|
|
(self.webpackChunk=self.webpackChunk||[]).push([[9572],{89489:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},59477:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},40001:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},49198:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},73331:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},15277:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},52671:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},8657:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},56082:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},33853:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},12893:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},15075:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},43531:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},61485:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},38819:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},47472:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(qt,ce){return jt.createElement(Ut.Z,(0,Ot.Z)({},qt,{ref:ce,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt},37036:function(){"use strict"},88010:function(En,yn){"use strict";yn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},84287:function(En,yn,xt){"use strict";var Ot=xt(59301),jt=Object.defineProperty,Qt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,pe=(we,qt,ce)=>qt in we?jt(we,qt,{enumerable:!0,configurable:!0,writable:!0,value:ce}):we[qt]=ce,Nt=(we,qt)=>{for(var ce in qt||(qt={}))Me.call(qt,ce)&&pe(we,ce,qt[ce]);if(Qt)for(var ce of Qt(qt))Ut.call(qt,ce)&&pe(we,ce,qt[ce]);return we};const Ie=we=>React.createElement("svg",Nt({className:"jiangxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},we),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143z",fill:"#98BDF7"}),React.createElement("path",{d:"m248.686 803.182-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#145DFF"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#98BDF7"}));yn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Im0yNDguNjg2IDgwMy4xODItNjUuODI5IDc1LjkyMlY2NTguMjg2aC03My4xNDN2MjIwLjgxOGwtNjUuODI4LTc1Ljk5NUwwIDg1MS4zODMgMTQ2LjI4NiAxMDI0IDI5Mi41NyA4NTEuNTN6IiBmaWxsPSIjMTQ1REZGIi8+PHBhdGggZD0iTTE0Ni4yODYgMCAwIDE1OC43Mmw0My44ODYgNTUuMjIzIDY1LjgyOC03NS45MjJ2MjI3LjY5M2g3My4xNDNWMTM4LjAyMWw2NS44MjkgNzUuOTIyIDQzLjg4NS01NS4yMjN6IiBmaWxsPSIjOThCREY3Ii8+PC9zdmc+"},86087:function(En,yn,xt){"use strict";var Ot=xt(59301),jt=Object.defineProperty,Qt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,pe=(we,qt,ce)=>qt in we?jt(we,qt,{enumerable:!0,configurable:!0,writable:!0,value:ce}):we[qt]=ce,Nt=(we,qt)=>{for(var ce in qt||(qt={}))Me.call(qt,ce)&&pe(we,ce,qt[ce]);if(Qt)for(var ce of Qt(qt))Ut.call(qt,ce)&&pe(we,ce,qt[ce]);return we};const Ie=we=>React.createElement("svg",Nt({className:"shengxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},we),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143zM248.686 803.182l-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#98BDF7"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#145DFF"}));yn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzek0yNDguNjg2IDgwMy4xODJsLTY1LjgyOSA3NS45MjJWNjU4LjI4NmgtNzMuMTQzdjIyMC44MThsLTY1LjgyOC03NS45OTVMMCA4NTEuMzgzIDE0Ni4yODYgMTAyNCAyOTIuNTcgODUxLjUzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Ik0xNDYuMjg2IDAgMCAxNTguNzJsNDMuODg2IDU1LjIyMyA2NS44MjgtNzUuOTIydjIyNy42OTNoNzMuMTQzVjEzOC4wMjFsNjUuODI5IDc1LjkyMiA0My44ODUtNTUuMjIzeiIgZmlsbD0iIzE0NURGRiIvPjwvc3ZnPg=="},74413:function(){"use strict";function En(Tt,et,nt,ht){nt===void 0&&(nt=0),ht===void 0&&(ht=1/0),this._name=Tt,this._defaultValue=et,this._minimum=nt,this._maximum=ht}Object.defineProperty(En.prototype,"name",{get:function(){return this._name},set:function(Tt){if(typeof Tt!="string"||Tt==="")throw new Error("Shape name must be a valid string.");this._name=Tt}}),Object.defineProperty(En.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Tt){if(typeof Tt!="number"||isNaN(Tt))throw new Error("The default value must be a real number, not: "+Tt);this._defaultValue=Tt}}),Object.defineProperty(En.prototype,"minimum",{get:function(){return this._minimum},set:function(Tt){if(typeof Tt!="number"||isNaN(Tt))throw new Error("Minimum must be a real number, not: "+Tt);this._minimum=Tt}}),Object.defineProperty(En.prototype,"maximum",{get:function(){return this._maximum},set:function(Tt){if(typeof Tt!="number"||isNaN(Tt))throw new Error("Maximum must be a real number, not: "+Tt);this._maximum=Tt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Tt,et){var nt=go.Shape._FigureParameters[Tt];return nt?nt[et]:null},go.Shape.setFigureParameter=function(Tt,et,nt){if(!(nt instanceof En))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+nt);if(nt.defaultValue<nt.minimum||nt.defaultValue>nt.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+nt.defaultValue);var ht=go.Shape._FigureParameters[Tt];ht||(ht=[],go.Shape._FigureParameters[Tt]=ht),ht[et]=nt};var yn=[];function xt(Tt,et){var nt=yn.pop();return nt===void 0?new go.Point(Tt,et):(nt.x=Tt,nt.y=et,nt)}function Ot(){var Tt=yn.pop();return Tt===void 0?new go.Point:Tt}function jt(Tt){yn.push(Tt)}function Qt(Tt,et,nt,ht,st,gt,vt,wt,Ft){Ft||(Ft=new go.Point);var It=Tt-nt,At=st-vt,Wt=NaN,re=NaN;if(It===0)if(At===0)Tt===nt&&(Wt=Tt,re=et);else{var ne=(gt-wt)/At,me=gt-ne*st;Wt=Tt,re=ne*Wt+me}else if(At===0){var Vt=(et-ht)/It,Le=et-Vt*Tt;Wt=st,re=Vt*Wt+Le}else{var Vt=(et-ht)/It,ne=(gt-wt)/At,Le=et-Vt*Tt,me=gt-ne*st;Wt=(me-Le)/(Vt-ne),re=Vt*Wt+Le}return Ft.x=Wt,Ft.y=re,Ft}function Me(Tt,et,nt,ht,st,gt,vt,wt,Ft,It,At,Wt,re,ne){var me=1-Ft,Vt=Ft,Le=Tt*me+nt*Vt,he=et*me+ht*Vt,Ge=nt*me+st*Vt,Ke=ht*me+gt*Vt,Ve=st*me+vt*Vt,sn=gt*me+wt*Vt,Mn=Le*me+Ge*Vt,xe=he*me+Ke*Vt,Ht=Ge*me+Ve*Vt,Je=Ke*me+sn*Vt,Tn=Mn*me+Ht*Vt,An=xe*me+Je*Vt;It.x=Le,It.y=he,At.x=Mn,At.y=xe,Wt.x=Tn,Wt.y=An,re.x=Ht,re.y=Je,ne.x=Ve,ne.y=sn}var Ut=new go.Spot(.156,.156),pe=new go.Spot(.844,.844),Nt=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new En("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=5),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var st=ht*Nt,gt=new go.Geometry().add(new go.PathFigure(ht,0,!0).add(new go.PathSegment(go.PathSegment.Line,et-ht,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,ht,et-st,0,et,st)).add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)).add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,nt-st,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,ht,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,st,nt,0,nt-st)).add(new go.PathSegment(go.PathSegment.Line,0,ht)).add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,st,st,0).close()));return st>1&&(gt.spot1=new go.Spot(0,0,st,st),gt.spot2=new go.Spot(1,1,-st,-st)),gt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Tt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=nt/2,ht.endX=et,ht.endY=nt/2,ht}),go.Shape.defineFigureGenerator("LineV",function(Tt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=et/2,ht.startY=0,ht.endX=et/2,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt/2,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("XLine",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LineRight",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.25*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)))}),go.Shape.defineFigureGenerator("LineDown",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.25*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)))}),go.Shape.defineFigureGenerator("LineLeft",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.75*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)))}),go.Shape.defineFigureGenerator("LineUp",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.75*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Tt,et,nt){var ht=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ht*et,(1-ht)*nt,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Move,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt/2)).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("CircleLine",function(Tt,et,nt){var ht=et/2,st=new go.Geometry().add(new go.PathFigure(et,et/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ht,ht,ht,ht).close()));return st.spot1=Ut,st.spot2=pe,st.defaultStretch=go.GraphObject.Uniform,st}),go.Shape.defineFigureGenerator("Line1",function(Tt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=0,ht.endX=et,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("Line2",function(Tt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=et,ht.startY=0,ht.endX=0,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("Curve1",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Nt*et,0,et,(1-Nt)*nt)))}),go.Shape.defineFigureGenerator("Curve2",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,0,Nt*nt,(1-Nt)*et,nt)))}),go.Shape.defineFigureGenerator("Curve3",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,Nt*nt,Nt*et,nt)))}),go.Shape.defineFigureGenerator("Curve4",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,(1-Nt)*et,0,0,(1-Nt)*nt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new En("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)?ht=.1:ht<-1?ht=-1:ht>1&&(ht=1);var st=Math.abs(ht)*et;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),st<et/2&>.setSpots(st/et,0,(et-st)/et,1),gt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new En("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)?ht=10:ht<-et?ht=-et:ht>et&&(ht=et);var st=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),st<et/2&>.setSpots(st/et,0,(et-st)/et,1),gt}}),go.Shape.setFigureParameter("Trapezoid1",0,new En("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)?ht=.2:ht<.5?ht=-.5:ht>.5&&(ht=.5);var st=Math.abs(ht)*et;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),st<et/2&>.setSpots(st/et,0,(et-st)/et,1),gt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new En("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)?ht=20:ht<-et?ht=-et/2:ht>et&&(ht=et/2);var st=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),st<et/2&>.setSpots(st/et,0,(et-st)/et,1),gt}}),go.Shape.setFigureParameter("ManualOperation",0,new En("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)?ht=10:ht<-et?ht=-et/2:ht>et&&(ht=et/2);var st=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())):gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())),st<et/2&>.setSpots(st/et,0,(et-st)/et,1),gt}});var Ie=[];function we(){var Tt=Ie.pop();return Tt===void 0?[]:Tt}function qt(Tt){Tt.length=0,Ie.push(Tt)}function ce(Tt){for(var et=we(),nt=.5,ht=.5,st=Math.PI*1.5,gt=0,vt=0;vt<Tt;vt++)gt=2*Math.PI/Tt*vt+st,et[vt]=new go.Point(ht+nt*Math.cos(gt),ht+nt*Math.sin(gt));return et.push(et[0]),et}function Ce(Tt){var et=Be(Tt),nt=we();nt[0]=et[0];for(var ht=1,st=1;ht<et.length;ht+=2,st+=3)nt[st]=et[ht],nt[st+1]=et[ht],nt[st+2]=et[ht+1];return qt(et),nt}function Be(Tt){for(var et=ce(Tt),nt=we(),ht=Math.floor(et.length/2),st=et.length-1,gt=Tt%2===0?2:1,vt=0;vt<st;vt++){var wt=et[vt],Ft=et[vt+1],It=et[(ht+vt-1)%st],At=et[(ht+vt+gt)%st];nt[vt*2]=wt,nt[vt*2+1]=Qt(wt.x,wt.y,It.x,It.y,Ft.x,Ft.y,At.x,At.y,new go.Point)}return nt[nt.length]=nt[0],qt(et),nt}go.Shape.defineFigureGenerator("Pentagon",function(Tt,et,nt){var ht=ce(5),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<5;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.2,.22),st.spot2=new go.Spot(.8,.9),st}),go.Shape.defineFigureGenerator("Hexagon",function(Tt,et,nt){var ht=ce(6),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<6;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.07,.25),st.spot2=new go.Spot(.93,.75),st}),go.Shape.defineFigureGenerator("Heptagon",function(Tt,et,nt){var ht=ce(7),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<7;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.2,.15),st.spot2=new go.Spot(.8,.85),st}),go.Shape.defineFigureGenerator("Octagon",function(Tt,et,nt){var ht=ce(8),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<8;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.15,.15),st.spot2=new go.Spot(.85,.85),st}),go.Shape.defineFigureGenerator("Nonagon",function(Tt,et,nt){var ht=ce(9),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<9;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.17,.13),st.spot2=new go.Spot(.82,.82),st}),go.Shape.defineFigureGenerator("Decagon",function(Tt,et,nt){var ht=ce(10),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<10;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.16,.16),st.spot2=new go.Spot(.84,.84),st}),go.Shape.defineFigureGenerator("Dodecagon",function(Tt,et,nt){var ht=ce(12),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<12;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.16,.16),st.spot2=new go.Spot(.84,.84),st}),go.Shape.defineFigureGenerator("FivePointedStar",function(Tt,et,nt){var ht=Be(5),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<10;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.266,.333),st.spot2=new go.Spot(.733,.733),st}),go.Shape.defineFigureGenerator("SixPointedStar",function(Tt,et,nt){var ht=Be(6),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<12;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.17,.25),st.spot2=new go.Spot(.83,.75),st}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Tt,et,nt){var ht=Be(7),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<14;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.222,.277),st.spot2=new go.Spot(.777,.666),st}),go.Shape.defineFigureGenerator("EightPointedStar",function(Tt,et,nt){var ht=Be(8),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<16;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.25,.25),st.spot2=new go.Spot(.75,.75),st}),go.Shape.defineFigureGenerator("NinePointedStar",function(Tt,et,nt){var ht=Be(9),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<18;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.222,.277),st.spot2=new go.Spot(.777,.666),st}),go.Shape.defineFigureGenerator("TenPointedStar",function(Tt,et,nt){var ht=Be(10),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<20;vt++)gt.add(new go.PathSegment(go.PathSegment.Line,ht[vt].x*et,ht[vt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),qt(ht),st.spot1=new go.Spot(.281,.261),st.spot2=new go.Spot(.723,.748),st}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Tt,et,nt){var ht=Ce(5),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),qt(ht),st.spot1=new go.Spot(.222,.277),st.spot2=new go.Spot(.777,.777),st}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Tt,et,nt){var ht=Ce(6),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),qt(ht),st.spot1=new go.Spot(.17,.222),st.spot2=new go.Spot(.833,.777),st}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Tt,et,nt){var ht=Ce(7),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),qt(ht),st.spot1=new go.Spot(.222,.222),st.spot2=new go.Spot(.777,.777),st}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Tt,et,nt){var ht=Ce(8),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),qt(ht),st.spot1=new go.Spot(.222,.222),st.spot2=new go.Spot(.777,.777),st}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Tt,et,nt){var ht=Ce(9),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),qt(ht),st.spot1=new go.Spot(.222,.222),st.spot2=new go.Spot(.777,.777),st}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Tt,et,nt){var ht=Ce(10),st=new go.Geometry,gt=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);st.add(gt);for(var vt=1;vt<ht.length;vt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ht[vt+2].x*et,ht[vt+2].y*nt,ht[vt].x*et,ht[vt].y*nt,ht[vt+1].x*et,ht[vt+1].y*nt));return gt.segments.last().close(),qt(ht),st.spot1=new go.Spot(.222,.222),st.spot2=new go.Spot(.777,.777),st}),go.Shape.setFigureParameter("FramedRectangle",0,new En("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new En("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN,st=Tt?Tt.parameter2:NaN;isNaN(ht)&&(ht=8),isNaN(st)&&(st=8);var gt=new go.Geometry,vt=new go.PathFigure(0,0,!0);return gt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht<et/2&&st<nt/2&&(vt.add(new go.PathSegment(go.PathSegment.Move,ht,st)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,nt-st)),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,nt-st)),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,st).close())),gt.setSpots(0,0,1,1,ht,st,-ht,-st),gt}),go.Shape.setFigureParameter("Ring",0,new En("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=8);var st=et/2,gt=new go.Geometry,vt=new go.PathFigure(et,et/2,!0);gt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Arc,0,360,st,st,st,st).close());var wt=Math.max(st-ht,0);return wt>0&&(vt.add(new go.PathSegment(go.PathSegment.Move,et/2+wt,et/2)),vt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,st,st,wt,wt).close())),gt.spot1=Ut,gt.spot2=pe,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.08034461*et,.1944299*nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*et,.05349299*nt,-.09239631*et,.07836421*nt,.1406031*et,-.0542823*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*et,.074219*nt,.2450511*et,-.00697547*nt,.3776197*et,-.01112067*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*et,.07004196*nt,.4539471*et,0,.6066018*et,-.02526587*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*et,.08370865*nt,.6914277*et,-.01904177*nt,.8921095*et,-.01220843*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*et,.3194596*nt,1.036446*et,.04105738*nt,1.020377*et,.3022052*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*et,.562044*nt,1.04448*et,.360238*nt,.992256*et,.5219009*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*et,.8217117*nt,1.032337*et,.5771781*nt,1.018411*et,.8120651*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*et,.9156953*nt,1.028411*et,.9571472*nt,.8556702*et,1.052487*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*et,.9310455*nt,.7431877*et,1.009325*nt,.5624123*et,1.021761*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*et,.9344623*nt,.4820677*et,1.031761*nt,.3030112*et,1.002796*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.870098*nt,.2329994*et,1.01518*nt,.03213784*et,1.01518*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*et,.6545475*nt,-.02812061*et,.9032597*nt,-.01205169*et,.6835638*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*et,.4265613*nt,-.01812061*et,.6089503*nt,-.00606892*et,.4555777*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.1944299*nt,-.01606892*et,.3892545*nt,-.01205169*et,.1944299*nt))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Tt,et,nt){var ht=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ht*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,et,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,ht*nt).close())).setSpots(ht/2,ht/2,1-ht/2,1-ht/2)}),go.Shape.setFigureParameter("Pie",0,new En("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new En("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN,st=Tt?Tt.parameter2:NaN;isNaN(ht)&&(ht=0),isNaN(st)&&(st=315);var gt=ht%360;gt<0&&(gt+=360);var vt=st%360,wt=Math.min(et,nt)/2;return new go.Geometry().add(new go.PathFigure(wt,wt).add(new go.PathSegment(go.PathSegment.Arc,gt,vt,wt,wt,wt,wt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Tt,et,nt){var ht=Nt/Math.SQRT2*.5,st=Math.SQRT2/2,gt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,st*et,gt*nt,et,(1-ht)*nt,(st+ht)*et,(gt+ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()))}),go.Shape.setFigureParameter("ThickCross",0,new En("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30);var st=Math.min(ht,et)/2,gt=et/2,vt=nt/2;return new go.Geometry().add(new go.PathFigure(gt-st,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+st,0)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt-st)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt-st).close()))}),go.Shape.setFigureParameter("ThinCross",0,new En("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var st=Math.min(ht,et)/2,gt=et/2,vt=nt/2;return new go.Geometry().add(new go.PathFigure(gt-st,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+st,0)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt-st)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt-st).close()))}),go.Shape.setFigureParameter("ThickX",0,new En("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;if((isNaN(ht)||ht<0)&&(ht=30),et===0||nt===0){var st=new go.Geometry(go.Geometry.Rectangle);return st.startX=0,st.startY=0,st.endX=et,st.endY=nt,st}else{var gt=et/2,vt=nt/2,wt=Math.atan2(nt,et),Ft=ht-Math.min(Math.cos(wt)*ht/2,gt),It=ht-Math.min(Math.sin(wt)*ht/2,vt),st=new go.Geometry,At=new go.PathFigure(Ft,0,!0);return st.add(At),At.add(new go.PathSegment(go.PathSegment.Line,gt,.2*nt)),At.add(new go.PathSegment(go.PathSegment.Line,et-Ft,0)),At.add(new go.PathSegment(go.PathSegment.Line,et,It)),At.add(new go.PathSegment(go.PathSegment.Line,.8*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,et,nt-It)),At.add(new go.PathSegment(go.PathSegment.Line,et-Ft,nt)),At.add(new go.PathSegment(go.PathSegment.Line,gt,.8*nt)),At.add(new go.PathSegment(go.PathSegment.Line,Ft,nt)),At.add(new go.PathSegment(go.PathSegment.Line,0,nt-It)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,0,It).close()),st}}),go.Shape.setFigureParameter("ThinX",0,new En("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var st=new go.Geometry,gt=new go.PathFigure(.1*et,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt).close()),st}),go.Shape.setFigureParameter("SquareIBeam",0,new En("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.2);var st=new go.Geometry,gt=new go.PathFigure(0,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*nt).close()),st}),go.Shape.setFigureParameter("RoundedIBeam",0,new En("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.5);var st=new go.Geometry,gt=new go.PathFigure(0,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Math.abs(1-ht)*et,.25*nt,Math.abs(1-ht)*et,.75*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*et,.75*nt,ht*et,.25*nt).close()),st}),go.Shape.defineFigureGenerator("HalfEllipse",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,Nt*et,0,et,(.5-Nt/2)*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,(.5+Nt/2)*nt,Nt*et,nt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,0,et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*et,.75*nt,.5*et,.25*nt).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,.1*et,.8*nt,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,0,0,.45*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.55*et,0,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.5*nt,.9*et,.8*nt).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*et,.01*nt)).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.6*et,.2*nt,et,.25*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.7*nt,et,.8*nt,.6*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,.5*et,.75*nt,.55*et,.95*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.7*nt,.45*et,.95*nt,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.4*et,.8*nt,0,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.49*et,.01*nt,0,.25*nt,.4*et,.2*nt).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.4*et,.6*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.15*et,nt,.5*et,.75*nt,.45*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.6*nt,.55*et,.95*nt,.5*et,.75*nt));var gt=.2,vt=.3,wt=0,Ft=gt*Nt;return st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5+gt+wt)*nt,(.5-gt+vt)*et,(.5+Ft+wt)*nt,(.5-Ft+vt)*et,(.5+gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+vt)*et,(.5+wt)*nt,(.5+Ft+vt)*et,(.5+gt+wt)*nt,(.5+gt+vt)*et,(.5+Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+wt)*nt,(1-.5+gt+vt)*et,(.5-Ft+wt)*nt,(.5+Ft+vt)*et,(.5-gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.65*et,.36771243*nt,(.5-Ft+vt)*et,(.5-gt+wt)*nt,(.5-gt+vt+.05)*et,(.5-Ft+wt-.02)*nt)),gt=.2,vt=0,wt=-.3,Ft=gt*Nt,st.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+vt)*et,(.5+wt)*nt,(.5+Ft+vt)*et,(.5+gt+wt)*nt,(.5+gt+vt)*et,(.5+Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+wt)*nt,(1-.5+gt+vt)*et,(.5-Ft+wt)*nt,(.5+Ft+vt)*et,(.5-gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+vt)*et,(.5+wt)*nt,(.5-Ft+vt)*et,(.5-gt+wt)*nt,(.5-gt+vt)*et,(.5-Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Ft+vt)*et,(.5+gt+wt)*nt,(.5-gt+vt)*et,(.5+Ft+wt)*nt,(.5-Ft+vt)*et,(.5+gt+wt)*nt)),gt=.2,vt=-.3,wt=0,Ft=gt*Nt,st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+wt)*nt,(1-.5+gt+vt-.05)*et,(.5-Ft+wt-.02)*nt,(.5+Ft+vt)*et,(.5-gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+vt)*et,(.5+wt)*nt,(.5-Ft+vt)*et,(.5-gt+wt)*nt,(.5-gt+vt)*et,(.5-Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5+gt+wt)*nt,(.5-gt+vt)*et,(.5+Ft+wt)*nt,(.5-Ft+vt)*et,(.5+gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.6*nt,(.5+Ft+vt)*et,(.5+gt+wt)*nt,(.5+gt+vt)*et,(.5+Ft+wt)*nt).close()),ht.setSpots(.06,.33,.93,.68),ht}),go.Shape.defineFigureGenerator("YinYang",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.5,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*.5,et*.5,et*.5,et*.5)),st.add(new go.PathSegment(go.PathSegment.Arc,90,-180,et*.5,et*.75,et*.25,et*.25)),st.add(new go.PathSegment(go.PathSegment.Arc,90,180,et*.5,et*.25,et*.25,et*.25));var gt=.1,vt=.5,wt=.25;return st.add(new go.PathSegment(go.PathSegment.Move,(vt+gt)*et,wt*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,0,-360,et*vt,nt*wt,gt*et,gt*et).close()),st=new go.PathFigure(et*.5,0,!1),ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*.5,et*.5,et*.5,et*.5)),wt=.75,st=new go.PathFigure((vt+gt)*et,wt*nt,!0),ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,0,360,et*vt,nt*wt,gt*et,gt*et).close()),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Peace",function(Tt,et,nt){var ht=.8535533905932737,st=.5*et,gt=.5*nt;return new go.Geometry().add(new go.PathFigure(st,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,st,gt,st,gt)).add(new go.PathSegment(go.PathSegment.Line,st,nt)).add(new go.PathSegment(go.PathSegment.Move,st,gt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Move,st,gt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,ht*nt)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=.5,vt=.5,wt=.5,Ft=new go.PathFigure(vt*et,(wt-gt)*nt);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),gt=.4,st=Nt*.4;var It=Ot(),At=Ot(),Wt=Ot(),re=Ot();Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.42,It,At,Wt,re,re);var ne=Ot(),me=Ot(),Vt=Ot();Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.58,re,re,Vt,ne,me);var Le=Ot(),he=Ot(),Ge=Ot();Me(vt,wt+gt,vt-st,wt+gt,vt-gt,wt+st,vt-gt,wt,.42,Le,he,Ge,re,re);var Ke=Ot(),Ve=Ot(),sn=Ot();return Me(vt,wt+gt,vt-st,wt+gt,vt-gt,wt+st,vt-gt,wt,.58,re,re,sn,Ke,Ve),Ft.add(new go.PathSegment(go.PathSegment.Move,sn.x*et,sn.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,Ke.x*et,Ke.y*nt,Ve.x*et,Ve.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Wt.x*et,Wt.y*nt,It.x*et,It.y*nt,At.x*et,At.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,sn.x*et,sn.y*nt).close()),Ft.add(new go.PathSegment(go.PathSegment.Move,Ge.x*et,Ge.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,Vt.x*et,Vt.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,ne.x*et,ne.y*nt,me.x*et,me.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Ge.x*et,Ge.y*nt,Le.x*et,Le.y*nt,he.x*et,he.y*nt).close()),jt(It),jt(At),jt(Wt),jt(re),jt(ne),jt(me),jt(Vt),jt(Le),jt(he),jt(Ge),jt(Ke),jt(Ve),jt(sn),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Fragile",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*et,0)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.29*et,.33*nt)).add(new go.PathSegment(go.PathSegment.Line,.35*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.5*nt,et,.25*nt,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.5*nt,0,.25*nt).close()))}),go.Shape.setFigureParameter("HourGlass",0,new En("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30),ht>et&&(ht=et);var st=(et-ht)/2,gt=st+ht;return new go.Geometry().add(new go.PathFigure(gt,.5*nt).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,st,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.55*nt).add(new go.PathSegment(go.PathSegment.Line,.6*et,0)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.55*nt).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.4,gt=.4,vt=.5,wt=.5,Ft=Ot(),It=Ot(),At=Ot(),Wt=Ot(),re=new go.PathFigure((vt-gt)*et,wt*nt,!1);ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.44,At,Wt,It,Ft,Ft),re.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,At.x*et,At.y*nt,Wt.x*et,Wt.y*nt));var ne=xt(It.x,It.y);Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.56,Ft,Ft,It,At,Wt);var me=xt(It.x,It.y);re.add(new go.PathSegment(go.PathSegment.Line,(ne.x*.1+.95*.9)*et,ne.y*.1*nt)),re.add(new go.PathSegment(go.PathSegment.Line,.85*et,ne.y*.1*nt)),re.add(new go.PathSegment(go.PathSegment.Line,.85*et,0)),re.add(new go.PathSegment(go.PathSegment.Line,et,0)),re.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),re.add(new go.PathSegment(go.PathSegment.Line,(me.x*.1+.9)*et,.15*nt)),re.add(new go.PathSegment(go.PathSegment.Line,(me.x*.1+.9)*et,(me.y*.1+.05*.9)*nt)),re.add(new go.PathSegment(go.PathSegment.Line,me.x*et,me.y*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,At.x*et,At.y*nt,Wt.x*et,Wt.y*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),gt=.35,st=Nt*.35;var Vt=new go.PathFigure(vt*et,(wt-gt)*nt,!1);ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt));var Le=new go.PathFigure((vt-gt)*et,wt*nt,!1);return ht.add(Le),jt(Ft),jt(It),jt(At),jt(Wt),jt(ne),jt(me),ht.spot1=new go.Spot(.202,.257),ht.spot2=new go.Spot(.792,.739),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("GenderFemale",function(Tt,et,nt){var ht=new go.Geometry,st=.375,gt=0,vt=-.125,wt=st*Nt,Ft=new go.PathFigure((.525+gt)*et,(.5+st+vt)*nt,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+st+gt)*et,(.5+vt)*nt,(.5+wt+gt)*et,(.5+st+vt)*nt,(.5+st+gt)*et,(.5+wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-st+vt)*nt,(1-.5+st+gt)*et,(.5-wt+vt)*nt,(.5+wt+gt)*et,(.5-st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5-st+gt)*et,(.5+vt)*nt,(.5-wt+gt)*et,(.5-st+vt)*nt,(.5-st+gt)*et,(.5-wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*et,(.5+st+vt)*nt,(.5-st+gt)*et,(.5+wt+vt)*nt,(.5-wt+gt)*et,(.5+st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.475*et,.85*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.425*et,.85*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.425*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.475*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.475*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.525*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.525*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.575*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.575*et,.85*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt).close()),st=.325,gt=0,vt=-.125,wt=st*Nt;var Ft=new go.PathFigure((1-.5+st+gt)*et,(.5+vt)*nt,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5+st+vt)*nt,(.5+st+gt)*et,(.5+wt+vt)*nt,(.5+wt+gt)*et,(.5+st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5-st+gt)*et,(.5+vt)*nt,(.5-wt+gt)*et,(.5+st+vt)*nt,(.5-st+gt)*et,(.5+wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-st+vt)*nt,(.5-st+gt)*et,(.5-wt+vt)*nt,(.5-wt+gt)*et,(.5-st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+st+gt)*et,(.5+vt)*nt,(.5+wt+gt)*et,(.5-st+vt)*nt,(1-.5+st+gt)*et,(.5-wt+vt)*nt));var Ft=new go.PathFigure((.525+gt)*et,(.5+st+vt)*nt,!1);return ht.add(Ft),ht.spot1=new go.Spot(.232,.136),ht.spot2=new go.Spot(.682,.611),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicImplies",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,ht*et,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,nt))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Tt,et,nt){var ht=new go.Geometry().add(new go.PathFigure(.5*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*et,.5*nt,.5*et,.5*nt)));return ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicTruth",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Tt,et,nt){var ht=.5;return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,0,ht*nt)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ht*et,ht*nt,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Tt,et,nt){var ht=.5;return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ht*et,ht*nt,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new En("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new En("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=.3);var gt=(1-ht)*et,vt=(.5-st/2)*nt,wt=(.5+st/2)*nt,Ft=new go.Geometry,It=new go.PathFigure(0,vt,!0);Ft.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt,vt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,0)),It.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,wt)),It.add(new go.PathSegment(go.PathSegment.Line,0,wt).close()),Ft.spot1=new go.Spot(0,vt/nt);var At=Qt(0,wt/nt,1,wt/nt,gt/et,1,1,.5,Ot());return Ft.spot2=new go.Spot(At.x,At.y),jt(At),Ft}),go.Shape.setFigureParameter("Arrow2",0,new En("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new En("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=30),ht>et&&(ht=et);var st=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=30),st=Math.min(st,nt/2);var gt=et-ht,vt=(nt-st)/2,wt=vt+st,Ft=new go.Geometry,It=new go.PathFigure(0,vt,!0);Ft.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt,vt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,0)),It.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,wt)),It.add(new go.PathSegment(go.PathSegment.Line,0,wt).close()),Ft.spot1=new go.Spot(0,vt/nt);var At=Qt(0,wt/nt,1,wt/nt,gt/et,1,1,.5,Ot());return Ft.spot2=new go.Spot(At.x,At.y),jt(At),Ft}),go.Shape.defineFigureGenerator("Chevron",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("DoubleArrow",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.214*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,1*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.786*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,1*nt).close()),ht}),go.Shape.setFigureParameter("DoubleEndArrow",0,new En("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close());var Ft=Qt(0,.5,.3,0,0,st/nt,.1,st/nt,Ot());return vt.spot1=new go.Spot(Ft.x,Ft.y),Ft=Qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ft),vt.spot2=new go.Spot(Ft.x,Ft.y),jt(Ft),vt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new En("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new En("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=40);var st=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=100);var gt=(nt-ht)/2,vt=gt+ht,wt=(nt-st)/2,Ft=wt+st;(ht>nt||st>nt)&&(st>ht?(ht=ht*nt/st,gt=(nt-ht)/2,vt=gt+ht,wt=0,Ft=nt):(gt=0,vt=nt,wt=0,Ft=nt));var It=new go.Geometry,At=new go.PathFigure(et,.5*nt,!0);It.add(At),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,Ft)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,.3*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,.3*et,Ft)),At.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.3*et,wt)),At.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,wt).close());var Wt=Qt(0,.5,.3,wt/nt,0,gt/nt,1,gt/nt,Ot());return It.spot1=new go.Spot(Wt.x,Wt.y),Wt=Qt(.7,Ft/nt,1,.5,0,vt/nt,1,vt/nt,Wt),It.spot2=new go.Spot(Wt.x,Wt.y),jt(Wt),It}),go.Shape.setFigureParameter("IBeamArrow",0,new En("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(0,st/nt);var Ft=Qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ot());return vt.spot2=new go.Spot(Ft.x,Ft.y),jt(Ft),vt}),go.Shape.setFigureParameter("IBeamArrow2",0,new En("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new En("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=40);var st=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=100);var gt=(nt-ht)/2,vt=gt+ht,wt=(nt-st)/2,Ft=wt+st;(ht>nt||st>nt)&&(st>ht?(ht=ht*nt/st,gt=(nt-ht)/2,vt=gt+ht,wt=0,Ft=nt):(gt=0,vt=nt,wt=0,Ft=nt));var It=new go.Geometry,At=new go.PathFigure(et,.5*nt,!0);It.add(At),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,Ft)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,Ft)),At.add(new go.PathSegment(go.PathSegment.Line,0,Ft)),At.add(new go.PathSegment(go.PathSegment.Line,0,wt)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,wt)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,wt).close()),It.spot1=new go.Spot(0,gt/nt);var Wt=Qt(.7,Ft/nt,1,.5,0,vt/nt,1,vt/nt,Ot());return It.spot2=new go.Spot(Wt.x,Wt.y),jt(Wt),It}),go.Shape.setFigureParameter("Pointer",0,new En("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.1);var st=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),st.spot1=new go.Spot(ht,.35);var vt=Qt(.2,.65,1,.65,0,1,1,.5,Ot());return st.spot2=new go.Spot(vt.x,vt.y),jt(vt),st}),go.Shape.setFigureParameter("RoundedPointer",0,new En("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*et,.75*nt,ht*et,.25*nt).close()),st.spot1=new go.Spot(ht,.35);var vt=Qt(0,.65,1,.65,0,1,1,.5,Ot());return st.spot2=new go.Spot(vt.x,vt.y),jt(vt),st}),go.Shape.setFigureParameter("SplitEndArrow",0,new En("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.4);var st=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(.2,.3);var Ft=Qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ot());return vt.spot2=new go.Spot(Ft.x,Ft.y),jt(Ft),vt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new En("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=50);var st=(nt-ht)/2,gt=st+ht;ht>nt&&(st=0,gt=nt);var vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(.2,st/nt);var Ft=Qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ot());return vt.spot2=new go.Spot(Ft.x,Ft.y),jt(Ft),vt}),go.Shape.setFigureParameter("SquareArrow",0,new En("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.7);var st=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,0).close()),st.spot1=go.Spot.TopLeft,st.spot2=new go.Spot(ht,1),st}),go.Shape.defineFigureGenerator("Cone1",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=Nt*.1,vt=new go.PathFigure(0,.9*nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-st)*et,nt,0,(.9+gt)*nt).close()),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.97),ht}),go.Shape.defineFigureGenerator("Cone2",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.9*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,nt,.85/.9*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt).close());var gt=new go.PathFigure(0,.9*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,.8*nt,.85/.9*et,.8*nt)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.82),ht}),go.Shape.defineFigureGenerator("Cube1",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var gt=new go.PathFigure(.5*et,nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.5,.85),ht}),go.Shape.defineFigureGenerator("Cube2",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.3*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,0).close());var gt=new go.PathFigure(0,.3*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.7,1),ht}),go.Shape.defineFigureGenerator("Cylinder1",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var st=new go.Geometry,gt=Nt*.5,vt=new go.PathFigure(0,ht,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Nt*ht,(.5-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,1*et,ht,(.5+gt)*et,0,1*et,Nt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,1*nt,1*et,nt-Nt*ht,(.5+gt)*et,1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-gt)*et,1*nt,0,nt-Nt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,0,ht));var wt=new go.PathFigure(et,ht,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,2*ht,1*et,2*ht-Nt*ht,(.5+gt)*et,2*ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht,(.5-gt)*et,2*ht,0,2*ht-Nt*ht)),st.spot1=new go.Spot(0,0,0,2*ht),st.spot2=new go.Spot(1,1),st}),go.Shape.defineFigureGenerator("Cylinder2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var st=new go.Geometry,gt=Nt*.5,vt=new go.PathFigure(0,nt-ht,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Nt*ht,(.5-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,ht,(.5+gt)*et,0,et,Nt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,nt-Nt*ht,(.5+gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-gt)*et,nt,0,nt-Nt*ht));var wt=new go.PathFigure(0,nt-ht,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt-2*ht,0,nt-ht-Nt*ht,(.5-gt)*et,nt-2*ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt-ht,(.5+gt)*et,nt-2*ht,et,nt-ht-Nt*ht)),st.spot1=new go.Spot(0,0),st.spot2=new go.Spot(1,1,0,-2*ht),st}),go.Shape.defineFigureGenerator("Cylinder3",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var st=new go.Geometry,gt=Nt*.5,vt=new go.PathFigure(ht,0,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Nt*ht,0,et,(.5-gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+gt)*nt,et-Nt*ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Nt*ht,nt,0,(.5+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*nt,Nt*ht,0));var wt=new go.PathFigure(ht,0,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,2*ht,.5*nt,ht+Nt*ht,0,2*ht,(.5-gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ht,nt,2*ht,(.5+gt)*nt,ht+Nt*ht,nt)),st.spot1=new go.Spot(0,0,2*ht,0),st.spot2=new go.Spot(1,1),st}),go.Shape.defineFigureGenerator("Cylinder4",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var st=new go.Geometry,gt=Nt*.5,vt=new go.PathFigure(et-ht,0,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Nt*ht,0,et,(.5-gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+gt)*nt,et-Nt*ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Nt*ht,nt,0,(.5+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*nt,Nt*ht,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0));var wt=new go.PathFigure(et-ht,0,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-2*ht,.5*nt,et-ht-Nt*ht,0,et-2*ht,(.5-gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et-2*ht,(.5+gt)*nt,et-ht-Nt*ht,nt)),st.spot1=new go.Spot(0,0),st.spot2=new go.Spot(1,1,-2*ht,0),st}),go.Shape.defineFigureGenerator("Prism1",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.25*et,.25*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(.25*et,.25*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.408,.172),ht.spot2=new go.Spot(.833,.662),ht}),go.Shape.defineFigureGenerator("Prism2",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.25*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(0,nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("Pyramid1",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt).close());var gt=new go.PathFigure(.5*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Pyramid2",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var gt=new go.PathFigure(.5*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Actor",function(Tt,et,nt){var ht=new go.Geometry,st=.2,gt=.1,vt=Nt*st,wt=Nt*gt,Ft=.5,It=.1,At=new go.PathFigure(Ft*et,(It+gt)*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-st)*et,It*nt,(Ft-vt)*et,(It+gt)*nt,(Ft-st)*et,(It+wt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-gt)*nt,(Ft-st)*et,(It-wt)*nt,(Ft-vt)*et,(It-gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+st)*et,It*nt,(Ft+vt)*et,(It-gt)*nt,(Ft+st)*et,(It-wt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+gt)*nt,(Ft+st)*et,(It+wt)*nt,(Ft+vt)*et,(It+gt)*nt));var Wt=.05,re=Nt*Wt;Ft=.05,It=.25;var ne=new go.PathFigure(.5*et,.2*nt,!0);return ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Line,.95*et,.2*nt)),Ft=.95,It=.25,ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+Wt)*et,It*nt,(Ft+re)*et,(It-Wt)*nt,(Ft+Wt)*et,(It-re)*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.85*et,.35*nt)),Wt=.025,re=Nt*Wt,Ft=.825,It=.35,ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Wt)*nt,(Ft+Wt)*et,(It-re)*nt,(Ft+re)*et,(It-Wt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-Wt)*et,It*nt,(Ft-re)*et,(It-Wt)*nt,(Ft-Wt)*et,(It-re)*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt)),Wt=.05,re=Nt*Wt,Ft=.5,It=.7,ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Wt)*nt,(Ft+Wt)*et,(It-re)*nt,(Ft+re)*et,(It-Wt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-Wt)*et,It*nt,(Ft-re)*et,(It-Wt)*nt,(Ft-Wt)*et,(It-re)*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.45*et,nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.2*et,.35*nt)),Wt=.025,re=Nt*Wt,Ft=.175,It=.35,ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Wt)*nt,(Ft+Wt)*et,(It-re)*nt,(Ft+re)*et,(It-Wt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-Wt)*et,It*nt,(Ft-re)*et,(It-Wt)*nt,(Ft-Wt)*et,(It-re)*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),Wt=.05,re=Nt*Wt,Ft=.05,It=.25,ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Wt)*nt,(Ft-Wt)*et,(It-re)*nt,(Ft-re)*et,(It-Wt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),ht.spot1=new go.Spot(.2,.2),ht.spot2=new go.Spot(.8,.65),ht}),go.Shape.setFigureParameter("Card",0,new En("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.2);var st=new go.Geometry,gt=new go.PathFigure(et,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,0).close()),st.spot1=new go.Spot(0,ht),st.spot2=go.Spot.BottomRight,st}),go.Shape.defineFigureGenerator("Collate",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt));var gt=new go.PathFigure(.5*et,.5*nt,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,.25),ht}),go.Shape.defineFigureGenerator("CreateRequest",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(0,st*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,st*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,(1-st)*nt)),ht}),go.Shape.defineFigureGenerator("Database",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=Nt*.1,vt=new go.PathFigure(et,.1*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-st)*et,nt,0,(.9+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+st)*et,0,et,(.1-gt)*nt));var wt=new go.PathFigure(et,.1*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+st)*et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-st)*et,.2*nt,0,(.1+gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+st)*et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-st)*et,.3*nt,0,(.2+gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.4*nt,et,(.3+gt)*nt,(.5+st)*et,.4*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,(.5-st)*et,.4*nt,0,(.3+gt)*nt)),ht.spot1=new go.Spot(0,.4),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("DataStorage",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.9*nt,.25*et,.1*nt).close()),ht.spot1=new go.Spot(.226,0),ht.spot2=new go.Spot(.81,1),ht}),go.Shape.defineFigureGenerator("DiskStorage",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=Nt*.1,vt=new go.PathFigure(et,.1*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-st)*et,nt,0,(.9+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+st)*et,0,et,(.1-gt)*nt));var wt=new go.PathFigure(et,.1*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+st)*et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-st)*et,.2*nt,0,(.1+gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+st)*et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-st)*et,.3*nt,0,(.2+gt)*nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("Display",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.25*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close()),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("DividedEvent",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)?st=.2:st<.15&&(st=.15);var gt=Nt*.2,vt=new go.PathFigure(0,.2*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,0,(.2-gt)*nt,(.2-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.2*nt,(.8+gt)*et,0,et,(.2-gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,nt,et,(.8+gt)*nt,(.8+gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*nt,(.2-gt)*et,nt,0,(.8+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt));var wt=new go.PathFigure(0,st*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,st*nt)),ht}),go.Shape.defineFigureGenerator("DividedProcess",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;(isNaN(st)||st<.1)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(0,st*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,st*nt)),ht}),go.Shape.defineFigureGenerator("Document",function(Tt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(0,.7*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;(isNaN(st)||st<.2)&&(st=.2);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(st*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,st*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,et,st*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,(1-st)*nt)),ht}),go.Shape.defineFigureGenerator("ExternalProcess",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var gt=new go.PathFigure(.1*et,.4*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.9*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.6*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.4*et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.9*nt)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("File",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(.75*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Interrupt",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt));var gt=new go.PathFigure(et,.5*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt));var vt=new go.PathFigure(et,.5*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("InternalStorage",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN,gt=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=.1),isNaN(gt)&&(gt=.1);var vt=new go.PathFigure(0,0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var wt=new go.PathFigure(st*et,0,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Move,0,gt*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt)),ht}),go.Shape.defineFigureGenerator("Junction",function(Tt,et,nt){var ht=new go.Geometry,st=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,vt=Nt*.5,wt=.5,Ft=new go.PathFigure(et,wt*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,nt,et,(wt+vt)*nt,(wt+vt)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,wt*nt,(wt-vt)*et,nt,0,(wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,0,0,(wt-vt)*nt,(wt-vt)*et,0)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,et,wt*nt,(wt+vt)*et,0,et,(wt-vt)*nt));var It=new go.PathFigure((gt+st)*et,(gt+st)*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt*et,gt*nt)),It.add(new go.PathSegment(go.PathSegment.Move,gt*et,(gt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Line,(gt+st)*et,gt*nt)),ht}),go.Shape.defineFigureGenerator("LinedDocument",function(Tt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(0,.7*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close());var gt=new go.PathFigure(.1*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.75*nt)),ht.spot1=new go.Spot(.1,0),ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("LoopLimit",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MagneticTape",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=.5,vt=new go.PathFigure(.5*et,nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-st)*et,nt,0,(gt+st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-st)*nt,(gt-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+st)*et,0,et,(gt-st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+.1)*et,.9*nt,et,(gt+st)*nt,(gt+st)*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.15,.15),ht.spot2=new go.Spot(.85,.8),ht}),go.Shape.defineFigureGenerator("ManualInput",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MessageFromUser",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.7);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,st*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.25);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,st*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,(1-st)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("MicroformRecording",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("MultiDocument",function(Tt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.44*nt,.96*et,.47*nt,.93*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.54*nt,.86*et,.57*nt,.83*et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.4*et,.4*nt,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,0).close());var gt=new go.PathFigure(.1*et,.2*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.44*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.8,.77),ht}),go.Shape.defineFigureGenerator("MultiProcess",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,.1*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close());var gt=new go.PathFigure(.2*et,.1*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.1*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),ht.spot1=new go.Spot(0,.2),ht.spot2=new go.Spot(.8,1),ht}),go.Shape.defineFigureGenerator("OfflineStorage",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=1-st,vt=new go.PathFigure(0,0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close());var wt=new go.PathFigure(.5*st*et,st*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*st)*et,st*nt)),ht}),go.Shape.defineFigureGenerator("OffPageConnector",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("Or",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=.5,vt=new go.PathFigure(et,gt*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+st)*nt,(gt+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-st)*et,nt,0,(gt+st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-st)*nt,(gt-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+st)*et,0,et,(gt-st)*nt));var wt=new go.PathFigure(et,.5*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),ht}),go.Shape.defineFigureGenerator("PaperTape",function(Tt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(0,.7*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.5*et,.6*nt,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ht.spot1=new go.Spot(0,.49),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN,gt=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=.1),isNaN(gt)&&(gt=.3);var vt=new go.PathFigure(0,0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN,gt=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=.1),isNaN(gt)&&(gt=.3);var vt=new go.PathFigure(0,0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Procedure",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure((1-st)*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,st*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),ht}),go.Shape.defineFigureGenerator("Process",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(st*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Sort",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var gt=new go.PathFigure(0,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.5),ht}),go.Shape.defineFigureGenerator("Start",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.25);var gt=new go.PathFigure(st*et,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt));var vt=new go.PathFigure(st*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-st)*et,nt)),ht.spot1=new go.Spot(st,0),ht.spot2=new go.Spot(1-st,1),ht}),go.Shape.defineFigureGenerator("Terminator",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.25*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt)),ht.spot1=new go.Spot(.23,0),ht.spot2=new go.Spot(.77,1),ht}),go.Shape.defineFigureGenerator("TransmittalTape",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,(1-st)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-st)*nt).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("AndGate",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(.5+st)*et,0,et,(.5-st)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.5+st)*nt,(.5+st)*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.55,1),ht}),go.Shape.defineFigureGenerator("Buffer",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Clock",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=.5,vt=new go.PathFigure(et,gt*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+st)*nt,(gt+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-st)*et,nt,0,(gt+st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-st)*nt,(gt-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+st)*et,0,et,(gt-st)*nt));var wt=new go.PathFigure(et,gt*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt));var Ft=new go.PathFigure(.8*et,.75*nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.6*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.6*et,.75*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.4*et,.75*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.4*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.2*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.2*et,.75*nt)),ht}),go.Shape.defineFigureGenerator("Ground",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.3*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),ht}),go.Shape.defineFigureGenerator("Inverter",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.1,gt=.1,vt=.9,wt=.5,Ft=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt));var It=new go.PathFigure((vt+gt)*et,wt*nt,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.4,.75),ht}),go.Shape.defineFigureGenerator("NandGate",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=Nt*.4,vt=Nt*.1,wt=.1,Ft=.9,It=.5,At=new go.PathFigure(.8*et,.5*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,.8*et,(.5+gt)*nt,(.4+st)*et,nt)),At.add(new go.PathSegment(go.PathSegment.Line,0,nt)),At.add(new go.PathSegment(go.PathSegment.Line,0,0)),At.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),At.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(.4+st)*et,0,.8*et,(.5-gt)*nt));var Wt=new go.PathFigure((Ft+wt)*et,It*nt,!0);return ht.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+wt)*nt,(Ft+wt)*et,(It+vt)*nt,(Ft+vt)*et,(It+wt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et,It*nt,(Ft-vt)*et,(It+wt)*nt,(Ft-wt)*et,(It+vt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-wt)*nt,(Ft-wt)*et,(It-vt)*nt,(Ft-vt)*et,(It-wt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et,It*nt,(Ft+vt)*et,(It-wt)*nt,(Ft+wt)*et,(It-vt)*nt)),ht.spot1=new go.Spot(0,.05),ht.spot2=new go.Spot(.55,.95),ht}),go.Shape.defineFigureGenerator("NorGate",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*st,vt=0,wt=.5,Ft=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.7*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(vt+gt)*et,(wt-st)*nt,.7*et,(wt-gt)*nt)),st=.1,gt=Nt*.1,vt=.9,wt=.5;var It=new go.PathFigure((vt-st)*et,wt*nt,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.6,.75),ht}),go.Shape.defineFigureGenerator("OrGate",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*st,vt=0,wt=.5,Ft=new go.PathFigure(0,0,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(vt+gt+gt)*et,(wt-st)*nt,.8*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.8*et,(wt+gt)*nt,(vt+gt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt).close()),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("XnorGate",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*st,vt=.2,wt=.5,Ft=new go.PathFigure(.1*et,0,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var It=new go.PathFigure(.8*et,.5*nt,!0);ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.7*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(vt+gt)*et,(wt-st)*nt,.7*et,(wt-gt)*nt)),st=.1,gt=Nt*.1,vt=.9,wt=.5;var At=new go.PathFigure((vt-st)*et,wt*nt,!0);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.65,.75),ht}),go.Shape.defineFigureGenerator("XorGate",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*st,vt=.2,wt=.5,Ft=new go.PathFigure(.1*et,0,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var It=new go.PathFigure(.2*et,0,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(vt+gt)*et,(wt-st)*nt,.9*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.9*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt).close()),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.8,.75),ht}),go.Shape.defineFigureGenerator("Capacitor",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("Resistor",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Inductor",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.1,gt=.1,vt=.1,wt=.5,Ft=new go.PathFigure((vt-st*.5)*et,nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.3,Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.5,Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.7,Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.9,Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st*.5)*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),ht}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=.5,vt=.5,wt=.5,Ft=new go.PathFigure((vt-gt)*et,wt*nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Move,(vt-gt+.1)*et,wt*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt-.1)*et,wt*nt,vt*et,(wt-gt)*nt,vt*et,(wt+gt)*nt)),ht}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.75*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("Diode",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Wifi",function(Tt,et,nt){var ht=new go.Geometry,st=et,gt=nt;et=et*.38,nt=nt*.6;var vt=Nt*.8,wt=.8,Ft=0,It=.5,At=(st-et)/2,Wt=(gt-nt)/2,re=new go.PathFigure(Ft*et+At,(It+wt)*nt+Wt,!0);ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et+At,It*nt+Wt,(Ft-vt)*et+At,(It+wt)*nt+Wt,(Ft-wt)*et+At,(It+vt)*nt+Wt)),re.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It-wt)*nt+Wt,(Ft-wt)*et+At,(It-vt)*nt+Wt,(Ft-vt)*et+At,(It-wt)*nt+Wt)),re.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt+vt*.5)*et+At,It*nt+Wt,Ft*et+At,(It-wt)*nt+Wt,(Ft-wt+vt*.5)*et+At,(It-vt)*nt+Wt)),re.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It+wt)*nt+Wt,(Ft-wt+vt*.5)*et+At,(It+vt)*nt+Wt,Ft*et+At,(It+wt)*nt+Wt).close()),vt=Nt*.4,wt=.4,Ft=.2,It=.5;var ne=new go.PathFigure(Ft*et+At,(It+wt)*nt+Wt,!0);ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et+At,It*nt+Wt,(Ft-vt)*et+At,(It+wt)*nt+Wt,(Ft-wt)*et+At,(It+vt)*nt+Wt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It-wt)*nt+Wt,(Ft-wt)*et+At,(It-vt)*nt+Wt,(Ft-vt)*et+At,(It-wt)*nt+Wt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt+vt*.5)*et+At,It*nt+Wt,Ft*et+At,(It-wt)*nt+Wt,(Ft-wt+vt*.5)*et+At,(It-vt)*nt+Wt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It+wt)*nt+Wt,(Ft-wt+vt*.5)*et+At,(It+vt)*nt+Wt,Ft*et+At,(It+wt)*nt+Wt).close()),vt=Nt*.2,wt=.2,Ft=.5,It=.5;var me=new go.PathFigure((Ft-wt)*et+At,It*nt+Wt,!0);ht.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It-wt)*nt+Wt,(Ft-wt)*et+At,(It-vt)*nt+Wt,(Ft-vt)*et+At,(It-wt)*nt+Wt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et+At,It*nt+Wt,(Ft+vt)*et+At,(It-wt)*nt+Wt,(Ft+wt)*et+At,(It-vt)*nt+Wt)),me.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It+wt)*nt+Wt,(Ft+wt)*et+At,(It+vt)*nt+Wt,(Ft+vt)*et+At,(It+wt)*nt+Wt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et+At,It*nt+Wt,(Ft-vt)*et+At,(It+wt)*nt+Wt,(Ft-wt)*et+At,(It+vt)*nt+Wt)),vt=Nt*.4,wt=.4,Ft=.8,It=.5;var Vt=new go.PathFigure(Ft*et+At,(It-wt)*nt+Wt,!0);ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et+At,It*nt+Wt,(Ft+vt)*et+At,(It-wt)*nt+Wt,(Ft+wt)*et+At,(It-vt)*nt+Wt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It+wt)*nt+Wt,(Ft+wt)*et+At,(It+vt)*nt+Wt,(Ft+vt)*et+At,(It+wt)*nt+Wt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt-vt*.5)*et+At,It*nt+Wt,Ft*et+At,(It+wt)*nt+Wt,(Ft+wt-vt*.5)*et+At,(It+vt)*nt+Wt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It-wt)*nt+Wt,(Ft+wt-vt*.5)*et+At,(It-vt)*nt+Wt,Ft*et+At,(It-wt)*nt+Wt).close()),vt=Nt*.8,wt=.8,Ft=1,It=.5;var Le=new go.PathFigure(Ft*et+At,(It-wt)*nt+Wt,!0);return ht.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et+At,It*nt+Wt,(Ft+vt)*et+At,(It-wt)*nt+Wt,(Ft+wt)*et+At,(It-vt)*nt+Wt)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It+wt)*nt+Wt,(Ft+wt)*et+At,(It+vt)*nt+Wt,(Ft+vt)*et+At,(It+wt)*nt+Wt)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt-vt*.5)*et+At,It*nt+Wt,Ft*et+At,(It+wt)*nt+Wt,(Ft+wt-vt*.5)*et+At,(It+vt)*nt+Wt)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It-wt)*nt+Wt,(Ft+wt-vt*.5)*et+At,(It-vt)*nt+Wt,Ft*et+At,(It-wt)*nt+Wt).close()),ht}),go.Shape.defineFigureGenerator("Email",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.54*nt)),ht}),go.Shape.defineFigureGenerator("Ethernet",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.35*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,0).close());var gt=new go.PathFigure(.1*et,nt,!0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var vt=new go.PathFigure(.6*et,nt,!0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt).close());var wt=new go.PathFigure(0,.5*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.75*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.6*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.6*nt)),ht}),go.Shape.defineFigureGenerator("Power",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.4,gt=.4,vt=.5,wt=.5,Ft=Ot(),It=Ot(),At=Ot(),Wt=Ot();Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.5,Ft,Ft,It,At,Wt);var re=xt(It.x,It.y),ne=new go.PathFigure(It.x*et,It.y*nt,!0);ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,At.x*et,At.y*nt,Wt.x*et,Wt.y*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),Me(vt-gt,wt,vt-gt,wt-st,vt-st,wt-gt,vt,wt-gt,.5,At,Wt,It,Ft,Ft),ne.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,At.x*et,At.y*nt,Wt.x*et,Wt.y*nt)),st=Nt*.3,gt=.3,Me(vt-gt,wt,vt-gt,wt-st,vt-st,wt-gt,vt,wt-gt,.5,At,Wt,It,Ft,Ft),ne.add(new go.PathSegment(go.PathSegment.Line,It.x*et,It.y*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,Wt.x*et,Wt.y*nt,At.x*et,At.y*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.5,Ft,Ft,It,At,Wt),ne.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,Wt.x*et,Wt.y*nt,At.x*et,At.y*nt).close());var ne=new go.PathFigure(.45*et,0,!0);return ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.55*et,.5*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.55*et,0).close()),jt(Ft),jt(It),jt(At),jt(Wt),jt(re),ht.spot1=new go.Spot(.25,.45),ht.spot2=new go.Spot(.75,.8),ht}),go.Shape.defineFigureGenerator("Fallout",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt/2,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,180,360,et/2,nt/2,et/2,nt/2));function gt(vt,wt,Ft){vt.add(new go.PathSegment(go.PathSegment.Move,(.3+wt)*et,(.8+Ft)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.5+wt)*et,(.5+Ft)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.1+wt)*et,(.5+Ft)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.3+wt)*et,(.8+Ft)*nt).close())}return gt(st,0,0),gt(st,.4,0),gt(st,.2,-.3),ht}),go.Shape.defineFigureGenerator("IrritationHazard",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.2*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close()),ht.spot1=new go.Spot(.3,.3),ht.spot2=new go.Spot(.7,.7),ht}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.37*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.11*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.77*et,.04*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,.49*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.37*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.63*et,.86*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.77*et,.91*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.34*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.34*et,.78*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.44*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,.56*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt).close()),ht}),go.Shape.defineFigureGenerator("FireHazard",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.29*et,0,-.25*et,.63*nt,.45*et,.44*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.51*et,.42*nt,.48*et,.17*nt,.54*et,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.59*et,.18*nt,.59*et,.29*nt,.58*et,.28*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,.6*nt,.8*et,.34*nt,.88*et,.43*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.88*et,.31*nt,.87*et,.48*nt,.88*et,.43*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,1.17*et,.76*nt,.82*et,.8*nt).close()),ht.spot1=new go.Spot(.07,.445),ht.spot2=new go.Spot(.884,.958),ht}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=0,vt=0,wt=st*Nt,Ft=.4*Math.SQRT2/2+.5,It=.5-.5*Math.SQRT2/2,At=1,Wt=.5,re=.5,ne=0,me=new go.PathFigure(Ft*et,(1-It)*nt,!1);return ht.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,At*et,Wt*nt,At*et,.7*nt,At*et,Wt*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(re+gt)*et,(ne+gt)*nt,(.5+st+gt)*et,(.5-wt+gt)*nt,(.5+wt+gt)*et,(.5-st+gt)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(.5-st+gt)*et,(.5+vt)*nt,(.5-wt+gt)*et,(.5-st+vt)*nt,(.5-st+gt)*et,(.5-wt+vt)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*et,.9*nt,(.5-st+gt)*et,(.5+wt+vt)*nt,(.5-wt+gt)*et,.9*nt)),me.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*et,.8*nt)),me.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*et,.9*nt)),me.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*et,.95*nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st);var gt=new go.PathFigure(et,nt,!1);ht.add(gt);var vt=new go.PathFigure(0,.5*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.2*et,.35*nt,.3*et,.35*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.7*et,.65*nt,.8*et,.65*nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close()),ht}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.2*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt).close());var st=new go.PathFigure(0,.2*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),ht}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.7*et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,0,.6*et,.5*nt,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,nt,.4*et,.5*nt,et,.5*nt).close());var gt=new go.PathFigure(.45*et,.73*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.73*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.38*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.63*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.31*et,.27*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.56*et,.27*nt)),ht}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st);var gt=new go.PathFigure(.335*et,(1-.555)*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.68*nt,(1-.12)*et,.46*nt,(1-.02)*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.335*et,(1-.555)*nt,.02*et,.54*nt,.12*et,.46*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.365*et,(1-.595)*nt));var vt=.5-.285,wt=.5,Ft=vt,It=Math.PI/4,At=4*(1-Math.cos(It))/(3*Math.sin(It)),Wt=At*.5,re=vt,ne=vt,me=At*re,Vt=At*ne;gt.add(new go.PathSegment(go.PathSegment.Bezier,(wt-re)*et,Ft*nt,(wt-(me+re)/2)*et,(Ft+(ne+Vt)/2)*nt,(wt-re)*et,(Ft+Vt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,(Ft-ne)*nt,(wt-re)*et,(Ft-Vt)*nt,(wt-me)*et,(Ft-ne)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(wt+re)*et,Ft*nt,(wt+me)*et,(Ft-ne)*nt,(wt+re)*et,(Ft-Vt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*et,(1-.595)*nt,(wt+re)*et,(Ft+Vt)*nt,(wt+(me+re)/2)*et,(Ft+(ne+Vt)/2)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*et,(1-.595)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt));var Le=new go.PathFigure(.2*et,nt,!1);ht.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,.2*et,.8*nt));var he=new go.PathFigure(.8*et,nt,!1);return ht.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var gt=new go.PathFigure(.2*et,.2*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventError",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st);var gt=new go.PathFigure(et,nt,!1);ht.add(gt);var vt=new go.PathFigure(.1*et,nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("Caution",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.05*et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.8*nt,0,nt,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.1*nt,.5*et,0,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.95*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,et,nt,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.05*et,nt));var gt=.05;return st.add(new go.PathSegment(go.PathSegment.Move,(.5-gt)*et,.875*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*et,.875*nt,gt*et,gt*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.325*nt,.575*et,.725*nt,.625*et,.375*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.75*nt,.375*et,.375*nt,.425*et,.725*nt)),ht}),go.Shape.defineFigureGenerator("Recycle",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.45*et,.95*nt,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.185*et,.85*nt,.17*et,.95*nt,.15*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.235*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.625*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.275*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.05*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.05*et,.575*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.1875*et,.95*nt,0,.675*nt,0,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.45*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.775*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.22*et,.775*nt));var gt=new go.PathFigure(.475*et,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.225*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.275*et,.175*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.325*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.05*nt,.35*et,0,.375*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.375*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.475*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.315*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.32*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,0,.65*et,.05*nt,.625*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.38*et,.0105*nt));var vt=new go.PathFigure(.675*et,.575*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.875*et,.525*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.85*et,.95*nt,et,.8*nt,et,.85*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.95*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.85*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.725*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,.675*et,.575*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.775*et,.775*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*.5,vt=new go.PathFigure(et,st*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,st*et,nt,et,(st+gt)*nt,(st+gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,st*nt,(st-gt)*et,nt,0,(st+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,st*et,0,0,(st-gt)*nt,(st-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,st*nt,(st+gt)*et,0,et,(st-gt)*nt));var wt=new go.PathFigure(st*et,0,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,st*et,.15*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,st*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,st*et,.85*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,0,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.15*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.85*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,st*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.58*et,.1*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,st*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.78*et,.54*nt)),ht}),go.Shape.defineFigureGenerator("Package",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.15*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(0,.15*nt,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.15*nt).close()),ht.spot1=new go.Spot(0,.1),ht.spot2=new go.Spot(1,1),ht}),go.Shape.defineFigureGenerator("Class",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var vt=new go.PathFigure(0,.5*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("Component",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt).close());var gt=new go.PathFigure(0,.2*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close());var vt=new go.PathFigure(0,.6*nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt).close()),ht}),go.Shape.defineFigureGenerator("Boat Shipment",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.15*et,.6*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt));var gt=new go.PathFigure(.15*et,.6*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ht}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht}),go.Shape.defineFigureGenerator("Workcell",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Supermarket",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.66*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.66*nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,.66*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ht}),go.Shape.defineFigureGenerator("TruckShipment",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(et,.8*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt).close());var vt=.1,wt=Nt*.1,Ft=.2,It=.9,At=new go.PathFigure((Ft-vt)*et,It*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-vt)*nt,(Ft-vt)*et,(It-wt)*nt,(Ft-wt)*et,(It-vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+vt)*et,It*nt,(Ft+wt)*et,(It-vt)*nt,(Ft+vt)*et,(It-wt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+vt)*nt,(Ft+vt)*et,(It+wt)*nt,(Ft+wt)*et,(It+vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-vt)*et,It*nt,(Ft-wt)*et,(It+vt)*nt,(Ft-vt)*et,(It+wt)*nt).close()),vt=.1,wt=Nt*.1,Ft=.8,It=.9;var Wt=new go.PathFigure((Ft-vt)*et,It*nt,!0);return ht.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-vt)*nt,(Ft-vt)*et,(It-wt)*nt,(Ft-wt)*et,(It-vt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+vt)*et,It*nt,(Ft+wt)*et,(It-vt)*nt,(Ft+vt)*et,(It-wt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+vt)*nt,(Ft+vt)*et,(It+wt)*nt,(Ft+wt)*et,(It+vt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-vt)*et,It*nt,(Ft-wt)*et,(It+vt)*nt,(Ft-vt)*et,(It+wt)*nt).close()),ht}),go.Shape.defineFigureGenerator("KanbanPost",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.2*et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),ht}),go.Shape.defineFigureGenerator("Forklift",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,0));var gt=new go.PathFigure(0,.5*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var vt=new go.PathFigure(.5*et,.8*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt));var wt=new go.PathFigure(.5*et,.7*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt));var Ft=.1,It=Nt*.1,At=.1,Wt=.9,re=new go.PathFigure((At-Ft)*et,Wt*nt,!0);ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Wt-Ft)*nt,(At-Ft)*et,(Wt-It)*nt,(At-It)*et,(Wt-Ft)*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,(At+Ft)*et,Wt*nt,(At+It)*et,(Wt-Ft)*nt,(At+Ft)*et,(Wt-It)*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Wt+Ft)*nt,(At+Ft)*et,(Wt+It)*nt,(At+It)*et,(Wt+Ft)*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,(At-Ft)*et,Wt*nt,(At-It)*et,(Wt+Ft)*nt,(At-Ft)*et,(Wt+It)*nt)),Ft=.1,It=Nt*.1,At=.4,Wt=.9;var ne=new go.PathFigure((At-Ft)*et,Wt*nt,!0);return ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Wt-Ft)*nt,(At-Ft)*et,(Wt-It)*nt,(At-It)*et,(Wt-Ft)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(At+Ft)*et,Wt*nt,(At+It)*et,(Wt-Ft)*nt,(At+Ft)*et,(Wt-It)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Wt+Ft)*nt,(At+Ft)*et,(Wt+It)*nt,(At+It)*et,(Wt+Ft)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(At-Ft)*et,Wt*nt,(At-It)*et,(Wt+Ft)*nt,(At-Ft)*et,(Wt+It)*nt)),ht}),go.Shape.defineFigureGenerator("RailShipment",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,.4*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.4*nt).close());var gt=new go.PathFigure(.45*et,.7*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt));var vt=new go.PathFigure(.55*et,.4*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.4*nt).close());var At=.05,Wt=Nt*.05,re=.175,ne=.95,wt=new go.PathFigure((re-At)*et,ne*nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne-At)*nt,(re-At)*et,(ne-Wt)*nt,(re-Wt)*et,(ne-At)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,(re+At)*et,ne*nt,(re+Wt)*et,(ne-At)*nt,(re+At)*et,(ne-Wt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne+At)*nt,(re+At)*et,(ne+Wt)*nt,(re+Wt)*et,(ne+At)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,(re-At)*et,ne*nt,(re-Wt)*et,(ne+At)*nt,(re-At)*et,(ne+Wt)*nt));var At=.05,Wt=Nt*.05,re=.375,ne=.95,Ft=new go.PathFigure((re-At)*et,ne*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne-At)*nt,(re-At)*et,(ne-Wt)*nt,(re-Wt)*et,(ne-At)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(re+At)*et,ne*nt,(re+Wt)*et,(ne-At)*nt,(re+At)*et,(ne-Wt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne+At)*nt,(re+At)*et,(ne+Wt)*nt,(re+Wt)*et,(ne+At)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(re-At)*et,ne*nt,(re-Wt)*et,(ne+At)*nt,(re-At)*et,(ne+Wt)*nt));var At=.05,Wt=Nt*.05,re=.625,ne=.95,It=new go.PathFigure((re-At)*et,ne*nt,!0);ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne-At)*nt,(re-At)*et,(ne-Wt)*nt,(re-Wt)*et,(ne-At)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(re+At)*et,ne*nt,(re+Wt)*et,(ne-At)*nt,(re+At)*et,(ne-Wt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne+At)*nt,(re+At)*et,(ne+Wt)*nt,(re+Wt)*et,(ne+At)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(re-At)*et,ne*nt,(re-Wt)*et,(ne+At)*nt,(re-At)*et,(ne+Wt)*nt));var At=.05,Wt=Nt*.05,re=.825,ne=.95,me=new go.PathFigure((re-At)*et,ne*nt,!0);ht.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne-At)*nt,(re-At)*et,(ne-Wt)*nt,(re-Wt)*et,(ne-At)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(re+At)*et,ne*nt,(re+Wt)*et,(ne-At)*nt,(re+At)*et,(ne-Wt)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne+At)*nt,(re+At)*et,(ne+Wt)*nt,(re+Wt)*et,(ne+At)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(re-At)*et,ne*nt,(re-Wt)*et,(ne+At)*nt,(re-At)*et,(ne+Wt)*nt).close());var Vt=new go.PathFigure(0,nt,!1);return ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht}),go.Shape.defineFigureGenerator("Warehouse",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var vt=new go.PathFigure(.15*et,nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt).close());var wt=.05,Ft=Nt*.05,It=.35,At=.775,Wt=new go.PathFigure((It-wt)*et,At*nt,!0);return ht.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(At-wt)*nt,(It-wt)*et,(At-Ft)*nt,(It-Ft)*et,(At-wt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(It+wt)*et,At*nt,(It+Ft)*et,(At-wt)*nt,(It+wt)*et,(At-Ft)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(At+wt)*nt,(It+wt)*et,(At+Ft)*nt,(It+Ft)*et,(At+wt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(It-wt)*et,At*nt,(It-Ft)*et,(At+wt)*nt,(It-wt)*et,(At+Ft)*nt).close()),ht}),go.Shape.defineFigureGenerator("ControlCenter",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.1*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt).close()),ht}),go.Shape.defineFigureGenerator("Bluetooth",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.75*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Globe",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.75*et,0,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.75*nt,.75*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.25*et,nt,0,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,.25*nt,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,.15*et,.25*nt,.15*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.85*et,.75*nt,.85*et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.15*nt,.35*et,.3*nt,.65*et,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.85*nt,.35*et,.7*nt,.65*et,.7*nt)),ht}),go.Shape.defineFigureGenerator("Wave",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.25*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.25*nt,.1*et,0,.2*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.25*nt,.425*et,.5*nt,.575*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.25*nt,.8*et,0,.9*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.75*nt,.1*et,.5*nt,.2*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.75*nt,.425*et,nt,.575*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.75*nt,.8*et,.5*nt,.9*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Operator",function(Tt,et,nt){var ht=new go.Geometry,st=.3,gt=Nt*.3,vt=.5,wt=.7,Ft=new go.PathFigure((vt-st)*et,wt*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt));var It=new go.PathFigure(0,.7*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,et,.7*nt,0,0,et,0)),ht}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.65*et,.3*nt,.65*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.35*et,.5*nt,.35*et,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.3*et,.6*nt,.1*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.2*et,nt,.35*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,.7*et,.6*nt,.9*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.8*et,nt,.65*et,.95*nt)),ht}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,0,.075*nt,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,0,nt,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.4*nt,.8*et,nt,.85*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),ht}),go.Shape.defineFigureGenerator("Battery",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.4*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.1*nt));var gt=new go.PathFigure(0,.6*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Delete",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*.5,vt=.5,wt=.5,Ft=new go.PathFigure((vt-st)*et,wt*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt));var It=new go.PathFigure(.15*et,.5*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,.85*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Flag",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.1*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.1*nt,.15*et,0,.35*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,.65*et,.2*nt,.85*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.85*et,.6*nt,.65*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.35*et,.4*nt,.15*et,.4*nt).close()),ht}),go.Shape.defineFigureGenerator("Help",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*.5,vt=.5,wt=.5,Ft=new go.PathFigure((vt-st)*et,wt*nt,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt).close()),st=.05,gt=Nt*.05,vt=.5,wt=.8;var It=new go.PathFigure((vt-st)*et,wt*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt).close()),It.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,.75*et,.475*nt,.75*et,.225*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.35*nt,.4*et,.2*nt,.3*et,.25*nt)),ht}),go.Shape.defineFigureGenerator("Location",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.975*et,.025*nt,.5*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*et,.5*nt,.5*et,0,.025*et,.025*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*et,.3*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Lock",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var gt=new go.PathFigure(.2*et,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.3*nt)),ht}),go.Shape.defineFigureGenerator("Unlocked",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var gt=new go.PathFigure(.2*et,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.35*nt)),ht}),go.Shape.defineFigureGenerator("Gear",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.9375*et,.56246875*nt,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.80621875*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.763*et,.3316875*nt,.79840625*et,.39915625*nt,.7834375*et,.3635*nt)).add(new go.PathSegment(go.PathSegment.Line,.8566875*et,.23796875*nt)).add(new go.PathSegment(go.PathSegment.Line,.76825*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.67596875*et,.24184375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*et,.19378125*nt,.64228125*et,.2188125*nt,.603875*et,.2021875*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.19378125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*et,.239375*nt,.39759375*et,.20190625*nt,.36053125*et,.2176875*nt)).add(new go.PathSegment(go.PathSegment.Line,.2379375*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.14953125*et,.2379375*nt)).add(new go.PathSegment(go.PathSegment.Line,.23934375*et,.3278125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*et,.4375*nt,.21765625*et,.36059375*nt,.201875*et,.397625*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Line,.1938125*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*et,.67596875*nt,.20221875*et,.603875*nt,.21884375*et,.64228125*nt)).add(new go.PathSegment(go.PathSegment.Line,.1495625*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.238*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.3316875*et,.76296875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*et,.80621875*nt,.36353125*et,.78340625*nt,.3991875*et,.79840625*nt)).add(new go.PathSegment(go.PathSegment.Line,.43753125*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.80621875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*et,.760625*nt,.602375*et,.79809375*nt,.63946875*et,.78234375*nt)).add(new go.PathSegment(go.PathSegment.Line,.76828125*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.85671875*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.76065625*et,.67221875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*et,.56246875*nt,.78234375*et,.63940625*nt,.798125*et,.602375*nt)).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.56246875*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*et,.5*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Hand",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.3*nt,0,.375*nt,.05*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.075*nt,.3*et,.225*nt,.4*et,.175*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.525*et,.075*nt,.46*et,.05*nt,.525*et,.05*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.4*nt,.525*et,.275*nt,.475*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.55*nt,et,.4*nt,et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.425*et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.7*nt,.675*et,.55*nt,.675*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.575*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,.85*nt,.65*et,.7*nt,.65*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.535*et,nt,.61*et,.85*nt,.61*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,.435*et,nt,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Map",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.2*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),st.add(new go.PathSegment(go.PathSegment.Move,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("Eject",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.7)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.7).close());var gt=new go.PathFigure(0,nt*.6,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close()),ht}),go.Shape.defineFigureGenerator("Pencil",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close()))}),go.Shape.defineFigureGenerator("Building",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*1,nt*1,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.85)),st.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.85)),st.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.85)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.85).close());var gt=new go.PathFigure(.126*et,.85*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.126*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.85*nt).close());var vt=new go.PathFigure(.402*et,.85*nt,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.402*et,.45*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.45*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.85*nt).close());var wt=new go.PathFigure(.678*et,.85*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.678*et,.45*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.45*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.85*nt).close());var Ft=new go.PathFigure(.5*et,.1*nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*et,.3*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*et,.3*nt).close()),ht}),go.Shape.defineFigureGenerator("Staircase",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt*1,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.8)),st.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.8)),st.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.6)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.6)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.4)),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.4)),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.2)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.2)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.15)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.15)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.95).close()),ht}),go.Shape.defineFigureGenerator("5Bars",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt*1,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*(1-.184)).close());var gt=new go.PathFigure(et*.204,nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.204,nt*(1-.184))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*(1-.184*2))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*1).close());var vt=new go.PathFigure(et*.408,nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.408,nt*(1-.184*2))),vt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*(1-.184*3))),vt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*1).close());var wt=new go.PathFigure(et*.612,nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.612,nt*(1-.184*3))),wt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*(1-.184*4))),wt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*1).close());var Ft=new go.PathFigure(et*.816,nt,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.816,nt*(1-.184*4))),Ft.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-.184*5))),Ft.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1).close()),ht}),go.Shape.defineFigureGenerator("PC",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,0).close());var gt=new go.PathFigure(et*.055,.07*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.07)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.1).close());var vt=new go.PathFigure(et*.055,.13*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.13)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.16)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.16).close());var wt=new go.PathFigure(et*.055,.18*nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.18)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.21)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.21).close());var Ft=new go.PathFigure(et*1,0,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.4,0)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.65)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.65).close()),ht}),go.Shape.defineFigureGenerator("Plane",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.55*et,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.475*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.35*et,.525*nt,0,.4*nt,.225*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.475*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.2*nt,.975*et,0,et,.08*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt).close()),ht}),go.Shape.defineFigureGenerator("Key",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*1,nt*.5,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.9,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.7,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.85,.575*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.9,.6*nt).close()),st.add(new go.PathSegment(go.PathSegment.Move,.17*et,.425*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*et,.5*nt,.075*et,.075*nt).close()),ht}),go.Shape.defineFigureGenerator("FilmTape",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*0,et*.3,et*.055)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var gt=new go.PathFigure(0,0,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*1,et*.3,et*.055)),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var vt=new go.PathFigure(et*.11,nt*.1,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.1)),vt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.8)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.11,nt*.8).close());var wt=new go.PathFigure(et*(.11+.24133333*1+.028*1),nt*.1,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.1)),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.8)),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*1),nt*.8).close());var Ft=new go.PathFigure(et*(.11+.24133333*2+.028*2),nt*.1,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.1)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.8)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*2),nt*.8).close()),ht}),go.Shape.defineFigureGenerator("FloppyDisk",function(Tt,et,nt){var ht=new go.Geometry,st=8,gt=st*Nt,vt=new go.PathFigure(st,0,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.86,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.14)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-st)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-st,nt,et,nt-gt,et-gt,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,st,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-st,gt,nt,0,nt-gt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,st)),vt.add(new go.PathSegment(go.PathSegment.Bezier,st,0,0,gt,gt,0).close());var wt=new go.PathFigure(et*.83,0,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.3)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.3)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*0).close());var Ft=new go.PathFigure(et*.83,nt*1,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.5)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.5)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*1).close());var It=new go.PathFigure(et*.78,nt*.05,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.05)),It.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.25)),It.add(new go.PathSegment(go.PathSegment.Line,et*.78,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("SpeechBubble",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=15),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var st=ht*Nt,gt=nt*.8,vt=new go.Geometry,wt=new go.PathFigure(ht,0,!0);return vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et,ht,et-st,0,et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,et,gt-ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,gt,et,gt-st,et-st,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.7,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.55,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,ht,gt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt-ht,st,gt,0,gt-st)),wt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,st,st,0).close()),st>1?(vt.spot1=new go.Spot(0,0,st,st),vt.spot2=new go.Spot(1,.8,-st,-st)):(vt.spot1=go.Spot.TopLeft,vt.spot2=new go.Spot(1,.8)),vt}),go.Shape.defineFigureGenerator("Repeat",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*.45,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.9)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.9)),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.45).close());var gt=new go.PathFigure(et*1,nt*.55,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.55).close()),ht}),go.Shape.defineFigureGenerator("Windows",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()).add(new go.PathSegment(go.PathSegment.Move,.4*et,.4*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.1*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.1*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*.1,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.9)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.9).close());var gt=new go.PathFigure(et*.1,nt*.2,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.22,nt*.285)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.37)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.25).close());var vt=new go.PathFigure(et*.28,nt*.37,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.37)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.41)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.28,nt*.41).close()),ht}),go.Shape.defineFigureGenerator("Beaker",function(Tt,et,nt){var ht=new go.Geometry,st=15,gt=st*Nt,vt=new go.PathFigure(et*.62,nt*.475,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-st)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-st,nt,et,nt-gt,et-gt,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,st,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-st,gt,nt,0,nt-gt)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.475)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.03)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.62,nt*.03).close()),gt>1?(ht.spot1=new go.Spot(0,0,gt,gt),ht.spot2=new go.Spot(1,1,-gt,-gt)):(ht.spot1=go.Spot.TopLeft,ht.spot2=go.Spot.BottomRight),ht}),go.Shape.defineFigureGenerator("Download",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*1,!0);ht.add(st);var gt=.1/.3;st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close());var vt=new go.PathFigure(et*.4,nt*0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.66)),vt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.26),nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*0).close()),ht}),go.Shape.defineFigureGenerator("Bin",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*1,!0);ht.add(st);var gt=.1/.3;return st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close()),ht}),go.Shape.defineFigureGenerator("Upload",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*1,!0);ht.add(st);var gt=.1/.3;st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close());var vt=new go.PathFigure(et*.5,nt*0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.74,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("EmptyDrink",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.15,nt*0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close()),ht}),go.Shape.defineFigureGenerator("Drink",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.15,nt*0,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close());var gt=new go.PathFigure(et*.235,nt*.28,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.765,nt*.28)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.655,nt*.97)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.345,nt*.97).close()),ht}),go.Shape.defineFigureGenerator("4Arrows",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.5,nt*0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.25)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.25)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.5)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.65)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.65)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.5)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.25)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},80727:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var En={},yn="5.0",xt={},Ot=null,jt=!1,Qt=!1,Me=null,Ut=!1,pe=null,Nt=null,Ie=0;Ie<arguments.length;Ie++){var we=arguments[Ie];if(we!==null)switch(typeof we){case"number":yn=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?yn=we:Me=we;break;case"object":typeof we.is3D!="undefined"?Ot=we:xt=we;break;case"boolean":jt=we,Qt=!0;break}}Ot===null&&(Ot={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},xt.material_id!==void 0&&!Qt&&(jt=!0)),Me!==null&&xt.id===void 0&&(xt.id=Me);var qt="",ce="",Ce=!1,Be=null,Tt=null,et=null,nt=!1,ht=null,st=null,gt=null,vt=null,wt=null;xt.height!==void 0&&(xt.height=Math.round(xt.height)),xt.width!==void 0&&(xt.width=Math.round(xt.width));var Ft=function(ze){return parseFloat(ze)>4?parseFloat(ze):5};En.setHTML5Codebase=function(ze,Te){Nt=ze,Je(ze,Te)},En.setJavaCodebase=En.setJavaCodebaseVersion=En.isCompiledInstalled=En.setPreCompiledScriptPath=En.setPreCompiledResourcePath=function(){},En.setHTML5CodebaseVersion=function(ze,Te){var dn=parseFloat(ze);if(dn!==NaN&&dn<5){console.log("The GeoGebra HTML5 codebase version "+dn+" is deprecated. Using version latest instead.");return}pe=ze,Ht(ze,Te)},En.getHTML5CodebaseVersion=function(){return Tt},En.getParameters=function(){return xt},En.setFontsCSSURL=function(ze){vt=ze},En.setGiacJSURL=function(ze){},En.setJNLPFile=function(ze){qt=ze},En.setJNLPBaseDir=function(ze){},En.inject=function(){function ze(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Te="auto",dn=xt.id,Hn,hn=!1,pn=0;pn<arguments.length;pn++){var de=arguments[pn];typeof de=="string"?(de=de.toLowerCase(),de.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Te=de:dn=arguments[pn]):typeof de=="boolean"?hn=de:de instanceof HTMLElement&&(Hn=de)}vn();function vn(){if(!Ut){setTimeout(vn,200);return}Te=Mn(Te);var bn=Hn||document.getElementById(dn);if(!bn){console.log("possibly bug on ajax loading? ");return}if(En.removeExistingApplet(bn,!1),xt.width===void 0&&bn.clientWidth&&(xt.width=bn.clientWidth),xt.height===void 0&&bn.clientHeight&&(xt.height=bn.clientHeight),!(xt.width&&xt.height)&&Te==="html5"&&(delete xt.width,delete xt.height),Be=Te,Te==="screenshot")he(bn,xt);else{var Qe=!1;xt.hasOwnProperty("playButton")&&xt.playButton||xt.hasOwnProperty("clickToLoad")&&xt.clickToLoad?Qe=!0:xt.hasOwnProperty("playButtonAutoDecide")&&xt.playButtonAutoDecide&&(Qe=(!It()||ze())&&At()),Qe?(Be="screenshot",Ke(bn,xt,hn,Te)):Le(bn,xt,hn)}}};function It(){try{return window.self!==window.top}catch(ze){return!0}}function At(){return xt.hasOwnProperty("screenshotGenerator")&&xt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}En.getViews=function(){return Ot},En.isJavaInstalled=function(){return!1};var Wt=function(ze){var Te=function(pn){var de=JSON.parse(pn),vn=function(Pn){return Pn.type=="G"||Pn.type=="E"},bn=de.elements?de.elements.filter(vn)[0]:de;if(!bn||!bn.url){dn();return}xt.fileName=bn.url,re(bn.settings||{}),Ot.is3D=!0;var Qe="https://www.geogebra.org/images/";En.setPreviewImage(ht||bn.previewUrl,Qe+"GeoGebra_loading.png",Qe+"applet_play.png"),ze()},dn=function(){xt.onError&&xt.onError(),Tn("Error: Fetching material (id "+xt.material_id+") failed.",xt)},Hn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",hn="/materials/"+xt.material_id+"?scope=basic";ne("https://"+Hn+"/api/proxy.php?path="+encodeURIComponent(hn),Te,dn)};function re(ze){var Te=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(dn){ze[dn]=!!ze[dn]}),Te.forEach(function(dn){xt[dn]===void 0&&ze[dn]!==void 0&&(xt[dn]=ze[dn])}),xt.showToolBarHelp===void 0&&(xt.showToolBarHelp=xt.showToolBar)}function ne(ze,Te,dn){var Hn=new XMLHttpRequest;Hn.open("GET",ze),Hn.onload=function(){Te(Hn.responseText)},Hn.onerror=dn,Hn.send()}En.isHTML5Installed=function(){return!0},En.getLoadedAppletType=function(){return Be},En.setPreviewImage=function(ze,Te,dn){ht=ze,st=Te,gt=dn},En.removeExistingApplet=function(ze,Te){var dn;typeof ze=="string"&&(ze=document.getElementById(ze)),Be=null;var Hn=null;for(dn=0;dn<ze.childNodes.length;dn++){var hn=ze.childNodes[dn],pn=hn.className;pn==="applet_screenshot"?Te?(hn.style.display="block",Be="screenshot"):hn.style.display="none":pn!=="applet_scaler prerender"&&(ze.removeChild(hn),Hn=pn&&pn.indexOf("appletParameters")!=-1?hn.id:null,dn--)}var de=xt.id!==void 0?xt.id:Hn,vn=window[de];vn&&typeof vn.getBase64=="function"&&(vn.remove(),window[de]=null)},En.refreshHitPoints=function(){if(Ft(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ze=En.getAppletObject();return ze&&typeof ze.recalculateEnvironments=="function"?(ze.recalculateEnvironments(),!0):!1},En.startAnimation=function(){var ze=En.getAppletObject();return ze&&typeof ze.startAnimation=="function"?(ze.startAnimation(),!0):!1},En.stopAnimation=function(){var ze=En.getAppletObject();return ze&&typeof ze.stopAnimation=="function"?(ze.stopAnimation(),!0):!1},En.getAppletObject=function(){var ze=xt.id!==void 0?xt.id:"ggbApplet";return window[ze]},En.resize=function(){};var me=function(ze,Te,dn){var Hn=document.createElement("param");Hn.setAttribute("name",Te),Hn.setAttribute("value",dn),ze.appendChild(Hn)},Vt=function(ze){return ze&&ze!=="false"},Le=function(ze,Te,dn){Ft(Tt)<=4.2&&(dn=!0);var Hn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Tt||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(Hn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var hn=document.createElement("div");hn.classList.add("appletParameters","notranslate");var pn=Te.width,de=Te.height;if(Te.disableAutoScale=Te.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Te.disableAutoScale,Te.width!==void 0)if(Ft(Tt)<=4.4)Vt(Te.showToolBar)&&(Te.height-=7),Vt(Te.showAlgebraInput)&&(Te.height-=37),Te.width<605&&Vt(Te.showToolBar)&&(Te.width=605,pn=605);else{var vn=100;(Vt(Te.showToolBar)||Vt(Te.showMenuBar))&&(Te.hasOwnProperty("customToolBar")&&(Te.customToolbar=Te.customToolBar),vn=Vt(Te.showMenuBar)?245:155),pn<vn&&(Te.width=vn,pn=vn)}hn.style.border="none",hn.style.display="inline-block";for(var bn in Te)Te.hasOwnProperty(bn)&&bn!=="appletOnLoad"&&hn.setAttribute("data-param-"+bn,Te[bn]);vt&&hn.setAttribute("data-param-fontscssurl",vt),En.resize=function(){GGBAppletUtils.responsiveResize(ze,Te)},window.addEventListener("resize",function(mt){En.resize()});var Qe=typeof Te.appletOnLoad=="function"?Te.appletOnLoad:function(){};if(!dn&&Te.width!==void 0){Te.hasOwnProperty("showSplash")||hn.setAttribute("data-param-showSplash","false");var Pn=ze.querySelector(".applet_scaler.prerender"),Ne=Pn!==null;if(Ne)var Pe=Pn.querySelector(".ggb_preview");else{var Pe=sn(pn,de,Te.borderColor,!1);Pn=document.createElement("div"),Pn.className="applet_scaler",Pn.style.position="relative",Pn.style.display="block",Pn.style.width=pn+"px",Pn.style.height=de+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Pn,"66%"),Ft(Tt)>=5?(Te.appletOnLoad=function(mt){var Lt=ze.querySelector(".ggb_preview");Lt&&Lt.parentNode.removeChild(Lt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Pn),window.GGBT_wsf_view&&$(window).trigger("resize"),Qe(mt)},Ne||Pn.appendChild(Pe)):hn.appendChild(Pe),Pn.appendChild(hn),Ne||ze.appendChild(Pn),setTimeout(function(){En.resize()},1)}else{var ie=document.createElement("div");ie.className="applet_scaler",ie.style.position="relative",ie.style.display="block",ie.appendChild(hn),ze.appendChild(ie),Te.appletOnLoad=function(mt){En.resize(),Qe(mt)}}function Dt(mt,Lt){Lt&&typeof Lt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(mt,Lt.appletOnLoad):renderGGBElement(mt),Tn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Lt)}function fe(mt,Lt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:mt,params:Lt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(zt){Dt(zt.article,zt.params)}),html5AppletsToProcess=null)},Ft(Tt)<5&&(mt.className+=" geogebraweb")):Dt(mt,Lt)}if(Hn){scriptLoadStarted=!0;for(var Se=0;Se<hn.childNodes.length;Se++){var ee=hn.childNodes[Se].tagName;ee==="TABLE"&&(hn.removeChild(hn.childNodes[Se]),Se--)}if(ggbHTML5LoadedScript!==null){var Kt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Kt!=null&&Kt.parentNode.removeChild(Kt)}var kt=document.createElement("script"),St=function(){fe(hn,Te)};kt.src=ce+et,ggbHTML5LoadedCodebaseIsWebSimple=nt,ggbHTML5LoadedCodebaseVersion=Tt,ggbHTML5LoadedScript=kt.src,Tn("GeoGebra HTML5 codebase loaded: '"+ce+"'.",Te),!Nt&&(!pe||pe=="5.0")?(nt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),St()):ce.requirejs?__webpack_require__.e(4184).then(function(){var mt=[__webpack_require__(74620)];St.apply(null,mt)}.bind(this)).catch(__webpack_require__.oe):(kt.onload=St,ze.appendChild(kt))}else fe(hn,Te);Te.height=de,Te.width=pn},he=function(ze,Te,dn){var Hn=sn(Te.width,Te.height,Te.borderColor,dn),hn=document.createElement("div");hn.style.position="relative",hn.style.display="block",hn.style.width=Te.width+"px",hn.style.height=Te.height+"px",hn.className="applet_screenshot applet_scaler"+(dn?" applet_screenshot_play":""),hn.appendChild(Hn);var pn=GGBAppletUtils.getScale(Te,ze,dn);dn?(ze.appendChild(Ve()),window.GGBT_wsf_view||(ze.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(hn,"66%"),ze.appendChild(hn),pn!==1&&!isNaN(pn)&&(GGBAppletUtils.scaleElement(hn,pn),hn.style.width=Te.width+"px",hn.style.height=Te.height+"px",hn.parentNode.style.width=Te.width*pn+"px",hn.parentNode.style.height=Te.height*pn+"px"),En.resize=function(){Ge(ze,Hn,hn,dn)},window.addEventListener("resize",function(de){En.resize()}),En.resize()};function Ge(ze,Te,dn,Hn){if(ze.contains(Te)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ze.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ze)}var hn=GGBAppletUtils.getScale(xt,ze,Hn);dn.parentNode!==null&&(!isNaN(hn)&&hn!==1?(GGBAppletUtils.scaleElement(dn,hn),dn.parentNode.style.width=xt.width*hn+"px",dn.parentNode.style.height=xt.height*hn+"px"):(GGBAppletUtils.scaleElement(dn,1),dn.parentNode.style.width=xt.width+"px",dn.parentNode.style.height=xt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ze),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}En.onExitFullscreen=function(ze,Te){Te.appendChild(ze)};var Ke=function(ze,Te,dn,Hn){he(ze,Te,!0);for(var hn=function(){var vn=[];for(de=0;de<ze.childNodes.length;de++)vn.push(ze.childNodes[de]);if(window.GGBT_wsf_view){var bn=window.GGBT_wsf_view.renderFullScreen(ze,Te.id),Qe=document.getElementById("fullscreencontainer"),Pn=jQuery(ze).find(".fullscreencontent");Pn.length>0?(bn.remove(),Pn.attr("id","fullscreencontent").show(),jQuery(Qe).append(Pn),window.dispatchEvent(new Event("resize"))):Le(bn,Te,!1),window.GGBT_wsf_view.launchFullScreen(Qe)}else Be=Hn,Le(ze,Te,!1);if(!window.GGBT_wsf_view)for(de=0;de<vn.length;de++)ze.removeChild(vn[de])},pn=ze.getElementsByClassName("ggb_preview_play"),de=0;de<pn.length;de++)pn[de].addEventListener("click",hn,!1),pn[de].addEventListener("ontouchstart",hn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ze),At()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ve=function(){var ze=document.createElement("div");if(ze.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Te='.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");}',dn=document.createElement("style");dn.styleSheet?dn.styleSheet.cssText=Te:dn.appendChild(document.createTextNode(Te)),document.getElementsByTagName("head")[0].appendChild(dn)}return ze},sn=function(ze,Te,dn,Hn){var hn=document.createElement("div");hn.className="ggb_preview",hn.style.position="absolute",hn.style.zIndex="90",hn.style.width=ze-2+"px",hn.style.height=Te-2+"px",hn.style.top="0px",hn.style.left="0px",hn.style.overflow="hidden",hn.style.backgroundColor="white";var pn="lightgrey";dn!==void 0&&(dn==="none"?pn="transparent":pn=dn),hn.style.border="1px solid "+pn;var de=document.createElement("img");if(de.style.position="relative",de.style.zIndex="1000",de.style.top="-1px",de.style.left="-1px",ht!==null&&de.setAttribute("src",ht),de.style.opacity=.7,st!==null){var vn,bn,Qe;if(!Hn){vn=document.createElement("img"),vn.style.position="absolute",vn.style.zIndex="1001",vn.style.opacity=1,de.style.opacity=.3,bn=360,bn>ze/4*3&&(bn=ze/4*3),Qe=bn/5.8,vn.setAttribute("src",st),vn.setAttribute("width",bn),vn.setAttribute("height",Qe);var Pn=(ze-bn)/2,Ne=(Te-Qe)/2;vn.style.left=Pn+"px",vn.style.top=Ne+"px",hn.appendChild(vn)}}return hn.appendChild(de),hn},Mn=function(ze){return ze=ze.toLowerCase(),ze==="html5"||ze==="screenshot"?ze:"html5"},xe=["web","webSimple","web3d","tablet","tablet3d","phone"],Ht=function(ze,Te){if(Tt=ze,Te){Je(Tt,!0);return}var dn=!jt;if(dn){var Hn=Ft(Tt);!isNaN(Hn)&&Hn<4.4&&(dn=!1)}var hn,pn;window.location.protocol.substr(0,4)==="http"?hn=window.location.protocol:hn="http:";var de=Tt.indexOf("//");de>0?pn=Tt:de===0?pn=hn+Tt:pn="https://www.geogebra.org/apps/5.2.814.0/";for(var vn in xe)if(Tt.slice(xe[vn].length*-1)===xe[vn]||Tt.slice((xe[vn].length+1)*-1)===xe[vn]+"/"){Je(pn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&dn&&!Ot.is3D&&!Ot.AV&&!Ot.SV&&!Ot.CV&&!Ot.EV2&&!Ot.CP&&!Ot.PC&&!Ot.DA&&!Ot.FI&&!Ot.PV&&!Vt(xt.showToolBar)&&!Vt(xt.showMenuBar)&&!Vt(xt.showAlgebraInput)&&!Vt(xt.enableRightClick)&&(!xt.appName||xt.appName=="classic")?pn+="webSimple/":pn+="web3d/",Je(pn,!1)},Je=function(ze,Te){if(ze.requirejs){ce=ze;return}ze.slice(-1)!=="/"&&(ze+="/"),ce=ze,Te===null&&(Te=ze.indexOf("http")===-1),Ce=Te,et="web.nocache.js",nt=!1;var dn=ce.split("/");dn.length>1&&(!Te&&dn[dn.length-2]==="webSimple"?(et="webSimple.nocache.js",nt=!0):xe.indexOf(dn[dn.length-2])>=0&&(et=dn[dn.length-2]+".nocache.js")),dn=ze.split("/"),Tt=dn[dn.length-3],Tt.substr(0,4)==="test"?Tt=Tt.substr(4,1)+"."+Tt.substr(5,1):(Tt.substr(0,3)==="war"||Tt.substr(0,4)==="beta")&&(Tt="5.0");var Hn=parseFloat(Tt);Hn!==NaN&&Hn<5&&ze.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Hn+" is deprecated. Using version latest instead."),Ht("5.0",Te))},Tn=function(ze,Te){window.console&&window.console.log&&(!Te||typeof Te.showLogging=="undefined"||Te.showLogging&&Te.showLogging!=="false")&&console.log(ze)};xt.material_id!==void 0?Wt(An):An();function An(){var ze=yn;pe!==null?ze=pe:parseFloat(ze)<5&&(ze="5.0"),Ht(ze,!1),Nt!==null&&Je(Nt,Ce),Ut=!0}return En},GGBAppletUtils=function(){"use strict";function En(){return window.GGBT_wsf_edit!==void 0}function yn(Ut,pe){pe!=1?(Ut.style.transformOrigin="0% 0% 0px",Ut.style.webkitTransformOrigin="0% 0% 0px",Ut.style.transform="scale("+pe+","+pe+")",Ut.style.webkitTransform="scale("+pe+","+pe+")",Ut.style.maxWidth="initial",Ut.querySelector(".ggb_preview")!==null&&(Ut.querySelector(".ggb_preview").style.maxWidth="initial"),Ut.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ut.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ut.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ut.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ut.style.transform="none",Ut.style.webkitTransform="none")}function xt(Ut,pe,Nt,Ie,we,qt){var ce=null;if(qt!=null&&qt!="")for(var Ce=Ut.parentNode;Ce!=null;)if((" "+Ce.className+" ").indexOf(" "+qt+" ")>-1){ce=Ce;break}else Ce=Ce.parentNode;var Be=0,Tt=0,et=0,nt=0,ht=0,st=0,gt=0;if(ce)Be=ce.offsetWidth,Tt=Math.max(Ie?ce.offsetWidth:0,ce.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Be=Math.min(window.innerWidth,document.documentElement.clientWidth),Tt=Math.min(window.innerHeight,document.documentElement.clientHeight),et=Be):(Be=window.innerWidth,Tt=window.innerHeight,et=window.innerWidth),Ut){var vt=Ut.getBoundingClientRect();vt.left>0&&vt.left<=Be&&(we===void 0||!we)&&(document.dir==="rtl"?(ht=Be-vt.width-vt.left,st=et<=480?10:30):(st=vt.left,ht=et<=480?10:30),nt=st+ht)}if(Ut&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var wt=Ut.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,gt=40)}}return Ut&&((Nt===void 0||!Nt)&&pe>0&&pe+nt<Be?Be=pe:Be-=nt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Nt===void 0||!Nt)&&(Tt-=gt)),{width:Be,height:Tt}}function Ot(Ut,pe,Nt,Ie,we){if(Ut.isScreenshoGenerator)return 1;var qt=Ie!==void 0&&Ie,ce=Ut.noScaleMargin!=null&&Ut.noScaleMargin,Ce=function(wt){return wt&&wt!=="false"},Be=Ce(Ut.autoHeight),Tt=xt(pe,Ut.width,Nt,Be,qt&&window.GGBT_wsf_view||ce,we),et=parseInt(Tt.width),nt=Ut.width,ht=Ut.height;if(nt===void 0){var st=pe.querySelector(".appletParameters");st&&(nt=st.offsetWidth,ht=st.offsetHeight)}var gt=et/nt,vt=qt?1:Tt.height/ht;return Nt!==void 0&&!Nt&&(gt=Math.min(1,gt),vt=Math.min(1,vt)),Math.min(gt,vt)}function jt(Ut,pe,Nt){var Ie=1,we,qt=!1;if(Ut.hasOwnProperty("allowUpscale")&&(qt=Ut.allowUpscale),Ut.hasOwnProperty("scale")&&(Ie=parseFloat(Ut.scale),(isNaN(Ie)||Ie===null||Ie===0)&&(Ie=1),Ie>1&&(qt=!0)),pe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(qt=!0),!(Ut.hasOwnProperty("disableAutoScale")&&Ut.disableAutoScale))we=Ot(Ut,pe,qt,Nt,Ut.scaleContainerClass);else return Ie;return qt&&(!Ut.hasOwnProperty("scale")||Ie===1)?we:Math.min(Ie,we)}function Qt(Ut){var pe=Math.min(window.innerWidth,document.documentElement.clientWidth),Nt=Math.min(window.innerHeight,document.documentElement.clientHeight),Ie=Ut.getBoundingClientRect(),we=(pe-Ie.width)/2,qt=(Nt-Ie.height)/2;qt<0&&(qt=0),Ut.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?Ut.style.left="40px":Ut.style.left=we+"px",Ut.style.top=qt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(qt<40?Ut.style.top="40px":Ut.style.top=qt+"px",Ut.style.left=we+"px")}function Me(Ut,pe){var Nt=Ut.querySelector(".appletParameters");if(Nt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(pe.id!==Nt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ut)}if(Nt.parentElement&&/fullscreen/.test(Nt.parentElement.className))return;var Ie=jt(pe,Ut);En()&&Nt.setAttribute("data-param-scale",Ie);for(var we=null,qt=0;qt<Ut.childNodes.length;qt++)if(Ut.childNodes[qt].className!==void 0&&Ut.childNodes[qt].className.match(/^applet_scaler/)){we=Ut.childNodes[qt];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var ce=pe.id!==void 0?pe.id:"ggbApplet",Ce=window[ce];(Ce==null||!Ce.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(Ie)&&Ie!==1?(we.parentNode.style.width=pe.width*Ie+"px",we.parentNode.style.height=pe.height*Ie+"px",yn(we,Ie)):(yn(we,1),we.parentNode.style.width=pe.width+"px",we.parentNode.style.height=pe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Qt(Ut),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Nt).parents(".content-added-content"))}}return{responsiveResize:Me,isFlexibleWorksheetEditor:En,positionCenter:Qt,getScale:jt,scaleElement:yn}}();__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 En=n.location.search;return En.indexOf(J)!=-1||En.indexOf(K)!=-1}function q(En,yn){}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(En){var yn=s[L].bindings;s[L].bindings=function(){for(var xt=yn?yn():{},Ot=En[webModule.__softPermutationId],jt=O;jt<Ot.length;jt++){var Qt=Ot[jt];xt[Qt[O]]=Qt[P]}return xt}};var t;function u(){return v(),t}function v(){if(!t){var En=o.createElement(Q);if(En.id=L,En.style.cssText=R+S,En.tabIndex=-1,o.body.appendChild(En),t=En.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var yn=document.compatMode==U?V:W;t.write(yn+X),t.close()}}}function w(En){function yn(Ot){function jt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Qt=jt();if(Qt){Ot();return}function Me(){if(!Qt){if(!jt())return;Qt=!0,Ot(),o.removeEventListener&&o.removeEventListener(Z,Me,!1),Ut&&clearInterval(Ut)}}o.addEventListener&&o.addEventListener(Z,Me,!1);var Ut=setInterval(function(){Me()},$)}function xt(Ot){var jt=u(),Qt=jt.body,Me=jt.createElement(_);Me.language=ab,Me.crossOrigin=W,Me.src=Ot,webModule.__errFn&&(Me.onerror=function(){webModule.__errFn(L,new Error(bb+Ot))}),Qt.appendChild(Me)}yn(function(){xt(En)})}webModule.__startLoadingFragment=function(En){return C(En)},webModule.__installRunAsyncCode=function(En){var yn=u(),xt=yn.body,Ot=yn.createElement(_);Ot.language=ab,Ot.text=En,xt.appendChild(Ot),xt.removeChild(Ot)};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(En){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(En){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(En){var yn=c[En];return yn==null?null:yn},r=d,webModule.__errFn=e}function B(){function En(Ut){var pe=Ut.lastIndexOf(rb);pe==-1&&(pe=Ut.length);var Nt=Ut.indexOf(sb);Nt==-1&&(Nt=Ut.length);var Ie=Ut.lastIndexOf(tb,Math.min(Nt,pe));return Ie>=O?Ut.substring(O,Ie+P):W}function yn(Ut){if(!Ut.match(/^\w+:\/\//)){var pe=o.createElement(ub);pe.src=Ut+vb,Ut=En(pe.src)}return Ut}function xt(){var Ut=__gwt_getMetaProperty(wb);return Ut!=null?Ut:W}function Ot(){for(var Ut=o.getElementsByTagName(_),pe=O;pe<Ut.length;++pe)if(Ut[pe].src.indexOf(xb)!=-1)return En(Ut[pe].src);return W}function jt(){var Ut=o.getElementsByTagName(yb);return Ut.length>O?Ut[Ut.length-P].href:W}function Qt(){var Ut=o.location;return Ut.href==Ut.protocol+zb+Ut.host+Ut.pathname+Ut.search+Ut.hash}var Me=xt();return Me==W&&(Me=Ot()),Me==W&&(Me=jt()),Me==W&&Qt()&&(Me=En(o.location.href)),Me=yn(Me),Me}function C(En){return En.match(/^\//)||En.match(/^[a-zA-Z]+:\/\//)?En:webModule.__moduleBase+En}function D(){var En=[],yn=O,xt=[],Ot=[];function jt(Ut){var pe=Ot[Ut](),Nt=xt[Ut];if(pe in Nt)return pe;var Ie=[];for(var we in Nt)Ie[Nt[we]]=we;throw r&&r(Ut,Ie,pe),null}if(__gwt_isKnownPropertyValue=function(Ut,pe){return pe in xt[Ut]},webModule.__getPropMap=function(){var Ut={};for(var pe in xt)xt.hasOwnProperty(pe)&&(Ut[pe]=jt(pe));return Ut},webModule.__computePropValue=jt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Qt;try{Qt=Cb;var Me=Qt.indexOf(Db);Me!=-1&&(yn=parseInt(Qt.substring(Me+P),$),Qt=Qt.substring(O,Me))}catch(Ut){}return webModule.__softPermutationId=yn,C(Qt+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},77903:function(En,yn,xt){"use strict";xt.d(yn,{Ax:function(){return Me},Ds:function(){return Ut},KI:function(){return Nt},SI:function(){return Qt},f1:function(){return jt}});var Ot=xt(3294);function jt(Ie){let we=!0;if(Ie.length>0){for(let qt=0;qt<Ie.length;qt++)if(Ie[qt].compile_success==0||!Ie[qt].compile_success){we=!1;break}}else we=!1;return we}function Qt(Ie,we=""){let qt=[];for(let ce=0;ce<Ie.length;ce++){let Ce=Ie[ce],Be=we?`${we}/${Ce.name}`:`${Ce.name}`;qt.push({title:Ce.name,type:Ce.type,isLeaf:Ce.type!=="tree",key:Be})}return qt}function Me(Ie,we,qt){for(let ce=0;ce<Ie.length;ce++){let Ce=Ie[ce];if(Ce.key===we){Ce.children=qt;break}Ce.children&&Me(Ce.children,we,qt)}return Ie}function Ut(Ie,we,qt){let ce;return function(){let Ce=this,Be=arguments,Tt=function(){ce=null,qt||Ie.apply(Ce,Be)},et=qt&&!ce;clearTimeout(ce),ce=setTimeout(Tt,we),et&&Ie.apply(Ce,Be)}}const pe=!0,Nt=Ot.Z.API_SERVER},32570:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return pe}});var Ot=xt(60324),jt={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},Qt=xt(32637),Me=xt(59301),pe=({type:Nt,style:Ie})=>{const we=Me.createElement("div",{className:jt.wrap,onClick:qt=>{qt.preventDefault(),qt.stopPropagation()}},Me.createElement("p",null,Nt==="shixun"||Nt==="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",Me.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Nt==="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"),Me.createElement("div",{className:jt.contact},Me.createElement("div",{className:jt.img},Me.createElement("img",{src:Qt,width:"124px",height:"124px"})),Me.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return Me.createElement(Ot.Z,{content:we},Me.createElement("span",{className:jt.text,style:Ie},"\u9AD8\u6D88\u8017"))}},16406:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Kt}});var Ot=xt(59301),jt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Qt=xt(92310),Me=xt.n(Qt),Ut=xt(71418);var pe=function(kt,St){return(pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(mt,Lt){mt.__proto__=Lt}||function(mt,Lt){for(var zt in Lt)Object.prototype.hasOwnProperty.call(Lt,zt)&&(mt[zt]=Lt[zt])})(kt,St)};function Nt(kt,St){function mt(){this.constructor=kt}pe(kt,St),kt.prototype=St===null?Object.create(St):(mt.prototype=St.prototype,new mt)}function Ie(kt,St,mt,Lt){return new(mt||(mt=Promise))(function(zt,Et){function Yt(qe){try{ln(Lt.next(qe))}catch(Nn){Et(Nn)}}function $e(qe){try{ln(Lt.throw(qe))}catch(Nn){Et(Nn)}}function ln(qe){var Nn;qe.done?zt(qe.value):(Nn=qe.value,Nn instanceof mt?Nn:new mt(function(ai){ai(Nn)})).then(Yt,$e)}ln((Lt=Lt.apply(kt,St||[])).next())})}function we(kt,St){var mt,Lt,zt,Et,Yt={label:0,sent:function(){if(1&zt[0])throw zt[1];return zt[1]},trys:[],ops:[]};return Et={next:$e(0),throw:$e(1),return:$e(2)},typeof Symbol=="function"&&(Et[Symbol.iterator]=function(){return this}),Et;function $e(ln){return function(qe){return function(Nn){if(mt)throw new TypeError("Generator is already executing.");for(;Yt;)try{if(mt=1,Lt&&(zt=2&Nn[0]?Lt.return:Nn[0]?Lt.throw||((zt=Lt.return)&&zt.call(Lt),0):Lt.next)&&!(zt=zt.call(Lt,Nn[1])).done)return zt;switch(Lt=0,zt&&(Nn=[2&Nn[0],zt.value]),Nn[0]){case 0:case 1:zt=Nn;break;case 4:return Yt.label++,{value:Nn[1],done:!1};case 5:Yt.label++,Lt=Nn[1],Nn=[0];continue;case 7:Nn=Yt.ops.pop(),Yt.trys.pop();continue;default:if(zt=Yt.trys,!((zt=zt.length>0&&zt[zt.length-1])||Nn[0]!==6&&Nn[0]!==2)){Yt=0;continue}if(Nn[0]===3&&(!zt||Nn[1]>zt[0]&&Nn[1]<zt[3])){Yt.label=Nn[1];break}if(Nn[0]===6&&Yt.label<zt[1]){Yt.label=zt[1],zt=Nn;break}if(zt&&Yt.label<zt[2]){Yt.label=zt[2],Yt.ops.push(Nn);break}zt[2]&&Yt.ops.pop(),Yt.trys.pop();continue}Nn=St.call(kt,Yt)}catch(ai){Nn=[6,ai],Lt=0}finally{mt=zt=0}if(5&Nn[0])throw Nn[1];return{value:Nn[0]?Nn[1]:void 0,done:!0}}([ln,qe])}}}function qt(){for(var kt=0,St=0,mt=arguments.length;St<mt;St++)kt+=arguments[St].length;var Lt=Array(kt),zt=0;for(St=0;St<mt;St++)for(var Et=arguments[St],Yt=0,$e=Et.length;Yt<$e;Yt++,zt++)Lt[zt]=Et[Yt];return Lt}var ce=function(){function kt(){}return kt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},kt.setAttributes=function(St,mt){for(var Lt=0,zt=mt;Lt<zt.length;Lt++){var Et=zt[Lt],Yt=Et[0],$e=Et[1];St.setAttribute(Yt,$e)}},kt.createRect=function(St,mt,Lt){var zt=document.createElementNS("http://www.w3.org/2000/svg","rect");return zt.setAttribute("width",St.toString()),zt.setAttribute("height",mt.toString()),Lt&&kt.setAttributes(zt,Lt),zt},kt.createLine=function(St,mt,Lt,zt,Et){var Yt=document.createElementNS("http://www.w3.org/2000/svg","line");return Yt.setAttribute("x1",St.toString()),Yt.setAttribute("y1",mt.toString()),Yt.setAttribute("x2",Lt.toString()),Yt.setAttribute("y2",zt.toString()),Et&&kt.setAttributes(Yt,Et),Yt},kt.createPolygon=function(St,mt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Lt.setAttribute("points",St),mt&&kt.setAttributes(Lt,mt),Lt},kt.createCircle=function(St,mt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","circle");return Lt.setAttribute("cx",(St/2).toString()),Lt.setAttribute("cy",(St/2).toString()),Lt.setAttribute("r",St.toString()),mt&&kt.setAttributes(Lt,mt),Lt},kt.createEllipse=function(St,mt,Lt){var zt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return zt.setAttribute("cx",(St/2).toString()),zt.setAttribute("cy",(mt/2).toString()),zt.setAttribute("rx",(St/2).toString()),zt.setAttribute("ry",(mt/2).toString()),Lt&&kt.setAttributes(zt,Lt),zt},kt.createGroup=function(St){var mt=document.createElementNS("http://www.w3.org/2000/svg","g");return St&&kt.setAttributes(mt,St),mt},kt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},kt.createMarker=function(St,mt,Lt,zt,Et,Yt,$e){var ln=document.createElementNS("http://www.w3.org/2000/svg","marker");return kt.setAttributes(ln,[["id",St],["orient",mt],["markerWidth",Lt.toString()],["markerHeight",zt.toString()],["refX",Et.toString()],["refY",Yt.toString()]]),ln.appendChild($e),ln},kt.createText=function(St){var mt=document.createElementNS("http://www.w3.org/2000/svg","text");return mt.setAttribute("x","0"),mt.setAttribute("y","0"),St&&kt.setAttributes(mt,St),mt},kt.createTSpan=function(St,mt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Lt.textContent=St,mt&&kt.setAttributes(Lt,mt),Lt},kt.createImage=function(St){var mt=document.createElementNS("http://www.w3.org/2000/svg","image");return St&&kt.setAttributes(mt,St),mt},kt.createPoint=function(St,mt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Lt.x=St,Lt.y=mt,Lt},kt.createPath=function(St,mt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","path");return Lt.setAttribute("d",St),mt&&kt.setAttributes(Lt,mt),Lt},kt}(),Ce=function(){function kt(){}return kt.addKey=function(St){kt.key=St},Object.defineProperty(kt,"isLicensed",{get:function(){return!!kt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(kt.key)},enumerable:!1,configurable:!0}),kt}(),Be=function(){function kt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return kt.prototype.rasterize=function(St,mt,Lt){var zt=this;return new Promise(function(Et){var Yt=Lt!==void 0?Lt:document.createElement("canvas");St===null&&(zt.markersOnly=!0,zt.naturalSize=!1);var $e=document.createElementNS("http://www.w3.org/2000/svg","svg");$e.setAttribute("xmlns","http://www.w3.org/2000/svg"),$e.setAttribute("width",mt.width.baseVal.valueAsString),$e.setAttribute("height",mt.height.baseVal.valueAsString),$e.setAttribute("viewBox","0 0 "+mt.viewBox.baseVal.width.toString()+" "+mt.viewBox.baseVal.height.toString()),$e.innerHTML=mt.innerHTML,zt.naturalSize===!0?($e.width.baseVal.value=St.naturalWidth,$e.height.baseVal.value=St.naturalHeight):zt.width!==void 0&&zt.height!==void 0&&($e.width.baseVal.value=zt.width,$e.height.baseVal.value=zt.height),Yt.width=$e.width.baseVal.value,Yt.height=$e.height.baseVal.value;var ln=$e.outerHTML,qe=Yt.getContext("2d");zt.markersOnly!==!0&&qe.drawImage(St,0,0,Yt.width,Yt.height);var Nn=window.URL,ai=new Image(Yt.width,Yt.height);ai.setAttribute("crossOrigin","anonymous");var Kn=new Blob([ln],{type:"image/svg+xml"}),ci=Nn.createObjectURL(Kn);ai.onload=function(){qe.drawImage(ai,0,0),Nn.revokeObjectURL(ci);var Ci=Yt.toDataURL(zt.imageType,zt.imageQuality);Et(Ci)},ai.src=ci})},kt}(),Tt=function(){},et=function(){function kt(St){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+St+"_"}return Object.defineProperty(kt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(kt.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(kt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),kt.prototype.addClass=function(St){return this.styleSheet===void 0&&this.addStyleSheet(),St.name=""+this.classNamePrefix+St.localName,this.classes.push(St),this.styleSheet.sheet.insertRule("."+St.name+" {"+St.style+"}",this.styleSheet.sheet.cssRules.length),St},kt.prototype.addRule=function(St){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(St),this.styleSheet.sheet.insertRule(St.selector+" {"+St.style+"}",this.styleSheet.sheet.cssRules.length)},kt.prototype.addStyleSheet=function(){var St;this.styleSheet=document.createElement("style"),((St=this.styleSheetRoot)!==null&&St!==void 0?St:document.head).appendChild(this.styleSheet),this.addRule(new nt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new nt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new nt("@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;
|
|
|
`))},kt.prototype.removeStyleSheet=function(){var St;this.styleSheet&&(((St=this.styleSheetRoot)!==null&&St!==void 0?St:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},kt}(),nt=function(kt,St){this.selector=kt,this.style=St},ht=function(kt,St){this.localName=kt,this.style=St},st=function(){function kt(St,mt,Lt,zt,Et){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=St,this.displayMode=mt,this.markerItems=Lt,this.uiStyleSettings=zt,this.styles=Et,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return kt.prototype.show=function(St){var mt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=St,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Lt=document.createElement("div");Lt.className=this.toolbarBlockStyleClass.name,Lt.style.whiteSpace="nowrap",this.uiContainer.appendChild(Lt),this.addActionButton(Lt,'<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(Lt,'<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(Lt,'<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(Lt,'<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(Lt,'<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(Lt,'<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(Lt,'<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(Lt,'<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(Et){var Yt=document.createElement("div");Yt.className=""+mt.toolbarButtonStyleClass.name,Yt.setAttribute("data-type-name",Et.typeName),Yt.innerHTML=Et.icon,Yt.addEventListener("click",function(){mt.markerToolbarButtonClicked(Yt,Et)}),mt.buttons.push(Yt),mt.markerButtons.push(Yt)}),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 zt=document.createElement("div");zt.className=this.toolbarBlockStyleClass.name,zt.style.whiteSpace="nowrap",zt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(zt),this.addActionButton(zt,'<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(zt,'<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()},kt.prototype.addButtonClickListener=function(St){this.buttonClickListeners.push(St)},kt.prototype.removeButtonClickListener=function(St){this.buttonClickListeners.indexOf(St)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(St),1)},kt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},kt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var St=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var mt=0;mt<this.markerButtons.length;mt++)mt<St||mt===St&&this.markerButtons.length-1===St?this.markerButtonBlock.appendChild(this.markerButtons[mt]):(mt===St&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[mt]))}},kt.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")},kt.prototype.resetButtonStyles=function(){var St=this;this.buttons.forEach(function(mt){mt.className=mt.className.replace(St.uiStyleSettings.toolbarButtonStyleColorsClassName?St.uiStyleSettings.toolbarButtonStyleColorsClassName:St.toolbarButtonStyleColorsClass.name,"").trim(),mt.className=mt.className.replace(St.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?St.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:St.toolbarActiveButtonStyleColorsClass.name,"").trim(),mt.className+=" "+(St.uiStyleSettings.toolbarButtonStyleColorsClassName?St.uiStyleSettings.toolbarButtonStyleColorsClassName:St.toolbarButtonStyleColorsClass.name)})},kt.prototype.addActionButton=function(St,mt,Lt){var zt=this,Et=document.createElement("div");switch(Et.className=""+this.toolbarButtonStyleClass.name,Et.innerHTML=mt,Et.setAttribute("data-action",Lt),Et.addEventListener("click",function(){zt.actionToolbarButtonClicked(Et,Lt)}),Lt){case"select":Et.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Et.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Et.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Et.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Et.style.fill=this.uiStyleSettings.closeButtonColor}St.appendChild(Et),this.buttons.push(Et)},kt.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 St=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ht("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*St)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*St)+`px;
|
|
|
padding: `+St+`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 nt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new nt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},kt.prototype.markerToolbarButtonClicked=function(St,mt){this.setActiveButton(St),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Lt){return Lt("marker",mt)}),this.markerButtonOverflowBlock.style.display="none"},kt.prototype.actionToolbarButtonClicked=function(St,mt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Lt){return Lt("action",mt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},kt.prototype.setActiveButton=function(St){this.resetButtonStyles(),St.className=St.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),St.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},kt.prototype.setActiveMarkerButton=function(St){var mt=this.markerButtons.find(function(Lt){return Lt.getAttribute("data-type-name")===St});mt&&this.setActiveButton(mt)},kt.prototype.setCurrentMarker=function(St){var mt=this;this.currentMarker=St,this.buttons.filter(function(Lt){return/delete|notes/.test(Lt.getAttribute("data-action"))}).forEach(function(Lt){mt.currentMarker===void 0?(Lt.style.fillOpacity="0.4",Lt.style.pointerEvents="none"):(Lt.style.fillOpacity="1",Lt.style.pointerEvents="all")})},kt}(),gt=function(){function kt(St,mt,Lt,zt){this.panels=[],this.panelButtons=[],this.markerjsContainer=St,this.displayMode=mt,this.uiStyleSettings=Lt,this.styles=zt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return kt.prototype.addStyles=function(){var St;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 mt=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: `+((St=this.uiStyleSettings.toolboxBackgroundColor)!==null&&St!==void 0?St:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ht("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*mt)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*mt)+`px;
|
|
|
padding: `+mt+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new 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 nt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new nt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},kt.prototype.show=function(St){var mt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=St,this.uiContainer.className=this.toolboxStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},kt.prototype.setPanelButtons=function(St){var mt,Lt,zt=this;this.panels=St,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Lt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Lt!==void 0?Lt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Et){var Yt;Et.uiStyleSettings=zt.uiStyleSettings;var $e=document.createElement("div");$e.className=zt.toolboxButtonStyleClass.name+" "+((Yt=zt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Yt!==void 0?Yt:zt.toolboxButtonStyleColorsClass.name),$e.innerHTML=Et.icon,$e.title=Et.title,$e.addEventListener("click",function(){zt.panelButtonClick(Et)}),zt.panelButtons.push($e),zt.buttonRow.appendChild($e)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},kt.prototype.panelButtonClick=function(St){var mt=this,Lt=-1;if(St!==this.activePanel){Lt=this.panels.indexOf(St),this.panelRow.innerHTML="";var zt=St.getUi();zt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(zt),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=St}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){mt.displayMode==="inline"?mt.panelRow.style.display="none":mt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Et,Yt){var $e,ln;Et.className=mt.toolboxButtonStyleClass.name+" "+(Yt===Lt?""+(($e=mt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&$e!==void 0?$e:mt.toolboxActiveButtonStyleColorsClass.name):""+((ln=mt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ln!==void 0?ln:mt.toolboxButtonStyleColorsClass.name))})},kt}(),vt=function(kt,St){this.title=kt,this.icon=St},wt=function(kt){function St(mt,Lt,zt,Et){var Yt=kt.call(this,mt,Et||'<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 Yt.colors=[],Yt.addTransparent=!1,Yt.colorBoxes=[],Yt.colors=Lt,Yt.currentColor=zt,Yt.setCurrentColor=Yt.setCurrentColor.bind(Yt),Yt.getColorBox=Yt.getColorBox.bind(Yt),Yt}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");return Lt.style.overflow="hidden",Lt.style.whiteSpace="nowrap",this.colors.forEach(function(zt){var Et=mt.getColorBox(zt);Lt.appendChild(Et),mt.colorBoxes.push(Et)}),Lt},St.prototype.getColorBox=function(mt){var Lt=this,zt=this.uiStyleSettings.toolbarHeight/4,Et=this.uiStyleSettings.toolbarHeight-zt,Yt=document.createElement("div");Yt.style.display="inline-block",Yt.style.boxSizing="content-box",Yt.style.width=Et-2+"px",Yt.style.height=Et-2+"px",Yt.style.padding="1px",Yt.style.marginRight="2px",Yt.style.marginBottom="2px",Yt.style.borderWidth="2px",Yt.style.borderStyle="solid",Yt.style.borderRadius=(Et+2)/2+"px",Yt.style.borderColor=mt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Yt.addEventListener("click",function(){Lt.setCurrentColor(mt,Yt)});var $e=document.createElement("div");return $e.style.display="inline-block",$e.style.width=Et-2+"px",$e.style.height=Et-2+"px",$e.style.backgroundColor=mt,$e.style.borderRadius=Et/2+"px",mt==="transparent"&&($e.style.fill=this.uiStyleSettings.toolboxAccentColor,$e.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>`),Yt.appendChild($e),Yt},St.prototype.setCurrentColor=function(mt,Lt){var zt=this;this.currentColor=mt,this.colorBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(mt)},St}(vt),Ft=function(){function kt(St,mt,Lt){this._state="new",this._isSelected=!1,this._container=St,this._overlayContainer=mt,this.globalSettings=Lt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(kt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),kt.prototype.ownsTarget=function(St){return!1},Object.defineProperty(kt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),kt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},kt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},kt.prototype.pointerDown=function(St,mt){},kt.prototype.dblClick=function(St,mt){},kt.prototype.manipulate=function(St){},kt.prototype.pointerUp=function(St){this.stateChanged()},kt.prototype.dispose=function(){},kt.prototype.addMarkerVisualToContainer=function(St){this.container.childNodes.length>0?this.container.insertBefore(St,this.container.childNodes[0]):this.container.appendChild(St)},kt.prototype.getState=function(){return{typeName:kt.typeName,state:this.state,notes:this.notes}},kt.prototype.restoreState=function(St){this._state=St.state,this.notes=St.notes},kt.prototype.scale=function(St,mt){},kt.prototype.colorChanged=function(St){this.onColorChanged&&this.onColorChanged(St),this.stateChanged()},kt.prototype.fillColorChanged=function(St){this.onFillColorChanged&&this.onFillColorChanged(St),this.stateChanged()},kt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var St=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),St.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(St)&&this.onStateChanged(this)}},kt.typeName="MarkerBase",kt}(),It=function(){function kt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return kt.prototype.findGripByVisual=function(St){return this.topLeft.ownsTarget(St)?this.topLeft:this.topCenter.ownsTarget(St)?this.topCenter:this.topRight.ownsTarget(St)?this.topRight:this.centerLeft.ownsTarget(St)?this.centerLeft:this.centerRight.ownsTarget(St)?this.centerRight:this.bottomLeft.ownsTarget(St)?this.bottomLeft:this.bottomCenter.ownsTarget(St)?this.bottomCenter:this.bottomRight.ownsTarget(St)?this.bottomRight:void 0},kt}(),At=function(){function kt(){this.GRIP_SIZE=10,this.visual=ce.createGroup(),this.visual.appendChild(ce.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ce.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return kt.prototype.ownsTarget=function(St){return St===this.visual||St===this.visual.childNodes[0]||St===this.visual.childNodes[1]},kt}(),Wt=function(){function kt(){}return kt.toITransformMatrix=function(St){return{a:St.a,b:St.b,c:St.c,d:St.d,e:St.e,f:St.f}},kt.toSVGMatrix=function(St,mt){return St.a=mt.a,St.b=mt.b,St.c=mt.c,St.d=mt.d,St.e=mt.e,St.f=mt.f,St},kt}(),re=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.left=0,Et.top=0,Et.width=0,Et.height=0,Et.defaultSize={x:50,y:20},Et.offsetX=0,Et.offsetY=0,Et.rotationAngle=0,Et.CB_DISTANCE=10,Et._suppressMarkerCreateEvent=!1,Et.container.transform.baseVal.appendItem(ce.createTransform()),Et.setupControlBox(),Et}return Nt(St,kt),Object.defineProperty(St.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(St.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(St.prototype,"visual",{get:function(){return this._visual},set:function(mt){this._visual=mt;var Lt=ce.createTransform();this._visual.transform.baseVal.appendItem(Lt)},enumerable:!1,configurable:!0}),St.prototype.ownsTarget=function(mt){return!!kt.prototype.ownsTarget.call(this,mt)||!!(this.controlGrips.findGripByVisual(mt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(mt))},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.state==="new"&&(this.left=mt.x,this.top=mt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var zt=this.unrotatePoint(mt);if(this.manipulationStartX=zt.x,this.manipulationStartY=zt.y,this.offsetX=zt.x-this.left,this.offsetY=zt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Lt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Lt)){this.activeGrip=this.rotatorGrip;var Et=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Et.x-this.width/2,this.top=Et.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Yt=this.container.transform.baseVal.getItem(0);Yt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Yt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},St.prototype.pointerUp=function(mt){var Lt=this.state;kt.prototype.pointerUp.call(this,mt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(mt),this._state="select",Lt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},St.prototype.moveVisual=function(mt){this.visual.style.transform="translate("+mt.x+"px, "+mt.y+"px)"},St.prototype.manipulate=function(mt){var Lt=this.unrotatePoint(mt);this.state==="creating"?this.resize(mt):this.state==="move"?(this.left=this.manipulationStartLeft+(Lt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Lt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Lt):this.state==="rotate"&&this.rotate(mt)},St.prototype.resize=function(mt){var Lt=this.manipulationStartLeft,zt=this.manipulationStartWidth,Et=this.manipulationStartTop,Yt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Lt=this.manipulationStartLeft+mt.x-this.manipulationStartX,zt=this.manipulationStartWidth+this.manipulationStartLeft-Lt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:zt=this.manipulationStartWidth+mt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Et=this.manipulationStartTop+mt.y-this.manipulationStartY,Yt=this.manipulationStartHeight+this.manipulationStartTop-Et;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Yt=this.manipulationStartHeight+mt.y-this.manipulationStartY}zt>=0?(this.left=Lt,this.width=zt):(this.left=Lt+zt,this.width=-zt),Yt>=0?(this.top=Et,this.height=Yt):(this.top=Et+Yt,this.height=-Yt),this.setSize()},St.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},St.prototype.rotate=function(mt){if(Math.abs(mt.x-this.centerX)>.1){var Lt=Math.sign(mt.x-this.centerX);this.rotationAngle=180*Math.atan((mt.y-this.centerY)/(mt.x-this.centerX))/Math.PI+90*Lt,this.applyRotation()}},St.prototype.applyRotation=function(){var mt=this.container.transform.baseVal.getItem(0);mt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(mt,0)},St.prototype.rotatePoint=function(mt){if(this.rotationAngle===0)return mt;var Lt=this.container.getCTM(),zt=ce.createPoint(mt.x,mt.y);return{x:(zt=zt.matrixTransform(Lt)).x,y:zt.y}},St.prototype.unrotatePoint=function(mt){if(this.rotationAngle===0)return mt;var Lt=this.container.getCTM();Lt=Lt.inverse();var zt=ce.createPoint(mt.x,mt.y);return{x:(zt=zt.matrixTransform(Lt)).x,y:zt.y}},St.prototype.select=function(){kt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},St.prototype.deselect=function(){kt.prototype.deselect.call(this),this.controlBox.style.display="none"},St.prototype.setupControlBox=function(){this.controlBox=ce.createGroup();var mt=ce.createTransform();mt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(mt),this.container.appendChild(this.controlBox),this.controlRect=ce.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=ce.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 It,this.addControlGrips(),this.controlBox.style.display="none"},St.prototype.adjustControlBox=function(){var mt=this.controlBox.transform.baseVal.getItem(0);mt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(mt,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},St.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()},St.prototype.createGrip=function(){var mt=new At;return mt.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(mt.visual),mt},St.prototype.positionGrips=function(){var mt=this.controlGrips.topLeft.GRIP_SIZE,Lt=-mt/2,zt=Lt,Et=(this.width+this.CB_DISTANCE)/2-mt/2,Yt=(this.height+this.CB_DISTANCE)/2-mt/2,$e=this.height+this.CB_DISTANCE-mt/2,ln=this.width+this.CB_DISTANCE-mt/2;this.positionGrip(this.controlGrips.topLeft.visual,Lt,zt),this.positionGrip(this.controlGrips.topCenter.visual,Et,zt),this.positionGrip(this.controlGrips.topRight.visual,ln,zt),this.positionGrip(this.controlGrips.centerLeft.visual,Lt,Yt),this.positionGrip(this.controlGrips.centerRight.visual,ln,Yt),this.positionGrip(this.controlGrips.bottomLeft.visual,Lt,$e),this.positionGrip(this.controlGrips.bottomCenter.visual,Et,$e),this.positionGrip(this.controlGrips.bottomRight.visual,ln,$e),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Et,zt-3*this.CB_DISTANCE)},St.prototype.positionGrip=function(mt,Lt,zt){var Et=mt.transform.baseVal.getItem(0);Et.setTranslate(Lt,zt),mt.transform.baseVal.replaceItem(Et,0)},St.prototype.hideControlBox=function(){this.controlBox.style.display="none"},St.prototype.showControlBox=function(){this.controlBox.style.display=""},St.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Wt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Wt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},kt.prototype.getState.call(this))},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt);var Lt=mt;this.left=Lt.left,this.top=Lt.top,this.width=Lt.width,this.height=Lt.height,this.rotationAngle=Lt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Wt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Lt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Wt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Lt.containerTransformMatrix))},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt);var zt=this.rotatePoint({x:this.left,y:this.top}),Et=this.unrotatePoint({x:zt.x*mt,y:zt.y*Lt});this.left=Et.x,this.top=Et.y,this.width=this.width*mt,this.height=this.height*Lt,this.adjustControlBox()},St}(Ft),ne=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.fillColor="transparent",Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.opacity=1,Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setFillColor=Et.setFillColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.createVisual=Et.createVisual.bind(Et),Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},St.prototype.createVisual=function(){this.visual=ce.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)},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.manipulate=function(mt){kt.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){kt.prototype.resize.call(this,mt),this.setSize()},St.prototype.setSize=function(){kt.prototype.setSize.call(this),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},St.prototype.pointerUp=function(mt){kt.prototype.pointerUp.call(this,mt),this.setSize()},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},St.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},St.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},kt.prototype.getState.call(this))},St.prototype.restoreState=function(mt){var Lt=mt;this.fillColor=Lt.fillColor,this.strokeColor=Lt.strokeColor,this.strokeWidth=Lt.strokeWidth,this.strokeDasharray=Lt.strokeDasharray,this.opacity=Lt.opacity,this.createVisual(),kt.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.setSize()},St.title="Rectangle marker",St}(re),me=function(kt){function St(mt,Lt,zt,Et){var Yt=kt.call(this,mt,Et||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Yt.widths=[],Yt.widthBoxes=[],Yt.widths=Lt,Yt.currentWidth=zt,Yt.setCurrentWidth=Yt.setCurrentWidth.bind(Yt),Yt}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");return Lt.style.display="flex",Lt.style.overflow="hidden",Lt.style.flexGrow="2",this.widths.forEach(function(zt){var Et=document.createElement("div");Et.style.display="flex",Et.style.flexGrow="2",Et.style.alignItems="center",Et.style.justifyContent="space-between",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.borderColor=zt===mt.currentWidth?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentWidth(zt,Et)}),Lt.appendChild(Et);var Yt=document.createElement("div");Yt.innerText=zt.toString(),Yt.style.marginRight="5px",Et.appendChild(Yt);var $e=document.createElement("div");$e.style.minHeight="20px",$e.style.flexGrow="2",$e.style.display="flex",$e.style.alignItems="center";var ln=document.createElement("hr");ln.style.minWidth="20px",ln.style.border="0px",ln.style.borderTop=zt+"px solid "+mt.uiStyleSettings.toolboxColor,ln.style.flexGrow="2",$e.appendChild(ln),Et.appendChild($e),mt.widthBoxes.push(Et)}),Lt},St.prototype.setCurrentWidth=function(mt,Lt){var zt=this;this.currentWidth=mt,this.widthBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},St}(vt),Vt=function(kt){function St(mt,Lt,zt,Et){var Yt=kt.call(this,mt,Et||'<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 Yt.styles=[],Yt.styleBoxes=[],Yt.styles=Lt,Yt.currentStyle=zt,Yt.setCurrentStyle=Yt.setCurrentStyle.bind(Yt),Yt}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");return Lt.style.display="flex",Lt.style.overflow="hidden",Lt.style.flexGrow="2",this.styles.forEach(function(zt){var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.justifyContent="space-between",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.overflow="hidden",Et.style.maxWidth=100/mt.styles.length-5+"%",Et.style.borderColor=zt===mt.currentStyle?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentStyle(zt,Et)}),Lt.appendChild(Et);var Yt=document.createElement("div");Yt.style.minHeight="20px",Yt.style.flexGrow="2",Yt.style.overflow="hidden";var $e=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+mt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(zt!==""?'stroke-dasharray="'+zt+'"':"")+` />
|
|
|
</svg>`;Yt.innerHTML=$e,Et.appendChild(Yt),mt.styleBoxes.push(Et)}),Lt},St.prototype.setCurrentStyle=function(mt,Lt){var zt=this;this.currentStyle=mt,this.styleBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},St}(vt),Le=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.strokeColor=zt.defaultColor,Et.strokeWidth=zt.defaultStrokeWidth,Et.strokeDasharray=zt.defaultStrokeDasharray,Et.strokePanel=new wt("Line color",zt.defaultColorSet,zt.defaultColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.strokeWidthPanel=new me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new Vt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et}return Nt(St,kt),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=kt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="FrameMarker",St.title="Frame marker",St.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',St}(ne),he=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"},Ge=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.x1=0,Et.y1=0,Et.x2=0,Et.y2=0,Et.defaultLength=50,Et.manipulationStartX=0,Et.manipulationStartY=0,Et.manipulationStartX1=0,Et.manipulationStartY1=0,Et.manipulationStartX2=0,Et.manipulationStartY2=0,Et.setupControlBox(),Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!!kt.prototype.ownsTarget.call(this,mt)||!(!this.grip1.ownsTarget(mt)&&!this.grip2.ownsTarget(mt))},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.manipulationStartX=mt.x,this.manipulationStartY=mt.y,this.state==="new"&&(this.x1=mt.x,this.y1=mt.y,this.x2=mt.x,this.y2=mt.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(Lt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Lt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},St.prototype.pointerUp=function(mt){var Lt=this.state;kt.prototype.pointerUp.call(this,mt),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(mt),this._state="select",Lt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},St.prototype.adjustVisual=function(){},St.prototype.manipulate=function(mt){this.state==="creating"?this.resize(mt):this.state==="move"?(this.x1=this.manipulationStartX1+mt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+mt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+mt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+mt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(mt)},St.prototype.resize=function(mt){switch(this.activeGrip){case this.grip1:this.x1=mt.x,this.y1=mt.y;break;case this.grip2:case void 0:this.x2=mt.x,this.y2=mt.y}this.adjustVisual(),this.adjustControlBox()},St.prototype.select=function(){kt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},St.prototype.deselect=function(){kt.prototype.deselect.call(this),this.controlBox.style.display="none"},St.prototype.setupControlBox=function(){this.controlBox=ce.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},St.prototype.adjustControlBox=function(){this.positionGrips()},St.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},St.prototype.createGrip=function(){var mt=new At;return mt.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(mt.visual),mt},St.prototype.positionGrips=function(){var mt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-mt/2,this.y1-mt/2),this.positionGrip(this.grip2.visual,this.x2-mt/2,this.y2-mt/2)},St.prototype.positionGrip=function(mt,Lt,zt){var Et=mt.transform.baseVal.getItem(0);Et.setTranslate(Lt,zt),mt.transform.baseVal.replaceItem(Et,0)},St.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},kt.prototype.getState.call(this))},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt);var Lt=mt;this.x1=Lt.x1,this.y1=Lt.y1,this.x2=Lt.x2,this.y2=Lt.y2},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.x1=this.x1*mt,this.y1=this.y1*Lt,this.x2=this.x2*mt,this.y2=this.y2*Lt,this.adjustVisual(),this.adjustControlBox()},St}(Ft),Ke=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.strokeColor=zt.defaultColor,Et.strokeWidth=zt.defaultStrokeWidth,Et.strokeDasharray=zt.defaultStrokeDasharray,Et.strokePanel=new wt("Line color",zt.defaultColorSet,zt.defaultColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.strokeWidthPanel=new me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new Vt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorLine&&mt!==this.visibleLine)},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorLine=ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ce.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)},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},St.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()),ce.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt);var Lt=mt;this.strokeColor=Lt.strokeColor,this.strokeWidth=Lt.strokeWidth,this.strokeDasharray=Lt.strokeDasharray,this.createVisual(),this.adjustVisual()},St.typeName="LineMarker",St.title="Line marker",St.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',St}(Ge),Ve=function(kt){function St(mt,Lt,zt,Et){var Yt=kt.call(this,mt,Et||'<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 Yt.fonts=[],Yt.fontBoxes=[],Yt.fonts=Lt,Yt.currentFont=zt,Yt.setCurrentFont=Yt.setCurrentFont.bind(Yt),Yt}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");return Lt.style.overflow="hidden",Lt.style.flexGrow="2",this.fonts.forEach(function(zt){var Et=document.createElement("div");Et.style.display="inline-block",Et.style.alignItems="center",Et.style.justifyContent="space-between",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.overflow="hidden",Et.style.maxWidth=100/mt.fonts.length-5+"%",Et.style.borderColor=zt===mt.currentFont?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentFont(zt,Et)}),Lt.appendChild(Et);var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.minHeight="20px",Yt.style.flexGrow="2",Yt.style.fontFamily=zt,Yt.style.overflow="hidden";var $e=document.createElement("div");$e.style.whiteSpace="nowrap",$e.style.overflow="hidden",$e.style.textOverflow="ellipsis",$e.innerHTML="The quick brown fox jumps over the lazy dog",Yt.appendChild($e),Et.appendChild(Yt),mt.fontBoxes.push(Et)}),Lt},St.prototype.setCurrentFont=function(mt,Lt){var zt=this;this.currentFont=mt,this.fontBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},St}(vt),sn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.color="transparent",Et.padding=5,Et.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Et.text=Et.DEFAULT_TEXT,Et.isMoved=!1,Et.color=zt.defaultColor,Et.fontFamily=zt.defaultFontFamily,Et.defaultSize={x:100,y:30},Et.setColor=Et.setColor.bind(Et),Et.setFont=Et.setFont.bind(Et),Et.renderText=Et.renderText.bind(Et),Et.sizeText=Et.sizeText.bind(Et),Et.textEditDivClicked=Et.textEditDivClicked.bind(Et),Et.showTextEditor=Et.showTextEditor.bind(Et),Et.setSize=Et.setSize.bind(Et),Et.positionTextEditor=Et.positionTextEditor.bind(Et),Et.colorPanel=new wt("Color",zt.defaultColorSet,zt.defaultColor),Et.colorPanel.onColorChanged=Et.setColor,Et.fontFamilyPanel=new Ve("Font",zt.defaultFontFamilies,zt.defaultFontFamily),Et.fontFamilyPanel.onFontChanged=Et.setFont,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){if(kt.prototype.ownsTarget.call(this,mt)||mt===this.visual||mt===this.textElement||mt===this.bgRectangle)return!0;var Lt=!1;return this.textElement.childNodes.forEach(function(zt){zt===mt&&(Lt=!0)}),Lt},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.bgRectangle=ce.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ce.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.renderText=function(){var mt=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(Lt){mt.textElement.appendChild(ce.createTSpan(Lt.trim()===""?" ":Lt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},St.prototype.getTextScale=function(){var mt=this.textElement.getBBox(),Lt=1;if(mt.width>0&&mt.height>0){var zt=(1*this.width-this.width*this.padding*2/100)/mt.width,Et=(1*this.height-this.height*this.padding*2/100)/mt.height;Lt=Math.min(zt,Et)}return Lt},St.prototype.getTextPosition=function(mt){var Lt=this.textElement.getBBox(),zt=0,Et=0;return Lt.width>0&&Lt.height>0&&(zt=(this.width-Lt.width*mt)/2,Et=this.height/2-Lt.height*mt/2),{x:zt,y:Et}},St.prototype.sizeText=function(){var mt=this.textElement.getBBox(),Lt=this.getTextScale(),zt=this.getTextPosition(Lt);zt.y-=mt.y*Lt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+zt.x+"px, "+zt.y+"px) scale("+Lt+", "+Lt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(zt.x,zt.y),this.textElement.transform.baseVal.getItem(1).setScale(Lt,Lt))},St.prototype.manipulate=function(mt){kt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},St.prototype.resize=function(mt){kt.prototype.resize.call(this,mt),this.isMoved=!0,this.setSize(),this.sizeText()},St.prototype.setSize=function(){kt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},St.prototype.pointerUp=function(mt){var Lt=this.state;Lt==="creating"&&(this._suppressMarkerCreateEvent=!0),kt.prototype.pointerUp.call(this,mt),this.setSize(),(Lt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},St.prototype.showTextEditor=function(){var mt=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(Lt){Lt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Lt=Number.parseFloat(mt.textEditor.style.fontSize);mt.textEditor.clientWidth>=Number.parseInt(mt.textEditor.style.maxWidth)&&Lt>.9;)Lt-=.1,mt.textEditor.style.fontSize=Math.max(Lt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Lt){Lt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Lt){if(Lt.clipboardData){var zt=Lt.clipboardData.getData("text"),Et=window.getSelection();if(!Et.rangeCount)return!1;Et.deleteFromDocument(),Et.getRangeAt(0).insertNode(document.createTextNode(zt)),Lt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){mt.textEditDivClicked(mt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},St.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var mt=this.getTextScale(),Lt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),zt=this.textElement.getBBox(),Et={x:zt.width*mt,y:zt.height*mt};Lt.x-=Et.x/2,Lt.y-=Et.y/2,this.textEditor.style.top=Lt.y+"px",this.textEditor.style.left=Lt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Lt.x+"px",this.textEditor.style.fontSize=Math.max(16*mt,12)+"px",this.textElement.style.display="none"}},St.prototype.textEditDivClicked=function(mt){this.text=mt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},St.prototype.select=function(){kt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},St.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),kt.prototype.deselect.call(this)},St.prototype.dblClick=function(mt,Lt){kt.prototype.dblClick.call(this,mt,Lt),this.showTextEditor()},St.prototype.setColor=function(mt){this.textElement&&ce.setAttributes(this.textElement,[["fill",mt]]),this.color=mt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(mt)},St.prototype.setFont=function(mt){this.textElement&&ce.setAttributes(this.textElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},St.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},St.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){var Lt=mt;this.color=Lt.color,this.fontFamily=Lt.fontFamily,this.padding=Lt.padding,this.text=Lt.text,this.createVisual(),kt.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.setSize(),this.sizeText(),this.positionTextEditor()},St.typeName="TextMarker",St.title="Text marker",St.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>',St}(re),Mn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.color="transparent",Et.lineWidth=3,Et.drawing=!1,Et.pixelRatio=1,Et.color=zt.defaultColor,Et.lineWidth=zt.defaultStrokeWidth,Et.pixelRatio=zt.freehandPixelRatio,Et.setColor=Et.setColor.bind(Et),Et.addCanvas=Et.addCanvas.bind(Et),Et.finishCreation=Et.finishCreation.bind(Et),Et.setLineWidth=Et.setLineWidth.bind(Et),Et.colorPanel=new wt("Color",zt.defaultColorSet,zt.defaultColor),Et.colorPanel.onColorChanged=Et.setColor,Et.lineWidthPanel=new me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Et.lineWidthPanel.onWidthChanged=Et.setLineWidth,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.drawingImage)},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.drawingImage=ce.createImage(),this.visual.appendChild(this.drawingImage);var mt=ce.createTransform();this.visual.transform.baseVal.appendItem(mt),this.addMarkerVisualToContainer(this.visual)},St.prototype.pointerDown=function(mt,Lt){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(mt.x,mt.y),this.drawing=!0):kt.prototype.pointerDown.call(this,mt,Lt)},St.prototype.manipulate=function(mt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(mt.x,mt.y),this.canvasContext.stroke()):kt.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){kt.prototype.resize.call(this,mt),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},St.prototype.pointerUp=function(mt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):kt.prototype.pointerUp.call(this,mt)},St.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)},St.prototype.select=function(){this.state==="creating"&&this.finishCreation(),kt.prototype.select.call(this)},St.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),kt.prototype.deselect.call(this)},St.prototype.finishCreation=function(){for(var mt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Lt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],zt=Lt[0],Et=Lt[1],Yt=Lt[2],$e=Lt[3],ln=!1,qe=0;qe<this.canvasElement.height;qe++)for(var Nn=0;Nn<this.canvasElement.width;Nn++)mt.data[qe*this.canvasElement.width*4+4*Nn+3]>0&&(ln=!0,qe<Et&&(Et=qe),Nn<zt&&(zt=Nn),qe>$e&&($e=qe),Nn>Yt&&(Yt=Nn));if(ln){this.left=zt/this.pixelRatio,this.top=Et/this.pixelRatio,this.width=(Yt-zt)/this.pixelRatio,this.height=($e-Et)/this.pixelRatio;var ai=document.createElement("canvas");ai.width=Yt-zt,ai.height=$e-Et,ai.getContext("2d").putImageData(this.canvasContext.getImageData(zt,Et,Yt-zt,$e-Et),0,0),this.drawingImgUrl=ai.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},St.prototype.setDrawingImage=function(){ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},St.prototype.setColor=function(mt){this.color=mt,this.colorChanged(mt)},St.prototype.setLineWidth=function(mt){this.lineWidth=mt},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({drawingImgUrl:this.drawingImgUrl},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){this.createVisual(),kt.prototype.restoreState.call(this,mt),this.drawingImgUrl=mt.drawingImgUrl,this.setDrawingImage()},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.setDrawingImage()},St.typeName="FreehandMarker",St.title="Freehand marker",St.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>',St}(re),xe=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,zt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Et.typeBoxes=[],Et.currentType=Lt,Et.setCurrentType=Et.setCurrentType.bind(Et),Et}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");Lt.style.display="flex",Lt.style.overflow="hidden",Lt.style.flexGrow="2";for(var zt=function($e){var ln="both";switch($e){case 0:ln="both";break;case 1:ln="start";break;case 2:ln="end";break;case 3:ln="none"}var qe=document.createElement("div");if(qe.style.display="flex",qe.style.flexGrow="2",qe.style.alignItems="center",qe.style.justifyContent="space-between",qe.style.padding="5px",qe.style.borderWidth="2px",qe.style.borderStyle="solid",qe.style.borderColor=ln===Et.currentType?Et.uiStyleSettings.toolboxAccentColor:"transparent",qe.addEventListener("click",function(){mt.setCurrentType(ln,qe)}),Lt.appendChild(qe),ln==="both"||ln==="start"){var Nn=document.createElement("div");Nn.style.display="flex",Nn.style.alignItems="center",Nn.style.minHeight="20px",Nn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(Et.uiStyleSettings!==void 0?Et.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Nn.style.marginLeft="5px",qe.appendChild(Nn)}var ai=document.createElement("div");ai.style.display="flex",ai.style.alignItems="center",ai.style.minHeight="20px",ai.style.flexGrow="2";var Kn=document.createElement("hr");if(Kn.style.minWidth="20px",Kn.style.border="0px",Kn.style.borderTop="3px solid "+(Et.uiStyleSettings!==void 0?Et.uiStyleSettings.toolboxColor:"#eeeeee"),Kn.style.flexGrow="2",ai.appendChild(Kn),qe.appendChild(ai),ln==="both"||ln==="end"){var ci=document.createElement("div");ci.style.display="flex",ci.style.alignItems="center",ci.style.minHeight="20px",ci.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="`+(Et.uiStyleSettings!==void 0?Et.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,ci.style.marginRight="5px",qe.appendChild(ci)}Et.typeBoxes.push(qe)},Et=this,Yt=0;Yt<4;Yt++)zt(Yt);return Lt},St.prototype.setCurrentType=function(mt,Lt){var zt=this;this.currentType=mt,this.typeBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings!==void 0?zt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},St}(vt),Ht=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.arrowType="end",Et.arrowBaseHeight=10,Et.arrowBaseWidth=10,Et.getArrowPoints=Et.getArrowPoints.bind(Et),Et.setArrowType=Et.setArrowType.bind(Et),Et.arrowTypePanel=new xe("Arrow type","end"),Et.arrowTypePanel.onArrowTypeChanged=Et.setArrowType,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.arrow1&&mt!==this.arrow2)},St.prototype.getArrowPoints=function(mt,Lt){var zt=this.arrowBaseWidth+2*this.strokeWidth,Et=this.arrowBaseHeight+2*this.strokeWidth;return mt-zt/2+","+(Lt+Et/2)+" "+mt+","+(Lt-Et/2)+" "+(mt+zt/2)+","+(Lt+Et/2)},St.prototype.createTips=function(){this.arrow1=ce.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ce.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow2)},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.state==="creating"&&this.createTips()},St.prototype.adjustVisual=function(){if(kt.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",ce.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ce.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var mt=0;Math.abs(this.x1-this.x2)>.1&&(mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Lt=this.arrow1.transform.baseVal.getItem(0);Lt.setRotate(mt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Lt,0);var zt=this.arrow2.transform.baseVal.getItem(0);zt.setRotate(mt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(zt,0)}},St.prototype.setArrowType=function(mt){this.arrowType=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({arrowType:this.arrowType},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt);var Lt=mt;this.arrowType=Lt.arrowType,this.createTips(),this.adjustVisual()},St.typeName="ArrowMarker",St.title="Arrow marker",St.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',St}(Ke),Je=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.fillColor=zt.defaultFillColor,Et.strokeWidth=0,Et.fillPanel=new wt("Color",zt.defaultColorSet,zt.defaultFillColor),Et.fillPanel.onColorChanged=Et.setFillColor,Et}return Nt(St,kt),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=kt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="CoverMarker",St.title="Cover marker",St.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',St}(ne),Tn=function(kt){function St(mt,Lt,zt,Et){var Yt=kt.call(this,mt,Et||'<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 Yt.opacities=[],Yt.opacityBoxes=[],Yt.opacities=Lt,Yt.currentOpacity=zt,Yt.setCurrentOpacity=Yt.setCurrentOpacity.bind(Yt),Yt}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");return Lt.style.display="flex",Lt.style.overflow="hidden",Lt.style.flexGrow="2",Lt.style.justifyContent="space-between",this.opacities.forEach(function(zt){var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.justifyContent="center",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.borderColor=zt===mt.currentOpacity?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentOpacity(zt,Et)}),Lt.appendChild(Et);var Yt=document.createElement("div");Yt.innerText=100*zt+"%",Et.appendChild(Yt),mt.opacityBoxes.push(Et)}),Lt},St.prototype.setCurrentOpacity=function(mt,Lt){var zt=this;this.currentOpacity=mt,this.opacityBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},St}(vt),An=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.setOpacity=Et.setOpacity.bind(Et),Et.fillColor=zt.defaultHighlightColor,Et.strokeWidth=0,Et.opacity=zt.defaultHighlightOpacity,Et.fillPanel=new wt("Color",zt.defaultColorSet,Et.fillColor),Et.fillPanel.onColorChanged=Et.setFillColor,Et.opacityPanel=new Tn("Opacity",zt.defaultOpacitySteps,Et.opacity),Et.opacityPanel.onOpacityChanged=Et.setOpacity,Et}return Nt(St,kt),St.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=kt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="HighlightMarker",St.title="Highlight marker",St.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>',St}(Je),ze='<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>',Te='<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>',dn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.bgColor="transparent",Et.tipPosition={x:0,y:0},Et.tipBase1Position={x:0,y:0},Et.tipBase2Position={x:0,y:0},Et.tipMoving=!1,Et.color=zt.defaultStrokeColor,Et.bgColor=zt.defaultFillColor,Et.fontFamily=zt.defaultFontFamily,Et.defaultSize={x:100,y:30},Et.setBgColor=Et.setBgColor.bind(Et),Et.getTipPoints=Et.getTipPoints.bind(Et),Et.positionTip=Et.positionTip.bind(Et),Et.setTipPoints=Et.setTipPoints.bind(Et),Et.colorPanel=new wt("Text color",zt.defaultColorSet,Et.color,ze),Et.colorPanel.onColorChanged=Et.setColor,Et.bgColorPanel=new wt("Fill color",zt.defaultColorSet,Et.bgColor,Te),Et.bgColorPanel.onColorChanged=Et.setBgColor,Et.fontFamilyPanel=new Ve("Font",zt.defaultFontFamilies,zt.defaultFontFamily),Et.fontFamilyPanel.onFontChanged=Et.setFont,Et.tipGrip=new At,Et.tipGrip.visual.transform.baseVal.appendItem(ce.createTransform()),Et.controlBox.appendChild(Et.tipGrip.visual),Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return kt.prototype.ownsTarget.call(this,mt)||this.tipGrip.ownsTarget(mt)||this.tip===mt},St.prototype.createTip=function(){ce.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ce.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},St.prototype.pointerDown=function(mt,Lt){this.state==="new"&&kt.prototype.pointerDown.call(this,mt,Lt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Lt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):kt.prototype.pointerDown.call(this,mt,Lt)},St.prototype.pointerUp=function(mt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,kt.prototype.pointerUp.call(this,mt);else{var Lt=this.state==="creating";kt.prototype.pointerUp.call(this,mt),this.setTipPoints(Lt),this.positionTip()}},St.prototype.manipulate=function(mt){if(this.tipMoving){var Lt=this.unrotatePoint(mt);this.tipPosition={x:Lt.x-this.manipulationStartLeft,y:Lt.y-this.manipulationStartTop},this.positionTip()}else kt.prototype.manipulate.call(this,mt)},St.prototype.setBgColor=function(mt){this.bgRectangle&&this.tip&&(ce.setAttributes(this.bgRectangle,[["fill",mt]]),ce.setAttributes(this.tip,[["fill",mt]])),this.bgColor=mt,this.fillColorChanged(mt)},St.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},St.prototype.setTipPoints=function(mt){mt===void 0&&(mt=!1);var Lt=Math.min(this.height/2,15),zt=this.height/5;mt&&(this.tipPosition={x:Lt+zt/2,y:this.height+20});var Et=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Et<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(zt=this.width/5,Lt=Math.min(this.width/2,15),this.tipBase1Position={x:Lt,y:0},this.tipBase2Position={x:Lt+zt,y:0}):(this.tipBase1Position={x:0,y:Lt},this.tipBase2Position={x:0,y:Lt+zt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Et<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(zt=this.width/5,Lt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Lt-zt,y:0},this.tipBase2Position={x:this.width-Lt,y:0}):(this.tipBase1Position={x:this.width,y:Lt},this.tipBase2Position={x:this.width,y:Lt+zt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Et<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(zt=this.width/5,Lt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Lt-zt,y:this.height},this.tipBase2Position={x:this.width-Lt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Lt-zt},this.tipBase2Position={x:this.width,y:this.height-Lt}):Et<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(zt=this.width/5,Lt=Math.min(this.width/2,15),this.tipBase1Position={x:Lt,y:this.height},this.tipBase2Position={x:Lt+zt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Lt},this.tipBase2Position={x:0,y:this.height-Lt-zt})},St.prototype.resize=function(mt){kt.prototype.resize.call(this,mt),this.positionTip()},St.prototype.positionTip=function(){ce.setAttributes(this.tip,[["points",this.getTipPoints()]]);var mt=this.tipGrip.visual.transform.baseVal.getItem(0);mt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(mt,0)},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),St.prototype.select=function(){this.positionTip(),kt.prototype.select.call(this)},St.prototype.getState=function(){var mt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){var Lt=mt;this.bgColor=Lt.bgColor,this.tipPosition=Lt.tipPosition,kt.prototype.restoreState.call(this,mt),this.createTip(),this.setTipPoints()},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.tipPosition={x:this.tipPosition.x*mt,y:this.tipPosition.y*Lt},this.positionTip()},St.typeName="CalloutMarker",St.title="Callout marker",St.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>',St}(sn),Hn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.fillColor="transparent",Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.opacity=1,Et.strokeColor=zt.defaultColor,Et.strokeWidth=zt.defaultStrokeWidth,Et.strokeDasharray=zt.defaultStrokeDasharray,Et.fillColor=zt.defaultFillColor,Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setFillColor=Et.setFillColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.setOpacity=Et.setOpacity.bind(Et),Et.createVisual=Et.createVisual.bind(Et),Et.strokePanel=new wt("Line color",qt(zt.defaultColorSet,["transparent"]),zt.defaultColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.fillPanel=new wt("Fill color",qt(zt.defaultColorSet,["transparent"]),Et.fillColor,Te),Et.fillPanel.onColorChanged=Et.setFillColor,Et.strokeWidthPanel=new me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new Vt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et.opacityPanel=new Tn("Opacity",zt.defaultOpacitySteps,Et.opacity),Et.opacityPanel.onOpacityChanged=Et.setOpacity,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},St.prototype.createVisual=function(){this.visual=ce.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)},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.manipulate=function(mt){kt.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){kt.prototype.resize.call(this,mt),this.setSize()},St.prototype.setSize=function(){kt.prototype.setSize.call(this),ce.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},St.prototype.pointerUp=function(mt){kt.prototype.pointerUp.call(this,mt),this.setSize()},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},St.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},St.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){var Lt=mt;this.fillColor=Lt.fillColor,this.strokeColor=Lt.strokeColor,this.strokeWidth=Lt.strokeWidth,this.strokeDasharray=Lt.strokeDasharray,this.opacity=Lt.opacity,this.createVisual(),kt.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.setSize()},St.typeName="EllipseMarker",St.title="Ellipse marker",St.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>',St}(re),hn=function(kt){function St(mt,Lt,zt){return kt.call(this,mt,Lt,zt)||this}return Nt(St,kt),Object.defineProperty(St.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.tip1&&mt!==this.tip2)},St.prototype.createTips=function(){this.tip1=ce.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(ce.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ce.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(ce.createTransform()),this.visual.appendChild(this.tip2)},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.state==="creating"&&this.createTips()},St.prototype.adjustVisual=function(){if(kt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ce.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()]]),ce.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Lt=this.tip1.transform.baseVal.getItem(0);Lt.setRotate(mt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Lt,0);var zt=this.tip2.transform.baseVal.getItem(0);zt.setRotate(mt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(zt,0)}},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=kt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt),this.createTips(),this.adjustVisual()},St.typeName="MeasurementMarker",St.title="Measurement marker",St.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>',St}(Ke),pn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.strokePanel.colors=zt.defaultColorSet,Et.fillColor="transparent",Et}return Nt(St,kt),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=kt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="EllipseFrameMarker",St.title="Ellipse frame marker",St.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>',St}(Hn),de=function(){function kt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(kt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),kt.prototype.addUndoStep=function(St){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(St)||(this.undoStack.push(St),JSON.stringify(this.lastRedoStep)!==JSON.stringify(St)&&this.redoStack.splice(0,this.redoStack.length))},kt.prototype.replaceLastUndoStep=function(St){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=St)},kt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},kt.prototype.undo=function(){if(this.undoStack.length>1){var St=this.undoStack.pop();return St!==void 0&&this.redoStack.push(St),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},kt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},kt}(),vn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.curveX=0,Et.curveY=0,Et.manipulationStartCurveX=0,Et.manipulationStartCurveY=0,Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.positionGrips=Et.positionGrips.bind(Et),Et.addControlGrips=Et.addControlGrips.bind(Et),Et.adjustVisual=Et.adjustVisual.bind(Et),Et.setupControlBox=Et.setupControlBox.bind(Et),Et.resize=Et.resize.bind(Et),Et.strokeColor=zt.defaultColor,Et.strokeWidth=zt.defaultStrokeWidth,Et.strokeDasharray=zt.defaultStrokeDasharray,Et.strokePanel=new wt("Line color",zt.defaultColorSet,zt.defaultColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.strokeWidthPanel=new me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new Vt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorCurve&&mt!==this.visibleCurve&&!this.curveGrip.ownsTarget(mt))},St.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorCurve=ce.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ce.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)},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=mt.x,this.curveY=mt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Lt)&&(this.activeGrip=this.curveGrip,this._state="resize")},St.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ce.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},St.prototype.setupControlBox=function(){kt.prototype.setupControlBox.call(this),this.curveControlLine1=ce.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ce.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)},St.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,kt.prototype.addControlGrips.call(this)},St.prototype.positionGrips=function(){kt.prototype.positionGrips.call(this);var mt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-mt/2,this.curveY-mt/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},St.prototype.manipulate=function(mt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+mt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+mt.y-this.manipulationStartY),kt.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){this.activeGrip===this.curveGrip&&(this.curveX=mt.x,this.curveY=mt.y),kt.prototype.resize.call(this,mt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual()},St.prototype.scale=function(mt,Lt){this.curveX=this.curveX*mt,this.curveY=this.curveY*Lt,kt.prototype.scale.call(this,mt,Lt)},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt);var Lt=mt;this.strokeColor=Lt.strokeColor,this.strokeWidth=Lt.strokeWidth,this.strokeDasharray=Lt.strokeDasharray,this.curveX=Lt.curveX,this.curveY=Lt.curveY,this.createVisual(),this.adjustVisual()},St.typeName="CurveMarker",St.title="Curve marker",St.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>',St}(Ge),bn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.fillColor="transparent",Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.textColor="transparent",Et.fontSize="1rem",Et.isMoved=!1,Et.captionText="Caption",Et.PADDING=5,Et.captionBoxWidth=0,Et.captionBoxHeight=0,Et.strokeColor=zt.defaultColor,Et.strokeWidth=zt.defaultStrokeWidth,Et.strokeDasharray=zt.defaultStrokeDasharray,Et.fillColor=zt.defaultFillColor,Et.textColor=zt.defaultStrokeColor,Et.fontFamily=zt.defaultFontFamily,Et.fontSize=zt.defaultCaptionFontSize,Et.captionText=zt.defaultCaptionText,Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setFillColor=Et.setFillColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.createVisual=Et.createVisual.bind(Et),Et.sizeCaption=Et.sizeCaption.bind(Et),Et.setCaptionText=Et.setCaptionText.bind(Et),Et.showTextEditor=Et.showTextEditor.bind(Et),Et.positionTextEditor=Et.positionTextEditor.bind(Et),Et.finishTextEditing=Et.finishTextEditing.bind(Et),Et.setFont=Et.setFont.bind(Et),Et.setTextColor=Et.setTextColor.bind(Et),Et.strokePanel=new wt("Line color",qt(zt.defaultColorSet,["transparent"]),Et.strokeColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.fillPanel=new wt("Fill color",qt(zt.defaultColorSet,["transparent"]),Et.fillColor,Te),Et.fillPanel.onColorChanged=Et.setFillColor,Et.strokeWidthPanel=new me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new Vt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et.fontFamilyPanel=new Ve("Font",zt.defaultFontFamilies,zt.defaultFontFamily),Et.fontFamilyPanel.onFontChanged=Et.setFont,Et.textColorPanel=new wt("Text color",zt.defaultColorSet,Et.textColor,ze),Et.textColorPanel.onColorChanged=Et.setTextColor,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.frame&&mt!==this.captionBg&&mt!==this.captionElement)},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ce.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ce.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=ce.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()},St.prototype.setCaptionText=function(mt){this.captionText=mt,this.captionElement.textContent=this.captionText,this.sizeCaption()},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.manipulate=function(mt){kt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},St.prototype.resize=function(mt){kt.prototype.resize.call(this,mt),this.setSize()},St.prototype.sizeCaption=function(){var mt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=mt.width+2*this.PADDING,this.captionBoxHeight=mt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ce.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')"]]),ce.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')"]])},St.prototype.showTextEditor=function(){var mt=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(Lt){Lt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Lt){Lt.key==="Enter"&&mt.finishTextEditing(mt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Lt){Lt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},St.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"))},St.prototype.finishTextEditing=function(mt){this.setCaptionText(mt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},St.prototype.setFont=function(mt){this.captionElement&&ce.setAttributes(this.captionElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},St.prototype.setTextColor=function(mt){this.captionElement&&ce.setAttributes(this.captionElement,[["fill",mt]]),this.textColor=mt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},St.prototype.setSize=function(){kt.prototype.setSize.call(this),ce.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},St.prototype.pointerUp=function(mt){kt.prototype.pointerUp.call(this,mt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},St.prototype.dblClick=function(mt,Lt){kt.prototype.dblClick.call(this,mt,Lt),this.showTextEditor()},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.frame&&ce.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},St.prototype.setFillColor=function(mt){this.fillColor=mt,this.captionBg&&ce.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.frame&&ce.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.frame&&ce.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},kt.prototype.getState.call(this));return mt.typeName=this.typeName,mt},St.prototype.restoreState=function(mt){var Lt=mt;this.fillColor=Lt.fillColor,this.strokeColor=Lt.strokeColor,this.strokeWidth=Lt.strokeWidth,this.strokeDasharray=Lt.strokeDasharray,this.textColor=Lt.textColor,this.fontFamily=Lt.fontFamily,this.captionText=Lt.captionText,this.fontSize=Lt.fontSize,this.createVisual(),kt.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.setSize()},St.typeName="CaptionFrameMarker",St.title="Caption frame marker",St.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>',St}(re),Qe=function(){function kt(St,mt){mt===void 0&&(mt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=St,this.cancelable=mt}return Object.defineProperty(kt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),kt.prototype.preventDefault=function(){this._defaultPrevented=!0},kt}(),Pn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,!1)||this;return Et.dataUrl=Lt,Et.state=zt,Et}return Nt(St,kt),St}(Qe),Ne=function(kt){function St(mt,Lt,zt){zt===void 0&&(zt=!1);var Et=kt.call(this,mt,zt)||this;return Et.marker=Lt,Et}return Nt(St,kt),St}(Qe),Pe=function(){function kt(){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 kt.prototype.addEventListener=function(St,mt){this[St].push(mt)},kt.prototype.removeEventListener=function(St,mt){var Lt=this[St].indexOf(mt);Lt>-1&&this[St].splice(Lt,1)},kt}(),ie=function(){function kt(St){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new he,this._isOpen=!1,this.undoRedoManager=new de,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 Pe,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=kt.instanceCounter++,this.styles=new et(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=St,this.targetRoot=document.body,this.width=St.clientWidth,this.height=St.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(kt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Le,Mn,Ht,sn,pn,Hn,An,dn,hn,Je,Ke,vn,bn]},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Le,Mn,Ht,sn,Hn,An,dn]},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Le,Mn,Ht,sn,An]},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(St){var mt=this;this._availableMarkerTypes.splice(0),St.forEach(function(Lt){if(typeof Lt=="string"){var zt=mt.ALL_MARKER_TYPES.find(function(Et){return Et.typeName===Lt});zt!==void 0&&mt._availableMarkerTypes.push(zt)}else mt._availableMarkerTypes.push(Lt)})},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(St){this._zoomLevel=St,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(kt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),kt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ce.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},kt.prototype.show=function(){var St=this;this.styles.styleSheetRoot===void 0&&Tt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Tt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(mt){return mt(new Qe(St))})},kt.prototype.render=function(){return Ie(this,void 0,void 0,function(){var St;return we(this,function(mt){switch(mt.label){case 0:return this.setCurrentMarker(),(St=new Be).naturalSize=this.renderAtNaturalSize,St.imageType=this.renderImageType,St.imageQuality=this.renderImageQuality,St.markersOnly=this.renderMarkersOnly,St.width=this.renderWidth,St.height=this.renderHeight,[4,St.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return mt.sent(),[4,St.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,mt.sent()]}})})},kt.prototype.close=function(St){var mt=this;if(St===void 0&&(St=!1),this.isOpen){var Lt=!1;St||this.eventListeners.beforeclose.forEach(function(zt){var Et=new Qe(mt,!0);zt(Et),Et.defaultPrevented&&(Lt=!0)}),Lt||(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(zt){return zt(new Qe(mt))}),this.detachEvents(),this._isOpen=!1)}},kt.prototype.addMarkersToToolbar=function(){for(var St,mt=[],Lt=0;Lt<arguments.length;Lt++)mt[Lt]=arguments[Lt];(St=this._availableMarkerTypes).push.apply(St,mt)},kt.prototype.addRenderEventListener=function(St){this.addEventListener("render",function(mt){St(mt.dataUrl,mt.state)})},kt.prototype.removeRenderEventListener=function(St){},kt.prototype.addCloseEventListener=function(St){this.addEventListener("close",function(){St()})},kt.prototype.removeCloseEventListener=function(St){},kt.prototype.setupResizeObserver=function(){var St=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){St.resize(St.target.clientWidth,St.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return St.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},kt.prototype.onPopupTargetResize=function(){var St=1*this.target.clientWidth/this.target.clientHeight,mt=this.editorCanvas.clientWidth/St>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*St:this.editorCanvas.clientWidth,Lt=mt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/St;this.resize(mt,Lt)},kt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},kt.prototype.resize=function(St,mt){this._isResizing=!0;var Lt=St/this.imageWidth,zt=mt/this.imageHeight;this.imageWidth=Math.round(St),this.imageHeight=Math.round(mt),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(Lt,zt),this._isResizing=!1},kt.prototype.scaleMarkers=function(St,mt){var Lt,zt=this;this._currentMarker&&this._currentMarker instanceof sn?this._currentMarker.scale(St,mt):(Lt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Et){Et!==zt._currentMarker&&Et.scale(St,mt)}),Lt!==void 0&&this.setCurrentMarker(Lt)},kt.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"},kt.prototype.setTopLeft=function(){var St=this.editingTarget.getBoundingClientRect(),mt=this.editorCanvas.getBoundingClientRect();this.left=St.left-mt.left,this.top=St.top-mt.top},kt.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)},kt.prototype.addDefs=function(){for(var St,mt=[],Lt=0;Lt<arguments.length;Lt++)mt[Lt]=arguments[Lt];this.defs=ce.createDefs(),this.addDefsToImage(),(St=this.defs).append.apply(St,mt)},kt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},kt.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)},kt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},kt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},kt.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)},kt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},kt.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)},kt.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 St=document.createElement("a");St.href="https://markerjs.com/",St.target="_blank",St.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>',St.title="Powered by marker.js",St.style.display="grid",St.style.alignItems="center",St.style.justifyItems="center",St.style.padding="3px",St.style.width="20px",St.style.height="20px",this.logoUI.appendChild(St),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},kt.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")},kt.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"},kt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},kt.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 St=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=St+"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 st(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 gt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},kt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},kt.prototype.removeMarker=function(St){this.markerImage.removeChild(St.container),this.markers.indexOf(St)>-1&&this.markers.splice(this.markers.indexOf(St),1),St.dispose()},kt.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())},kt.prototype.toolbarButtonClicked=function(St,mt){if(St==="marker"&&mt!==void 0)this.createNewMarker(mt);else if(St==="action")switch(mt){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},kt.prototype.deleteSelectedMarker=function(){var St=this;if(this._currentMarker!==void 0){var mt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(zt){var Et=new Ne(St,St._currentMarker,!0);zt(Et),Et.defaultPrevented&&(mt=!0)}),!mt){var Lt=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(zt){return zt(new Ne(St,Lt))})}}},kt.prototype.clear=function(){var St=this,mt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Yt){var $e=new Ne(St,void 0,!0);Yt($e),$e.defaultPrevented&&(mt=!0)}),!mt)){this.setCurrentMarker();for(var Lt=function(Yt){var $e=zt.markers[Yt];zt.setCurrentMarker(zt.markers[Yt]),zt._currentMarker.dispose(),zt.markerImage.removeChild(zt._currentMarker.container),zt.markers.splice(zt.markers.indexOf(zt._currentMarker),1),zt.eventListeners.markerdelete.forEach(function(ln){return ln(new Ne(St,$e))})},zt=this,Et=this.markers.length-1;Et>=0;Et--)Lt(Et);this.addUndoStep()}},Object.defineProperty(kt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),kt.prototype.showNotesEditor=function(){var St;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=(St=this._currentMarker.notes)!==null&&St!==void 0?St:"",this.overlayContainer.appendChild(this.notesArea))},kt.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)},kt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},kt.prototype.addUndoStep=function(){var St=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var mt=this.getState(),Lt=this.undoRedoManager.getLastUndoStep();if(!Lt||Lt.width===mt.width&&Lt.height===mt.height){var zt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(mt),zt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Et){return Et(new Qe(St))})}else this.undoRedoManager.replaceLastUndoStep(mt),this.eventListeners.statechange.forEach(function(Et){return Et(new Qe(St))})}},kt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},kt.prototype.undoStep=function(){var St=this,mt=this.undoRedoManager.undo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Lt){return Lt(new Qe(St))}))},kt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},kt.prototype.redoStep=function(){var St=this,mt=this.undoRedoManager.redo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Lt){return Lt(new Qe(St))}))},kt.prototype.stepZoom=function(){var St=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=St<this.zoomSteps.length-1?this.zoomSteps[St+1]:this.zoomSteps[0]},kt.prototype.panTo=function(St){this.contentDiv.scrollBy({left:this.prevPanPoint.x-St.x,top:this.prevPanPoint.y-St.y}),this.prevPanPoint=St},kt.prototype.startRenderAndClose=function(){return Ie(this,void 0,void 0,function(){var St,mt,Lt=this;return we(this,function(zt){switch(zt.label){case 0:return[4,this.render()];case 1:return St=zt.sent(),mt=this.getState(),this.eventListeners.render.forEach(function(Et){return Et(new Pn(Lt,St,mt))}),this.close(!0),[2]}})})},kt.prototype.getState=function(St){St===!0&&this.setCurrentMarker();var mt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Lt){return mt.markers.push(Lt.getState())}),mt},kt.prototype.restoreState=function(St){var mt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);St.markers.forEach(function(Lt){var zt=mt._availableMarkerTypes.find(function(Yt){return Yt.typeName===Lt.typeName});if(zt!==void 0){var Et=mt.addNewMarker(zt);Et.restoreState(Lt),mt.markers.push(Et)}}),St.width&&St.height&&(St.width!==this.imageWidth||St.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/St.width,this.imageHeight/St.height),this.eventListeners.restorestate.forEach(function(Lt){return Lt(new Qe(mt))})},kt.prototype.addNewMarker=function(St){var mt=ce.createGroup();return this.markerImage.appendChild(mt),new St(mt,this.overlayContainer,this.settings)},kt.prototype.createNewMarker=function(St){var mt,Lt=this;(mt=typeof St=="string"?this._availableMarkerTypes.find(function(zt){return zt.typeName===St}):St)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(mt),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(mt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(zt){return zt(new Ne(Lt,Lt._currentMarker))}))},kt.prototype.markerCreated=function(St){var mt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(St),this.setCurrentMarker(St),St instanceof Mn&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Mn):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Lt){return Lt(new Ne(mt,mt._currentMarker))})},kt.prototype.colorChanged=function(St){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=St,this.settings.defaultStrokeColor=St)},kt.prototype.fillColorChanged=function(St){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=St)},kt.prototype.markerStateChanged=function(St){var mt=this;this.eventListeners.markerchange.forEach(function(Lt){return Lt(new Ne(mt,St))})},kt.prototype.setCurrentMarker=function(St){var mt=this;this._currentMarker!==St&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Lt){return Lt(new Ne(mt,mt._currentMarker))})),this._currentMarker=St,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(Lt){return Lt(new Ne(mt,mt._currentMarker))}))},kt.prototype.onPointerDown=function(St){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||St.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var mt=this.markers.find(function(Lt){return Lt.ownsTarget(St.target)});mt!==void 0?(this.setCurrentMarker(mt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(St.clientX,St.clientY),St.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:St.clientX,y:St.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(St.clientX,St.clientY))},kt.prototype.onDblClick=function(St){if(this._isFocused||this.focus(),this.mode==="select"){var mt=this.markers.find(function(Lt){return Lt.ownsTarget(St.target)});mt!==void 0&&mt!==this._currentMarker&&this.setCurrentMarker(mt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(St.clientX,St.clientY),St.target):this.setCurrentMarker()}},kt.prototype.onPointerMove=function(St){this.touchPoints!==1&&St.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||St.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(St.clientX,St.clientY)):this.zoomLevel>1&&this.panTo({x:St.clientX,y:St.clientY}))},kt.prototype.onPointerUp=function(St){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(St.clientX,St.clientY)),this.isDragging=!1,this.addUndoStep()},kt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},kt.prototype.onKeyUp=function(St){this._currentMarker===void 0||this.notesArea!==void 0||St.key!=="Delete"&&St.key!=="Backspace"||this.deleteSelectedMarker()},kt.prototype.clientToLocalCoordinates=function(St,mt){var Lt=this.markerImage.getBoundingClientRect();return{x:(St-Lt.left)/this.zoomLevel,y:(mt-Lt.top)/this.zoomLevel}},kt.prototype.onWindowResize=function(){this.positionUI()},kt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var St=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=St+"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()},kt.prototype.addLicenseKey=function(St){Ce.addKey(St)},kt.prototype.addEventListener=function(St,mt){this.eventListeners.addEventListener(St,mt)},kt.prototype.removeEventListener=function(St,mt){this.eventListeners.removeEventListener(St,mt)},kt.prototype.renderState=function(St){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(St),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(kt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),kt.prototype.focus=function(){var St=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(mt){return mt(new Qe(St))}))},kt.prototype.blur=function(){var St=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(mt){return mt(new Qe(St))}))},kt.instanceCounter=0,kt}(),Dt=xt(99064),fe=xt(955),Se=(kt,St,mt)=>new Promise((Lt,zt)=>{var Et=ln=>{try{$e(mt.next(ln))}catch(qe){zt(qe)}},Yt=ln=>{try{$e(mt.throw(ln))}catch(qe){zt(qe)}},$e=ln=>ln.done?Lt(ln.value):Promise.resolve(ln.value).then(Et,Yt);$e((mt=mt.apply(kt,St)).next())}),Kt=({data:kt,className:St,fullWidth:mt,style:Lt={},onClose:zt,onOk:Et,showFullTools:Yt,noAssociationId:$e})=>{const ln=(0,Ot.useRef)(null),qe=(0,Ot.useRef)(null),Nn=(0,Ot.useRef)(null),ai=(0,Ot.useRef)(null),[Kn,ci]=(0,Ot.useState)(!1),[Ci,Wi]=(0,Ot.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Ot.useEffect)(()=>(Nn.current||(Nn.current=document.createElement("style"),document.head.appendChild(Nn.current)),kt!=null&&kt.visible?(document.body.setAttribute("data-custom","y-hidden"),Nn.current.innerHTML=" html { overflow-y: hidden; }",kt!=null&&kt.src&&Oi()):(document.body.removeAttribute("data-custom"),Nn.current&&(document.head.removeChild(Nn.current),Nn.current=null)),()=>{document.body.removeAttribute("data-custom"),Nn.current&&(document.head.removeChild(Nn.current),Nn.current=null)}),[kt==null?void 0:kt.visible]);const Oi=()=>Se(void 0,null,function*(){ci(!0),Wi("\u6B63\u5728\u52A0\u8F7D\u4E2D");const oi=yield(0,fe.ZJ)(kt==null?void 0:kt.src);ln.current.src="",ln.current.src=oi,ln.current.onload=function(){Ao()},ci(!1),Wi("")}),mo=oi=>Se(void 0,null,function*(){ci(!0),Wi("\u6B63\u5728\u4FDD\u5B58\u4E2D");const fi=yield(0,Dt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:kt.title,file:oi.dataUrl}});fi!=null&&fi.id&&!$e?(yield(0,Dt.ZP)(`/api/attachments/${kt.id}/add_subitem.json`,{method:"post",body:{subitem_id:fi==null?void 0:fi.id,settings:JSON.stringify(oi.state)}})).status===0&&Et():fi!=null&&fi.id&&Et(fi),ci(!1),Wi("")}),Bo=()=>{const oi=document.querySelector('a[href="https://markerjs.com/"]');oi&&oi.parentNode&&(oi.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(di=>{const mi=document.querySelector(di.name);mi&&mi.setAttribute("title",di.title)})},Ao=()=>{qe.current=new ie(ln.current),qe.current.targetRoot=ai.current,qe.current.addEventListener("render",mo),qe.current.addEventListener("beforeclose",zt),Yt&&(qe.current.availableMarkerTypes=qe.current.ALL_MARKER_TYPES,qe.current.uiStyleSettings.redoButtonVisible=!0,qe.current.uiStyleSettings.notesButtonVisible=!0,qe.current.uiStyleSettings.zoomButtonVisible=!0,qe.current.uiStyleSettings.zoomOutButtonVisible=!0,qe.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=qe.current.uiStyleSettings,qe.current.show(),kt!=null&&kt.snapshotData&&qe.current.restoreState(kt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Bo()},300)};return Ot.createElement(Ot.Fragment,null,(kt==null?void 0:kt.visible)&&Ot.createElement(Ut.Z,{spinning:Kn,tip:Ci,style:{position:"absolute",width:"100vw"}},Ot.createElement("div",{ref:ai,className:Me()(jt.imageDimensions,St,mt?jt.fullWidth:""),style:Lt},Ot.createElement("img",{className:jt.img,ref:ln}))))}},41588:function(En,yn,xt){"use strict";var Ot=xt(59301),jt=xt(95237),Qt=xt(43604),Me=xt(99313),Ut=xt(3113),pe=xt(85149),Nt=xt(88010),Ie=xt(48136),we=xt(59301);const qt=(0,Ot.forwardRef)(({callback:ce,showSaveButton:Ce,value:Be=""},Tt)=>{const et=(0,Ot.useRef)(),nt=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],ht=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
|
y=b + r\\text{sin}\\theta \r
|
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\left\\{\\begin{matrix} \r
|
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
|
\\end{matrix}\\right. \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\perp \\alpha \\ \r
|
|
|
b \\perp \\alpha \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
|
a \\perp m,a \\perp n \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
|
a^{2}+b^{2}=c^{2} \r
|
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R^{+} \\ \r
|
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R \\ \r
|
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
|
P \\left( S \\right) =1 \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
\\forall A \\in S \\\\ \r
|
|
|
P \\left( A \\right) \\ge 0 \r
|
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
P_{n}=n! \\\\ \r
|
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
|
\\end{array}`}]}]}],st=wt=>{et.current.setValue(et.current.getValue()+" "+wt.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(jt.Z,{className:Nt.Z.lists,gutter:[10,10]},nt.map((wt,Ft)=>we.createElement(Qt.Z,{flex:"110px",className:Nt.Z.item},we.createElement("div",null,we.createElement(pe.Z,{value:`$$${wt.value}$$`}),wt.name),we.createElement("div",{className:Nt.Z.children},wt.children.map((It,At)=>we.createElement("div",{key:At},we.createElement("h1",null,It.name),we.createElement(jt.Z,{gutter:[10,10]},It.data.map((Wt,re)=>we.createElement(Qt.Z,{key:re,onClick:()=>st(Wt),className:Nt.Z.diamond},we.createElement(pe.Z,{value:"`$$"+Wt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(jt.Z,{className:Nt.Z.lists,gutter:[10,10]},ht.map((wt,Ft)=>we.createElement(Qt.Z,{flex:"110px",className:Nt.Z.item},we.createElement("div",null,we.createElement(pe.Z,{value:"`$$"+wt.value+"$$`"}),wt.name),we.createElement("div",{className:Nt.Z.children},wt.children.map((It,At)=>we.createElement("div",{key:At},It.name&&we.createElement("h1",null,It.name),we.createElement(jt.Z,{gutter:[10,10]},It.data.map((Wt,re)=>we.createElement(Qt.Z,{key:re,onClick:()=>st(Wt),className:Nt.Z.diamond},we.createElement(pe.Z,{value:"`$$"+Wt.value+"$$`"}))))))))))}],vt=()=>{var wt=document.createElement("div");wt.innerHTML=et.current.getValue();var Ft=wt.innerText;return ce&&ce(Ft),Ft};return(0,Ot.useImperativeHandle)(Tt,()=>({getData:vt})),we.createElement("div",{className:Nt.Z.mathWrap},we.createElement(Me.default,{defaultActiveKey:"1",items:gt}),we.createElement("math-field",{locale:"zh_cn",className:Nt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:et,style:{width:800,marginTop:30,fontSize:18}},Be||""),Ce&&we.createElement("div",{className:Nt.Z.button},we.createElement(Ut.ZP,{size:"large",onClick:vt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});yn.Z=qt},8797:function(En,yn,xt){"use strict";var Ot=xt(59301),jt=xt(93314),Qt=xt(3113),Me=Object.defineProperty,Ut=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,qt=(Tt,et,nt)=>et in Tt?Me(Tt,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Tt[et]=nt,ce=(Tt,et)=>{for(var nt in et||(et={}))Ie.call(et,nt)&&qt(Tt,nt,et[nt]);if(Nt)for(var nt of Nt(et))we.call(et,nt)&&qt(Tt,nt,et[nt]);return Tt},Ce=(Tt,et)=>Ut(Tt,pe(et));const Be=({img:Tt,buttonProps:et={},styles:nt={},customText:ht,ButtonText:st,ButtonClick:gt,Buttonclass:vt,ButtonTwo:wt,imgStyles:Ft,loading:It=!1,className:At=""})=>Ot.createElement("section",{className:`tc animated fadeIn ${At}`,style:ce({color:"#999",margin:"100px auto",visibility:It?"hidden":"visible"},nt)},Ot.createElement("img",{src:Tt||jt,style:Ce(ce({},Ft),{pointerEvents:"none",userSelect:"none"})}),Ot.createElement("p",{className:"mt20 font14"},ht||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),st&&Ot.createElement(Qt.ZP,ce({className:vt,onClick:gt},et),st),wt&&wt);yn.Z=Be},23210:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return vt}});var Ot=xt(59301),jt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Qt=xt(3113),Me=xt(70557),Ut=xt(23954),pe=xt(6848),Nt=xt(955),Ie=xt(94941),we=xt(8797),qt=xt(3294),ce=xt(19381),Ce=xt(59301),Be=Object.defineProperty,Tt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ht=(wt,Ft,It)=>Ft in wt?Be(wt,Ft,{enumerable:!0,configurable:!0,writable:!0,value:It}):wt[Ft]=It,st=(wt,Ft)=>{for(var It in Ft||(Ft={}))et.call(Ft,It)&&ht(wt,It,Ft[It]);if(Tt)for(var It of Tt(Ft))nt.call(Ft,It)&&ht(wt,It,Ft[It]);return wt},gt=(wt,Ft,It)=>new Promise((At,Wt)=>{var re=Vt=>{try{me(It.next(Vt))}catch(Le){Wt(Le)}},ne=Vt=>{try{me(It.throw(Vt))}catch(Le){Wt(Le)}},me=Vt=>Vt.done?At(Vt.value):Promise.resolve(Vt.value).then(re,ne);me((It=It.apply(wt,Ft)).next())}),vt=({editOffice:wt="view",data:Ft,theme:It,type:At,filename:Wt,monacoEditor:re,className:ne,style:me,close:Vt,onClose:Le,hasMask:he,disabledDownload:Ge,onImgDimensions:Ke,showNodata:Ve,recordInfo:sn})=>{const[Mn,xe]=(0,Ot.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ht,Je]=(0,Ot.useState)(""),[Tn,An]=(0,Ot.useState)(),ze=window.ENV==="build"?"/react/build":"",Te=location.host.startsWith("localhost")?qt.Z.PROXY_SERVER:qt.Z.API_SERVER,Hn=10*(1024*1024),hn=(0,Ot.useRef)();Ft!=null&&Ft.startsWith("/api")&&At!=="txt"&&(Ft=qt.Z.API_SERVER+Ft);const pn=Qe=>Qe.substring(Qe.lastIndexOf("/")+1).split(".").pop();Wt&&re&&(re.filename=Wt),(0,Ot.useEffect)(()=>{var Qe,Pn;const Ne=(Pn=(Qe=document.cookie)==null?void 0:Qe.replace(/\s/g,""))==null?void 0:Pn.split(";");Ne==null||Ne.map(Pe=>{let ie=Pe.split("=");ie[0]==="_educoder_session"&&Je(ie[1])})},[]),(0,Ot.useEffect)(()=>{At==="office"&&(Ft.indexOf("bigfilescdn.")>-1||Ft.indexOf("bigfiles1")>-1?An({url:Ft,fileType:pn(Ft),model:Ft.indexOf("model=edit")?"edit":"view"}):de())},[At,Ft]);const de=()=>gt(void 0,null,function*(){console.log("data:",Ft);let Qe=Ft;Ft.startsWith("http")||(Qe=location.origin+Qe);let Pn=new URL(Qe).pathname.split("/").pop();const Ne=yield(0,Ie.gJ)({attachment_id:Pn});Ne.url=Te+Ne.url,An(Ne)}),vn=()=>{if(Ft.startsWith("http")||Ft.startsWith("blob:")){bn();return}(0,Nt.Sv)(Wt||"educoder",Ft,Wt)},bn=()=>{sn&&(0,ce.fc)({id:sn==null?void 0:sn.id,watch_type:1,course_id:sn==null?void 0:sn.course_id}),(0,Nt.Nd)(Wt||"educoder",decodeURIComponent(Ft))};return Ce.createElement("div",{style:st({},me||{}),className:`${he&&jt.bgBlack} ${At?jt.wrp:"hide"}`},Vt&&Ce.createElement("div",{className:jt.close,ref:hn},!!Ke&&Ce.createElement(pe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>hn.current},Ce.createElement("span",{onClick:()=>{Le(),Ke()}},Ce.createElement("i",{className:"icon-yulanpizhu"}))),!Ge&&Ce.createElement(pe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>hn.current},Ce.createElement("span",{onClick:bn},Ce.createElement("i",{className:"icon-quxiaozhiding"}))),Ce.createElement(pe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>hn.current},Ce.createElement("span",{className:"",onClick:Le},Ce.createElement("i",{className:"icon-guanbi1"})))),Ce.createElement("div",{className:`${jt[ne]} ${ne} ${jt.monaco} ${At==="txt"?"show":"hide"}`},At==="txt"&&Ce.createElement(Ce.Fragment,null,Ce.createElement(Ut.ZP,st({},re)))),At==="audio"&&Ce.createElement("audio",{src:`${(Ft==null?void 0:Ft.indexOf("http://"))>-1||(Ft==null?void 0:Ft.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ft}`,autoPlay:!0}),At==="video"&&Ce.createElement(Ce.Fragment,null,(Ft==null?void 0:Ft.indexOf("http"))>-1?Ce.createElement("video",{controls:!0,src:`${Ft}`,autoPlay:!0}):Ce.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ft}`,autoPlay:!0})),At==="office"&&Tn&&Ce.createElement("iframe",{src:`${ze}/office.html?key=${Tn.key}&url=${btoa(Tn.url)}&callbackUrl=${Te+(Tn.callbackUrl||"")}&fileType=${Tn.fileType}&title=${Tn.title||""}&model=${wt}&officeServer=${qt.Z.ONLYOFFICE}&disabledDownload=${!!Ge}`}),At==="html"&&Ce.createElement("iframe",{src:Ft+"&disposition=inline"}),At==="pdf"&&Ce.createElement("iframe",{src:`${ze}/js/pdfview/index.html?filename=${Wt||"educoder.pdf"}&url=${encodeURIComponent(Ft)}&disabledDownload=${!!Ge}`}),At==="image"&&Ce.createElement("img",{src:`${(Ft==null?void 0:Ft.indexOf("http://"))>-1||(Ft==null?void 0:Ft.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ft}`}),(At==="other"||At==="download")&&Ce.createElement(Ce.Fragment,null,Ve?Ce.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Ce.createElement(Qt.ZP,{icon:Ce.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:vn,disabled:Ge},"\u4E0B\u8F7D")}):Ce.createElement(Qt.ZP,{type:"primary",size:"middle",onClick:vn,disabled:Ge},Ce.createElement(Me.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(En,yn,xt){"use strict";xt.d(yn,{z:function(){return At},Z:function(){return Wt}});var Ot=xt(59301),jt=xt(50304),Qt=xt(24768),Me=xt(64018),Ut=xt(65157),pe=xt(3294),Nt=xt(955),Ie=xt(15342),we=xt(1012),qt=xt(23210),ce=xt(59301),Be=({html:re})=>{const ne=(0,Ot.useRef)(null),me=(0,Ot.useRef)(null),Vt=`.markdown-body p {
|
|
|
margin: 0 0 16px 0 !important;
|
|
|
line-height: 28px;
|
|
|
white-space: pre-wrap;
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
li {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
dl {
|
|
|
margin-bottom: 0px;
|
|
|
}
|
|
|
|
|
|
.markdown-body {
|
|
|
-ms-text-size-adjust: 100%;
|
|
|
-webkit-text-size-adjust: 100%;
|
|
|
color: #333;
|
|
|
overflow: hidden;
|
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
|
word-break: break-word;
|
|
|
font-size: 16px;
|
|
|
line-height: 1.6;
|
|
|
white-space: normal;
|
|
|
word-wrap: break-word;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul>li {
|
|
|
list-style-type: disc;
|
|
|
}
|
|
|
|
|
|
.markdown-body ol>li {
|
|
|
list-style-type: decimal;
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
background: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:active,
|
|
|
.markdown-body a:hover {
|
|
|
outline: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body strong {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 2em;
|
|
|
margin: 0.67em 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
-moz-box-sizing: content-box;
|
|
|
box-sizing: content-box;
|
|
|
height: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
overflow: auto;
|
|
|
}
|
|
|
|
|
|
.markdown-body code,
|
|
|
.markdown-body kbd,
|
|
|
.markdown-body pre {
|
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
color: inherit;
|
|
|
font: inherit;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body html input[disabled] {
|
|
|
cursor: default;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
line-height: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
border-collapse: collapse;
|
|
|
border-spacing: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body td,
|
|
|
.markdown-body th {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body * {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
color: #4183c4;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:hover,
|
|
|
.markdown-body a:active {
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
height: 0;
|
|
|
margin: 15px 0;
|
|
|
overflow: hidden;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
border-bottom: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:before {
|
|
|
display: table;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:after {
|
|
|
display: table;
|
|
|
clear: both;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
margin-top: 15px;
|
|
|
margin-bottom: 15px;
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
font-size: 21px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 11px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding: 0;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
ul.linenums,
|
|
|
ol.linenums {
|
|
|
padding: 16px 0 0 36px !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding-left: 2em;
|
|
|
}
|
|
|
|
|
|
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ul ol {
|
|
|
list-style-type: lower-roman;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul ol,
|
|
|
.markdown-body ul ol ol,
|
|
|
.markdown-body ol ul ol,
|
|
|
.markdown-body ol ol ol {
|
|
|
list-style-type: lower-alpha;
|
|
|
}
|
|
|
|
|
|
.markdown-body dd {
|
|
|
margin-left: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon {
|
|
|
font: normal normal 16px octicons-anchor;
|
|
|
line-height: 1;
|
|
|
display: inline-block;
|
|
|
text-decoration: none;
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
user-select: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon-link:before {
|
|
|
content: '\f05c';
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:first-child {
|
|
|
margin-top: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:last-child {
|
|
|
margin-bottom: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
display: block;
|
|
|
padding-right: 6px;
|
|
|
padding-left: 30px;
|
|
|
margin-left: -30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor:focus {
|
|
|
outline: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
position: relative;
|
|
|
margin-top: 1em;
|
|
|
margin-bottom: 16px;
|
|
|
font-weight: bold;
|
|
|
line-height: 1.4;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
|
.markdown-body h2 .octicon-link,
|
|
|
.markdown-body h3 .octicon-link,
|
|
|
.markdown-body h4 .octicon-link,
|
|
|
.markdown-body h5 .octicon-link,
|
|
|
.markdown-body h6 .octicon-link {
|
|
|
display: none;
|
|
|
color: #000;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
|
.markdown-body h2:hover .anchor,
|
|
|
.markdown-body h3:hover .anchor,
|
|
|
.markdown-body h4:hover .anchor,
|
|
|
.markdown-body h5:hover .anchor,
|
|
|
.markdown-body h6:hover .anchor {
|
|
|
padding-left: 8px;
|
|
|
margin-left: -30px;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 2.25em;
|
|
|
line-height: 1.2;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 1.75em;
|
|
|
line-height: 1.225;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 1.5em;
|
|
|
line-height: 1.43;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 1.25em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 1em;
|
|
|
color: #777;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul,
|
|
|
.markdown-body ul ol,
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ol ul {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body li>p {
|
|
|
margin-top: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dt {
|
|
|
padding: 0;
|
|
|
margin-top: 16px;
|
|
|
font-size: 1em;
|
|
|
font-style: italic;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dd {
|
|
|
padding: 0 16px;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
padding: 0 15px;
|
|
|
color: #777;
|
|
|
border-left: 4px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
|
margin-top: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
display: block;
|
|
|
width: 100%;
|
|
|
overflow: auto;
|
|
|
word-break: normal;
|
|
|
word-break: keep-all;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th {
|
|
|
font-weight: bold;
|
|
|
text-align: revert;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th,
|
|
|
.markdown-body table td {
|
|
|
padding: 6px 13px;
|
|
|
border: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr {
|
|
|
background-color: #fff;
|
|
|
border-top: 1px solid #ccc;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
|
background-color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
max-width: 100%;
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
padding: 0;
|
|
|
padding-top: 0.2em;
|
|
|
padding-bottom: 0.2em;
|
|
|
margin: 0;
|
|
|
font-size: 85%;
|
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:has(.katex) {
|
|
|
background-color: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:before,
|
|
|
.markdown-body code:after {
|
|
|
letter-spacing: -0.2em;
|
|
|
content: "\\00a0";
|
|
|
}
|
|
|
|
|
|
.markdown-body pre>code {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
font-size: 100%;
|
|
|
word-break: normal;
|
|
|
white-space: pre;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight {
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre,
|
|
|
.markdown-body pre {
|
|
|
padding: 16px;
|
|
|
overflow: auto;
|
|
|
font-size: 85%;
|
|
|
line-height: 1.45;
|
|
|
background-color: #f7f7f7;
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre {
|
|
|
margin-bottom: 0;
|
|
|
word-break: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
word-wrap: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code {
|
|
|
display: inline;
|
|
|
max-width: initial;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
overflow: initial;
|
|
|
line-height: inherit;
|
|
|
word-wrap: normal;
|
|
|
background-color: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code:before,
|
|
|
.markdown-body pre code:after {
|
|
|
content: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font-size: 11px;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c {
|
|
|
color: #969896;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c1,
|
|
|
.markdown-body .pl-mdh,
|
|
|
.markdown-body .pl-mm,
|
|
|
.markdown-body .pl-mp,
|
|
|
.markdown-body .pl-mr,
|
|
|
.markdown-body .pl-s1 .pl-v,
|
|
|
.markdown-body .pl-s3,
|
|
|
.markdown-body .pl-sc,
|
|
|
.markdown-body .pl-sv {
|
|
|
color: #0086b3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-e,
|
|
|
.markdown-body .pl-en {
|
|
|
color: #795da3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
|
.markdown-body .pl-smi,
|
|
|
.markdown-body .pl-smp,
|
|
|
.markdown-body .pl-stj,
|
|
|
.markdown-body .pl-vo,
|
|
|
.markdown-body .pl-vpf {
|
|
|
color: #333;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ent {
|
|
|
color: #63a35c;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-k,
|
|
|
.markdown-body .pl-s,
|
|
|
.markdown-body .pl-st {
|
|
|
color: #a71d5d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-pds,
|
|
|
.markdown-body .pl-s1,
|
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
|
.markdown-body .pl-sr,
|
|
|
.markdown-body .pl-sr .pl-cce,
|
|
|
.markdown-body .pl-sr .pl-sra,
|
|
|
.markdown-body .pl-sr .pl-sre,
|
|
|
.markdown-body .pl-src {
|
|
|
color: #df5000;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mo,
|
|
|
.markdown-body .pl-v {
|
|
|
color: #1d3e81;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-id {
|
|
|
color: #b52a1d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ii {
|
|
|
background-color: #b52a1d;
|
|
|
color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
|
color: #63a35c;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ml {
|
|
|
color: #693a17;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mh,
|
|
|
.markdown-body .pl-mh .pl-en,
|
|
|
.markdown-body .pl-ms {
|
|
|
color: #1d3e81;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mq {
|
|
|
color: #008080;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mi {
|
|
|
color: #333;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mb {
|
|
|
color: #333;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-md,
|
|
|
.markdown-body .pl-mdhf {
|
|
|
background-color: #ffecec;
|
|
|
color: #bd2c00;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdht,
|
|
|
.markdown-body .pl-mi1 {
|
|
|
background-color: #eaffea;
|
|
|
color: #55a532;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdr {
|
|
|
color: #795da3;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item {
|
|
|
list-style-type: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
|
margin-top: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item input {
|
|
|
float: left;
|
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
|
z-index: 1;
|
|
|
position: relative;
|
|
|
border-color: #4183c4;
|
|
|
}
|
|
|
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
|
.pln {
|
|
|
color: #000
|
|
|
}
|
|
|
|
|
|
/* plain text */
|
|
|
|
|
|
@media screen {
|
|
|
.str {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* string content */
|
|
|
.kwd {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a keyword */
|
|
|
.com {
|
|
|
color: #800
|
|
|
}
|
|
|
|
|
|
/* a comment */
|
|
|
.typ {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a type name */
|
|
|
.lit {
|
|
|
color: #066
|
|
|
}
|
|
|
|
|
|
/* a literal value */
|
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #660
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a markup tag name */
|
|
|
.atn {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a markup attribute name */
|
|
|
.atv {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* a markup attribute value */
|
|
|
.dec,
|
|
|
.var {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a declaration; a variable name */
|
|
|
.fun {
|
|
|
color: red
|
|
|
}
|
|
|
|
|
|
/* a function name */
|
|
|
}
|
|
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
|
@media print,
|
|
|
projection {
|
|
|
.str {
|
|
|
color: #060
|
|
|
}
|
|
|
|
|
|
.kwd {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.com {
|
|
|
color: #600;
|
|
|
font-style: italic
|
|
|
}
|
|
|
|
|
|
.typ {
|
|
|
color: #404;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.lit {
|
|
|
color: #044
|
|
|
}
|
|
|
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #440
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.atn {
|
|
|
color: #404
|
|
|
}
|
|
|
|
|
|
.atv {
|
|
|
color: #060
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
|
pre.prettyprint {
|
|
|
padding: 2px;
|
|
|
/* border: 1px solid #888 */
|
|
|
}
|
|
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
|
ol.linenums {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0
|
|
|
}
|
|
|
|
|
|
/* IE indents via margin-left */
|
|
|
li.L0,
|
|
|
li.L1,
|
|
|
li.L2,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L6,
|
|
|
li.L7,
|
|
|
li.L8 {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
/* Alternate shading for lines */
|
|
|
li.L1,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L7,
|
|
|
li.L9 {
|
|
|
background: #eee
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}`;return(0,Ot.useEffect)(()=>{const Le=ne.current.attachShadow({mode:"open"});me.current=document.createElement("div"),me.current.className="markdown-body",me.current.innerHTML=re,Le.appendChild(me.current);const he=document.createElement("style");return he.textContent=Vt,Le.appendChild(he),()=>{Le.innerHTML=""}},[]),(0,Ot.useEffect)(()=>{me.current&&(me.current.innerHTML=re)},[re]),ce.createElement("div",{ref:ne})},Tt=Object.defineProperty,et=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,st=(re,ne,me)=>ne in re?Tt(re,ne,{enumerable:!0,configurable:!0,writable:!0,value:me}):re[ne]=me,gt=(re,ne)=>{for(var me in ne||(ne={}))nt.call(ne,me)&&st(re,me,ne[me]);if(et)for(var me of et(ne))ht.call(ne,me)&&st(re,me,ne[me]);return re};const vt="@\u2581\u2581@",wt="@\u2581@",Ft=/<pre[^>]*>/g;function It(re){let ne=document.createElement("div");return ne.innerHTML=re,ne.childNodes.length===0?"":ne.childNodes[0].nodeValue}const At=(re,ne)=>{re=re||"";const me=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Vt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Le=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,he=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ne?re.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(me,(Ge,Ke,Ve,sn,Mn,xe,Ht)=>{const Je=Ke||sn||xe,Tn=Ve||Mn||Ht||"?";return pe.Z.API_SERVER+"/api/attachments/"+Je+Tn+"&t="+(0,Nt.Jn)(Je,Date.now())+(Ge.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(re=re.replace(he,(Ge,Ke,Ve,sn,Mn,xe,Ht)=>{const Je=Ke||sn||xe,Tn=Ve||Mn||Ht||"?";return pe.Z.API_SERVER+"/attachments/download/"+Je+Tn+"&t="+(0,Nt.Jn)(Je,Date.now())+(Ge.indexOf(")")>-1?")":"&")}).replace(me,(Ge,Ke,Ve,sn,Mn,xe,Ht)=>{const Je=Ke||sn||xe,Tn=Ve||Mn||Ht||"?";return pe.Z.API_SERVER+"/api/attachments/"+Je+Tn+"&t="+(0,Nt.Jn)(Je,Date.now())+(Ge.indexOf(")")>-1?")":"&")}).replace(Vt,(Ge,Ke,Ve,sn,Mn)=>{const xe=Ke||sn,Ht=Ve||Mn||"";return'"'+pe.Z.API_SERVER+"/api/attachments/"+xe+Ht+xe+Ht+"&t="+(0,Nt.Jn)(xe,Date.now())}).replace(Le,(Ge,Ke,Ve,sn,Mn)=>{const xe=Ke||sn,Ht=Ve||Mn||"";return"("+pe.Z.API_SERVER+"/files/uploads/"+xe+Ht+xe+Ht+"&t="+(0,Nt.Jn)(xe,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,`
|
|
|
`),re)};var Wt=({value:re="",className:ne,showTextOnly:me,showLines:Vt,style:Le={},stylesPrev:he={},highlightKeywords:Ge,showProgramFill:Ke,isProgramFill:Ve,disabledFill:sn=!1,programFillValue:Mn,onFillChange:xe=Tn=>{},onFillBlur:Ht=()=>{},onFillFocus:Je=()=>{}})=>{let Tn=String(re);const[An,ze]=(0,Ot.useState)(""),[Te,dn]=(0,Ot.useState)("office"),[Hn,hn]=(0,Ot.useState)([]),pn=(0,Ot.useRef)("a"+(0,we.Z)()),de={},vn=(kt,St,mt)=>{const Lt=document.createElement(kt===wt?"input":"textarea");Lt.style.width="100%",Lt.style.height=kt===wt?"40px":"151px",Lt.rows=5,Lt.spellcheck=!1,Lt.name="edu-program-fill",Lt.placeholder="\u8BF7\u8F93\u5165",Lt.dataset.id=St;const zt=Object.keys(de).length;return de[zt]=Lt,`<span class="edu-program-fill-wrap ${kt===wt?"":"show"}" style="width:${kt===wt?"400px":"100%"}" title=${mt||""}><span>${Lt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function bn(kt){return kt=kt.replace(/!\[.*?\]\(.*?\)/g,""),kt=kt.replace(/\[.*?\]\(.*?\)/g,""),kt=kt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),kt=kt.replace(/<embed.*?>/g,""),kt=kt.replace(/<img.*?>/g,""),kt=kt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),kt=kt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),kt=kt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),kt=kt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),kt}const Qe=kt=>kt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(St,mt){let Lt=mt.replace(/(\n|\r)/g,"").split("}"),zt=[];return Lt.map(Et=>{Et!=""&&zt.push(`.${pn.current} ${Et}`)}),`<style>${zt.join("}")}</style>`}),Pn=(0,Ot.useMemo)(()=>{try{const Lt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,zt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Et=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Yt=/\(\/attachments\/download\//g;Tn=Tn.replace(Yt,"("+pe.Z.API_SERVER+"/attachments/download/").replace(Lt,"("+pe.Z.API_SERVER+"/api/attachments/").replace(zt,'"'+pe.Z.API_SERVER+"/api/attachments/").replace(Et,'"'+pe.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(Lt){}if(Ke){let Lt=-1;return Tn=Tn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(zt,Et,Yt){var $e;return++Lt,vn(zt,Lt,($e=Mn==null?void 0:Mn[Lt])==null?void 0:$e.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Qe(Tn||"")}</pre>`}let kt=Qe(Tn);kt=(0,Qt.ZP)(kt);const St=(0,Qt.ez)();Tn.match(/\[TOC\]/)&&(kt=kt.replace("<p>[TOC]</p>",(0,Qt.Qv)()),(0,Qt.Iy)()),kt=kt.replace(/(__special_katext_id_\d+__)/g,(Lt,zt)=>{const{type:Et,expression:Yt}=St[zt];return(0,Ie.renderToString)(It(Yt)||"",{displayMode:Et==="block",throwOnError:!1,output:"html"})}),kt=kt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Qt.AL)();const mt=document.createElement("div");if(mt.innerHTML=kt,me)return mt.innerText;if(Ge){const Lt=Ge.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Dt(mt,Lt),mt.innerHTML}return setTimeout(()=>ee(),500),mt.innerHTML},[Tn,Ge]);(0,Ot.useEffect)(()=>{fe.current&&fe.current.querySelectorAll(["input","textarea"]).forEach(St=>{St.oninput=Ne,St.onblur=Pe,St.onfocus=ie})},[Hn]),(0,Ot.useEffect)(()=>{var kt,St,mt,Lt,zt;if(Mn!=null&&Mn.length)try{const Et=fe.current.querySelectorAll(".edu-program-fill-score"),Yt=fe.current.querySelectorAll('[name="edu-program-fill"]');for(const[$e,ln]of Yt.entries())ln.value=((kt=Mn==null?void 0:Mn[$e])==null?void 0:kt.value)||"",((St=Mn==null?void 0:Mn[$e])==null?void 0:St.type)==="warning"?ln.className="program-fill-warning":((mt=Mn==null?void 0:Mn[$e])==null?void 0:mt.type)==="success"?ln.className="program-fill-success":ln.className="";for(const[$e,ln]of Et.entries())ln.innerHTML=(Lt=Mn==null?void 0:Mn[$e])!=null&&Lt.score?`${(zt=Mn==null?void 0:Mn[$e])==null?void 0:zt.score}\u5206`:"";hn(Mn)}catch(Et){console.log(Et,"error")}},[Mn]);const Ne=kt=>{Hn[kt.target.dataset.id]=Hn[kt.target.dataset.id]||{},Hn[kt.target.dataset.id].value=kt.target.value,hn([...Hn]),xe(Hn,kt.target.dataset.id)},Pe=kt=>{Hn[kt.target.dataset.id]=Hn[kt.target.dataset.id]||{},Hn[kt.target.dataset.id].value=kt.target.value,hn([...Hn]),Ht(Hn,kt.target.dataset.id)},ie=kt=>{Hn[kt.target.dataset.id]=Hn[kt.target.dataset.id]||{},Hn[kt.target.dataset.id].value=kt.target.value,hn([...Hn]),Je(Hn,kt.target.dataset.id)};function Dt(kt,St){return kt.childNodes.forEach(mt=>{var Lt;if(mt.childNodes.length>0)Dt(mt,St);else if(mt.nodeName!=="IMG")if(mt.innerHTML)mt.innerHTML=(Lt=mt.innerHTML)==null?void 0:Lt.replace(new RegExp(St,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const zt=document.createElement("span");zt.innerHTML=mt.textContent.replace(new RegExp(St,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),mt.replaceWith(zt)}})}const fe=(0,Ot.useRef)();Qt.jb.WebkitLineClamp=Vt,Vt&&(Le=gt(gt({},Le),Qt.jb));function Se(kt){let St=kt.target;if(St.tagName.toUpperCase()==="A"){let mt=St.getAttribute("href");if(mt.indexOf("office")>-1)kt.preventDefault(),ze(mt),dn("office");else if(mt.indexOf("application/pdf")>-1)kt.preventDefault(),ze(mt),dn("pdf");else if(mt.indexOf("text/html")>-1)kt.preventDefault(),ze(mt),dn("html");else if(mt.startsWith("#")){kt.preventDefault();let Lt=document.getElementById(mt.replace("#",""));Lt&&Lt.scrollIntoView(!0)}}}const ee=()=>{var kt;const St=(kt=fe.current)==null?void 0:kt.querySelectorAll("video");St==null||St.forEach(mt=>{if(mt.oncontextmenu=()=>!1,mt.src.indexOf(".m3u8")>-1&&!mt.canPlayType("application/vnd.apple.mpegurl")){if(Ut.ZP.isSupported()){var Lt=new Ut.ZP;Lt.loadSource(mt.src),Lt.attachMedia(mt)}}})};(0,Ot.useEffect)(()=>{if(fe.current&&Pn&&Pn.match(Ft)&&window.PR.prettyPrint(),fe.current)return fe.current.addEventListener("click",Se),()=>{var kt;(kt=fe.current)==null||kt.removeEventListener("click",Se),(0,Qt.AL)(),(0,Qt.Iy)()}},[Pn,fe.current,Se]),(0,Ot.useEffect)(()=>{var kt;const St=mt=>{mt.preventDefault(),mt.clipboardData.setData("text",window.getSelection().toString())};return(kt=fe.current)==null||kt.addEventListener("copy",St),()=>{var mt;(mt=fe.current)==null||mt.removeEventListener("copy",St)}},[fe.current]);const Kt=kt=>/<style[\s\S]*?>/i.test(kt||"");return Ot.createElement(Ot.Fragment,null,me&&Ot.createElement("div",{ref:fe},Pn),!me&&!Kt(Pn)&&Ot.createElement("div",{ref:fe,style:gt({},Le),className:`${ne||""} ${sn?"disabled-fill":""} markdown-body ${pn.current}`,dangerouslySetInnerHTML:{__html:Pn}}),!me&&Kt(Pn)&&Ot.createElement(Be,{html:Pn}),Ot.createElement(qt.Z,{close:!0,data:An,type:An!=null&&An.length?Te:"",style:gt({},he),onClose:()=>ze("")}))}},53932:function(En,yn,xt){"use strict";xt.d(yn,{h:function(){return wt},Z:function(){return vt}});var Ot=xt(59301),jt=xt(57809),Qt=xt(78241),Me=xt(3113),Ut=xt(89780),pe=xt.n(Ut),Nt=xt(37036),Ie=Object.defineProperty,we=Object.defineProperties,qt=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,Tt=(Ft,It,At)=>It in Ft?Ie(Ft,It,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ft[It]=At,et=(Ft,It)=>{for(var At in It||(It={}))Ce.call(It,At)&&Tt(Ft,At,It[At]);if(ce)for(var At of ce(It))Be.call(It,At)&&Tt(Ft,At,It[At]);return Ft},nt=(Ft,It)=>we(Ft,qt(It));const ht=jt.default.Option,st={labelCol:{span:4},wrapperCol:{span:20}},gt={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"]};var vt=({callback:Ft,onCancel:It})=>{const[At,Wt]=(0,Ot.useState)("python");function re(me){Wt(gt[me][1])}function ne(me){Ft(me)}return Ot.createElement(Qt.default,nt(et({},st),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ne,style:{width:500}}),Ot.createElement(Qt.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Ot.createElement(jt.default,{getPopupContainer:me=>me.parentNode,onChange:re},Object.keys(gt).map(me=>Ot.createElement(ht,{key:me,value:me},gt[me][0])))),Ot.createElement(Qt.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Ot.createElement(wt,{mode:At})),Ot.createElement("div",{className:"flex-container flex-end"},Ot.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ot.createElement(Me.ZP,{type:"ghost",onClick:It},"\u53D6\u6D88")))};function wt({value:Ft,onChange:It,mode:At,options:Wt={}}){const re=(0,Ot.useRef)(),[ne,me]=(0,Ot.useState)();return(0,Ot.useEffect)(()=>{if(ne){let Vt=function(Le){const he=Le.getValue();It&&It(he)};return ne.on("change",Vt),()=>{ne.off("change",Vt)}}},[ne,It]),(0,Ot.useEffect)(()=>{ne&&ne.setOption("mode",At)},[ne,At]),(0,Ot.useEffect)(()=>{ne&&(Ft!==ne.getValue()||Ft==="")&&setTimeout(()=>{ne.setValue(Ft||"")},300)},[ne,Ft]),(0,Ot.useEffect)(()=>{if(re.current&&!ne){const Vt=pe().fromTextArea(re.current,et({mode:At,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Wt));me(Vt)}},[re.current,ne]),Ot.createElement("div",{className:"my-codemirror-container"},Ot.createElement("textarea",{ref:re}))}},12290:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return hi}});var Ot=xt(59301),jt=xt(89780),Qt=xt.n(jt),Me=xt(76374),Ut=xt(37036),pe=xt(6313),Nt=xt(25717),Ie=xt(99498),we=xt(25419),qt=xt(67549),ce=xt(85149),Ce=({value:Fe="",className:Ae,showTextOnly:Zt,showLines:He,style:fn={}})=>{const ye=(0,Ot.useMemo)(()=>"",[Fe]);return Ot.createElement(Ot.Fragment,null,Ot.createElement("div",{dangerouslySetInnerHTML:{__html:ye}}))},Be=xt(59301),Tt=Object.defineProperty,et=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,vt=(Fe,Ae,Zt)=>Ae in Fe?Tt(Fe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Fe[Ae]=Zt,wt=(Fe,Ae)=>{for(var Zt in Ae||(Ae={}))st.call(Ae,Zt)&&vt(Fe,Zt,Ae[Zt]);if(ht)for(var Zt of ht(Ae))gt.call(Ae,Zt)&&vt(Fe,Zt,Ae[Zt]);return Fe},Ft=(Fe,Ae)=>et(Fe,nt(Ae));let It=[{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 At({onActionCallback:Fe,title:Ae,icon:Zt,actionName:He,className:fn="",children:ye}){function ae(){Fe(He)}return Be.createElement("a",{title:Ae,className:fn,onClick:ae},Be.createElement("i",{className:`${Zt}`}),ye)}var Wt=({watch:Fe,showNullButton:Ae,showNullProgramButton:Zt,onActionCallback:He,fullScreen:fn,insertTemp:ye,hidetoolBar:ae,extraUse:Ye})=>{const gn=[...It,{title:`${Fe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Fe?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Be.createElement("ul",{className:"markdown-toolbar-container"},!ae&&gn.map((In,Re)=>Be.createElement("li",{key:Re},In.actionName?Be.createElement(At,Ft(wt({},In),{onActionCallback:He})):Be.createElement("span",{className:"v-line"}))),Ae?Be.createElement("li",null,Be.createElement(At,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:He},Be.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Zt?Be.createElement(Be.Fragment,null,Be.createElement("li",null,Be.createElement(At,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:He},Be.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Be.createElement("li",null,Be.createElement(At,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:He},Be.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,ye&&Be.createElement("li",null,Be.createElement(At,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${ye}`,onActionCallback:He},Be.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ye&&Be.createElement("li",null,Ye),Be.createElement("li",{className:"btn-full-screen"},Be.createElement(At,{icon:`${fn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:fn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:He})))},re=xt(79346),ne=xt(78241),me=xt(92832),Vt=xt(3113),Le=Object.defineProperty,he=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,Mn=(Fe,Ae,Zt)=>Ae in Fe?Le(Fe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Fe[Ae]=Zt,xe=(Fe,Ae)=>{for(var Zt in Ae||(Ae={}))Ve.call(Ae,Zt)&&Mn(Fe,Zt,Ae[Zt]);if(Ke)for(var Zt of Ke(Ae))sn.call(Ae,Zt)&&Mn(Fe,Zt,Ae[Zt]);return Fe},Ht=(Fe,Ae)=>he(Fe,Ge(Ae));const Je={labelCol:{span:4},wrapperCol:{span:20}};var Tn=({callback:Fe,onCancel:Ae})=>{function Zt(He){Fe(He)}return Ot.createElement(ne.default,Ht(xe({},Je),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Zt,style:{width:500}}),Ot.createElement(ne.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Ot.createElement(me.default,null)),Ot.createElement(ne.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Ot.createElement(me.default,null)),Ot.createElement("div",{className:"flex-container flex-end"},Ot.createElement(Vt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ot.createElement(Vt.ZP,{type:"ghost",onClick:Ae},"\u53D6\u6D88")))},An=xt(53932),ze=xt(28451),Te=xt(43418),dn=xt(95237),Hn=xt(16406),hn=xt(59301),pn=({callback:Fe,onCancel:Ae})=>{const Zt=document.createElement("canvas"),He=Zt.getContext("2d");Zt.width=1e3,Zt.height=800,He.fillStyle="#ffffff",He.fillRect(0,0,Zt.width,Zt.height);const fn=Zt.toDataURL("image/png");return hn.createElement(Te.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},hn.createElement(dn.Z,{style:{height:"100vh"}},hn.createElement(Hn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:fn,visible:!0,title:String(Date.now())},onOk:ye=>{Fe({src:ye.url})},onClose:Ae})))},de=xt(12378);function vn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(vn,go.CommandHandler),vn.prototype.canAlignSelection=function(){var Fe=this.diagram;return!(Fe===null||Fe.isReadOnly||Fe.isModelReadOnly||Fe.selection.count<2)},vn.prototype.alignLeft=function(){var Fe=this.diagram;Fe.startTransaction("aligning left");var Ae=1/0;Fe.selection.each(function(Zt){Zt instanceof go.Link||(Ae=Math.min(Zt.position.x,Ae))}),Fe.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Ae,Zt.position.y))}),Fe.commitTransaction("aligning left")},vn.prototype.alignRight=function(){var Fe=this.diagram;Fe.startTransaction("aligning right");var Ae=-1/0;Fe.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var He=Zt.actualBounds.x+Zt.actualBounds.width;Ae=Math.max(He,Ae)}}),Fe.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Ae-Zt.actualBounds.width,Zt.position.y))}),Fe.commitTransaction("aligning right")},vn.prototype.alignTop=function(){var Fe=this.diagram;Fe.startTransaction("alignTop");var Ae=1/0;Fe.selection.each(function(Zt){Zt instanceof go.Link||(Ae=Math.min(Zt.position.y,Ae))}),Fe.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.position.x,Ae))}),Fe.commitTransaction("alignTop")},vn.prototype.alignBottom=function(){var Fe=this.diagram;Fe.startTransaction("aligning bottom");var Ae=-1/0;Fe.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var He=Zt.actualBounds.y+Zt.actualBounds.height;Ae=Math.max(He,Ae)}}),Fe.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.actualBounds.x,Ae-Zt.actualBounds.height))}),Fe.commitTransaction("aligning bottom")},vn.prototype.alignCenterX=function(){var Fe=this.diagram,Ae=Fe.selection.first();if(Ae){Fe.startTransaction("aligning Center X");var Zt=Ae.actualBounds.x+Ae.actualBounds.width/2;Fe.selection.each(function(He){He instanceof go.Link||He.move(new go.Point(Zt-He.actualBounds.width/2,He.actualBounds.y))}),Fe.commitTransaction("aligning Center X")}},vn.prototype.alignCenterY=function(){var Fe=this.diagram,Ae=Fe.selection.first();if(Ae){Fe.startTransaction("aligning Center Y");var Zt=Ae.actualBounds.y+Ae.actualBounds.height/2;Fe.selection.each(function(He){He instanceof go.Link||He.move(new go.Point(He.actualBounds.x,Zt-He.actualBounds.height/2))}),Fe.commitTransaction("aligning Center Y")}},vn.prototype.alignColumn=function(Fe){var Ae=this.diagram;Ae.startTransaction("align Column"),Fe===void 0&&(Fe=0),Fe=parseFloat(Fe);var Zt=new Array;Ae.selection.each(function(Ye){Ye instanceof go.Link||Zt.push(Ye)});for(var He=0;He<Zt.length-1;He++){var fn=Zt[He],ye=fn.actualBounds.y+fn.actualBounds.height+Fe,ae=Zt[He+1];ae.move(new go.Point(fn.actualBounds.x,ye))}Ae.commitTransaction("align Column")},vn.prototype.alignRow=function(Fe){Fe===void 0&&(Fe=0),Fe=parseFloat(Fe);var Ae=this.diagram;Ae.startTransaction("align Row");var Zt=new Array;Ae.selection.each(function(Ye){Ye instanceof go.Link||Zt.push(Ye)});for(var He=0;He<Zt.length-1;He++){var fn=Zt[He],ye=fn.actualBounds.x+fn.actualBounds.width+Fe,ae=Zt[He+1];ae.move(new go.Point(ye,fn.actualBounds.y))}Ae.commitTransaction("align Row")},vn.prototype.canRotate=function(Fe){var Ae=this.diagram;return!(Ae===null||Ae.isReadOnly||Ae.isModelReadOnly||Ae.selection.count<1)},vn.prototype.rotate=function(Fe){Fe===void 0&&(Fe=90);var Ae=this.diagram;Ae.startTransaction("rotate "+Fe.toString());var Ae=this.diagram;Ae.selection.each(function(Zt){Zt instanceof go.Link||Zt instanceof go.Group||(Zt.angle+=Fe)}),Ae.commitTransaction("rotate "+Fe.toString())},vn.prototype.pullToFront=function(){var Fe=this.diagram;Fe.startTransaction("pullToFront");var Ae=new go.Map;Fe.selection.each(function(Zt){Ae.set(Zt.layer,0)}),Ae.iteratorKeys.each(function(Zt){var He=0;Zt.parts.each(function(fn){if(!fn.isSelected){var ye=fn.zOrder;isNaN(ye)?fn.zOrder=0:He=Math.max(He,ye)}}),Ae.set(Zt,He)}),Fe.selection.each(function(Zt){vn._assignZOrder(Zt,Ae.get(Zt.layer)+1)}),Fe.commitTransaction("pullToFront")},vn.prototype.pushToBack=function(){var Fe=this.diagram;Fe.startTransaction("pushToBack");var Ae=new go.Map;Fe.selection.each(function(Zt){Ae.set(Zt.layer,0)}),Ae.iteratorKeys.each(function(Zt){var He=0;Zt.parts.each(function(fn){if(!fn.isSelected){var ye=fn.zOrder;isNaN(ye)?fn.zOrder=0:He=Math.min(He,ye)}}),Ae.set(Zt,He)}),Fe.selection.each(function(Zt){vn._assignZOrder(Zt,Ae.get(Zt.layer)-1-vn._findGroupDepth(Zt))}),Fe.commitTransaction("pushToBack")},vn._assignZOrder=function(Fe,Ae,Zt){Zt===void 0&&(Zt=Fe),Fe.layer===Zt.layer&&(Fe.zOrder=Ae),Fe instanceof go.Group&&Fe.memberParts.each(function(He){vn._assignZOrder(He,Ae+1,Zt)})},vn._findGroupDepth=function(Fe){if(Fe instanceof go.Group){var Ae=0;return Fe.memberParts.each(function(Zt){Ae=Math.max(Ae,vn._findGroupDepth(Zt))}),Ae+1}else return 0},vn.prototype.doKeyDown=function(){var Fe=this.diagram;if(Fe!==null){var Ae=Fe.lastInput;if(Ae.key==="Up"||Ae.key==="Down"||Ae.key==="Left"||Ae.key==="Right"){var Zt=this.arrowKeyBehavior;if(Zt==="none")return;if(Zt==="select"){this._arrowKeySelect();return}else if(Zt==="move"){this._arrowKeyMove();return}else if(Zt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},vn.prototype._getAllParts=function(){var Fe=new Array;return this.diagram.nodes.each(function(Ae){Fe.push(Ae)}),this.diagram.parts.each(function(Ae){Fe.push(Ae)}),Fe},vn.prototype._arrowKeyMove=function(){var Fe=this.diagram,Ae=Fe.lastInput,Zt=0,He=0;if(Ae.control||Ae.meta)Zt=1,He=1;else if(Fe.grid!==null){var fn=Fe.grid.gridCellSize;He=fn.width,Zt=fn.height}Fe.startTransaction("arrowKeyMove"),Fe.selection.each(function(ye){Ae.key==="Up"?ye.move(new go.Point(ye.actualBounds.x,ye.actualBounds.y-Zt)):Ae.key==="Down"?ye.move(new go.Point(ye.actualBounds.x,ye.actualBounds.y+Zt)):Ae.key==="Left"?ye.move(new go.Point(ye.actualBounds.x-He,ye.actualBounds.y)):Ae.key==="Right"&&ye.move(new go.Point(ye.actualBounds.x+He,ye.actualBounds.y))}),Fe.commitTransaction("arrowKeyMove")},vn.prototype._arrowKeySelect=function(){var Fe=this.diagram,Ae=Fe.lastInput,Zt=null;Ae.key==="Up"?Zt=this._findNearestPartTowards(270):Ae.key==="Down"?Zt=this._findNearestPartTowards(90):Ae.key==="Left"?Zt=this._findNearestPartTowards(180):Ae.key==="Right"&&(Zt=this._findNearestPartTowards(0)),Zt!==null&&(Ae.shift?Zt.isSelected=!0:Ae.control||Ae.meta?Zt.isSelected=!Zt.isSelected:Fe.select(Zt))},vn.prototype._findNearestPartTowards=function(Fe){var Ae=this.diagram.selection.first();if(Ae===null)return null;for(var Zt=Ae.actualBounds.center,He=this._getAllParts(),fn=1/0,ye=Ae,ae=0;ae<He.length;ae++){var Ye=He[ae];if(Ye!==Ae&&Ye.canSelect()){var gn=Ye.actualBounds.center,In=Zt.directionPoint(gn),Re=this._angleCloseness(In,Fe);if(Re<=45){var _t=Zt.distanceSquaredPoint(gn);_t*=1+Math.sin(Re*Math.PI/180),_t<fn&&(fn=_t,ye=Ye)}}}return ye},vn.prototype._angleCloseness=function(Fe,Ae){return Math.min(Math.abs(Ae-Fe),Math.min(Math.abs(Ae+360-Fe),Math.abs(Ae-360-Fe)))},vn.prototype._arrowKeyTree=function(){var Fe=this.diagram,Ae=Fe.selection.first();if(Ae instanceof go.Node){var Zt=Fe.lastInput;if(Zt.key==="Right"){if(!Ae.isTreeLeaf)if(!Ae.isTreeExpanded)Fe.commandHandler.canExpandTree(Ae)&&Fe.commandHandler.expandTree(Ae);else{var He=this._sortTreeChildrenByY(Ae).first();He!==null&&Fe.select(He)}}else if(Zt.key==="Left")if(!Ae.isTreeLeaf&&Ae.isTreeExpanded)Fe.commandHandler.canCollapseTree(Ae)&&Fe.commandHandler.collapseTree(Ae);else{var fn=Ae.findTreeParentNode();fn!==null&&Fe.select(fn)}else if(Zt.key==="Up"){var fn=Ae.findTreeParentNode();if(fn!==null){var ye=this._sortTreeChildrenByY(fn),ae=ye.indexOf(Ae);if(ae>0){for(var Ye=ye.elt(ae-1);Ye!==null&&Ye.isTreeExpanded&&!Ye.isTreeLeaf;){var gn=this._sortTreeChildrenByY(Ye);Ye=gn.last()}Ye!==null&&Fe.select(Ye)}else Fe.select(fn)}}else if(Zt.key==="Down")if(Ae.isTreeExpanded&&!Ae.isTreeLeaf){var He=this._sortTreeChildrenByY(Ae).first();He!==null&&Fe.select(He)}else for(;Ae!==null;){var fn=Ae.findTreeParentNode();if(fn===null)break;var ye=this._sortTreeChildrenByY(fn),ae=ye.indexOf(Ae);if(ae<ye.length-1){Fe.select(ye.elt(ae+1));break}else Ae=fn}var In=Fe.selection.first();In!==null&&Fe.scrollToRect(In.actualBounds)}},vn.prototype._sortTreeChildrenByY=function(Fe){var Ae=new go.List().addAll(Fe.findTreeChildrenNodes());return Ae.sort(function(Zt,He){var fn=Zt.location,ye=He.location;return fn.y<ye.y?-1:fn.y>ye.y?1:fn.x<ye.x?-1:fn.x>ye.x?1:0}),Ae},vn.prototype.copyToClipboard=function(Fe){go.CommandHandler.prototype.copyToClipboard.call(this,Fe),this._lastPasteOffset.set(this.pasteOffset)},vn.prototype.pasteFromClipboard=function(){var Fe=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Fe,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Fe},Object.defineProperty(vn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Fe){if(Fe!=="move"&&Fe!=="select"&&Fe!=="scroll"&&Fe!=="tree"&&Fe!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Fe);this._arrowKeyBehavior=Fe}}),Object.defineProperty(vn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Fe){if(!(Fe instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Fe);this._pasteOffset.set(Fe)}});var bn=vn,Qe=xt(74413),Pn=xt(43604),Ne=xt(99064),Pe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ie=xt(24065),Dt=xt(59301),fe=(Fe,Ae,Zt)=>new Promise((He,fn)=>{var ye=gn=>{try{Ye(Zt.next(gn))}catch(In){fn(In)}},ae=gn=>{try{Ye(Zt.throw(gn))}catch(In){fn(In)}},Ye=gn=>gn.done?He(gn.value):Promise.resolve(gn.value).then(ye,ae);Ye((Zt=Zt.apply(Fe,Ae)).next())});function Se({onCancel:Fe,callback:Ae}){let Zt=(0,Ot.useRef)(),He=(0,Ot.useRef)(),fn=(0,Ot.useRef)(),ye=(0,Ot.useRef)(!1);const ae=(0,Ot.useRef)(!1),[Ye,gn]=(0,Ot.useState)(0);function In(){const _t=de.bx.make,nn={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};Zt.current=new de.S0(He.current,{padding:20,grid:_t(de.s_,"Grid",_t(de.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),_t(de.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Dn=>{var gi=Dn.diagram.commandHandler.addTopLevelParts(Dn.diagram.selection,!0);gi||Dn.diagram.currentTool.doCancel()},commandHandler:_t(bn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Dn=>{var gi=Dn.subject;gi.location=gi.location.copy().snapToGridPoint(Dn.diagram.grid.gridOrigin,Dn.diagram.grid.gridCellSize),setTimeout(()=>{Dn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Dn=>{var gi=Dn.subject;setTimeout(()=>{Dn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Dn=>{var gi=Dn.parameter.part;gi.invalidateConnectedLinks();var ki=Dn.subject;Dn.diagram.toolManager.linkingTool.isForwards?ki.toNode.invalidateConnectedLinks():ki.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Zt.current.nodeTemplate=_t(de.NB,"Auto",{locationSpot:de.z6.Center,locationObjectName:"SHAPE",desiredSize:new de.$u(120,60),minSize:new de.$u(40,40),resizable:!0,resizeCellSize:new de.$u(10,10),rotatable:!0},new de.KX("location","loc",de.E9.parse).makeTwoWay(de.E9.stringify),new de.KX("desiredSize","size",de.$u.parse).makeTwoWay(de.$u.stringify),_t(de.bn,{name:"SHAPE",fill:nn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:de.z6.AllSides,toSpot:de.z6.AllSides},new de.KX("figure"),new de.KX("fill"),new de.KX("stroke","borderColor"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),_t(de.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),_t(de.al,{margin:1,textAlign:"center",overflow:de.al.OverflowEllipsis,editable:!0},new de.KX("text").makeTwoWay(),new de.KX("stroke","color"))),Zt.current.nodeTemplate.toolTip=_t("ToolTip",_t(de.s_,"Vertical",{maxSize:new de.$u(200,NaN)},_t(de.al,{font:"bold 10pt sans-serif",textAlign:"center"},new de.KX("text")),_t(de.al,{font:"10pt sans-serif",textAlign:"center"},new de.KX("text","details"))));function cn(Dn,gi){var ki=(Pi,Di)=>{Pi.handled=!0,Pi.diagram.model.commit(Zi=>{var Ri=Di.part.adornedPart,$i=new de.E9().setRectSpot(Ri.actualBounds,Dn);$i.subtract(Ri.location),$i.scale(2,2),$i.x+=Math.sign($i.x)*130,$i.y+=Math.sign($i.y)*130,$i.add(Ri.location),$i.snapToGridPoint(Pi.diagram.grid.gridOrigin,Pi.diagram.grid.gridCellSize);var qi=Zi.copyNodeData(Ri.data);Zi.setGroupKeyForNodeData(qi,Zi.getGroupKeyForNodeData(Ri.data)),Zi.addNodeData(qi);var mn={from:Ri.key,to:Zi.getKeyForNodeData(qi)};Zi.addLinkData(mn);var Lo=Pi.diagram.findNodeForData(qi);Lo.location=$i,Pi.diagram.select(Lo),setTimeout(()=>{Pi.diagram.commandHandler.editTextBlock()},20)})};return _t(de.bn,{figure:gi,alignment:Dn,alignmentFocus:Dn.opposite(),width:Dn.equals(de.z6.Top)||Dn.equals(de.z6.Bottom)?25:18,height:Dn.equals(de.z6.Top)||Dn.equals(de.z6.Bottom)?18:25,fill:"orange",stroke:nn.white,strokeWidth:4,mouseEnter:(Pi,Di)=>Di.fill="dodgerblue",mouseLeave:(Pi,Di)=>Di.fill="orange",isActionable:!0,click:ki,contextClick:ki})}function Bn(Dn){return _t(de.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:(gi,ki)=>ki.fill="dodgerblue",mouseLeave:(gi,ki)=>ki.fill="orange",click:(gi,ki)=>{gi.diagram.commandHandler.showContextMenu(ki.part.adornedPart)}},Dn||{})}Zt.current.nodeTemplate.selectionAdornmentTemplate=_t(de.uz,"Spot",_t(de.Vm,{padding:10}),cn(de.z6.Top,"TriangleUp"),cn(de.z6.Left,"TriangleLeft"),cn(de.z6.Right,"TriangleRight"),cn(de.z6.Bottom,"TriangleDown"),Bn({alignment:new de.z6(.75,0)}));function Oe(Dn,gi){return(ki,Pi)=>{ki.handled=!0,ki.diagram.model.commit(Di=>{Di.set(Pi.part.adornedPart.data,Dn,gi)})}}function Xe(Dn,gi){return gi||(gi="color"),_t(de.bn,{width:16,height:16,stroke:"lightgray",fill:Dn,margin:1,background:"transparent",mouseEnter:(ki,Pi)=>Pi.stroke="dodgerblue",mouseLeave:(ki,Pi)=>Pi.stroke="lightgray",click:Oe(gi,Dn),contextClick:Oe(gi,Dn)})}function Gn(){return[_t("ContextMenuButton",_t(de.s_,"Horizontal",Xe(nn.white,"fill"),Xe(nn.beige,"fill"),Xe(nn.extralightblue,"fill"),Xe(nn.extralightred,"fill"))),_t("ContextMenuButton",_t(de.s_,"Horizontal",Xe(nn.lightgray,"fill"),Xe(nn.lightgreen,"fill"),Xe(nn.lightblue,"fill"),Xe(nn.lightred,"fill")))]}function Xn(){return[_t("ContextMenuButton",_t(de.s_,"Horizontal",Xe(nn.black),Xe(nn.green),Xe(nn.blue),Xe(nn.red))),_t("ContextMenuButton",_t(de.s_,"Horizontal",Xe(nn.white),Xe(nn.magenta),Xe(nn.purple),Xe(nn.orange)))]}function Jn(Dn,gi){return gi||(gi="thickness"),_t(de.bn,"LineH",{width:16,height:16,strokeWidth:Dn,margin:1,background:"transparent",mouseEnter:(ki,Pi)=>Pi.background="dodgerblue",mouseLeave:(ki,Pi)=>Pi.background="transparent",click:Oe(gi,Dn),contextClick:Oe(gi,Dn)})}function Rn(Dn,gi){return gi||(gi="dash"),_t(de.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Dn,margin:1,background:"transparent",mouseEnter:(ki,Pi)=>Pi.background="dodgerblue",mouseLeave:(ki,Pi)=>Pi.background="transparent",click:Oe(gi,Dn),contextClick:Oe(gi,Dn)})}function ni(){return[_t("ContextMenuButton",_t(de.s_,"Horizontal",Jn(1),Jn(2),Jn(3),Jn(4))),_t("ContextMenuButton",_t(de.s_,"Horizontal",Rn(null),Rn([2,4]),Rn([4,4])))]}function Qn(Dn,gi){return gi||(gi="figure"),_t(de.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Dn,margin:1,background:"transparent",mouseEnter:(ki,Pi)=>Pi.fill="dodgerblue",mouseLeave:(ki,Pi)=>Pi.fill="lightgray",click:Oe(gi,Dn),contextClick:Oe(gi,Dn)})}Zt.current.nodeTemplate.contextMenu=_t("ContextMenu",_t("ContextMenuButton",_t(de.s_,"Horizontal",Qn("Rectangle"),Qn("RoundedRectangle"),Qn("Ellipse"),Qn("Diamond"))),_t("ContextMenuButton",_t(de.s_,"Horizontal",Qn("Parallelogram2"),Qn("ManualOperation"),Qn("Procedure"),Qn("Cylinder1"))),_t("ContextMenuButton",_t(de.s_,"Horizontal",Qn("Terminator"),Qn("CreateRequest"),Qn("Document"),Qn("TriangleDown"))),Gn(),Xn(),ni()),Zt.current.groupTemplate=_t(de.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:de.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Dn,gi)=>{var ki=gi.addMembers(gi.diagram.selection,!0);ki||gi.diagram.currentTool.doCancel()},avoidable:!1},new de.KX("location","loc",de.E9.parse).makeTwoWay(de.E9.stringify),_t(de.s_,"Auto",{name:"BODY"},_t(de.bn,{parameter1:10,fill:nn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:de.z6.AllSides,toSpot:de.z6.AllSides},new de.KX("fill"),new de.KX("stroke","color"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),_t(de.Vm,{background:"transparent",margin:20})),_t(de.al,{alignment:de.z6.Top,alignmentFocus:de.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new de.KX("text"),new de.KX("stroke","color"))),Zt.current.groupTemplate.selectionAdornmentTemplate=_t(de.uz,"Spot",_t(de.s_,"Auto",_t(de.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),_t(de.Vm,{margin:1.5})),Bn({alignment:de.z6.TopRight,alignmentFocus:de.z6.BottomRight})),Zt.current.groupTemplate.contextMenu=_t("ContextMenu",Gn(),Xn(),ni()),Zt.current.linkTemplate=_t(de.rU,{layerName:"Foreground",routing:de.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new de.KX("fromSpot","fromSpot",de.z6.parse),new de.KX("toSpot","toSpot",de.z6.parse),new de.KX("fromShortLength","dir",Dn=>Dn>=1?10:0),new de.KX("toShortLength","dir",Dn=>Dn>=1?10:0),new de.KX("points").makeTwoWay(),_t(de.bn,{strokeWidth:2},new de.KX("stroke","color"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),_t(de.bn,{segmentIndex:0,segmentOffset:new de.E9(15,0),segmentOrientation:de.rU.OrientAlong,alignmentFocus:de.z6.Right,figure:"circle",width:10,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Dn=>Dn===1)),_t(de.bn,{segmentIndex:-1,segmentOffset:new de.E9(-10,6),segmentOrientation:de.rU.OrientPlus90,alignmentFocus:de.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Dn=>Dn>=1),new de.KX("width","thickness",Dn=>7+3*Dn),new de.KX("height","thickness",Dn=>7+3*Dn),new de.KX("segmentOffset","thickness",Dn=>new de.E9(-15,4+1.5*Dn))),_t(de.bn,{segmentIndex:0,segmentOffset:new de.E9(15,-6),segmentOrientation:de.rU.OrientMinus90,alignmentFocus:de.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Dn=>Dn===2),new de.KX("width","thickness",Dn=>7+3*Dn),new de.KX("height","thickness",Dn=>7+3*Dn),new de.KX("segmentOffset","thickness",Dn=>new de.E9(-15,4+1.5*Dn))),_t(de.al,{alignmentFocus:new de.z6(0,1,-4,0),editable:!0},new de.KX("text").makeTwoWay(),new de.KX("stroke","color"))),Zt.current.linkTemplate.selectionAdornmentTemplate=_t(de.uz,_t(de.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:qn(2)},new de.KX("pathPattern","thickness",qn)),Bn({alignmentFocus:new de.z6(0,0,-6,-4)}));function qn(Dn){return _t(de.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Dn+4).toString()+" H3"})}function Si(Dn){var gi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Dn===0?gi="M0 0 M16 16 M0 8 L16 8":Dn===2&&(gi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),_t(de.bn,{geometryString:gi,margin:2,background:"transparent",mouseEnter:(ki,Pi)=>Pi.background="dodgerblue",mouseLeave:(ki,Pi)=>Pi.background="transparent",click:Oe("dir",Dn),contextClick:Oe("dir",Dn)})}function Vi(Dn){var gi=(ki,Pi)=>{ki.handled=!0,ki.diagram.model.commit(Di=>{var Zi=Pi.part.adornedPart;Di.set(Zi.data,Dn?"toSpot":"fromSpot",de.z6.stringify(de.z6.AllSides)),(Dn?Zi.toNode:Zi.fromNode).invalidateConnectedLinks()})};return _t(de.bn,{width:12,height:12,fill:"transparent",mouseEnter:(ki,Pi)=>Pi.background="dodgerblue",mouseLeave:(ki,Pi)=>Pi.background="transparent",click:gi,contextClick:gi})}function un(Dn,gi){var ki=0,Pi=de.z6.RightSide;Dn.equals(de.z6.Top)?(ki=270,Pi=de.z6.TopSide):Dn.equals(de.z6.Left)?(ki=180,Pi=de.z6.LeftSide):Dn.equals(de.z6.Bottom)&&(ki=90,Pi=de.z6.BottomSide),gi||(ki-=180);var Di=(Zi,Ri)=>{Zi.handled=!0,Zi.diagram.model.commit($i=>{var qi=Ri.part.adornedPart;$i.set(qi.data,gi?"toSpot":"fromSpot",de.z6.stringify(Pi)),(gi?qi.toNode:qi.fromNode).invalidateConnectedLinks()})};return _t(de.bn,{alignment:Dn,alignmentFocus:Dn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:ki,background:"transparent",mouseEnter:(Zi,Ri)=>Ri.background="dodgerblue",mouseLeave:(Zi,Ri)=>Ri.background="transparent",click:Di,contextClick:Di})}Zt.current.linkTemplate.contextMenu=_t("ContextMenu",Xn(),ni(),_t("ContextMenuButton",_t(de.s_,"Horizontal",Si(0),Si(1),Si(2))),_t("ContextMenuButton",_t(de.s_,"Horizontal",_t(de.s_,"Spot",Vi(!1),un(de.z6.Top,!1),un(de.z6.Left,!1),un(de.z6.Right,!1),un(de.z6.Bottom,!1)),_t(de.s_,"Spot",{margin:new de.Zt(0,0,0,2)},Vi(!0),un(de.z6.Top,!0),un(de.z6.Left,!0),un(de.z6.Right,!0),un(de.z6.Bottom,!0)))));const lo=`{ "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 to=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function Ki(Dn){return console.log("shapeName:",Dn),to.indexOf(Dn)>=0}var en=new de.YI(fn.current,{maxSelectionCount:1,linkTemplate:_t(de.rU,{locationSpot:de.z6.Center,selectionAdornmentTemplate:_t(de.uz,"Link",{locationSpot:de.z6.Center},_t(de.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),_t(de.bn,{toArrow:"Standard",stroke:null}))},{routing:de.rU.AvoidsNodes,curve:de.rU.JumpOver,corner:5,toShortLength:4},new de.KX("points"),_t(de.bn,{isPanelMain:!0,strokeWidth:2}),_t(de.bn,{toArrow:"Standard",stroke:null})),model:new de.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...de.bn.getFigureGenerators().toArray().map(Dn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Dn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Zt.current.addDiagramListener("TextEdited",function(Dn){var gi;const ki=Dn.subject.part;var Pi=(gi=document.activeElement)==null?void 0:gi.value;typeof Pi=="string"&&Pi.trim()===""&&Zt.current.model.commit(function(Di){Di.set(ki.data,"text","\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}),en.nodeTemplate=_t(de.NB,"Auto",{locationSpot:de.z6.Center},new de.KX("location","location",de.E9.parse).makeTwoWay(de.E9.stringify),_t(de.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 de.KX("stroke").makeTwoWay(),new de.KX("fill").makeTwoWay(),new de.KX("figure")),_t(de.al,{margin:new de.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new de.$u(16,16),maxSize:new de.$u(10,NaN),textAlign:"center",editable:!0},new de.KX("key").makeTwoWay())),setTimeout(()=>{Zt.current.grid=_t(de.s_,"Grid",_t(de.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),_t(de.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Zt.current.grid.visible=!0,Zt.current.grid.gridCellStroke="darkgray",Zt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Zt.current,Zt.current}const Re=()=>fe(this,null,function*(){var _t,nn=Zt.current.makeImage();const cn=yield(0,Ne.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:nn.src,file_data:JSON.stringify({login:(_t=(0,ie.eY)())==null?void 0:_t.login,data:JSON.parse(Zt.current.model.toJson())})}});Ae({src:cn.url})});return(0,Ot.useEffect)(()=>(setTimeout(()=>{In()},500),gn(Ye+1),()=>{Zt.current=null}),[]),Dt.createElement("div",{ref:ae,className:ye.current?`${Pe.maxH60} body-overflow-initial`:"body-overflow-initial"},Dt.createElement(Te.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Ye,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Dt.createElement(dn.Z,null,Dt.createElement(Pn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Dt.createElement(Pn.Z,{onClick:()=>{var _t,nn,cn=Zt.current.selection.first();if(ye.current=!ye.current,document.activeElement&&cn){let Bn=(nn=(_t=document.activeElement)==null?void 0:_t.value)==null?void 0:nn.trim();typeof Bn=="string"&&Zt.current.model.commit(function(Oe){Oe.set(cn.data,"text",Bn||"\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}gn(Ye+1)}},Dt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Fe},Dt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Pe.flowChartWrp},Dt.createElement("div",{style:{display:"flex",height:"100%"}},Dt.createElement("div",{style:{width:"300px",height:"100%"}},Dt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Dt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Pe.myPaletteDiv,ref:fn})),Dt.createElement("div",{style:{flex:1,position:"relative"}},Dt.createElement("div",{ref:He,style:{height:"80vh"}}))),Dt.createElement("div",{className:"tr"},Dt.createElement(Vt.ZP,{size:"large",onClick:Re,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var ee=Se,Kt=xt(5112),kt=xt(5871);const St=Kt.ZP.Group,mt={margin:"0 8px"};var Lt=({callback:Fe,onCancel:Ae})=>{function Zt(He){Fe(He)}return Ot.createElement(ne.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Zt},Ot.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Ot.createElement("span",{style:mt},"\u5355\u5143\u683C\u6570\uFF1A"),Ot.createElement("span",{style:mt},"\u884C\u6570"),Ot.createElement(ne.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Ot.createElement(kt.Z,null)),Ot.createElement("span",{style:mt},"\u5217\u6570"),Ot.createElement(ne.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Ot.createElement(kt.Z,null))),Ot.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Ot.createElement("span",{style:mt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Ot.createElement(ne.default.Item,{name:"align"},Ot.createElement(St,null,Ot.createElement(Kt.ZP,{value:"default"},Ot.createElement("i",{className:"fa fa-align-justify"})),Ot.createElement(Kt.ZP,{value:"left"},Ot.createElement("i",{className:"fa fa-align-left"})),Ot.createElement(Kt.ZP,{value:"center"},Ot.createElement("i",{className:"fa fa-align-center"})),Ot.createElement(Kt.ZP,{value:"right"},Ot.createElement("i",{className:"fa fa-align-right"}))))),Ot.createElement("div",{className:"flex-container flex-end"},Ot.createElement(Vt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ot.createElement(Vt.ZP,{type:"ghost",onClick:Ae},"\u53D6\u6D88")))},zt=xt(78673),Et=xt(80727),Yt=xt.n(Et),ln=(0,Ot.forwardRef)(({use3d:Fe,width:Ae,height:Zt,callback:He,showSaveButton:fn},ye)=>{const ae=(0,Ot.useRef)(),Ye=(0,Ot.useRef)(),[gn,In]=(0,Ot.useState)(!1),Re=(0,Ot.useRef)({id:ae,appName:"graphing",width:Ae||1e3,height:Zt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Ot.useEffect)(()=>{Ye.current=new(Yt())(Re.current,!0),window.onload=function(){Ye.current.inject("applet_container")}},[]);const _t=()=>{var nn=window.ggbApplet.getPNGBase64(1,!0,72);return He&&He(nn),nn};return(0,Ot.useEffect)(()=>{Re.current.appName=gn?"3D":"graphing",Ye.current.inject("applet_container")},[gn]),(0,Ot.useEffect)(()=>{In(Fe)},[Fe]),(0,Ot.useImperativeHandle)(ye,()=>({getImgData:_t})),Ot.createElement(Ot.Fragment,null,Ot.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ae}),Ot.createElement(dn.Z,{align:"middle"},Ot.createElement(Pn.Z,{flex:1},Ot.createElement(zt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:gn,onChange:nn=>In(nn)})),Ot.createElement(Pn.Z,null,Ot.createElement(Vt.ZP,{size:"large",onClick:_t,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),qe=xt(41588),Nn=xt(8591);const ai="link",Kn="upload-image",ci="add-flowchart",Ci="draw-image",Wi="add-flowchart",Oi="code-block",mo="add-table",Bo="------------",Ao={default:Bo,left:`:${Bo}`,center:`:${Bo}:`,right:`${Bo}:`};var oi=xt(58856);function fi(){}let di=0;const mi=1e4,co="\u2581",Sn="@\u2581\u2581@",Ct="@\u2581@",Yn=`
|
|
|
**\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`,yi=["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 _e(Fe){return/^\d+$/.test(Fe)?`${Fe}px`:Fe}const _n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",si={[_n+"-B"]:"bold",[_n+"-I"]:"italic"},ri={[ai]:"\u6DFB\u52A0\u94FE\u63A5",[Oi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Kn]:"\u6DFB\u52A0\u56FE\u7247",[Ci]:"\u6DFB\u52A0\u753B\u56FE",[ci]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[mo]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var hi=({defaultValue:Fe="",onChange:Ae,width:Zt="100%",height:He=400,miniToolbar:fn=!1,isFocus:ye=!1,watch:ae,insertTemp:Ye,mode:gn="markdown",id:In="markdown-editor-id",showResizeBar:Re=!1,noStorage:_t=!1,showNullButton:nn=!1,showNullProgramButton:cn=!1,hidetoolBar:Bn=!1,fullScreen:Oe=!1,onBlur:Xe,onCMBeforeChange:Gn,onFullScreen:Xn,className:Jn="",disablePaste:Rn=!1,disabled:ni=!1,disabledFill:Qn=!1,placeholder:qn="",values:Si="",extraUse:Vi})=>{const[un,lo]=(0,Ot.useState)(null),[to,Ki]=(0,Ot.useState)(Fe),[en,Dn]=(0,Ot.useState)(ae),[gi,ki]=(0,Ot.useState)(Oe),[Pi,Di]=(0,Ot.useState)(""),[Zi,Ri]=(0,Ot.useState)(0),[$i,qi]=(0,Ot.useState)(He),[mn,Lo]=(0,Ot.useState)(!1),[tn,Gi]=(0,Ot.useState)(0),[Yi,ji]=(0,Ot.useState)(0),No=(0,Ot.useRef)(),Mo=(0,Ot.useRef)(),Ii=(0,Ot.useRef)(),Ni=(0,Ot.useRef)();(0,Ot.useEffect)(()=>{const So=window.scrollY||window.pageYOffset;Ki(Si),un==null||un.setValue(Si),window.scrollTo(0,So)},[Si]),(0,Ot.useEffect)(()=>{Xn==null||Xn(gi)},[gi]),(0,Ot.useEffect)(()=>{if(No.current){let So=function(Zn,Ji){var qo;if(Rn){Ji.preventDefault();return}const Or=Ji.clipboardData;if(Or){const ur=Or.types.toString(),Yo=Or.items;if(ur==="Files"||Or.types.indexOf("Files")>-1){if(Ji.preventDefault(),gn=="stex")return;try{let xr=Yo[1];((qo=Yo[0])==null?void 0:qo.kind)==="file"&&(xr=Yo[0]);const wr=xr.getAsFile(),ta=wr.name.split(".").pop();(0,ze.I)(wr,da=>{var wa,an,Jr;da.id?((wa=wr==null?void 0:wr.type)==null?void 0:wa.indexOf("image"))>-1?Xi.replaceSelection(`<img width="100%" src="/api/attachments/${da.id}?type=${da.content_type})" alt="" />`):((an=wr==null?void 0:wr.type)==null?void 0:an.indexOf("video"))>-1?Xi.replaceSelection(`<video width="100%" controls src="/api/attachments/${da.id}"></video>`):((Jr=wr==null?void 0:wr.type)==null?void 0:Jr.indexOf("pdf"))>-1?Xi.replaceSelection(`<a href="/api/attachments/${da.id}?type=${wr.type}&disposition=inline" target="_blank">${wr.name}</a>`):yi.includes(ta)?Xi.replaceSelection(`<a href="/api/attachments/${da.id}?type=office&disposition=inline" target="_blank">${wr.name}</a>`):Xi.replaceSelection(`[${wr.name}](/api/attachments/${da.id}?type=${da.content_type})`):(da==null?void 0:da.status)===401&&(document.location.href="/user/login")})}catch(xr){Nn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Xi=Qt().fromTextArea(No.current,{mode:gn,lineNumbers:!fn,lineWrapping:!0,value:Fe,autoCloseTags:!0,autoCloseBrackets:!0});return Xi.on("keyup",function(Zn,Ji){Ji.keyCode===8&&(Zn.getValue()==""?Xi.setOption("placeholder",qn):Xi.setOption("placeholder",null))}),Xi.on("keydown",function(Zn,Ji){if(Ji.keyCode===8){var qo=uo(Zn);qo&&Ji.preventDefault()}}),ye&&Xi.focus(),Xi.on("paste",So),ni&&Xi.on("beforeChange",function(Zn,Ji){(Ji.origin==="paste"||Ji.origin==="+input")&&Ji.cancel()}),lo(Xi),()=>{Xi.off("paste",So)}}},[]);const zi=(0,Ot.useCallback)(()=>{if(Mo.current)try{}catch(So){console.log(So,"---- to set md editor body height")}},[$i,Mo,gi]);(0,Ot.useEffect)(()=>{function So(){let Xi=new Me.Z(Zn=>{for(let Ji of Zn)(Ji.target.offsetHeight>0||Ji.target.offsetWidth>0)&&(zi(),un.setSize("100%","100%"),un.refresh())});return Xi.observe(No.current.parentElement),Xi}if(un){const Xi=So();return()=>{var Zn,Ji;(Zn=No.current)!=null&&Zn.parentElement&&Xi.unobserve((Ji=No.current)==null?void 0:Ji.parentElement)}}},[un,zi]),(0,Ot.useEffect)(()=>{if(un){let So=[];for(const[Xi,Zn]of Object.entries(si)){let Ji={[Xi]:()=>{li(Zn)}};So.push(Ji),un.addKeyMap(Ji)}return()=>{for(let Xi of So)un.removeKeyMap(Xi)}}},[un]),(0,Ot.useEffect)(()=>{Oe!==gi&&ki(Oe)},[Oe]),(0,oi.Z)(()=>{if(!_t&&Zi>0){let So=new Date().getTime(),Xi=window.sessionStorage.getItem(In);So>=Zi+mi&&(!Xi||Xi!==to)&&(window.sessionStorage.setItem(In,to),Lo(!0))}},mi),(0,Ot.useEffect)(()=>{Dn(ae)},[un,ae]),(0,Ot.useEffect)(()=>{un&&ye&&un.focus()},[un,ye]),(0,Ot.useEffect)(()=>{if(en&&un){let So=function(Zn){let Ji=Zn.target;if(Ni.current){let qo=Ji.scrollTop/Ji.scrollHeight;Ni.current.scrollTop=Ni.current.scrollHeight*qo}};const Xi=un.getScrollerElement();return Xi.addEventListener("scroll",So),()=>{Xi.removeEventListener("scroll",So)}}},[un,en]),(0,Ot.useEffect)(()=>{if(un&&Gn){let So=function(Xi,Zn){Gn(Xi,Zn)};return un.on("beforeChange",So),()=>{un.off("beforeChange",So)}}},[un,Gn]),(0,Ot.useEffect)(()=>{if(un&&Xe){let So=function(){Xe(un.getValue())};return un.on("blur",So),()=>{un.off("blur",So)}}},[un,Xe]);function uo(So,Xi){var Zn=So.getDoc(),Ji=Zn.getCursor(),qo=Zn.getLine(Ji.line),Or=qo.charAt(Ji.ch-1),ur=qo.lastIndexOf("@\u2581@",Ji.ch),Yo=qo.lastIndexOf("@\u2581\u2581@",Ji.ch),xr=ur>Yo?ur:Yo,wr=ur>Yo?3:4;if(Sn.indexOf(Or)===-1)return null;if(console.log("change1:",Xi,So,qo,Ji,xr,ur,Yo,Or),xr>=0&&Ji.ch-xr<5){var ta=xr+wr;return Zn.replaceRange("",{line:Ji.line,ch:xr},{line:Ji.line,ch:ta}),{line:Ji.line,ch:ta}}return null}(0,Ot.useEffect)(()=>{if(un){let So=function(Xi,Zn){const Ji=Xi.getValue();Ki(Ji),Ri(new Date().getTime()),Xi.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ae&&(cn?Ae(Ji,fo(Ji)):Ae(Ji))};return un.on("change",So),()=>{un.off("change",So)}}},[un,Ae]),(0,Ot.useEffect)(()=>{if(un)if(Fe==null)un.setValue(""),Ki("");else{const So=window.scrollY||window.pageYOffset;Fe!==un.getValue()&&(un.setValue(Fe),Ki(Fe),un.setCursor(ni?1:un.lineCount(),0),window.scrollTo(0,So))}},[un,Fe]);const li=(0,Ot.useCallback)(So=>{const Xi=un.getCursor(),Zn=un.getSelection();let Ji=Zn.split(`
|
|
|
`);switch(So){case"bold":return un.replaceSelection("**"+Zn+"**"),Zn===""&&un.setCursor(Xi.line,Xi.ch+2),un.focus();case"italic":return un.replaceSelection("*"+Zn+"*"),Zn===""&&un.setCursor(Xi.line,Xi.ch+1),un.focus();case"code":return un.replaceSelection("`"+Zn+"`"),Zn===""&&un.setCursor(Xi.line,Xi.ch+1),un.focus();case"inline-latex":return Di("inline-latex"),un.focus();case"latex":return un.replaceSelection("```latex\n"+Zn+"\n```"),un.setCursor(Xi.line+1,Zn.length+1),un.focus();case"line-break":return un.replaceSelection(`<br/>
|
|
|
`),un.focus();case"list-ul":return Zn===""?un.replaceSelection("- "+Zn):un.replaceSelection(Ji.map(qo=>qo===""?"":`- ${qo}`).join(`
|
|
|
`)),un.focus();case"list-ol":return Zn===""?un.replaceSelection("1. "+Zn):un.replaceSelection(Ji.map((qo,Or)=>qo===""?"":`${Or+1}. ${qo}`).join(`
|
|
|
`)),un.focus();case"add-null-ch":return Zn===""&&un.setCursor(Xi.line,Xi.ch),un.replaceSelection(co),un.focus();case"add-signal":return Zn===""&&un.setCursor(Xi.line,Xi.ch),un.replaceSelection(Ct),un.focus();case"add-multiple":return Zn===""&&un.setCursor(Xi.line,Xi.ch),un.replaceSelection(Sn),un.focus();case"inster-template-1":return Zn===""&&un.setCursor(Xi.line,Xi.ch),un.replaceSelection(Yn),un.focus();case"eraser":return un.setValue(""),un.focus();case"trigger-watch":return Dn(!en),un.focus();case"trigger-full-screen":return ki(!gi),un.focus();case ai:Di(ai);return;case Oi:Di(Oi);return;case Kn:Di(Kn);return;case Ci:Di(Ci);return;case"maths-latex":Di("maths-latex");return;case ci:Di(ci);return;case mo:Di(mo);return;default:throw new Error}},[un,en,gi]),$t=(0,Ot.useCallback)((So,Xi)=>{var Zn,Ji,qo,Or,ur,Yo;switch(Di(""),Pi){case ai:const{title:wa,link:an}=So;return un.replaceSelection(`[${wa}](${an})`),un.focus();case Oi:const{language:Jr,content:Zs}=So;return un.replaceSelection(["```"+Jr,Zs,"```"].join(`
|
|
|
`)),un.focus();case"maths-latex":for(var xr=atob(So),wr=new Uint8Array(xr.length),ta=0;ta<xr.length;ta++)wr[ta]=xr.charCodeAt(ta);var da=new Blob([wr],{type:"image/png"});(0,ze.I)(da,xo=>{xo.id?un.replaceSelection(``):(xo==null?void 0:xo.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":un.replaceSelection("`$$"+So+"$$`");break;case Kn:case Ci:case Wi:const{src:ps,alt:Ds}=So,$o=Xi,Ms=(qo=(Ji=(Zn=$o==null?void 0:$o.name)==null?void 0:Zn.split("."))==null?void 0:Ji.pop)==null?void 0:qo.call(Ji);return((Or=$o==null?void 0:$o.type)==null?void 0:Or.indexOf("image"))>-1||!($o!=null&&$o.type)?$o!=null&&$o.align||$o!=null&&$o.width?un.replaceSelection(`<p style="text-align:${$o.align||"initial"}"><img width="${$o.width?$o.width+"%":"initial"}" src="${ps}" alt="${Ds||""}" /></p>`):un.replaceSelection(`<img width="100%" src="${ps}" alt="${Ds||""}" />`):((ur=$o==null?void 0:$o.type)==null?void 0:ur.indexOf("video"))>-1?un.replaceSelection(`<video width="100%" controls src="${ps}"></video>`):((Yo=$o==null?void 0:$o.type)==null?void 0:Yo.indexOf("pdf"))>-1?un.replaceSelection(`<a href="${ps}?type=${$o.type}&disposition=inline" target="_blank">${$o.name}</a>`):yi.includes(Ms)?un.replaceSelection(`<a href="${ps}?type=office&disposition=inline" target="_blank">${$o.name}</a>`):un.replaceSelection(`[${$o.name}](${ps})`),un.focus();case mo:const{row:Nr,col:Go,align:fr}=So;let aa=`
|
|
|
`;for(let xo=0;xo<Nr;xo++){let tr=[],ko=[];for(let vi=0;vi<Go;vi++)xo===1&&ko.push(Ao[fr]),tr.push(" ");xo===1&&(aa+=`| ${ko.join(" | ")} |
|
|
|
`),aa+=`| ${tr.join(Go===1?"":" | ")} |
|
|
|
`}return un.replaceSelection(aa+`
|
|
|
`),un.focus();default:throw new Error}},[un,Pi]),Ho=(0,Ot.useMemo)(()=>{switch(Pi){case ai:return Ot.createElement(Tn,{callback:$t,onCancel:or});case Oi:return Ot.createElement(An.Z,{callback:$t,onCancel:or});case Kn:return Ot.createElement(ze.Z,{callback:$t,onCancel:or});case ci:return Ot.createElement(ee,{callback:$t,onCancel:or});case mo:return Ot.createElement(Lt,{callback:$t,onCancel:or});case"maths-latex":return Ot.createElement(ln,{showSaveButton:!0,callback:$t});case"inline-latex":return Ot.createElement(qe.Z,{showSaveButton:!0,callback:$t});default:return null}},[Pi]);function or(){Di("")}(0,Ot.useEffect)(()=>{if(Ii.current){let So=function(ur){qo=!0,Or=ur.pageY},Xi=function(){qo=!1},Zn=function(ur){if(qo){let Yo=ur.pageY-Or;Yo<0&&(Yo=0),Yo>300&&(Yo=300);let xr=He+Yo+"px";qi(xr)}},Ji=Ii.current,qo=!1,Or=0;return Ji.addEventListener("mousedown",So),document.addEventListener("mousemove",Zn),document.addEventListener("mouseup",Xi),()=>{Ji.removeEventListener("mousedown",So),document.removeEventListener("mousemove",Zn),document.removeEventListener("mouseup",Xi)}}},[un,Ii]),(0,Ot.useEffect)(()=>{qi(He)},[He]);const Cr=_e(Zt),Fr=_e($i),cr={width:Cr,height:Fr},oo=(0,Ot.useMemo)(()=>{if(Zi){let So=new Date(Zi),Xi=So.getHours(),Zn=So.getMinutes(),Ji=So.getSeconds();return Xi=Xi<10?"0"+Xi:Xi,Zn=Zn<10?"0"+Zn:Zn,Ji=Ji<10?"0"+Ji:Ji,`${Xi}:${Zn}:${Ji}`}return 0},[Zi]),fo=So=>{const Xi=[];if(cn){let Zn=-1;So=So.replace(/(@▁▁@|@▁@)/g,function(Ji,qo,Or){Xi.push({multiLine:Ji!==Ct})})}return Xi};function _o(){window.sessionStorage.removeItem(In),Lo(!1),Ri(0)}function Co(){Lo(!1),Ri(0),un.setValue(window.sessionStorage.getItem(In))}(0,Ot.useEffect)(()=>{ri[Pi]&&Pi!==Ci&&Pi!==ci&&setTimeout(()=>{const So=document.getElementsByClassName("markdown-popup-form")[0],Xi=window.innerWidth/2-So.offsetWidth/2,Zn=window.innerHeight/2-So.offsetHeight/2;Gi(Xi),ji(Zn)},0)},[Pi]);const lr=So=>{So.preventDefault();const Xi=So.clientX-tn,Zn=So.clientY-Yi;document.body.onmousemove=Ji=>{let qo=Ji.clientX-Xi,Or=Ji.clientY-Zn;const ur=document.getElementsByClassName("markdown-popup-form")[0],Yo=window.innerWidth-ur.offsetWidth,xr=window.innerHeight-ur.offsetHeight;qo=Math.max(0,Math.min(qo,Yo)),Or=Math.max(0,Math.min(Or,xr)),ha(Ji.clientX,Ji.clientY,Xi,Zn)&&(Gi(qo),ji(Or))},document.body.onmouseup=function(){document.body.onmousemove=null}},ha=(So,Xi,Zn,Ji)=>{const qo=document.body.clientHeight,Or=document.body.clientWidth;return So<20&&Zn>So||So>Or-20&&Zn<So||Xi<20&&Ji>Xi||Xi>qo-20&&Ji<Xi?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Ot.createElement(Ot.Fragment,null,Ot.createElement("div",{className:"markdown-editor-wrapper",ref:Mo},Ot.createElement("div",{className:`markdown-editor-container ${Jn} ${en?"on-preview":""} ${fn?"mini":""} ${gi?"full-screen":""}`,style:cr},Ot.createElement(Wt,{insertTemp:Ye,watch:en,fullScreen:gi,showNullButton:nn,showNullProgramButton:cn,onActionCallback:li,hidetoolBar:Bn,extraUse:Vi}),Ot.createElement("div",{className:"markdown-editor-body"},Ot.createElement("div",{className:"codemirror-container"},Ot.createElement("textarea",{ref:No,placeholder:qn})),en?Ot.createElement("div",{ref:Ni,className:"preview-container"},gn==="stex"&&Ot.createElement(Ce,{value:to}),gn!=="stex"&&Ot.createElement(ce.Z,{disabledFill:Qn,showProgramFill:cn,value:to})):null))),Re?Ot.createElement("a",{ref:Ii,className:"editor-resize"}):null,Pi===Ci&&Ot.createElement(pn,{callback:$t,onCancel:or}),Pi===ci&&Ot.createElement(ee,{callback:$t,onCancel:or}),Ot.createElement(re.Z,null,ri[Pi]&&Pi!==Ci&&Pi!==ci?Ot.createElement(Te.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:tn,top:Yi},title:Ot.createElement("div",{style:{cursor:"move"},onMouseDown:lr},ri[Pi]),open:!0,onCancel:or,footer:null,destroyOnClose:!0,width:Pi===ci?"1200px":null,height:Pi===ci?"80vh":null,className:"markdown-popup-form"},Ho):null))}},28451:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return It},I:function(){return Wt}});var Ot=xt(78241),jt=xt(8591),Qt=xt(92832),Me=xt(81327),Ut=xt(5871),pe=xt(5112),Nt=xt(3113),Ie=xt(77903),we=xt(59301),qt=xt(59301),ce=Object.defineProperty,Ce=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ht=(re,ne,me)=>ne in re?ce(re,ne,{enumerable:!0,configurable:!0,writable:!0,value:me}):re[ne]=me,st=(re,ne)=>{for(var me in ne||(ne={}))et.call(ne,me)&&ht(re,me,ne[me]);if(Tt)for(var me of Tt(ne))nt.call(ne,me)&&ht(re,me,ne[me]);return re},gt=(re,ne)=>Ce(re,Be(ne));const{useForm:vt}=Ot.default,wt={width:280,marginRight:10},Ft={labelCol:{span:5},wrapperCol:{span:19}};var It=({callback:re,onCancel:ne})=>{const[me]=vt();let Vt=(0,we.useRef)();function Le(Ke){Vt.current.width=me.getFieldValue("width"),Vt.current.align=me.getFieldValue("align"),re(Ke,Vt.current)}function he(Ke,Ve){if(Ke.status===-1){jt.ZP.error(Ke.message);return}me.setFieldsValue({src:`/api/attachments/${Ke.id}`,type:Ve.type})}function Ge(Ke){let Ve=Ke.target.files[0];Vt.current=Ve,Wt(Ve,he)}return qt.createElement(Ot.default,gt(st({form:me},Ft),{className:"upload-image-panel",onFinish:Le,style:{width:470,overflow:"hidden"}}),qt.createElement(Ot.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},qt.createElement("div",{className:"flex-container"},qt.createElement(Ot.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},qt.createElement(Qt.default,{style:wt})),qt.createElement(At,{onFileChange:Ge}))),qt.createElement(Ot.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},qt.createElement(Qt.default,{style:{width:264}})),qt.createElement(Ot.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},qt.createElement(Me.Z,null,qt.createElement(Ot.default.Item,{name:"width",style:{margin:0}},qt.createElement(Ut.Z,{style:{width:264}})),qt.createElement("span",{className:"ml8"},"%"))),qt.createElement(Ot.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},qt.createElement(pe.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"}]})),qt.createElement("aside",null,qt.createElement(Ot.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},qt.createElement(Nt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),qt.createElement(Nt.ZP,{type:"default",onClick:ne},"\u53D6\u6D88"))))};function At({onFileChange:re}){return qt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",qt.createElement("input",{type:"file",onChange:re}))}function Wt(re,ne){if(!re)throw new String("\u6CA1\u6709\u6587\u4EF6");let me=new FormData;me.append("editormd-image-file",re),me.append("file_param_name","editormd-image-file"),me.append("byxhr","true");var Vt=new window.XMLHttpRequest;Vt.withCredentials=!0,Vt.addEventListener("load",function(Le){ne(JSON.parse(Le.target.responseText),re)},!1),Vt.addEventListener("error",function(Le){console.error(Le)},!1),Vt.open("POST",`${Ie.KI}/api/attachments.json`),Vt.send(me)}},79346:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Qt}});var Ot=xt(59301),jt=xt(4676);class Qt extends Ot.Component{constructor(Ut){super(Ut);const pe=window.document;this.node=pe.createElement("div"),pe.body.appendChild(this.node)}render(){const{children:Ut}=this.props;return(0,jt.createPortal)(Ut,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(En,yn,xt){"use strict";xt.d(yn,{SV:function(){return fe},ZP:function(){return Dt}});var Ot=xt(59301),jt=xt(76374);const Qt={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"]},Me={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"]},Ut={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(`
|
|
|
`)}]},pe={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(`
|
|
|
`)}]},Nt={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 Ie=xt(53184),we=xt.n(Ie),qt=Object.defineProperty,ce=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,nt=(Se,ee,Kt)=>ee in Se?qt(Se,ee,{enumerable:!0,configurable:!0,writable:!0,value:Kt}):Se[ee]=Kt,ht=(Se,ee)=>{for(var Kt in ee||(ee={}))Tt.call(ee,Kt)&&nt(Se,Kt,ee[Kt]);if(Be)for(var Kt of Be(ee))et.call(ee,Kt)&&nt(Se,Kt,ee[Kt]);return Se},st=(Se,ee)=>ce(Se,Ce(ee)),gt=(Se,ee,Kt)=>new Promise((kt,St)=>{var mt=Et=>{try{zt(Kt.next(Et))}catch(Yt){St(Yt)}},Lt=Et=>{try{zt(Kt.throw(Et))}catch(Yt){St(Yt)}},zt=Et=>Et.done?kt(Et.value):Promise.resolve(Et.value).then(mt,Lt);zt((Kt=Kt.apply(Se,ee)).next())});const vt={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},wt=(Se,ee)=>ee.map(Kt=>({label:Kt,kind:Se.languages.CompletionItemKind.Keyword,insertText:Kt})),Ft=Se=>Object.keys(vt.tables).map(ee=>({label:ee,kind:Se.languages.CompletionItemKind.Variable,insertText:ee})),It=(Se,ee)=>{const Kt=vt.tables[Se];return Kt?Kt.map(kt=>({label:kt,kind:ee.languages.CompletionItemKind.Field,insertText:kt})):[]};function At(Se,ee,Kt,kt,St){let mt=ee.getWordUntilPosition(Kt),Lt={startLineNumber:Kt.lineNumber,endLineNumber:Kt.lineNumber,startColumn:mt.startColumn,endColumn:mt.endColumn},zt=kt.map(Et=>({label:Et,kind:Se.languages.CompletionItemKind.Keyword,insertText:Et,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Lt}));return St.map(Et=>{zt.push(st(ht({},Et),{range:Lt}))}),zt}var Wt=Se=>{vt.languages.map(St=>(Se.languages.registerDocumentFormattingEditProvider(St,{provideDocumentFormattingEdits(mt,Lt,zt){return gt(this,null,function*(){const Et=we()(mt.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:mt.getFullModelRange(),text:Et}]})}}),St));const ee=Ut.quickKey.map(St=>({label:St.label,kind:Se.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Kt=pe.quickKey.map(St=>({label:St.label,kind:Se.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet})),kt=Me.quickKey.map(St=>({label:St.label,kind:Se.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Se.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(St,mt){var Lt=St.getWordUntilPosition(mt),zt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:Lt.startColumn,endColumn:Lt.endColumn},Et=St.getLineContent(mt.lineNumber).substring(Lt.startColumn-2,Lt.endColumn);return{suggestions:[...Ut.keywords.map(Yt=>({label:Yt,kind:Se.languages.CompletionItemKind.Function,documentation:Yt,insertText:Yt,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt})),...Ut.quickKey.map(Yt=>({label:Yt.label,kind:Se.languages.CompletionItemKind.Function,documentation:Yt.content,insertText:Et.startsWith("#")?Yt.content.replace(/#/,""):Yt.content,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt}))]}}}),Se.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(St,mt){var Lt=St.getWordUntilPosition(mt),zt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:Lt.startColumn,endColumn:Lt.endColumn};return{suggestions:[...Qt.keywords.map(Et=>({label:Et,kind:Se.languages.CompletionItemKind.Function,documentation:Et,insertText:Et,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt}))]}}}),Se.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(St,mt){var Lt=St.getWordUntilPosition(mt),zt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:Lt.startColumn,endColumn:Lt.endColumn},Et=St.getLineContent(mt.lineNumber).substring(Lt.startColumn-2,Lt.endColumn);return{suggestions:[...Me.keywords.map(Yt=>({label:Yt,kind:Se.languages.CompletionItemKind.Function,documentation:Yt,insertText:Yt,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt})),...Me.quickKey.map(Yt=>({label:Yt.label,kind:Se.languages.CompletionItemKind.Function,documentation:Yt.content,insertText:Et.startsWith("#")?Yt.content.replace(/#/,""):Yt.content,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt}))]}}}),Se.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(St,mt){var Lt=St.getWordUntilPosition(mt),zt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:Lt.startColumn,endColumn:Lt.endColumn},Et=St.getLineContent(mt.lineNumber).substring(Lt.startColumn-2,Lt.endColumn);return{suggestions:[...Nt.keywords.map(Yt=>({label:Yt,kind:Se.languages.CompletionItemKind.Function,documentation:Yt,insertText:Yt,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt})),...Nt.quickKey.map(Yt=>({label:Yt.label,kind:Se.languages.CompletionItemKind.Function,documentation:Yt.content,insertText:Et.startsWith("#")?Yt.content.replace(/#/,""):Yt.content,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt}))]}}}),Se.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(St,mt){var Lt=St.getWordUntilPosition(mt),zt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:Lt.startColumn,endColumn:Lt.endColumn},Et=St.getLineContent(mt.lineNumber).substring(Lt.startColumn-2,Lt.endColumn);return{suggestions:[...pe.keywords.map(Yt=>({label:Yt,kind:Se.languages.CompletionItemKind.Function,documentation:Yt,insertText:Yt,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt})),...pe.quickKey.map(Yt=>({label:Yt.label,kind:Se.languages.CompletionItemKind.Function,documentation:Yt.content,insertText:Et.startsWith("#")?Yt.content.replace(/#/,""):Yt.content,insertTextRules:Se.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt}))]}}})};const re="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var ne=Object.defineProperty,me=(Se,ee,Kt)=>ee in Se?ne(Se,ee,{enumerable:!0,configurable:!0,writable:!0,value:Kt}):Se[ee]=Kt,Vt=(Se,ee,Kt)=>me(Se,typeof ee!="symbol"?ee+"":ee,Kt);const Le=class px{constructor(ee,Kt,kt){this.placeholder=ee,this.editor=Kt,this.monaco=kt,Kt.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)}};Vt(Le,"ID","editor.widget.placeholderHint");var Ge=Le,Ke=xt(96236),Ve=xt(8591),sn=xt(6848),Mn=xt(89392),xe=xt(34604),Ht=xt(56102),Je=Object.defineProperty,Tn=Object.defineProperties,An=Object.getOwnPropertyDescriptors,ze=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,dn=Object.prototype.propertyIsEnumerable,Hn=(Se,ee,Kt)=>ee in Se?Je(Se,ee,{enumerable:!0,configurable:!0,writable:!0,value:Kt}):Se[ee]=Kt,hn=(Se,ee)=>{for(var Kt in ee||(ee={}))Te.call(ee,Kt)&&Hn(Se,Kt,ee[Kt]);if(ze)for(var Kt of ze(ee))dn.call(ee,Kt)&&Hn(Se,Kt,ee[Kt]);return Se},pn=(Se,ee)=>Tn(Se,An(ee)),de=(Se,ee)=>{var Kt={};for(var kt in Se)Te.call(Se,kt)&&ee.indexOf(kt)<0&&(Kt[kt]=Se[kt]);if(Se!=null&&ze)for(var kt of ze(Se))ee.indexOf(kt)<0&&dn.call(Se,kt)&&(Kt[kt]=Se[kt]);return Kt},vn=(Se,ee,Kt)=>new Promise((kt,St)=>{var mt=Et=>{try{zt(Kt.next(Et))}catch(Yt){St(Yt)}},Lt=Et=>{try{zt(Kt.throw(Et))}catch(Yt){St(Yt)}},zt=Et=>Et.done?kt(Et.value):Promise.resolve(Et.value).then(mt,Lt);zt((Kt=Kt.apply(Se,ee)).next())});function bn(Se){return/^\d+$/.test(Se)?`${Se}px`:Se}function Qe(){}let Pn=!1;const Ne={"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 Pe(Se=[]){let ee=Se;if(Array.isArray(Se)){for(let Kt=0;Kt<Se.length;Kt++){let kt=Ne[Se[Kt]];if(kt)return kt}return ee[0]}return Ne[ee]||ee}let ie=null;var Dt=Se=>{var ee=Se,{width:Kt="100%",height:kt="100%",value:St,language:mt="javascript",style:Lt={},options:zt={},overrideServices:Et={},theme:Yt="vs-dark",onEditBlur:$e,isCopy:ln=!1,onSave:qe,autoHeight:Nn=!1,forbidCopy:ai=!1,onChange:Kn=Qe,editorDidMount:ci=Qe,onFocus:Ci=Qe,onBreakPoint:Wi=Qe,breakPointValue:Oi=[],filename:mo="educoder.txt",errorLine:Bo,errorContent:Ao="",highlightLine:oi,openBreakPoint:fi=!1,placeholder:di=""}=ee,mi=de(ee,["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 co=(0,Ot.useRef)(),Sn=(0,Ot.useRef)({}),Ct=(0,Ot.useRef)(),Yn=(0,Ot.useRef)(),yi=(0,Ot.useRef)([]),_e=(0,Ot.useRef)(!1),Wn=(0,Ot.useRef)(),_n=(0,Ot.useRef)(),si=(0,Ot.useRef)(!1),[ri,hi]=(0,Ot.useState)(!1);function Fe(){let Oe;return co.current&&(Oe=new jt.Z(Xe=>{for(let Gn of Xe)(Gn.target.offsetHeight>0||Gn.target.offsetWidth>0)&&Sn.current.instance.layout()}),Oe.observe(co.current)),Oe}function Ae(){Ve.ZP.warning({content:decodeURIComponent(re),key:"monaco-editor-tip"})}const Zt=()=>{let Oe=Sn.current.instance;if(St!=null&&Oe&&ri){const Xe=Oe.getModel();Xe&&St!==Xe.getValue()&&(Pn=!0,Xe.setValue(St),Oe.layout(),Pn=!1)}};(0,Ot.useEffect)(()=>{const Oe=xe.Z.subscribe("formatDocument",Xe=>{var Gn;let Xn=Sn.current.instance;(Gn=Xn==null?void 0:Xn.getAction)==null||Gn.call(Xn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Xe=>{Kn(Xe)},Oe},[]),(0,Ot.useEffect)(()=>{var Oe;let Xe=Sn.current.instance;Yn.current&&clearTimeout(Yn.current),Yn.current=setTimeout(()=>{Zt()},500),St&&(St!=null&&St.length)&&((Oe=Xe==null?void 0:Xe.updateOptions)==null||Oe.call(Xe,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(St.split(/\r\n|\r|\n/g).length))+3,5)}))},[St,ri,Sn.current]),(0,Ot.useEffect)(()=>{if(Bo&&Sn.current&&Sn.current.instance){let Xe=Sn.current.instance;Xe.changeViewZones(function(Gn){var Xn=document.createElement("div");Xn.style.padding="10px 20px",Xn.style.width="calc(100% - 20px)",Xn.className="my-error-line-wrp",Xn.innerHTML=Ao,Gn.addZone({afterLineNumber:Bo||11,heightInLines:3,domNode:Xn})});var Oe={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Xe.addOverlayWidget(Oe),Xe.revealPositionInCenter({lineNumber:20,column:1})}},[Bo,Sn.current,ri]);const He=(Oe="",Xe)=>{if(!Oe||Oe.trim()==="")return!0;const Xn=Sn.current.instance.getModel().getLineTokens(Xe);let Jn=!1;for(let Rn=0;Rn<2;Rn++)Xn.getStandardTokenType(Rn)===1&&(Jn=!0);return Jn};(0,Ot.useEffect)(()=>{var Oe;const Xe=(Oe=Sn.current)==null?void 0:Oe.instance;if(Xe&&ri&&ai){const Gn=Xe.onDidBlurEditorWidget(()=>{si.current=!1}),Xn=Xe.onDidFocusEditorText(()=>{si.current=!0});return()=>{Gn.dispose(),Xn.dispose()}}},[Sn.current,ri,ai]),(0,Ot.useEffect)(()=>{var Oe;if((Oe=Sn.current)!=null&&Oe.instance&&ri&&fi){let Xe=Sn.current.instance,Gn=Xe.getModel();if(!Gn)return;(()=>{var Ki;let en=[],Dn=[];const gi=Gn.getAllDecorations();for(let Pi of gi)Pi.options.className==="highlighted-line"&&(en.push((Ki=Pi==null?void 0:Pi.range)==null?void 0:Ki.startLineNumber),Dn.push(Pi==null?void 0:Pi.id));if(oi===en[0])return;Gn.deltaDecorations(Dn,[]);const ki=Gn.getLineCount();oi&&oi<=ki&&(Xe.deltaDecorations([],[{range:new ie.Range(oi,1,oi,Gn.getLineMaxColumn(oi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Xe.revealLineInCenter(oi))})();const Jn=(Ki=!1)=>{var en;let Dn=[],gi=[];const ki=Gn.getAllDecorations();for(let Pi of ki)Pi.options.linesDecorationsClassName==="breakpoints-select"&&(Dn.push((en=Pi==null?void 0:Pi.range)==null?void 0:en.startLineNumber),gi.push(Pi==null?void 0:Pi.id));if(Ki)return{lines:Dn,ids:gi};Wi(Dn)},Rn=Ki=>vn(void 0,null,function*(){let en={range:new ie.Range(Ki,1,Ki,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Gn.deltaDecorations([],[en]),Jn()}),ni=Ki=>vn(void 0,null,function*(){let en=[];const Dn=Xe.getLineDecorations(Ki);for(let gi of Dn)gi.options.linesDecorationsClassName==="breakpoints-select"&&en.push(gi.id);yield Gn.deltaDecorations(en,[]),Jn()}),Qn=Ki=>{let en=Xe.getLineDecorations(Ki);for(let Dn of en)if(Dn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Mn.isEqual)(Oi,Jn(!0).lines)){Gn.deltaDecorations(Jn(!0).ids,[]);const Ki=Oi.map(en=>({range:new ie.Range(en,1,en,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Gn.deltaDecorations([],Ki)}const qn=Xe.onDidChangeModelContent(Ki=>{let en=Xe.getPosition();if(en){let Dn=en.lineNumber;clearTimeout(_n.current),_n.current=setTimeout(()=>{He(Gn.getLineContent(Dn),Dn)?ni(Dn):Qn(Dn)?(ni(Dn),Rn(Dn)):Jn()},100)}}),Si=Xe.onMouseDown(Ki=>{var en,Dn,gi;if(Ki.target.detail&&((gi=(Dn=(en=Ki.target)==null?void 0:en.element)==null?void 0:Dn.className)!=null&&gi.includes("line-numbers"))){let ki=Ki.target.position.lineNumber;if(He(Gn.getLineContent(ki),ki))return;Qn(ki)?ni(ki):Rn(ki)}}),Vi=Ki=>{let en={range:new ie.Range(Ki,1,Ki,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};yi.current=Xe.deltaDecorations(yi.current,[en])},un=()=>{yi.current=Xe.deltaDecorations(yi.current,[])},lo=Xe.onMouseMove(Ki=>{var en,Dn,gi;if(un(),Ki.target.detail&&((gi=(Dn=(en=Ki.target)==null?void 0:en.element)==null?void 0:Dn.className)!=null&&gi.includes("line-numbers"))){let ki=Ki.target.position.lineNumber;if(He(Gn.getLineContent(ki),ki))return;Vi(ki)}}),to=Xe.onMouseLeave(()=>{un()});return()=>{qn.dispose(),Si.dispose(),lo.dispose(),to.dispose()}}},[Sn.current,ri,Oi,oi,fi,mt]),(0,Ot.useEffect)(()=>{var Oe;(Oe=Sn.current)!=null&&Oe.instance&&fi&&Sn.current.instance.setPosition({lineNumber:0,column:0})},[oi]);function fn(){let Oe=Sn.current.instance;if(Oe){const Xe=Oe.getSelection(),Gn=Sn.current.pastePos||{},Xn=new ie.Range(Gn.startLineNumber||Xe.endLineNumber,Gn.startColumn||Xe.endColumn,Gn.endLineNumber||Xe.endLineNumber,Gn.endColumn||Xe.endColumn);setTimeout(()=>{Oe.executeEdits("",[{range:Xn,text:""}])},300)}}function ye(Oe){(window.navigator.platform.match("Mac")?Oe.metaKey:Oe.ctrlKey)&&Oe.keyCode==83&&(Oe.preventDefault(),qe())}const ae=()=>{if(Nn&&Sn.current.instance){const Oe=Sn.current.instance.getContentHeight();cn(Oe<kt?kt:Oe)}else cn(kt)};function Ye(Oe){var Xe=document.createEvent("MouseEvents");Xe.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Oe.dispatchEvent(Xe)}const gn=Oe=>{if(!si.current)return;const{keyCode:Xe,ctrlKey:Gn,metaKey:Xn,target:Jn,type:Rn}=Oe;return(Rn==="paste"||(Xe===67||Xe===86)&&(Xn||Gn))&&Jn.nodeName==="TEXTAREA"&&(Ae(),Oe.preventDefault()),!1};function In(Oe,Xe){var Gn=window.URL||window.webkitURL||window,Xn=new Blob([Xe]),Jn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Jn.href=Gn.createObjectURL(Xn),Jn.download=Oe,Ye(Jn)}(0,Ot.useEffect)(()=>{ae()},[ae]),(0,Ot.useEffect)(()=>{co.current&&!ri&&Promise.all([xt.e(8909),xt.e(3267)]).then(xt.bind(xt,71448)).then(Oe=>{try{ie=Oe,Sn.current.instance=ie.editor.create(co.current,{value:St,language:Pe(mt),theme:Yt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Et);const Xe=Sn.current.instance;let Jn=[...Ke.BH._menuItems].find(qn=>qn[0]._debugName=="EditorContext")[1],Rn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ni=(qn,Si)=>{var Vi,un;let lo=qn._first;do Si.includes((un=(Vi=lo.element)==null?void 0:Vi.command)==null?void 0:un.id)&&qn._remove(lo);while(lo=lo.next)};if(ci(Xe,ie),setTimeout(()=>{ae(),Sn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{In(mo||"educoder.txt",Xe.getValue())}})},500),Sn.current.subscription=Xe.onDidChangeModelContent(qn=>{_e.current?clearTimeout(Wn.current):(ae(),Kn(Xe.getValue(),qn)),Wn.current=setTimeout(()=>{_e.current=!1},500)}),window.Monaco||Wt(ie,Pe(mt)),ai&&(ni(Jn,Rn),co.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",gn),window.removeEventListener("paste",gn),window.addEventListener("keydown",gn),window.addEventListener("paste",gn)),window.Monaco=ie,$e&&Xe.onDidBlurEditorWidget(()=>{$e(Xe.getValue())}),Ci&&Xe.onDidFocusEditorText(()=>{Ci(Xe.getValue())}),ai)try{Xe.onDidPaste(qn=>{const Si=Xe.getSelection(),Vi=Sn.current.pastePos||{},un=new ie.Range(Vi.startLineNumber||Si.endLineNumber,Vi.startColumn||Si.endColumn,Vi.endLineNumber||Si.endLineNumber,Vi.endColumn||Si.endColumn);Xe.executeEdits("",[{range:qn.range,text:""}])})}catch(qn){}let Qn=Fe();return di&&typeof di=="string"&&new Ge(di,Xe,ie),hi(!0),()=>{const qn=Sn.current.instance;qn.dispose();const Si=qn.getModel();Si&&Si.dispose(),Sn.current.subscription&&Sn.current.subscription.dispose(),Qn.unobserve(co.current)}}catch(Xe){}})},[]),(0,Ot.useEffect)(()=>{if(Sn.current.instance&&ri)return document.addEventListener("keydown",ye,!1),()=>{document.removeEventListener("keydown",ye)}},[qe,ri]),(0,Ot.useEffect)(()=>{let Oe=Sn.current.instance;if(Oe&&ri){let Xe=Pe(mt);ie.editor.setModelLanguage(Oe.getModel(),Xe)}},[mt,ri]),(0,Ot.useEffect)(()=>{Sn.current.instance&&ri&&ie.editor.setTheme(Yt)},[Yt,ri]),(0,Ot.useEffect)(()=>{let Oe=Sn.current.instance;Ct.current=zt,Oe&&ri&&(Oe.updateOptions(hn({},zt)),setTimeout(()=>{Oe.getModel().updateOptions(hn({},zt))},200))},[JSON.stringify(zt),ri]),(0,Ot.useEffect)(()=>{let Oe=Sn.current.instance;Oe&&ri&&Oe.layout()},[Kt,kt,ri]);const[Re,_t]=(0,Ot.useState)(bn(Kt)),[nn,cn]=(0,Ot.useState)(bn(kt)),Bn=pn(hn({},Lt),{width:Re,height:nn,position:"relative"});return Ot.createElement("div",{className:"my-monaco-editor",ref:co,style:Bn},ln&&Ot.createElement(Ht.CopyToClipboard,{text:St,onCopy:()=>Ve.ZP.success("\u590D\u5236\u6210\u529F")},Ot.createElement(sn.Z,{title:"\u590D\u5236\u4EE3\u7801"},Ot.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Ot.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function fe({width:Se="100%",height:ee="100%",original:Kt,modified:kt,language:St,options:mt={}}){const Lt=(0,Ot.useRef)(),[zt,Et]=(0,Ot.useState)(null);function Yt(Nn){let ai;return Lt.current&&(ai=new jt.Z(Kn=>{for(let ci of Kn)(ci.target.offsetHeight>0||ci.target.offsetWidth>0)&&Nn.layout()}),ai.observe(Lt.current)),ai}(0,Ot.useEffect)(()=>(Lt.current&&Promise.all([xt.e(8909),xt.e(9404)]).then(xt.bind(xt,2550)).then(Nn=>{ie=Nn;const ai=ie.editor.createDiffEditor(Lt.current,pn(hn({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},mt),{wordWrap:!0}));Et(ai);let Kn=Yt(ai);return()=>{ai.dispose();const ci=ai.getModel();ci&&ci.dispose(),Kn.unobserve(Lt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Ot.useEffect)(()=>{zt&&zt.setModel({original:ie.editor.createModel(Kt,St),modified:ie.editor.createModel(kt,St)})},[Kt,kt,St,zt]);const $e=bn(Se),ln=bn(ee),qe={width:$e,height:ln};return Ot.createElement("div",{className:"my-diff-editor",ref:Lt,style:qe})}},58856:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return jt}});var Ot=xt(59301);function jt(Qt,Me){const Ut=(0,Ot.useRef)();(0,Ot.useEffect)(()=>{Ut.current=Qt}),(0,Ot.useEffect)(()=>{function pe(){Ut.current()}if(Me!==null){let Nt=setInterval(pe,Me);return()=>clearInterval(Nt)}},[Me])}},9572:function(En,yn,xt){"use strict";xt.r(yn),xt.d(yn,{default:function(){return Ao}});var Ot=xt(59301),jt=xt(89070),Qt={box:"box___akyrK",formWrap:"formWrap___y92V8",shiti_icon:"shiti_icon____ZNmy",genghuan:"genghuan___Bw7ao",shanchu:"shanchu___SItJZ",box_header:"box_header___jersL",header_title:"header_title___Jrz8Q",ewm:"ewm___Ccwyw",ewm_img:"ewm_img___qYpk1",ewm_text:"ewm_text____v5jw",box_miaoshu:"box_miaoshu___BqRGY",question_button:"question_button___MvZyz",select_question:"select_question___LvjKa",question_right:"question_right___sDC9L",question_right_title:"question_right_title___ek4Hb",question_right_content:"question_right_content___FyEMX",save_button:"save_button___dLwXn",start_button:"start_button___ta6xr",submit_button:"submit_button___E6iWE",staticWrap:"staticWrap___WAzhb",title:"title___xZVjz",subTitle:"subTitle___Y2dsw",erweima:"erweima___6VmbC"},Me=xt(78241),Ut=xt(8591),pe=xt(71418),Nt=xt(6848),Ie=xt(43418),we=xt(57809),qt=xt(1710),ce=xt(9122),Ce=xt(79285),Be=xt(95237),Tt=xt(43604),et={wrap:"wrap___xb1NT",deleteIcon:"deleteIcon___cM9xv",keywordTag:"keywordTag___UL5M3",questionTitleEditorWrap:"questionTitleEditorWrap___KCJQj",choiceListWrap:"choiceListWrap___YUFJN",choiceWrap:"choiceWrap___OLt1d",choiceIndex:"choiceIndex___v8tLz",judgementIndex:"judgementIndex___GFeej",setAnswerBtn:"setAnswerBtn___pBwSA",activeAnswer:"activeAnswer___d0iL0",activeJudgementAnswer:"activeJudgementAnswer___hUIzE",actionWrapper:"actionWrapper___KnaNE",addIcon:"addIcon___fbmnO",inputBorder:"inputBorder___vbVXA",placeholder:"placeholder___ECmuB",blankInputNumberWrapper:"blankInputNumberWrapper___uIbUU",addBtn:"addBtn___c1VkJ",blankIndex:"blankIndex___ek3fY",baseInputWrapper:"baseInputWrapper___zlGHK",collapseWrapper:"collapseWrapper___QtpR6",panelHeader:"panelHeader___ZsUo0",open:"open___q9CQo",close:"close___Ju5ls",hide:"hide___BmCWZ",green:"green___XHvv2",textArea:"textArea___wzrae",row:"row___TZDhZ",html:"html___kVAJu"},nt=xt(12893),ht=xt(12290),st=xt(85149),gt=xt(59301),vt=Object.defineProperty,wt=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,Wt=Object.prototype.propertyIsEnumerable,re=(oi,fi,di)=>fi in oi?vt(oi,fi,{enumerable:!0,configurable:!0,writable:!0,value:di}):oi[fi]=di,ne=(oi,fi)=>{for(var di in fi||(fi={}))At.call(fi,di)&&re(oi,di,fi[di]);if(It)for(var di of It(fi))Wt.call(fi,di)&&re(oi,di,fi[di]);return oi},me=(oi,fi)=>wt(oi,Ft(fi)),Vt=(oi,fi)=>{var di={};for(var mi in oi)At.call(oi,mi)&&fi.indexOf(mi)<0&&(di[mi]=oi[mi]);if(oi!=null&&It)for(var mi of It(oi))fi.indexOf(mi)<0&&Wt.call(oi,mi)&&(di[mi]=oi[mi]);return di};const Le=oi=>{var fi=oi,{value:di,onChange:mi,scrollId:co}=fi,Sn=Vt(fi,["value","onChange","scrollId"]);return gt.createElement("div",{id:co||""},gt.createElement(ht.Z,me(ne({},Sn),{defaultValue:di,onChange:(Ct,Yn)=>{Yn!=null&&Yn.length?mi(Ct,Yn):mi(Ct)}})))},he=({value:oi,onChange:fi,placeholder:di,height:mi=150,isEdit:co,miniToolbar:Sn,watch:Ct=!0})=>co?gt.createElement(ht.Z,{isFocus:!0,height:mi||void 0,placeholder:di,defaultValue:oi,onChange:fi,miniToolbar:Sn}):gt.createElement("div",{style:{cursor:"pointer"}},oi?gt.createElement(st.Z,{className:et.inputBorder,value:oi}):gt.createElement("div",{className:`${et.inputBorder} ${et.placeholder} inputBorderError`},di));var Ge=xt(59301),Ke=Object.defineProperty,Ve=Object.defineProperties,sn=Object.getOwnPropertyDescriptors,Mn=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,Je=(oi,fi,di)=>fi in oi?Ke(oi,fi,{enumerable:!0,configurable:!0,writable:!0,value:di}):oi[fi]=di,Tn=(oi,fi)=>{for(var di in fi||(fi={}))xe.call(fi,di)&&Je(oi,di,fi[di]);if(Mn)for(var di of Mn(fi))Ht.call(fi,di)&&Je(oi,di,fi[di]);return oi},An=(oi,fi)=>Ve(oi,sn(fi)),ze=(oi,fi)=>{var di={};for(var mi in oi)xe.call(oi,mi)&&fi.indexOf(mi)<0&&(di[mi]=oi[mi]);if(oi!=null&&Mn)for(var mi of Mn(oi))fi.indexOf(mi)<0&&Ht.call(oi,mi)&&(di[mi]=oi[mi]);return di};const Te=["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"],dn=({value:oi,onChange:fi,choiceTextKey:di,answerKey:mi,index:co,isEdit:Sn,setInputActive:Ct,form:Yn,choiceOptionsPath:yi,allowChangeMode:_e,showAddIcon:Wn,addItem:_n,deleteItem:si})=>{const ri=(oi==null?void 0:oi[mi])===1,hi=()=>{const Ae=Yn.getFieldValue(yi);Yn.setFieldValue(yi,Ae.map(Zt=>An(Tn({},Zt),{[mi]:0})))},Fe=()=>{ri?fi(An(Tn({},oi),{[mi]:0})):(_e||hi(),fi(An(Tn({},oi),{[mi]:1})))};return Ge.createElement(Be.Z,{className:et.choiceWrap,align:"middle",wrap:!1},Ge.createElement(Tt.Z,{onClick:Fe,className:`${et.choiceIndex} ${ri?et.activeAnswer:""}`},Te[co]),Ge.createElement(Tt.Z,{flex:1,className:`${et.editorWrap} ml15`,onClick:Ct},Ge.createElement(he,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:Sn,value:oi==null?void 0:oi[di],onChange:Ae=>{fi(An(Tn({},oi),{[di]:Ae}))}})),Ge.createElement(Tt.Z,{className:et.actionWrapper},Ge.createElement(Nt.Z,{title:"\u5220\u9664"},Ge.createElement(nt.Z,{className:et.deleteIcon,onClick:si,style:{visibility:co>1?"visible":"hidden"}}))))},Hn=({questionTitlePlaceholder:oi,titleKey:fi,choiceKey:di,analysisKey:mi,choiceTextKey:co,answerKey:Sn,choiceOptionsPath:Ct,allowChangeMode:Yn=!0,form:yi,showAnalysis:_e=!0})=>{const[Wn,_n]=(0,Ot.useState)(),[si,ri]=(0,Ot.useState)(!1);return Ge.createElement("div",{className:et.wrap},Ge.createElement("div",{className:et.questionTitleEditorWrap},Ge.createElement(Me.default.Item,{label:"\u9898\u5E72",name:fi,labelCol:{span:24},rules:[{required:!0}]},Ge.createElement(Le,{scrollId:Array.isArray(fi)?fi.join("_"):`${fi}`,height:150,placeholder:oi}))),Ge.createElement(Me.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Ge.createElement(Me.default.List,{name:di,rules:[{validator(hi,Fe){const Ae=Fe.some(He=>He[Sn]===1),Zt=Fe.findIndex(He=>{var fn;return((fn=He[co])==null?void 0:fn.length)<=0});return Zt!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Te[Zt]}\u9009\u9879\u7684\u5185\u5BB9`)):Ae?Promise.resolve():(Ut.ZP.error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"),Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848")))}}]},(hi,{add:Fe,remove:Ae})=>Ge.createElement("div",{id:Array.isArray(Ct)?Ct.join("_"):`${Ct}`,style:{marginTop:"-20px"}},hi.map((Zt,He)=>{var fn=Zt,{key:ye,name:ae}=fn,Ye=ze(fn,["key","name"]);const gn=Wn===ye,In=()=>{_n(ye)},Re=He<7&&He===hi.length-1,_t=()=>Fe({[co]:"",[Sn]:0}),nn=()=>Ae(ae);return Ge.createElement(Me.default.Item,An(Tn({},Ye),{key:ye,name:ae,className:et.choiceListWrap,rules:[{validator(cn,Bn){return Bn!=null&&Bn.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Te[He]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),Ge.createElement(dn,{choiceTextKey:co,answerKey:Sn,index:He,isEdit:gn,setInputActive:In,form:yi,choiceOptionsPath:Ct,allowChangeMode:Yn,showAddIcon:Re,addItem:_t,deleteItem:nn}))}),hi.length<8&&Ge.createElement("div",{className:`${et.addBtn} mb30`,onClick:()=>Fe({[co]:"",[Sn]:0})},Ge.createElement("i",{className:"iconfont icon-tianjiatixing mr5 font12"}),"\u6DFB\u52A0\u9009\u9879"))),_e&&Ge.createElement("div",{onClick:()=>ri(!0)},Ge.createElement(Me.default.Item,{name:mi,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ge.createElement(he,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:si}))))};var hn=xt(59301),pn=Object.defineProperty,de=Object.defineProperties,vn=Object.getOwnPropertyDescriptors,bn=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Pn=Object.prototype.propertyIsEnumerable,Ne=(oi,fi,di)=>fi in oi?pn(oi,fi,{enumerable:!0,configurable:!0,writable:!0,value:di}):oi[fi]=di,Pe=(oi,fi)=>{for(var di in fi||(fi={}))Qe.call(fi,di)&&Ne(oi,di,fi[di]);if(bn)for(var di of bn(fi))Pn.call(fi,di)&&Ne(oi,di,fi[di]);return oi},ie=(oi,fi)=>de(oi,vn(fi)),Dt=(oi,fi)=>{var di={};for(var mi in oi)Qe.call(oi,mi)&&fi.indexOf(mi)<0&&(di[mi]=oi[mi]);if(oi!=null&&bn)for(var mi of bn(oi))fi.indexOf(mi)<0&&Pn.call(oi,mi)&&(di[mi]=oi[mi]);return di};const fe={\u6B63\u786E:"T",\u9519\u8BEF:"F"},Se=({value:oi,onChange:fi,form:di})=>{const mi=(oi==null?void 0:oi.is_answer)===1,co=oi==null?void 0:oi.choice_text,Sn=()=>{const Ct=di.getFieldsValue().choices.map(Yn=>({choice_text:Yn.choice_text,is_answer:0}));di.setFieldsValue({choices:Ct}),fi(ie(Pe({},oi),{is_answer:1}))};return hn.createElement(Be.Z,{className:et.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},hn.createElement(Tt.Z,{onClick:Sn,className:`${et.choiceIndex} ${et.judgementIndex} ${mi?et.activeAnswer:""}`},fe[co]),hn.createElement(Tt.Z,{flex:1,className:`${et.editorWrap} ml15`},hn.createElement("div",{className:`${et.inputBorder} ${et.placeholder} ${mi?et.activeJudgementAnswer:""}`},co)))},ee=({questionTitlePlaceholder:oi,choiceKey:fi,form:di})=>{const[mi,co]=(0,Ot.useState)(!1);return hn.createElement("div",{className:et.wrap},hn.createElement("div",{className:et.questionTitleEditorWrap},hn.createElement(Me.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},hn.createElement(Le,{scrollId:"name",height:140,placeholder:oi}))),hn.createElement(Me.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},hn.createElement(Me.default.List,{name:"choices",rules:[{validator(Sn,Ct){return Ct.some(yi=>(yi==null?void 0:yi.is_answer)===1)?Promise.resolve():(Ut.ZP.error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"),Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848")))}}]},Sn=>hn.createElement("div",{id:"choices"},Sn.map(Ct=>{var Yn=Ct,{key:yi,name:_e}=Yn,Wn=Dt(Yn,["key","name"]);return hn.createElement(Me.default.Item,ie(Pe({},Wn),{key:yi,name:_e,noStyle:!0}),hn.createElement(Se,{form:di}))})))),hn.createElement("div",{onClick:()=>co(!0)},hn.createElement(Me.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},hn.createElement(he,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:mi}))))};var Kt=xt(99064),kt=xt(3294),St=xt(5112),mt=xt(89392),Lt=xt(59301);const zt=({problemset:oi,dispatch:fi,question:di,disabled:mi,showAnswer:co})=>{const[Sn,Ct]=(0,Ot.useState)({}),[Yn,yi]=(0,Ot.useState)([]),[_e,Wn]=(0,Ot.useState)(!1),[_n]=(0,jt.useSearchParams)(),si=["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"],ri={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",JUDGMENT:"\u5224\u65AD\u9898"};return(0,Ot.useEffect)(()=>{const hi=(0,mt.cloneDeep)(di);Ct(hi),yi(hi.choices)},[di]),Lt.createElement("div",null,Lt.createElement("div",{className:"c-light-primary mb5 font16"},ri[di==null?void 0:di.item_type]),Lt.createElement(st.Z,{value:Sn==null?void 0:Sn.name}),Yn==null?void 0:Yn.map((hi,Fe)=>{const{is_answer:Ae,choice_text:Zt}=hi;let He="";return Ae&&co&&(He=et.green),Lt.createElement("div",{key:Fe,style:{pointerEvents:"none"},className:`${et.row} ${He}`},Lt.createElement(St.ZP,{disabled:mi,checked:Ae&&co}),Lt.createElement("span",null,si[Fe],".\xA0"),Lt.createElement(st.Z,{className:et.html,value:Zt}))}))};var Et=(0,jt.connect)(({problemset:oi})=>({problemset:oi}))(zt),Yt=xt(59301),$e=Object.defineProperty,ln=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Nn=Object.getOwnPropertySymbols,ai=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable,ci=(oi,fi,di)=>fi in oi?$e(oi,fi,{enumerable:!0,configurable:!0,writable:!0,value:di}):oi[fi]=di,Ci=(oi,fi)=>{for(var di in fi||(fi={}))ai.call(fi,di)&&ci(oi,di,fi[di]);if(Nn)for(var di of Nn(fi))Kn.call(fi,di)&&ci(oi,di,fi[di]);return oi},Wi=(oi,fi)=>ln(oi,qe(fi)),Oi=(oi,fi,di)=>new Promise((mi,co)=>{var Sn=yi=>{try{Yn(di.next(yi))}catch(_e){co(_e)}},Ct=yi=>{try{Yn(di.throw(yi))}catch(_e){co(_e)}},Yn=yi=>yi.done?mi(yi.value):Promise.resolve(yi.value).then(Sn,Ct);Yn((di=di.apply(oi,fi)).next())});const mo=["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"],Bo=({user:oi,classroomList:fi,globalSetting:di,loading:mi,problemset:co,dispatch:Sn,pageNum:Ct,pptInfo:Yn,deletePage:yi,openEwm:_e})=>{var Wn,_n,si,ri,hi,Fe,Ae,Zt,He,fn,ye,ae,Ye,gn,In,Re,_t,nn,cn;const[Bn,Oe]=(0,Ot.useState)(null),[Xe,Gn]=(0,Ot.useState)(!1),[Xn,Jn]=(0,Ot.useState)(""),[Rn]=Me.default.useForm(),[ni,Qn]=(0,Ot.useState)(!1),qn=(0,jt.useParams)(),[Si,Vi]=(0,Ot.useState)({}),[un,lo]=(0,Ot.useState)(!0),[to,Ki]=(0,Ot.useState)(!1),[en,Dn]=(0,Ot.useState)(!1),[gi,ki]=(0,Ot.useState)({summary:[],details:[]}),[Pi,Di]=(0,Ot.useState)(1),Zi=(0,Ot.useRef)(null),Ri=(0,Ot.useRef)(null);(0,Ot.useEffect)(()=>{Ct&&(Rn.setFieldsValue({choices:[],name:"",is_answer:0,analysis:""}),mn(),Ki(!1))},[Ct]),(0,Ot.useEffect)(()=>{yi&&$i()},[yi]),(0,Ot.useEffect)(()=>{_e&&Qn(!0)},[_e]),(0,Ot.useEffect)(()=>()=>{clearInterval(Ri.current)},[location.pathname]);const $i=()=>Oi(void 0,null,function*(){let tn=yield(0,Kt.ZP)(`/api/courses/${qn==null?void 0:qn.coursesId}/smart_plans/${qn==null?void 0:qn.id}/delete_page.json`,{method:"delete",body:{position:yi}});(tn==null?void 0:tn.status)==0&&(Ut.ZP.success("\u5220\u9664\u6210\u529F"),mn())}),qi=(tn,Gi,Yi)=>{(0,Kt.ZP)(`/api/courses/${qn==null?void 0:qn.coursesId}/smart_plans/${qn==null?void 0:qn.id}/set_page_cache.json`,{method:"post",body:{type:0,data:{page:tn,allow_answer:Gi,is_end:Yi,randomData:Pi}}})},mn=()=>Oi(void 0,null,function*(){var tn,Gi,Yi,ji,No,Mo,Ii,Ni,zi,uo,li,$t,Ho,or,Cr,Fr,cr,oo,fo,_o,Co,lr,ha,So,Xi,Zn,Ji,qo,Or,ur,Yo,xr,wr,ta,da,wa,an,Jr,Zs,ps,Ds;lo(!0),Ri.current&&clearInterval(Ri.current);let $o=yield(0,Kt.ZP)(`/api/courses/${qn==null?void 0:qn.coursesId}/smart_plans/${qn==null?void 0:qn.id}/item_banks.json`,{method:"get",params:{position:Ct}});lo(!1),($o==null?void 0:$o.status)==0&&(Vi($o==null?void 0:$o.data),(Yn==null?void 0:Yn.status)!=="ended"&&qi(Ct,((Yi=(Gi=(tn=$o==null?void 0:$o.data)==null?void 0:tn.item_banks)==null?void 0:Gi[0])==null?void 0:Yi.status)=="in_progress",(Yn==null?void 0:Yn.status)=="ended"),((ji=$o==null?void 0:$o.data)==null?void 0:ji.count)>0&&(Zi.current=(Ii=(Mo=(No=$o==null?void 0:$o.data)==null?void 0:No.item_banks)==null?void 0:Mo[0])==null?void 0:Ii.status,(((uo=(zi=(Ni=$o==null?void 0:$o.data)==null?void 0:Ni.item_banks)==null?void 0:zi[0])==null?void 0:uo.status)=="in_progress"||((Ho=($t=(li=$o==null?void 0:$o.data)==null?void 0:li.item_banks)==null?void 0:$t[0])==null?void 0:Ho.status)=="ended")&&(Lo((Fr=(Cr=(or=$o==null?void 0:$o.data)==null?void 0:or.item_banks)==null?void 0:Cr[0])==null?void 0:Fr.smart_plan_item_bank_id),((fo=(oo=(cr=$o==null?void 0:$o.data)==null?void 0:cr.item_banks)==null?void 0:oo[0])==null?void 0:fo.status)=="in_progress"&&(Ri.current=setInterval(()=>{var Ms,Nr,Go;Lo((Go=(Nr=(Ms=$o==null?void 0:$o.data)==null?void 0:Ms.item_banks)==null?void 0:Nr[0])==null?void 0:Go.smart_plan_item_bank_id)},3e3))),Jn(((lr=(Co=(_o=$o==null?void 0:$o.data)==null?void 0:_o.item_banks)==null?void 0:Co[0])==null?void 0:lr.item_type)=="SINGLE"||((Xi=(So=(ha=$o==null?void 0:$o.data)==null?void 0:ha.item_banks)==null?void 0:So[0])==null?void 0:Xi.item_type)=="MULTIPLE"?"SELECT":"JUDGMENT"),Rn.setFieldsValue({item_type:((qo=(Ji=(Zn=$o==null?void 0:$o.data)==null?void 0:Zn.item_banks)==null?void 0:Ji[0])==null?void 0:qo.item_type)=="SINGLE"||((Yo=(ur=(Or=$o==null?void 0:$o.data)==null?void 0:Or.item_banks)==null?void 0:ur[0])==null?void 0:Yo.item_type)=="MULTIPLE"?"SELECT":"JUDGMENT",choices:(da=(ta=(wr=(xr=$o==null?void 0:$o.data)==null?void 0:xr.item_banks)==null?void 0:wr[0])==null?void 0:ta.choices)==null?void 0:da.map(Ms=>(Ms.is_answer=Ms.is_answer?1:0,Ms)),analysis:(Jr=(an=(wa=$o==null?void 0:$o.data)==null?void 0:wa.item_banks)==null?void 0:an[0])==null?void 0:Jr.analysis,name:(Ds=(ps=(Zs=$o==null?void 0:$o.data)==null?void 0:Zs.item_banks)==null?void 0:ps[0])==null?void 0:Ds.name})))}),Lo=tn=>Oi(void 0,null,function*(){var Gi,Yi,ji,No,Mo,Ii;let Ni=yield(0,Kt.ZP)(`/api/courses/${qn==null?void 0:qn.coursesId}/smart_plans/${qn==null?void 0:qn.id}/item_bank_statistics.json`,{method:"get",params:{smart_plan_item_bank_id:tn}});if((Ni==null?void 0:Ni.status)==0){const zi={class_num:(Gi=Ni==null?void 0:Ni.data)==null?void 0:Gi.class_num,answerd_num:(Yi=Ni==null?void 0:Ni.data)==null?void 0:Yi.answerd_num,correctly_num:(ji=Ni==null?void 0:Ni.data)==null?void 0:ji.correctly_num,submitted_rate:(No=Ni==null?void 0:Ni.data)==null?void 0:No.submitted_rate,correct_rate:(Mo=Ni==null?void 0:Ni.data)==null?void 0:Mo.correct_rate};ki({summary:[zi],details:(Ii=Ni==null?void 0:Ni.data)==null?void 0:Ii.choice_list})}});return Yt.createElement("section",null,Yt.createElement(pe.Z,{spinning:un},Yt.createElement("div",{className:Qt.box},Yt.createElement("div",{className:Qt.box_header},Yt.createElement("div",{className:Qt.header_title},"\u5B66\u4E60\u4E92\u52A8\u9875"),Yt.createElement(Nt.Z,{title:"\u9000\u51FA\u8BFE\u4EF6",placement:"left"},Yt.createElement("i",{className:"iconfont icon-guanbi11",style:{fontSize:"13px",cursor:"pointer",marginLeft:"auto"},onClick:()=>{jt.history.push(`/classrooms/${qn==null?void 0:qn.coursesId}/smart_plan`)}}))),(Si==null?void 0:Si.count)==0&&!to&&Yt.createElement(Yt.Fragment,null,Yt.createElement("div",{className:Qt.box_miaoshu},"\u6559\u5E08\u53EF\u4E3A\u6BCF\u9875PPT\u7075\u6D3B\u6DFB\u52A0\u8BD5\u9898\uFF0C\u642D\u914D\u8C03\u67E5\u95EE\u5377\u4E0E\u4E92\u52A8\u8BA8\u8BBA\uFF0C\u5B9E\u65F6\u638C\u63E1\u5B66\u751F\u5B66\u4E60\u6548\u679C\uFF0C\u8BA9\u8BFE\u5802\u5185\u5BB9\u66F4\u4E30\u5BCC\u3001\u4E92\u52A8\u66F4\u7CBE\u5F69\uFF0C\u6559\u5B66\u6548\u679C\u4E8B\u534A\u529F\u500D\uFF01"),Yt.createElement("div",{className:Qt.question_button},Yt.createElement(Nt.Z,{title:(Yn==null?void 0:Yn.status)=="ended"?"\u5F53\u524D\u8BFE\u4EF6\u5DF2\u7ED3\u675F\u6388\u8BFE\uFF0C\u4E0D\u53EF\u65B0\u589E\u8BD5\u9898":""},Yt.createElement("div",{className:Qt.select_question,style:{cursor:(Yn==null?void 0:Yn.status)!="ended"?"pointer":"no-drop"},onClick:()=>{(Yn==null?void 0:Yn.status)!="ended"&&(Oe(!0),Gn(!1))}},Yt.createElement("img",{src:xt(43301),style:{width:"30px",height:"30px"}}),Yt.createElement("div",{className:Qt.question_right},Yt.createElement("div",{className:Qt.question_right_title},"\u9898\u5E93\u9009\u9898"),Yt.createElement("div",{className:Qt.question_right_content},"\u4ECE\u5E73\u53F0\u8BD5\u9898\u5E93\u4E2D\u6309\u77E5\u8BC6\u70B9\u3001\u96BE\u5EA6\u7B49\u6761\u4EF6\u7CBE\u51C6\u7B5B\u9009\uFF0C\u5FEB\u901F\u6DFB\u52A0\u8BD5\u9898\u5230\u8BFE\u4EF6\u6D4B\u9A8C")))),Yt.createElement(Nt.Z,{title:(Yn==null?void 0:Yn.status)=="ended"?"\u5F53\u524D\u8BFE\u4EF6\u5DF2\u7ED3\u675F\u6388\u8BFE\uFF0C\u4E0D\u53EF\u65B0\u589E\u8BD5\u9898":""},Yt.createElement("div",{className:Qt.select_question,style:{cursor:(Yn==null?void 0:Yn.status)!="ended"?"pointer":"no-drop"},onClick:()=>{(Yn==null?void 0:Yn.status)!="ended"&&(Ki(!0),Dn(!0),Jn("SELECT"),Rn.setFieldsValue({item_type:"SELECT",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0}))}))}},Yt.createElement("img",{src:xt(96542),style:{width:"30px",height:"30px"}}),Yt.createElement("div",{className:Qt.question_right},Yt.createElement("div",{className:Qt.question_right_title},"\u81EA\u4E3B\u5EFA\u9898"),Yt.createElement("div",{className:Qt.question_right_content},"\u6839\u636E\u6559\u5B66\u9700\u6C42\uFF0C\u81EA\u4E3B\u8BBE\u8BA1\u5355\u9009\u3001\u591A\u9009\u548C\u5224\u65AD\u9898\u7684\u9898\u76EE\u5185\u5BB9\u3001\u9009\u9879\u53CA\u7B54\u6848\uFF0C\u6EE1\u8DB3\u6559\u5B66\u9700\u6C42")))))),((Si==null?void 0:Si.count)>0||to)&&Yt.createElement(Me.default,{form:Rn,className:Qt.formWrap,layout:"vertical",colon:!1},(Si==null?void 0:Si.count)>0&&((_n=(Wn=Si==null?void 0:Si.item_banks)==null?void 0:Wn[0])==null?void 0:_n.status)=="not_started"&&(Yn==null?void 0:Yn.status)!="ended"&&Yt.createElement("div",{className:Qt.shiti_icon},Yt.createElement(Nt.Z,{title:"\u66F4\u6362\u8BD5\u9898",placement:"left"},Yt.createElement("i",{className:`iconfont icon-gengxin-genghuan-tihuan mr10 font16 ${(si=Qt)==null?void 0:si.genghuan}`,style:{fontSize:"13px",cursor:"pointer",marginLeft:"auto"},onClick:()=>Oi(void 0,null,function*(){Oe(!0),Gn(!0)})})),Yt.createElement(Nt.Z,{title:"\u5220\u9664\u8BD5\u9898",placement:"left"},Yt.createElement("i",{className:`iconfont icon-shanchu19 ${(ri=Qt)==null?void 0:ri.shanchu}`,style:{fontSize:"13px",cursor:"pointer",marginLeft:"auto"},onClick:()=>Oi(void 0,null,function*(){Ie.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,content:"\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BD5\u9898\uFF1F",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Oi(void 0,null,function*(){var tn,Gi;const Yi=yield(0,Kt.ZP)(`/api/smart_plan_item_banks/${(Gi=(tn=Si==null?void 0:Si.item_banks)==null?void 0:tn[0])==null?void 0:Gi.smart_plan_item_bank_id}.json`,{method:"delete"});(Yi==null?void 0:Yi.status)===0&&(Ut.ZP.success("\u5220\u9664\u6210\u529F"),mn())})})})}))),en&&Yt.createElement(Me.default.Item,{name:"item_type",label:"\u9898\u578B"},Yt.createElement(we.default,{size:"large",onChange:tn=>{switch(Rn.setFieldsValue({choices:[],name:"",is_answer:0,analysis:""}),Jn(tn),tn){case"SELECT":Rn.setFieldsValue({choices:Array.from({length:4},()=>({choice_text:"",is_answer:0}))});break;case"JUDGMENT":Rn.setFieldsValue({choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}]});break}},disabled:((Fe=(hi=Si==null?void 0:Si.item_banks)==null?void 0:hi[0])==null?void 0:Fe.status)=="ended"||((Zt=(Ae=Si==null?void 0:Si.item_banks)==null?void 0:Ae[0])==null?void 0:Zt.status)=="in_progress"||(Yn==null?void 0:Yn.status)=="ended"},Yt.createElement(we.default.Option,{value:"SELECT"},"\u9009\u62E9\u9898"),Yt.createElement(we.default.Option,{value:"JUDGMENT"},"\u5224\u65AD\u9898"))),Xn=="SELECT"&&(en?Yt.createElement(Hn,{form:Rn,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",titleKey:"name",choiceKey:"choices",analysisKey:"analysis",choiceOptionsPath:"choices",choiceTextKey:"choice_text",answerKey:"is_answer",allowChangeMode:!0}):Yt.createElement("div",null,Yt.createElement(Et,{question:(He=Si==null?void 0:Si.item_banks)==null?void 0:He[0],disabled:!0,showAnswer:(Yn==null?void 0:Yn.status)==="ended"||Zi.current=="ended"}))),Xn=="JUDGMENT"&&(en?Yt.createElement(ee,{form:Rn,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",choiceKey:"choices"}):Yt.createElement("div",null,Yt.createElement(Et,{question:(fn=Si==null?void 0:Si.item_banks)==null?void 0:fn[0],disabled:!0,showAnswer:(Yn==null?void 0:Yn.status)==="ended"||Zi.current=="ended"}))),(Si==null?void 0:Si.count)>0&&(Yn==null?void 0:Yn.status)!="not_started"&&!en&&((ae=(ye=Si==null?void 0:Si.item_banks)==null?void 0:ye[0])==null?void 0:ae.status)!="not_started"&&Yt.createElement("div",{className:Qt.staticWrap},Yt.createElement("div",{className:Qt.title},"\u7B54\u9898\u7EDF\u8BA1"),Yt.createElement("div",{className:Qt.subTitle},"\u7B54\u9898\u6982\u89C8"),Yt.createElement(qt.default,{pagination:!1,dataSource:(gi==null?void 0:gi.summary)||[],columns:[{title:"\u542C\u8BFE\u4EBA\u6570",align:"left",width:100,dataIndex:"class_num",ellipsis:!0,render:tn=>Yt.createElement("span",{style:{color:"#000"}},tn||"0")},{title:"\u7B54\u9898\u4EBA\u6570",align:"left",width:110,dataIndex:"answerd_num",ellipsis:!0,render:tn=>Yt.createElement("span",{style:{color:"#000"}},tn||"0")},{title:"\u7B54\u5BF9\u4EBA\u6570",align:"left",ellipsis:!0,width:130,dataIndex:"correctly_num",render:tn=>Yt.createElement("span",{style:{color:"#000"}},tn||"0")},{title:"\u63D0\u4EA4\u7387",align:"left",width:120,dataIndex:"submitted_rate",ellipsis:!0,render:tn=>Yt.createElement("span",{style:{color:"#000"}},tn+"%"||0)},{title:"\u6B63\u786E\u7387",align:"right",dataIndex:"correct_rate",render:(tn,Gi)=>Yt.createElement("span",{style:{color:"#000"}},tn+"%"||0)}]}),Yt.createElement("div",{className:Qt.subTitle},"\u7B54\u9898\u8BE6\u60C5"),Yt.createElement(qt.default,{pagination:!1,dataSource:(gi==null?void 0:gi.details)||[],columns:[{title:"\u9009\u9879",align:"left",dataIndex:"choice_text",ellipsis:!0,render:(tn,Gi,Yi)=>{var ji,No;return Yt.createElement("span",{style:{color:"#000"}},((No=(ji=Si==null?void 0:Si.item_banks)==null?void 0:ji[0])==null?void 0:No.item_type)=="JUDGMENT"?Yt.createElement(st.Z,{className:"font14",value:tn}):Yt.createElement("span",{style:{display:"flex"}},mo[Yi],"\u3001",Yt.createElement(st.Z,{className:"font14",value:tn})))}},{title:"\u9009\u62E9\u4EBA\u6570",align:"left",width:110,dataIndex:"user_num",ellipsis:!0,render:tn=>Yt.createElement("span",{style:{color:"#000"}},tn||"--")},{title:"\u4EBA\u6570\u6BD4\u4F8B",align:"right",ellipsis:!0,width:130,dataIndex:"rate",render:tn=>Yt.createElement("span",{style:{color:"#000"}},tn+"%"||0)}]})),(Yn==null?void 0:Yn.status)!="ended"&&Yt.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:"20px",position:"sticky",bottom:0,background:"#FFF",paddingBottom:24}},((Yn==null?void 0:Yn.status)=="not_started"||((gn=(Ye=Si==null?void 0:Si.item_banks)==null?void 0:Ye[0])==null?void 0:gn.status)!="ended")&&(en?Yt.createElement("div",{className:Qt.save_button,onClick:()=>Oi(void 0,null,function*(){var tn,Gi,Yi,ji,No,Mo;yield Rn.validateFields();let Ii="";Rn.getFieldValue("item_type")=="SELECT"?Rn.getFieldValue("choices").filter(uo=>uo.is_answer==1).length>1?Ii="MULTIPLE":Ii="SINGLE":Ii=Rn.getFieldValue("item_type");const Ni=Wi(Ci({},Rn.getFieldsValue()),{item_type:Ii,position:Ct,smart_plan_id:qn==null?void 0:qn.id,difficulty:2}),zi=(Gi=(tn=Si==null?void 0:Si.item_banks)==null?void 0:tn[0])!=null&&Gi.smart_plan_item_bank_id?`/api/smart_plan_item_banks/${(ji=(Yi=Si==null?void 0:Si.item_banks)==null?void 0:Yi[0])==null?void 0:ji.smart_plan_item_bank_id}.json`:`/api/courses/${qn==null?void 0:qn.coursesId}/smart_plans/${qn==null?void 0:qn.id}/create_item_banks.json`;try{const uo=yield(0,Kt.ZP)(zi,{method:(Mo=(No=Si==null?void 0:Si.item_banks)==null?void 0:No[0])!=null&&Mo.smart_plan_item_bank_id?"put":"post",body:Ni});(uo==null?void 0:uo.status)===0?(Ut.ZP.success("\u4FDD\u5B58\u6210\u529F"),(Yn==null?void 0:Yn.status)!="not_started"&&Di(li=>li+1),mn(),Ki(!1),Dn(!1)):Ut.ZP.error("\u4FDD\u5B58\u5931\u8D25")}catch(uo){Ut.ZP.error("\u8BF7\u6C42\u51FA\u9519")}})},"\u4FDD\u5B58"):Yt.createElement("div",{className:Qt.save_button,onClick:()=>Oi(void 0,null,function*(){Dn(!0)})},"\u7F16\u8F91")),(Yn==null?void 0:Yn.status)=="in_progress"&&((Re=(In=Si==null?void 0:Si.item_banks)==null?void 0:In[0])==null?void 0:Re.status)=="not_started"&&!en&&Yt.createElement("div",{className:Qt.start_button,onClick:()=>Oi(void 0,null,function*(){var tn,Gi;let Yi=yield(0,Kt.ZP)(`/api/courses/${qn==null?void 0:qn.coursesId}/smart_plans/${qn==null?void 0:qn.id}/change_item_banks.json`,{method:"post",body:{smart_plan_item_bank_id:(Gi=(tn=Si==null?void 0:Si.item_banks)==null?void 0:tn[0])==null?void 0:Gi.smart_plan_item_bank_id}});(Yi==null?void 0:Yi.status)==0&&(Ut.ZP.success("\u5DF2\u542F\u52A8\u7B54\u9898"),mn(),ki(Yi==null?void 0:Yi.data))})},Yt.createElement("i",{className:"iconfont icon-qidongdati mr10 font14"}),"\u542F\u52A8\u7B54\u9898"),(Yn==null?void 0:Yn.status)=="in_progress"&&((nn=(_t=Si==null?void 0:Si.item_banks)==null?void 0:_t[0])==null?void 0:nn.status)=="in_progress"&&!en&&Yt.createElement("div",{className:Qt.submit_button,onClick:()=>Oi(void 0,null,function*(){var tn,Gi;let Yi=yield(0,Kt.ZP)(`/api/courses/${qn==null?void 0:qn.coursesId}/smart_plans/${qn==null?void 0:qn.id}/change_item_banks.json`,{method:"post",body:{smart_plan_item_bank_id:(Gi=(tn=Si==null?void 0:Si.item_banks)==null?void 0:tn[0])==null?void 0:Gi.smart_plan_item_bank_id}});(Yi==null?void 0:Yi.status)==0&&(Ut.ZP.success("\u5DF2\u7ED3\u675F\u7B54\u9898"),mn(),ki(Yi==null?void 0:Yi.data))})},Yt.createElement("i",{className:"iconfont icon-jieshushouke mr10 font14"}),"\u7ED3\u675F\u7B54\u9898"))))),Bn&&Yt.createElement(Ce.Z,{ispptModal:!0,setScoreShow:Oe,isshixuns:!1,ScoreShow:!!Bn,isloadings:!1,onOk:tn=>Oi(void 0,null,function*(){if(!tn.length){Ut.ZP.warning("\u8BF7\u9009\u62E9\u8BD5\u9898");return}console.log("\u8BF7\u9009\u62E9\u8BD5\u9898"+Xe);let Gi=yield(0,Kt.ZP)(`/api/courses/${qn==null?void 0:qn.coursesId}/smart_plans/${qn==null?void 0:qn.id}/add_item_banks.json`,{method:"post",body:{item_bank_ids:tn,position:Ct,is_smart_plan:!0}});(Gi==null?void 0:Gi.status)==0&&(Ut.ZP.success("\u9009\u9898\u6210\u529F"),Oe(!1),mn(),Dn(!1))})}),Yt.createElement(Ie.default,{centered:!0,keyboard:!1,open:ni,title:Si==null?void 0:Si.smart_plan_name,width:600,forceRender:!0,footer:null,onOk:()=>{Qn(!1)},onCancel:()=>{Qn(!1)}},Yt.createElement("div",{className:Qt.modal},"\u8BF7\u6253\u5F00\u624B\u673A\u626B\u7801\u529F\u80FD\uFF0C\u626B\u63CF\u5C4F\u5E55\u4E0A\u7684\u4E8C\u7EF4\u7801\uFF0C\u5373\u53EF\u8FDB\u5165\u8BFE\u4EF6\u9875\u9762\uFF0C\u5F00\u542F\u667A\u6167\u5B66\u4E60\u65B0\u4F53\u9A8C\uFF01"),Yt.createElement("div",{className:Qt.erweima},Yt.createElement(ce.Z,{errorLevel:"H",value:`${location.origin}/miniprogram/courseware/study?course_id=${qn==null?void 0:qn.coursesId}&id=${qn==null?void 0:qn.id}`,bgColor:"#FFF",size:360,icon:`${kt.Z.IMG_SERVER}/${(cn=di==null?void 0:di.setting)==null?void 0:cn.tab_logo_url}`}))))};var Ao=(0,jt.connect)(({user:oi,classroomList:fi,loading:di,globalSetting:mi,problemset:co})=>({user:oi,classroomList:fi,globalSetting:mi,loading:di.effects,problemset:co}))(Bo)},79285:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return ze}});var Ot=xt(59301),jt=xt(78241),Qt=xt(8591),Me=xt(43418),Ut=xt(99313),pe=xt(57809),Nt=xt(19842),Ie=xt(98228),we=xt(92832),qt=xt(1710),ce=xt(6848),Ce=xt(58421),Be=xt(3113),Tt=xt(99064),et={flex_box_center:"flex_box_center___kuaVT",flex_space_between:"flex_space_between___exKHH",flex_box_vertical_center:"flex_box_vertical_center___BzvkN",flex_box_center_end:"flex_box_center_end___Ss2DJ",flex_box_column:"flex_box_column___p1LEr",scoremodal:"scoremodal___upTFR",selectWrapper:"selectWrapper___HH3RX",selectWrappers:"selectWrappers___fUWwr",allqingchu:"allqingchu___BFF1D",title:"title___hFasb",score:"score___DXG3o",close:"close___kEIiB",content:"content___Mco8L",items:"items___j98jk",bottom:"bottom___A1n1C",yes:"yes___P1zzb",no:"no___xZqXd",titlecount:"titlecount___fqA9P",add:"add___MqV0R",search:"search___NREgv",searchIcon:"searchIcon___qny3A",tabWrap:"tabWrap___dR18c",previewModal:"previewModal___uSiGS",q_title:"q_title___a9NY9"},nt=xt(26422),ht={flex_box_center:"flex_box_center___nnwwA",flex_space_between:"flex_space_between___cRir9",flex_box_vertical_center:"flex_box_vertical_center___FqTZ8",flex_box_center_end:"flex_box_center_end___WU5_v",flex_box_column:"flex_box_column___QZFa1",warp:"warp___aLZwN",shixunbutton:"shixunbutton___Eoa1i",redio:"redio___LJ4js",redioitem:"redioitem___YicCC",redioitemyes:"redioitemyes___lX4Nr",title:"title___pi1jH",titleyes:"titleyes___jiEh7",yestag:"yestag___DLWoP",qcount:"qcount___U9kkL",score:"score___vLK4B",qtitle:"qtitle___kyg0t",checkbox:"checkbox___vjiBw",checkboxitem:"checkboxitem___HW3CP",checkboxitemyes:"checkboxitemyes___kpjek",bottom:"bottom___uG8Zq",bottomitem:"bottomitem___TnJQQ",left:"left___M8WXX",right:"right____dkCI",completion:"completion___H6RmA",content:"content___a2hGC",items:"items___D8mLd",simple:"simple___fQ0OS",shixun:"shixun___nB6Jk",combination:"combination___YrOdz",program:"program___lG0JA"},st=xt(85149),gt=xt(955),vt=xt(24334);const wt=["A\uFF0E","B\uFF0E","C\uFF0E","D\uFF0E","E\uFF0E","F\uFF0E","G\uFF0E","H\uFF0E","I\uFF0E","J\uFF0E","K\uFF0E","L\uFF0E","M\uFF0E","N\uFF0E","O\uFF0E","P\uFF0E","Q\uFF0E","R\uFF0E","S\uFF0E","T\uFF0E","U\uFF0E","V\uFF0E","W\uFF0E","X\uFF0E","Y\uFF0E","Z\uFF0E"];var It=({qitem:Te})=>{var dn,Hn,hn,pn,de,vn,bn,Qe,Pn,Ne;return Ot.createElement("div",{className:ht.warp},Ot.createElement("div",{className:ht.mainPart},Ot.createElement("div",{className:ht.qcount},(Te==null?void 0:Te.question_type)===8&&Ot.createElement(st.Z,{className:ht.content,showProgramFill:!0,value:(dn=Te==null?void 0:Te.program_attr)==null?void 0:dn.description}),(Te==null?void 0:Te.question_type)!=8&&Ot.createElement(st.Z,{className:ht.qtitle,value:(Te==null?void 0:Te.name)||(Te==null?void 0:Te.title)})),((Te==null?void 0:Te.question_type)===0||(Te==null?void 0:Te.question_type)===2)&&Ot.createElement("div",null,(Hn=Te==null?void 0:Te.choices)==null?void 0:Hn.map((Pe,ie)=>Ot.createElement("div",{className:ht.redio},!(Pe!=null&&Pe.is_answer)&&Ot.createElement("span",{className:ht.redioitem}),(Pe==null?void 0:Pe.is_answer)&&Ot.createElement("i",{className:`${ht.redioitemyes} icon-duigou1`}),Ot.createElement(st.Z,{className:Pe!=null&&Pe.is_answer?ht.titleyes:ht.title,value:wt[ie]+(Pe==null?void 0:Pe.choice_text)}),(Pe==null?void 0:Pe.is_answer)&&Ot.createElement("div",{className:ht.yestag},"\u6B63\u786E\u7B54\u6848")))),(Te==null?void 0:Te.question_type)===1&&Ot.createElement("div",null,(hn=Te==null?void 0:Te.choices)==null?void 0:hn.map((Pe,ie)=>Ot.createElement("div",{className:ht.checkbox},!(Pe!=null&&Pe.is_answer)&&Ot.createElement("span",{className:ht.checkboxitem}),(Pe==null?void 0:Pe.is_answer)&&Ot.createElement("i",{className:`${ht.checkboxitemyes} icon-duigou1`}),Ot.createElement(st.Z,{className:Pe!=null&&Pe.is_answer?ht.titleyes:ht.title,value:wt[ie]+(Pe==null?void 0:Pe.choice_text)}),(Pe==null?void 0:Pe.is_answer)&&Ot.createElement("div",{className:ht.yestag},"\u6B63\u786E\u7B54\u6848")))),(Te==null?void 0:Te.question_type)===3&&Ot.createElement("div",{className:ht.completion},(pn=Te==null?void 0:Te.standard_answer)==null?void 0:pn.map((Pe,ie)=>{var Dt;return Ot.createElement("div",{style:{display:"flex"}},Ot.createElement("span",{className:ht.title},"\u586B\u7A7A\u9879",ie+1),Ot.createElement("div",{className:ht.content},(Dt=Pe==null?void 0:Pe.answer_text)==null?void 0:Dt.map((fe,Se)=>Ot.createElement("div",{className:ht.items},fe))))})),(Te==null?void 0:Te.question_type)===4&&Ot.createElement("div",{className:ht.simple},Ot.createElement("div",{className:ht.title},"\u53C2\u8003\u7B54\u6848"),Ot.createElement("div",{className:"mt10",style:{fontSize:"16px"}},(de=Te==null?void 0:Te.answer_texts)!=null&&de[0]?Ot.createElement(st.Z,{className:ht.content,value:(vn=Te==null?void 0:Te.answer_texts)==null?void 0:vn[0]}):Ot.createElement("div",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))),(Te==null?void 0:Te.question_type)===5&&((bn=Te==null?void 0:Te.challenge_names)==null?void 0:bn.map((Pe,ie)=>Ot.createElement("div",{className:ht.shixun},Ot.createElement("span",{className:ht.qtitle},Ot.createElement("span",{style:{marginRight:10}},"\u7B2C",(0,gt.EM)(ie+1),"\u9898"),Pe)))),(Te==null?void 0:Te.question_type)===6&&Ot.createElement("div",{className:ht.program},Ot.createElement(st.Z,{className:ht.content,value:((Qe=Te==null?void 0:Te.program_attr)==null?void 0:Qe.description)||"- -"})),(Te==null?void 0:Te.question_type)===7&&((Pn=Te==null?void 0:Te.sub_item_banks)==null?void 0:Pn.map((Pe,ie)=>{var Dt,fe,Se,ee,Kt;return Ot.createElement("div",null,Ot.createElement("div",{className:ht.combination},Ot.createElement("span",{className:ht.qtitle},Pe==null?void 0:Pe.name)),Ot.createElement("div",{className:ht.warp,style:{padding:"0px",paddingTop:20}},Ot.createElement("div",null,((Pe==null?void 0:Pe.item_type)=="SINGLE"||(Pe==null?void 0:Pe.item_type)=="JUDGMENT")&&((Dt=Pe==null?void 0:Pe.choices)==null?void 0:Dt.map((kt,St)=>Ot.createElement("div",{className:ht.redio},!(kt!=null&&kt.is_answer)&&Ot.createElement("span",{className:ht.redioitem}),(kt==null?void 0:kt.is_answer)&&Ot.createElement("i",{className:`${ht.redioitemyes} icon-duigou1`}),Ot.createElement(st.Z,{className:kt!=null&&kt.is_answer?ht.titleyes:ht.title,value:wt[St]+(kt==null?void 0:kt.choice_text)}),(kt==null?void 0:kt.is_answer)&&Ot.createElement("div",{className:ht.yestag},"\u6B63\u786E\u7B54\u6848")))),(Pe==null?void 0:Pe.item_type)=="MULTIPLE"&&((fe=Pe==null?void 0:Pe.choices)==null?void 0:fe.map((kt,St)=>Ot.createElement("div",{className:ht.checkbox},!(kt!=null&&kt.is_answer)&&Ot.createElement("span",{className:ht.checkboxitem}),(kt==null?void 0:kt.is_answer)&&Ot.createElement("i",{className:`${ht.checkboxitemyes} icon-duigou1`}),Ot.createElement(st.Z,{className:kt!=null&&kt.is_answer?ht.titleyes:ht.title,value:wt[St]+(kt==null?void 0:kt.choice_text)}),(kt==null?void 0:kt.is_answer)&&Ot.createElement("div",{className:ht.yestag},"\u6B63\u786E\u7B54\u6848")))),(Pe==null?void 0:Pe.item_type)=="COMPLETION"&&Ot.createElement("div",{className:ht.completion},(Se=Pe==null?void 0:Pe.standard_answer)==null?void 0:Se.map((kt,St)=>{var mt;return Ot.createElement("div",{style:{display:"flex"}},Ot.createElement("span",{className:ht.title},"\u586B\u7A7A\u9879",St+1),Ot.createElement("div",{className:ht.content},(mt=kt==null?void 0:kt.answer_text)==null?void 0:mt.map((Lt,zt)=>Ot.createElement("div",{className:ht.items},Lt))))})),(Pe==null?void 0:Pe.item_type)=="SUBJECTIVE"&&Ot.createElement("div",{className:ht.simple},Ot.createElement("div",{className:ht.title},"\u53C2\u8003\u7B54\u6848"),Ot.createElement("div",{className:"mt10",style:{fontSize:"16px"}},(ee=Pe==null?void 0:Pe.answer_texts)!=null&&ee[0]?Ot.createElement(st.Z,{className:ht.content,value:(Kt=Pe==null?void 0:Pe.answer_texts)==null?void 0:Kt[0]}):Ot.createElement("div",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))))))})),(Te==null?void 0:Te.question_type)===8&&Ot.createElement("div",null,Ot.createElement(st.Z,{disabledFill:!0,className:ht.content,showProgramFill:!0,value:vt.Base64.decode(((Ne=Te==null?void 0:Te.program_attr)==null?void 0:Ne.code)||"")})),(Te==null?void 0:Te.question_type)===5&&Ot.createElement("div",{style:{background:"#F6F7F9",padding:"0px 20px",height:46,lineHeight:"46px",marginTop:40,display:"flex",alignItems:"center"}},Ot.createElement("div",{style:{flex:1,alignItems:"center",display:"flex"}},Ot.createElement("div",{style:{marginRight:30}},Ot.createElement("span",{style:{marginRight:10}},"\u521B\u5EFA\u8005"),Ot.createElement("span",{style:{color:"#000000"}},(Te==null?void 0:Te.author_name)||"- -")),Ot.createElement("div",{style:{marginRight:30}},Ot.createElement("span",{style:{marginRight:10}},"\u6240\u5C5E\u5355\u4F4D"),Ot.createElement("span",{style:{color:"#000000"}},(Te==null?void 0:Te.author_school_name)||"- -")),Ot.createElement("div",{style:{marginRight:30}},Ot.createElement("span",{style:{marginRight:10}},"\u5B66\u4E60\u4EBA\u6570"),Ot.createElement("span",{style:{color:"#000000"}},(Te==null?void 0:Te.study_count)||"0"))),Ot.createElement("a",{className:ht.shixunbutton,href:`/shixuns/${Te==null?void 0:Te.identifier}/challenges?exercise=true`,target:"_blank"},Ot.createElement("i",{onClick:()=>{},style:{marginRight:20},className:"iconfont icon-shixunkecheng mr5 "}),"\u5B9E\u8BAD\u8BE6\u60C5"))),((Te==null?void 0:Te.question_type)<=4||[6,8].includes(Te==null?void 0:Te.question_type))&&Ot.createElement("div",{className:ht.bottom},Ot.createElement("div",{className:ht.bottomitem},Ot.createElement("span",{className:ht.left},"\u89E3\u6790"),Ot.createElement("span",{className:ht.right},Te!=null&&Te.analysis?Ot.createElement(st.Z,{value:Te==null?void 0:Te.analysis}):Ot.createElement("span",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))),Ot.createElement("div",{className:ht.bottomitem},Ot.createElement("span",{className:ht.left},"\u96BE\u5EA6"),Ot.createElement("span",{className:ht.right},(Te==null?void 0:Te.difficulty)===1?"\u7B80\u5355":(Te==null?void 0:Te.difficulty)===2?"\u9002\u4E2D":"\u56F0\u96BE")),Ot.createElement("div",{className:ht.bottomitem},Ot.createElement("span",{className:ht.left},"\u77E5\u8BC6\u70B9"),Ot.createElement("span",{className:ht.right},Te!=null&&Te.tag_discipline?Te==null?void 0:Te.tag_discipline:Ot.createElement("span",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~")))))},At=xt(86087),Wt=xt(84287),re=xt(89070),ne=xt(61485),me=xt(32570),Vt=xt(16149),Le=xt(59301),he=Object.defineProperty,Ge=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,xe=(Te,dn,Hn)=>dn in Te?he(Te,dn,{enumerable:!0,configurable:!0,writable:!0,value:Hn}):Te[dn]=Hn,Ht=(Te,dn)=>{for(var Hn in dn||(dn={}))sn.call(dn,Hn)&&xe(Te,Hn,dn[Hn]);if(Ve)for(var Hn of Ve(dn))Mn.call(dn,Hn)&&xe(Te,Hn,dn[Hn]);return Te},Je=(Te,dn)=>Ge(Te,Ke(dn)),Tn=(Te,dn,Hn)=>new Promise((hn,pn)=>{var de=Qe=>{try{bn(Hn.next(Qe))}catch(Pn){pn(Pn)}},vn=Qe=>{try{bn(Hn.throw(Qe))}catch(Pn){pn(Pn)}},bn=Qe=>Qe.done?hn(Qe.value):Promise.resolve(Qe.value).then(de,vn);bn((Hn=Hn.apply(Te,dn)).next())});const An=({setScoreShow:Te,ScoreShow:dn,onOk:Hn,isshixuns:hn,isloadings:pn,dispatch:de,isIntelligentAssistant:vn=!1,ispptModal:bn=!1,newExercisePaper:Qe,shixunsDetail:Pn})=>{var Ne,Pe,ie;let[Dt,fe]=(0,Ot.useState)({type:"0",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,bigmodel:vn,is_smart_plan:bn,group_id:[]}),[Se,ee]=(0,Ot.useState)([]),[Kt,kt]=(0,Ot.useState)([]),[St,mt]=(0,Ot.useState)([]),[Lt,zt]=(0,Ot.useState)([]);const[Et,Yt]=(0,Ot.useState)(!1),[$e]=jt.default.useForm(),[ln,qe]=(0,Ot.useState)(),[Nn,ai]=(0,Ot.useState)(!1);let[Kn,ci]=(0,Ot.useState)(hn);const[Ci,Wi]=(0,Ot.useState)([]),[Oi,mo]=(0,Ot.useState)(0),[Bo,Ao]=(0,Ot.useState)(!0),[oi,fi]=(0,Ot.useState)([]),[di,mi]=(0,Ot.useState)([]),co=[{name:"\u5168\u90E8",value:"",question_type:0},{name:"\u5355\u9009\u9898",value:"SINGLE",question_type:0},{name:"\u591A\u9009\u9898",value:"MULTIPLE",question_type:1},{name:"\u5224\u65AD\u9898",value:"JUDGMENT",question_type:2},{name:"\u586B\u7A7A\u9898",value:"COMPLETION",question_type:3},{name:"\u7B80\u7B54\u9898",value:"SUBJECTIVE",question_type:4},{name:"\u5B9E\u8BAD\u9898",value:"SHIXUN",question_type:5},{name:"\u7F16\u7A0B\u9898",value:"PROGRAM",question_type:6},{name:"\u7EC4\u5408\u9898",value:"COMBINATION",question_type:7},{name:"\u7A0B\u5E8F\u586B\u7A7A\u9898",value:"BPROGRAM",question_type:8}];let[Sn,Ct]=(0,Ot.useState)({gg:{type:"1",page:1,updated_at:"",quotes:"",item_type:null,courseid:"",per_page:10,tag_discipline_id:null,difficulty:null,keyword:null},ttgx:{type:"3",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,group_id:[]},scj:{type:"2",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null},wcjd:{type:"0",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,group_id:[]},yx:{type:"5",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,group_id:null}});const Yn=(0,Ot.useRef)(new Set),yi=(0,Ot.useRef)(new Set),_e=[{name:"\u7B80\u5355",value:1},{name:"\u9002\u4E2D",value:2},{name:"\u56F0\u96BE",value:3}],Wn=[{name:"\u521D\u7EA7",value:1},{name:"\u4E2D\u7EA7",value:2},{name:"\u4E2D\u9AD8\u7EA7",value:3},{name:"\u9AD8\u7EA7",value:4}],_n=[{name:"\u672A\u53D1\u5E03",value:"unpublish"},{name:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{name:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],[si,ri]=(0,Ot.useState)(!1),hi=()=>{$e.resetFields(),Kn=!1,ci(!1),ri(!1),$e.submit()};(0,Ot.useEffect)(()=>{var Re,_t,nn,cn,Bn,Oe,Xe,Gn,Xn,Jn;(((nn=(_t=(Re=Qe==null?void 0:Qe.editData)==null?void 0:Re.exercise)==null?void 0:_t.exist_item_bank_ids)==null?void 0:nn.length)>0||((Oe=(Bn=(cn=Qe==null?void 0:Qe.editData)==null?void 0:cn.exercise)==null?void 0:Bn.exist_item_bank_shixun_ids)==null?void 0:Oe.length)>0)&&mi([...(Gn=(Xe=Qe==null?void 0:Qe.editData)==null?void 0:Xe.exercise)==null?void 0:Gn.exist_item_bank_ids,...(Jn=(Xn=Qe==null?void 0:Qe.editData)==null?void 0:Xn.exercise)==null?void 0:Jn.exist_item_bank_shixun_ids])},[(Pe=(Ne=Qe==null?void 0:Qe.editData)==null?void 0:Ne.exercise)==null?void 0:Pe.exist_item_bank_ids]),(0,Ot.useEffect)(()=>{dn&&($e.setFieldsValue({item_type:"",courseid:"",tag_discipline_id:null,difficulty:null,keyword:null}),Bo&&Kn&&($e.setFieldsValue({item_type:"SHIXUN"}),Dt.item_type="SHIXUN",fe(Ht({},Dt)),Ao(!1)),Fe(Dt),Ae(),Zt({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"0"}))},[dn]),(0,Ot.useEffect)(()=>{Oi>0&&setTimeout(()=>{mo(0)},2e3)},[Oi]);function Fe(Re){return Tn(this,null,function*(){var _t,nn,cn;if(Yt(!0),fe(Ht({},Re)),(St==null?void 0:St.length)<=0&&Re.type==="5"){zt([]),Yt(!1);return}console.log("----",St,Ci);let Bn=Re.type==="5"?St==null?void 0:St.filter(Gn=>!Ci.includes(Gn)):null,Oe=Re.type==="5"?St==null?void 0:St.filter(Gn=>Ci.includes(Gn)):null,Xe=yield(0,Tt.ZP)("/api/item_banks.json",{method:"get",params:Je(Ht({},Re),{discipline_id:((_t=Re==null?void 0:Re.courseid)==null?void 0:_t[0])||null,sub_discipline_id:((nn=Re==null?void 0:Re.courseid)==null?void 0:nn[1])||null,ids:Bn,shixun_ids:Oe,include_shixuns:!vn,group_id:((cn=Re.group_id)==null?void 0:cn.map(Gn=>Gn==null?void 0:Gn.value))||null,keyword:Re.keyword?encodeURIComponent(Re.keyword):Re.keyword,type:Re.type==="5"?null:Re.type,clazz:Re.type==="3"?"ItemBanksGroup":null,bigmodel:vn,is_smart_plan:bn})});zt(Xe),Yt(!1)})}function Ae(){return Tn(this,null,function*(){let Re=yield(0,Tt.ZP)("/api/disciplines.json",{method:"get",params:{source:"question",group_id:0,group_type:Dt.type==="5"?null:Dt.type,clazz:"ItemBanksGroup"}});ee((0,nt.L)(Re==null?void 0:Re.disciplines))})}function Zt(Re){return Tn(this,null,function*(){var _t;let nn=yield(0,Tt.ZP)("/api/item_banks_groups/for_problemset.json",{method:"post",body:Re}),cn=[{title:"\u6839\u76EE\u5F55",id:0,pid:0,value:0,key:0,isLeaf:!1,children:(_t=nn==null?void 0:nn.data)==null?void 0:_t.map(Bn=>({title:Bn.name,id:Bn.id,pid:Bn.id,value:Bn.id,key:Bn.id,isLeaf:!Bn.have_child}))}];fi(cn)})}function He(Re){return Tn(this,null,function*(){var _t,nn,cn,Bn;Yt(!0);let Oe=(_t=Re.list)==null?void 0:_t.filter(Xn=>!Ci.includes(Xn)),Xe=(nn=Re.list)==null?void 0:nn.filter(Xn=>Ci.includes(Xn));if(Oe.length===0&&Xe.length===0){Yt(!1),zt([]);return}let Gn=yield(0,Tt.ZP)("/api/item_banks.json",{method:"get",params:Je(Ht({},Re),{discipline_id:((cn=Re==null?void 0:Re.courseid)==null?void 0:cn[0])||null,sub_discipline_id:((Bn=Re==null?void 0:Re.courseid)==null?void 0:Bn[1])||null,ids:Oe,shixun_ids:Xe,type:Re.type==="5"?null:Re.type,clazz:Re.type==="3"?"ItemBanksGroup":null})});Yt(!1),zt(Gn)})}const fn=Re=>Tn(void 0,null,function*(){const _t=yield de({type:"shixunsDetail/release",payload:{id:Re}});let nn=_t==null?void 0:_t.tag_position,cn=(_t==null?void 0:_t.evaluation_set_position)||[],Bn=_t.status;return Bn===0?(Qt.ZP.success("\u53D1\u5E03\u6210\u529F"),Fe(Dt),!0):(Bn===2?Qt.ZP.error(`\u7B2C${cn.join(",")}\u5173\u5C1A\u672A\u5B8C\u6210\uFF0C\u65E0\u6CD5\u7533\u8BF7\u53D1\u5E03`):Bn===3?Qt.ZP.error(`\u6BCF\u4E00\u4E2A\u5173\u5361\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u6280\u80FD\u6807\u7B7E, \u7B2C${nn.join(",")}\u5173\u5C1A\u672A\u8BBE\u7F6E\u6280\u80FD\u6807\u7B7E\uFF0C\u8BF7\u8865\u5145`):Qt.ZP.error("\u5C1A\u672A\u521B\u5EFA\u4EFB\u52A1\u7684\u5B9E\u8BAD\uFF0C\u4E0D\u80FD\u7533\u8BF7\u53D1\u5E03"),!1)}),ye=Re=>(Re==null?void 0:Re.shixun_tag_num)===1?"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528\uFF0C\u8BF7\u5148\u8FDB\u884C\u53D1\u5E03":"",ae=(Re,_t,nn)=>Re.map(cn=>cn.key===_t?Ht(Ht({},cn),nn):cn.children?Je(Ht({},cn),{children:ae(cn.children,_t,nn)}):cn),Ye=Re=>Tn(void 0,null,function*(){const{key:_t}=Re;let nn=Dt.type;const cn=yield(0,Vt.ex)({page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",group_id:Math.abs(_t),type:nn}),{data:Bn,total_count:Oe}=cn||{};Oe>0&&fi(Xe=>ae(Xe,_t,{children:Bn.map(Gn=>({title:Gn.name,id:Gn.id,pid:Gn.id,value:Gn.id,key:Gn.id,isLeaf:!Gn.have_child}))}))});function gn(Re){console.log("----",Dt),Re==="1"&&(Sn.gg=Ht({},Dt)),Re==="2"&&(Sn.scj=Ht({},Dt)),Re==="3"&&(Sn.ttgx=Ht({},Dt)),Re==="0"&&(Sn.wcjd=Ht({},Dt)),Re==="5"&&(Sn.yx=Ht({},Dt)),Ct(Ht({},Sn))}function In(){Dt.type==="1"&&(Dt=Sn.gg),Dt.type==="2"&&(Dt=Sn.scj),Dt.type==="3"&&(Dt=Sn.ttgx),Dt.type==="0"&&(Dt=Sn.wcjd),Dt.type==="5"&&(Dt=Sn.yx),(Dt==null?void 0:Dt.item_type)==="SHIXUN"?(Kn=!0,ci(!0)):(Kn=!1,ci(!1)),$e.setFieldsValue(Ht({},Dt)),fe(Ht({},Dt)),Fe(Ht({},Dt))}return Le.createElement("div",null,Le.createElement(Me.default,{title:!1,footer:!1,open:dn,width:1200,centered:!0,className:et.scoremodal,onCancel:()=>{Te(!1)}},Le.createElement("div",{style:{display:"flex",alignItems:"center"}},Le.createElement("div",{className:et.title},vn?"\u4EE5\u9898\u6362\u9898":"\u9898\u5E93\u9009\u9898")),vn&&Le.createElement("div",{style:{padding:10,background:"#F6F7F9",borderRadius:4,marginTop:14}},"\u6839\u636E\u73B0\u6709\u8BD5\u9898\u7684\u9898\u578B\u3001\u65B9\u5411\u3001\u77E5\u8BC6\u70B9\u3001\u96BE\u6613\u5EA6\uFF0C\u5FEB\u901F\u751F\u6210\u65B0\u7684\u8BD5\u9898\uFF0C\u589E\u52A0\u8BD5\u9898\u7684\u4E30\u5BCC\u5EA6"),Le.createElement(Ut.default,{className:et.tabWrap,activeKey:Dt.type,onChange:Re=>{Re==="3"?(Dt.show_all_share=!0,Zt({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"3"})):Dt.show_all_share=null,Re==="0"&&Zt({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"0"}),gn(Dt.type),Dt.type=Re,(Dt==null?void 0:Dt.item_type)==="SHIXUN"&&Dt.type!=="5"&&(Kn=!0,ci(!0)),ri(!1),Dt.type==="5"&&(Kn=!1,ci(!1)),In(),Ae()},items:[{label:"\u516C\u5171",key:"1"},{label:"\u56E2\u961F\u5171\u4EAB",key:"3"},{label:"\u6536\u85CF\u5939",key:"2"},{label:"\u6211\u521B\u5EFA\u7684",key:"0"},{label:Le.createElement("div",null,"\u5DF2\u9009",St.length>0&&Le.createElement("span",{className:et.titlecount},St.length),Oi>0&&Le.createElement("span",{className:et.add},"+",Oi)),key:"5"}]}),Le.createElement(jt.default,{layout:"inline",form:$e,onValuesChange:(Re,_t)=>{const nn=Object.values(_t).some(Bn=>Bn!==null&&Bn!==""&&Bn!==void 0),cn=_t.keyword==="";if(ri(nn||!cn),Dt.page=1,(_t==null?void 0:_t.item_type)==="SHIXUN"){if(Dt.type==="5"?ci(!1):ci(!0),Re.keyword||Re.keyword==="")return;$e.submit()}else{if(Re!=null&&Re.courseid&&$e.setFieldsValue({tag_discipline_id:""}),ci(!1),Re.keyword||Re.keyword==="")return;$e.submit()}},onFinish:Re=>{var _t;Dt.type==="3"&&(!Re.group_id||((_t=Re==null?void 0:Re.group_id)==null?void 0:_t.length)===0)?Dt.show_all_share=!0:Dt.show_all_share=null,fe(Ht(Ht({},Dt),Re)),Fe(Ht(Ht({},Dt),Re))}},Le.createElement(jt.default.Item,{name:"item_type"},Le.createElement(pe.default,{className:et.selectWrapper,placeholder:"\u9898\u578B",style:{width:110},size:"middle"},(vn?co==null?void 0:co.filter(Re=>Re.question_type!==5):bn?co.slice(0,4):co).map(Re=>Le.createElement(pe.default.Option,{key:Re.value},Re.name)))),Le.createElement(jt.default.Item,{name:"courseid"},Le.createElement(Nt.Z,{className:et.selectWrapper,style:{width:160},size:"middle",placeholder:"\u65B9\u5411&\u8BFE\u7A0B",options:Se})),!Kn&&Le.createElement(jt.default.Item,{name:"tag_discipline_id"},Le.createElement(pe.default,{className:et.selectWrapper,placeholder:"\u77E5\u8BC6\u70B9",style:{width:160},size:"middle",allowClear:!0},(ie=Lt==null?void 0:Lt.tag_disciplines)==null?void 0:ie.map(Re=>Le.createElement(pe.default.Option,{key:Re.id},Re.name)))),Le.createElement(jt.default.Item,{name:Kn?"diff":"difficulty"},Le.createElement(pe.default,{className:et.selectWrapper,placeholder:"\u96BE\u5EA6",style:{width:118},size:"middle",allowClear:!0},!Kn&&_e.map(Re=>Le.createElement(pe.default.Option,{key:Re.value},Re.name)),Kn&&Wn.map(Re=>Le.createElement(pe.default.Option,{key:Re.value},Re.name)))),Kn&&Le.createElement(jt.default.Item,{name:"shixun_publish_status"},Le.createElement(pe.default,{className:et.selectWrapper,placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"middle",allowClear:!0},_n.map(Re=>Le.createElement(pe.default.Option,{key:Re.value},Re.name)))),(Dt.type==="3"||Dt.type==="0")&&!Kn&&Le.createElement(jt.default.Item,{name:"group_id"},Le.createElement(Ie.default,{treeDataSimpleMode:!0,style:{width:118},className:et.selectWrappers,multiple:!0,allowClear:!0,showSearch:!0,filterTreeNode:(Re,_t)=>_t.title.toUpperCase().indexOf(Re.toUpperCase())!==-1,dropdownStyle:{maxHeight:400,width:500,overflow:"auto"},placeholder:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939",treeCheckStrictly:!0,loadData:Ye,treeDefaultExpandedKeys:[0],maxTagCount:0,treeCheckable:!0,treeData:oi})),si&&Le.createElement("span",{className:et.allqingchu,onClick:hi},Le.createElement("i",{className:"iconfont icon-guanbi4"}),Le.createElement("span",null,"\u6E05\u9664\u7B5B\u9009\u6761\u4EF6")),Le.createElement(jt.default.Item,{style:{flex:"0 0 auto",marginRight:0,marginLeft:"auto"},name:"keyword"},Le.createElement(we.default.Search,{className:et.search,placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",allowClear:!0,suffix:Le.createElement("i",{className:`iconfont icon-sousuo9 font14 ${et.searchIcon}`,onClick:()=>$e.submit()}),onSearch:Re=>{$e.submit()}}))),Le.createElement("div",{style:{background:"#F6F7F9",display:"flex",alignItems:"center",marginTop:18,height:40,paddingLeft:10,paddingRight:20}},Le.createElement("div",{onClick:()=>{Dt.updated_at==="asc"?Dt.updated_at="desc":Dt.updated_at="asc",fe(Je(Ht({},Dt),{page:1})),Fe(Je(Ht({},Dt),{page:1}))}}," ",Dt.updated_at?Le.createElement("img",{src:Dt.updated_at==="asc"?At.Z:Wt.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):Le.createElement("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"\u6309\u66F4\u65B0\u65F6\u95F4\u6392\u5E8F"),Le.createElement("div",{onClick:()=>{Dt.quotes==="asc"?Dt.quotes="desc":Dt.quotes="asc",fe(Je(Ht({},Dt),{page:1})),Fe(Je(Ht({},Dt),{page:1}))},style:{marginLeft:20}}," ",Dt.quotes?Le.createElement("img",{src:Dt.quotes==="asc"?At.Z:Wt.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):Le.createElement("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"\u6309\u4F7F\u7528\u6B21\u6570\u6392\u5E8F")),Le.createElement(qt.default,{style:{marginTop:2,marginBottom:20},scroll:{y:260},dataSource:(Lt==null?void 0:Lt.items)||(Lt==null?void 0:Lt.shixun_list),pagination:!1,loading:Et,rowKey:Re=>Re.id,rowSelection:{type:vn||bn?"radio":"checkbox",selectedRowKeys:Kt,getCheckboxProps:Re=>({disabled:Re.shixun_tag_num===1||(di==null?void 0:di.find(_t=>Re.id===_t))}),onSelect(Re,_t,nn){if(vn||bn){kt([Re.id]),yi.current=new Set([Re.id]),mo(1),mt([Re.id]);return}if(_t)Kn&&Wi([...Ci,Re.id]),kt([...Kt,Re.id]),Re.identifier?Yn.current.add(Re.id):yi.current.add(Re.id),mo(1),mt([...St,Re.id]);else{Re.identifier?Yn.current.delete(Re.id):yi.current.delete(Re.id);let cn=St.filter(Bn=>Bn!==Re.id);if(kt(cn),mt(cn),Kn){let Bn=Ci.filter(Oe=>Oe!==Re.id);Wi([...Bn])}if(Dt.type==="5"){He(Je(Ht({},Dt),{list:[...cn]}));return}}},onSelectAll(Re,_t,nn){if(Re){const cn=nn.map(Bn=>Bn.id);Kn&&Wi([...Ci,...cn]),kt([...Kt,...cn]),mt([...St,...cn]);for(const Bn of nn)Bn.identifier?Yn.current.add(Bn.id):yi.current.add(Bn.id)}else{const cn=nn.map(Oe=>Oe.id),Bn=Kt.filter(Oe=>!cn.some(Xe=>Xe===Oe));if(kt([...Bn]),mt([...Bn]),Kn){let Oe=Ci.filter(Xe=>!cn.some(Gn=>Gn===Xe.id));Wi([...Oe])}Dt.type==="5"&&He(Je(Ht({},Dt),{list:[...Bn]}));for(const Oe of cn)Oe.identifier?Yn.current.delete(Oe):yi.current.delete(Oe)}}},columns:[{title:"\u9898\u578B",dataIndex:"item_type",key:"item_type",render:(Re,_t,nn)=>{var cn,Bn;return Le.createElement(ce.Z,{title:ye(_t)},Le.createElement("div",null,Kn||_t!=null&&_t.challenge_names?"\u5B9E\u8BAD\u9898":(Bn=(cn=co==null?void 0:co.filter(Oe=>Oe.value===Re))==null?void 0:cn[0])==null?void 0:Bn.name))}},{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:Kn?"30%":"60%",key:"name",render:(Re,_t,nn)=>{var cn;return Le.createElement("div",{style:{display:"flex",alignItems:"center"}},Le.createElement(ce.Z,{title:ye(_t)},Le.createElement("div",{className:_t!=null&&_t.high_resources_consume?et.q_title:""},Le.createElement(st.Z,{key:1,showLines:1,showTextOnly:!0,value:Kn||_t!=null&&_t.challenge_names?_t!=null&&_t.title||Re===null?"--":Re:(_t==null?void 0:_t.item_type)=="BPROGRAM"?(cn=_t==null?void 0:_t.program_attr)==null?void 0:cn.description:Re}))),(_t==null?void 0:_t.high_resources_consume)&&Le.createElement(me.Z,{type:"shixun",style:{marginLeft:10}}))}},{title:"\u521B\u5EFA\u8005",dataIndex:"author_name",key:"author_name",hidden:!Kn,render:(Re,_t,nn)=>{var cn;return Le.createElement(ce.Z,{title:ye(_t)},Le.createElement("span",null,Re?(cn=Re==null?void 0:Re.split("\u3001"))==null?void 0:cn[0]:"- -"))}},{title:"\u6240\u5C5E\u5355\u4F4D",dataIndex:"author_school_name",key:"author_school_name",hidden:!Kn,render:(Re,_t,nn)=>Le.createElement(ce.Z,{title:ye(_t)},Le.createElement("span",null,Re||"- -"))},{title:"\u96BE\u5EA6",dataIndex:"difficulty",key:"difficulty",render:(Re,_t,nn)=>{var cn,Bn,Oe,Xe;return Le.createElement(ce.Z,{title:ye(_t)},Le.createElement("div",null,Kn||_t!=null&&_t.challenge_names?(_t==null?void 0:_t.level)||((Bn=(cn=_e==null?void 0:_e.filter(Gn=>Gn.value===Re))==null?void 0:cn[0])==null?void 0:Bn.name):(Xe=(Oe=_e==null?void 0:_e.filter(Gn=>Gn.value===Re))==null?void 0:Oe[0])==null?void 0:Xe.name))}},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",hidden:!Kn,render:(Re,_t,nn)=>Le.createElement(ce.Z,{title:ye(_t)},Le.createElement("div",null,Re||"- -"))},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"quotes",key:"quotes",render:(Re,_t,nn)=>Le.createElement(ce.Z,{title:ye(_t)},Le.createElement("div",null,Kn||_t!=null&&_t.challenge_names?(_t==null?void 0:_t.study_count)||(_t==null?void 0:_t.stu_num):Re))},{title:Le.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",Le.createElement(ce.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},Le.createElement(ne.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",hidden:!Kn,render:(Re,_t,nn)=>Le.createElement(ce.Z,{title:ye(_t)},Le.createElement("div",null,Re||"- -"))},{title:"\u64CD\u4F5C",dataIndex:"id",key:"item_type",render:(Re,_t,nn)=>Le.createElement(ce.Z,{title:ye(_t)},Le.createElement("div",{style:{flex:1,textAlign:"start"}},Le.createElement("a",{onClick:()=>{var cn,Bn;qe(Je(Ht({},_t),{question_type:Kn||_t!=null&&_t.challenge_names?5:(Bn=(cn=co==null?void 0:co.filter(Oe=>Oe.value===(_t==null?void 0:_t.item_type)))==null?void 0:cn[0])==null?void 0:Bn.question_type})),ai(!0)}},"\u67E5\u770B"),(_t==null?void 0:_t.shixun_tag_num)===1&&Le.createElement("a",{style:{marginLeft:10},onClick:()=>{Me.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,width:400,content:Le.createElement("div",null,"\u662F\u5426\u786E\u5B9A\u53D1\u5E03",Le.createElement("span",{style:{cursor:"pointer",color:"#3061D0"},onClick:()=>{window.open(`/shixuns/${_t==null?void 0:_t.identifier}/challenges`)}},(_t==null?void 0:_t.shixun_name)||"--"),"\uFF1F"),onOk:()=>Tn(void 0,null,function*(){if(!fn(_t==null?void 0:_t.identifier))return new Promise((cn,Bn)=>{Bn()})})})}},"\u53D1\u5E03")))}].filter(Re=>!Re.hidden)}),Le.createElement(Ce.Z,{current:Dt.page,total:(Lt==null?void 0:Lt.items_count)||(Lt==null?void 0:Lt.shixuns_count),style:{marginBottom:20},defaultPageSize:Dt.per_page,showTotal:Re=>Le.createElement("span",null,"\u5171\xA0",Le.createElement("span",{style:{color:"#165DFF"}},Re),"\xA0\u6761\u6570\u636E"),pageSize:Dt.per_page,onChange:(Re,_t)=>{Dt.page=Re,Dt.per_page=_t,fe(Ht({},Dt)),Fe(Ht({},Dt))}}),Le.createElement("div",{className:et.bottom},Le.createElement(Be.ZP,{className:et.no,onClick:()=>{Te(!1)}},"\u53D6\u6D88"),Le.createElement(Be.ZP,{loading:pn,style:{width:pn&&75},className:et.yes,onClick:()=>Tn(void 0,null,function*(){if((St==null?void 0:St.length)<=0){Qt.ZP.info(vn||bn?"\u8BF7\u9009\u62E9\u4E00\u9053\u8BD5\u9898":"\u5F53\u524D\u6682\u672A\u9009\u62E9\u6570\u636E");return}Hn([...yi.current],[...Yn.current],!0,St==null?void 0:St.length)})},vn?"\u5F00\u59CB\u6362\u9898":"\u786E\u8BA4"))),Le.createElement(Me.default,{open:Nn,title:"\u9898\u76EE\u8BE6\u60C5",footer:!1,className:et.previewModal,width:1e3,centered:!0,onCancel:()=>{ai(!1)},onOk:()=>{ai(!1)}},Le.createElement(It,{qitem:ln})))};var ze=(0,re.connect)(({shixunsDetail:Te,newExercisePaper:dn})=>({shixunsDetail:Te,newExercisePaper:dn}))(An)},24768:function(En,yn,xt){"use strict";xt.d(yn,{AL:function(){return wt},Iy:function(){return ce},Qv:function(){return Tt},ez:function(){return vt},jb:function(){return Ce}});var Ot=xt(32834),jt=xt.n(Ot),Qt=xt(11690),Me=xt.n(Qt);let Ut=1;function pe(re,ne){const me=re.match(/^(\s+)(?:```)/);if(me===null)return ne;const Vt=me[1];return ne.split(`
|
|
|
`).map(Le=>{const he=Le.match(/^\s+/);if(he===null)return Le;const[Ge]=he;return Ge.length>=Vt.length?Le.slice(Vt.length):Le}).join(`
|
|
|
`)}let Nt=[],Ie=["<ul>"];const we=new(jt()).Renderer,qt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ce(){Nt.length=0,Ie=["<ul>"]}const Ce={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Be(re,ne,me,Vt){if(ne>=re.length||re[ne].level<=me)return ne;var Le=re[ne];Vt.push("<li><a href='#"+Ut+Le.anchor+"'>"+Le.text+"</a>"),ne++;var he=[];return ne=Be(re,ne,Le.level,he),he.length>0&&(Vt.push("<ul>"),he.forEach(function(Ge){Vt.push(Ge)}),Vt.push("</ul>")),Vt.push("</li>"),ne=Be(re,ne,me,Vt),ne}function Tt(){return Be(Nt,0,0,Ie),Ie.push("</ul>"),Ie.join("")}const et={heading(re){const ne=qt.exec(re);if(Ut+=1,ne)return{type:"heading",raw:ne[0],depth:ne[1].length,text:ne[2]}},fences(re){const ne=this.rules.block.fences.exec(re);if(ne){const me=ne[0];let Vt=pe(me,ne[3]||"");const Le=ne[2]?ne[2].trim():ne[2];if(["latex","katex","math"].indexOf(Le)>=0){const he=st(),Ge=Vt;Vt=he,gt[he]={type:"block",expression:Ge}}return{type:"code",raw:me,lang:Le,text:Vt}}}},nt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ht=0;const st=()=>`__special_katext_id_${ht++}__`;let gt={};function vt(){return gt}function wt(){ht=0,gt={}}function Ft(re){return re=re.replace(nt,(ne,me)=>{const Vt=st();return gt[Vt]={type:"inline",expression:me},Vt}),re}const It=we.listitem;we.listitem=function(re){return It(Ft(re))};const At=we.paragraph;we.paragraph=function(re){return At(Ft(re))};const Wt=we.tablecell;we.tablecell=function(re,ne){return Wt(Ft(re),ne)},we.code=function(re,ne,me){const Vt=(ne||"").match(/\S*/)[0];return Vt?["latex","katex","math"].indexOf(Vt)>=0?`<p class='editormd-tex'>${re}</p>`:`<pre class="prettyprint linenums"><code class="language-${ne}">${me?re:(0,Qt.escape)(re,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(me?re:(0,Qt.escape)(re,!0))+"</code></pre>"},we.heading=function(re,ne,me){let Vt=this.options.headerPrefix+me.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Nt.push({anchor:Vt,level:ne,text:re}),"<h"+ne+' id="'+Ut+Vt+'">'+re+"</h"+ne+">"},jt().setOptions({silent:!0,gfm:!0,pedantic:!1}),jt().use({tokenizer:et,renderer:we}),yn.ZP=jt()},50371:function(En,yn){"use strict";function xt(){const Ot=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let jt=1;jt<arguments.length;jt++){const Qt=jt<0||arguments.length<=jt?void 0:arguments[jt];Qt&&Object.keys(Qt).forEach(Me=>{const Ut=Qt[Me];Ut!==void 0&&(Ot[Me]=Ut)})}return Ot}yn.Z=xt},77578:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ot}});const Ot=jt=>jt?typeof jt=="function"?jt():jt:null},13845:function(En,yn,xt){"use strict";xt.d(yn,{F:function(){return Ot},Z:function(){return jt}});function Ot(Qt){return Qt!=null&&Qt===Qt.window}function jt(Qt,Me){var Ut,pe;if(typeof window=="undefined")return 0;const Nt=Me?"scrollTop":"scrollLeft";let Ie=0;return Ot(Qt)?Ie=Qt[Me?"pageYOffset":"pageXOffset"]:Qt instanceof Document?Ie=Qt.documentElement[Nt]:(Qt instanceof HTMLElement||Qt)&&(Ie=Qt[Nt]),Qt&&!Ot(Qt)&&typeof Ie!="number"&&(Ie=(pe=((Ut=Qt.ownerDocument)!==null&&Ut!==void 0?Ut:Qt).documentElement)===null||pe===void 0?void 0:pe[Nt]),Ie}},56762:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return jt}});var Ot=xt(59301);function jt(){const[,Qt]=Ot.useReducer(Me=>Me+1,0);return Qt}},68031:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Me}});var Ot=xt(16089);function jt(Ut,pe,Nt,Ie){const we=Nt-pe;return Ut/=Ie/2,Ut<1?we/2*Ut*Ut*Ut+pe:we/2*((Ut-=2)*Ut*Ut+2)+pe}var Qt=xt(13845);function Me(Ut){let pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Nt=()=>window,callback:Ie,duration:we=450}=pe,qt=Nt(),ce=(0,Qt.Z)(qt,!0),Ce=Date.now(),Be=()=>{const et=Date.now()-Ce,nt=jt(et>we?we:et,ce,Ut,we);(0,Qt.F)(qt)?qt.scrollTo(window.pageXOffset,nt):qt instanceof Document||qt.constructor.name==="HTMLDocument"?qt.documentElement.scrollTop=nt:qt.scrollTop=nt,et<we?(0,Ot.Z)(Be):typeof Ie=="function"&&Ie()};(0,Ot.Z)(Be)}},19842:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return yi}});var Ot=xt(80702),jt=xt(59301),Qt=xt(33853),Me=xt(58617),Ut=xt(38819),pe=xt(92310),Nt=xt.n(pe),Ie=xt(72308),we=xt(52487),qt=xt(74416),ce=xt(77861),Ce=xt(17115),Be=xt(90782),Tt=xt(6089),et=xt(18929),nt=jt.createContext(null),ht=nt,st=xt(62853),gt=xt(49618),vt=xt(77321),wt="__rc_cascader_search_mark__",Ft=function(Wn,_n,si){var ri=si.label;return _n.some(function(hi){return String(hi[ri]).toLowerCase().includes(Wn.toLowerCase())})},It=function(Wn,_n,si,ri){return _n.map(function(hi){return hi[ri.label]}).join(" / ")},At=function(_e,Wn,_n,si,ri,hi){var Fe=ri.filter,Ae=Fe===void 0?Ft:Fe,Zt=ri.render,He=Zt===void 0?It:Zt,fn=ri.limit,ye=fn===void 0?50:fn,ae=ri.sort;return jt.useMemo(function(){var Ye=[];if(!_e)return[];function gn(In,Re){var _t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;In.forEach(function(nn){if(!(!ae&&ye!==!1&&ye>0&&Ye.length>=ye)){var cn=[].concat((0,Ot.Z)(Re),[nn]),Bn=nn[_n.children],Oe=_t||nn.disabled;if((!Bn||Bn.length===0||hi)&&Ae(_e,cn,{label:_n.label})){var Xe;Ye.push((0,vt.Z)((0,vt.Z)({},nn),{},(Xe={disabled:Oe},(0,gt.Z)(Xe,_n.label,He(_e,cn,si,_n)),(0,gt.Z)(Xe,wt,cn),(0,gt.Z)(Xe,_n.children,void 0),Xe)))}Bn&&gn(nn[_n.children],cn,Oe)}})}return gn(Wn,[]),ae&&Ye.sort(function(In,Re){return ae(In[wt],Re[wt],_e,_n)}),ye!==!1&&ye>0?Ye.slice(0,ye):Ye},[_e,Wn,_n,si,He,hi,Ae,ae,ye])},Wt="__RC_CASCADER_SPLIT__",re="SHOW_PARENT",ne="SHOW_CHILD";function me(_e){return _e.join(Wt)}function Vt(_e){return _e.map(me)}function Le(_e){return _e.split(Wt)}function he(_e){var Wn=_e||{},_n=Wn.label,si=Wn.value,ri=Wn.children,hi=si||"value";return{label:_n||"label",value:hi,key:hi,children:ri||"children"}}function Ge(_e,Wn){var _n,si;return(_n=_e.isLeaf)!==null&&_n!==void 0?_n:!((si=_e[Wn.children])!==null&&si!==void 0&&si.length)}function Ke(_e){var Wn=_e.parentElement;if(Wn){var _n=_e.offsetTop-Wn.offsetTop;_n-Wn.scrollTop<0?Wn.scrollTo({top:_n}):_n+_e.offsetHeight-Wn.scrollTop>Wn.offsetHeight&&Wn.scrollTo({top:_n+_e.offsetHeight-Wn.offsetHeight})}}function Ve(_e,Wn){return _e.map(function(_n){var si;return(si=_n[wt])===null||si===void 0?void 0:si.map(function(ri){return ri[Wn.value]})})}function sn(_e,Wn,_n){var si=new Set(_e),ri=Wn();return _e.filter(function(hi){var Fe=ri[hi],Ae=Fe?Fe.parent:null,Zt=Fe?Fe.children:null;return Fe&&Fe.node.disabled?!0:_n===ne?!(Zt&&Zt.some(function(He){return He.key&&si.has(He.key)})):!(Ae&&!Ae.node.disabled&&si.has(Ae.key))})}function Mn(_e,Wn,_n){for(var si=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,ri=Wn,hi=[],Fe=function(){var He,fn,ye,ae=_e[Ae],Ye=(He=ri)===null||He===void 0?void 0:He.findIndex(function(In){var Re=In[_n.value];return si?String(Re)===String(ae):Re===ae}),gn=Ye!==-1?(fn=ri)===null||fn===void 0?void 0:fn[Ye]:null;hi.push({value:(ye=gn==null?void 0:gn[_n.value])!==null&&ye!==void 0?ye:ae,index:Ye,option:gn}),ri=gn==null?void 0:gn[_n.children]},Ae=0;Ae<_e.length;Ae+=1)Fe();return hi}var xe=function(_e,Wn,_n,si,ri){return jt.useMemo(function(){var hi=ri||function(Fe){var Ae=si?Fe.slice(-1):Fe,Zt=" / ";return Ae.every(function(He){return["string","number"].includes((0,st.Z)(He))})?Ae.join(Zt):Ae.reduce(function(He,fn,ye){var ae=jt.isValidElement(fn)?jt.cloneElement(fn,{key:ye}):fn;return ye===0?[ae]:[].concat((0,Ot.Z)(He),[Zt,ae])},[])};return _e.map(function(Fe){var Ae,Zt,He=Mn(Fe,Wn,_n),fn=hi(He.map(function(ae){var Ye,gn=ae.option,In=ae.value;return(Ye=gn==null?void 0:gn[_n.label])!==null&&Ye!==void 0?Ye:In}),He.map(function(ae){var Ye=ae.option;return Ye})),ye=me(Fe);return{label:fn,value:ye,key:ye,valueCells:Fe,disabled:(Ae=He[He.length-1])===null||Ae===void 0||(Zt=Ae.option)===null||Zt===void 0?void 0:Zt.disabled}})},[_e,Wn,_n,ri,si])},Ht=xt(71430),Je=function(_e,Wn){var _n=jt.useRef({options:null,info:null}),si=jt.useCallback(function(){return _n.current.options!==_e&&(_n.current.options=_e,_n.current.info=(0,Ht.I8)(_e,{fieldNames:Wn,initWrapper:function(hi){return(0,vt.Z)((0,vt.Z)({},hi),{},{pathKeyEntities:{}})},processEntity:function(hi,Fe){var Ae=hi.nodes.map(function(Zt){return Zt[Wn.value]}).join(Wt);Fe.pathKeyEntities[Ae]=hi,hi.key=Ae}})),_n.current.info.pathKeyEntities},[Wn,_e]);return si},Tn=function(_e,Wn){return jt.useCallback(function(_n){var si=[],ri=[];return _n.forEach(function(hi){var Fe=Mn(hi,_e,Wn);Fe.every(function(Ae){return Ae.option})?ri.push(hi):si.push(hi)}),[ri,si]},[_e,Wn])},An=xt(48736);function ze(_e){return jt.useMemo(function(){if(!_e)return[!1,{}];var Wn={matchInputWidth:!0,limit:50};return _e&&(0,st.Z)(_e)==="object"&&(Wn=(0,vt.Z)((0,vt.Z)({},Wn),_e)),Wn.limit<=0&&delete Wn.limit,[!0,Wn]},[_e])}var Te=jt.memo(function(_e){var Wn=_e.children;return Wn},function(_e,Wn){return!Wn.open}),dn=Te;function Hn(_e){var Wn,_n=_e.prefixCls,si=_e.checked,ri=_e.halfChecked,hi=_e.disabled,Fe=_e.onClick,Ae=_e.disableCheckbox,Zt=jt.useContext(ht),He=Zt.checkable,fn=typeof He!="boolean"?He:null;return jt.createElement("span",{className:Nt()("".concat(_n),(Wn={},(0,gt.Z)(Wn,"".concat(_n,"-checked"),si),(0,gt.Z)(Wn,"".concat(_n,"-indeterminate"),!si&&ri),(0,gt.Z)(Wn,"".concat(_n,"-disabled"),hi||Ae),Wn)),onClick:Fe},fn)}var hn="__cascader_fix_label__";function pn(_e){var Wn=_e.prefixCls,_n=_e.multiple,si=_e.options,ri=_e.activeValue,hi=_e.prevValuePath,Fe=_e.onToggleOpen,Ae=_e.onSelect,Zt=_e.onActive,He=_e.checkedSet,fn=_e.halfCheckedSet,ye=_e.loadingKeys,ae=_e.isSelectable,Ye=_e.searchValue,gn="".concat(Wn,"-menu"),In="".concat(Wn,"-menu-item"),Re=jt.useContext(ht),_t=Re.fieldNames,nn=Re.changeOnSelect,cn=Re.expandTrigger,Bn=Re.expandIcon,Oe=Re.loadingIcon,Xe=Re.dropdownMenuColumnStyle,Gn=cn==="hover",Xn=jt.useMemo(function(){return si.map(function(Jn){var Rn,ni=Jn.disabled,Qn=Jn.disableCheckbox,qn=Jn[wt],Si=(Rn=Jn[hn])!==null&&Rn!==void 0?Rn:Jn[_t.label],Vi=Jn[_t.value],un=Ge(Jn,_t),lo=qn?qn.map(function(gi){return gi[_t.value]}):[].concat((0,Ot.Z)(hi),[Vi]),to=me(lo),Ki=ye.includes(to),en=He.has(to),Dn=fn.has(to);return{disabled:ni,label:Si,value:Vi,isLeaf:un,isLoading:Ki,checked:en,halfChecked:Dn,option:Jn,disableCheckbox:Qn,fullPath:lo,fullPathKey:to}})},[si,He,_t,fn,ye,hi]);return jt.createElement("ul",{className:gn,role:"menu"},Xn.map(function(Jn){var Rn,ni=Jn.disabled,Qn=Jn.label,qn=Jn.value,Si=Jn.isLeaf,Vi=Jn.isLoading,un=Jn.checked,lo=Jn.halfChecked,to=Jn.option,Ki=Jn.fullPath,en=Jn.fullPathKey,Dn=Jn.disableCheckbox,gi=function(){if(!(ni||Ye)){var Zi=(0,Ot.Z)(Ki);Gn&&Si&&Zi.pop(),Zt(Zi)}},ki=function(){ae(to)&&Ae(Ki,Si)},Pi;return typeof to.title=="string"?Pi=to.title:typeof Qn=="string"&&(Pi=Qn),jt.createElement("li",{key:en,className:Nt()(In,(Rn={},(0,gt.Z)(Rn,"".concat(In,"-expand"),!Si),(0,gt.Z)(Rn,"".concat(In,"-active"),ri===qn||ri===en),(0,gt.Z)(Rn,"".concat(In,"-disabled"),ni),(0,gt.Z)(Rn,"".concat(In,"-loading"),Vi),Rn)),style:Xe,role:"menuitemcheckbox",title:Pi,"aria-checked":un,"data-path-key":en,onClick:function(){gi(),!Dn&&(!_n||Si)&&ki()},onDoubleClick:function(){nn&&Fe(!1)},onMouseEnter:function(){Gn&&gi()},onMouseDown:function(Zi){Zi.preventDefault()}},_n&&jt.createElement(Hn,{prefixCls:"".concat(Wn,"-checkbox"),checked:un,halfChecked:lo,disabled:ni||Dn,disableCheckbox:Dn,onClick:function(Zi){Dn||(Zi.stopPropagation(),ki())}}),jt.createElement("div",{className:"".concat(In,"-content")},Qn),!Vi&&Bn&&!Si&&jt.createElement("div",{className:"".concat(In,"-expand-icon")},Bn),Vi&&Oe&&jt.createElement("div",{className:"".concat(In,"-loading-icon")},Oe))}))}var de=function(){var _e=(0,ce.lk)(),Wn=_e.multiple,_n=_e.open,si=jt.useContext(ht),ri=si.values,hi=jt.useState([]),Fe=(0,we.Z)(hi,2),Ae=Fe[0],Zt=Fe[1];return jt.useEffect(function(){if(_n&&!Wn){var He=ri[0];Zt(He||[])}},[_n]),[Ae,Zt]},vn=xt(10228),bn=function(_e,Wn,_n,si,ri,hi){var Fe=(0,ce.lk)(),Ae=Fe.direction,Zt=Fe.searchValue,He=Fe.toggleOpen,fn=Fe.open,ye=Ae==="rtl",ae=jt.useMemo(function(){for(var Xe=-1,Gn=Wn,Xn=[],Jn=[],Rn=si.length,ni=Ve(Wn,_n),Qn=function(to){var Ki=Gn.findIndex(function(en,Dn){return(ni[Dn]?me(ni[Dn]):en[_n.value])===si[to]});if(Ki===-1)return"break";Xe=Ki,Xn.push(Xe),Jn.push(si[to]),Gn=Gn[Xe][_n.children]},qn=0;qn<Rn&&Gn;qn+=1){var Si=Qn(qn);if(Si==="break")break}for(var Vi=Wn,un=0;un<Xn.length-1;un+=1)Vi=Vi[Xn[un]][_n.children];return[Jn,Xe,Vi,ni]},[si,_n,Wn]),Ye=(0,we.Z)(ae,4),gn=Ye[0],In=Ye[1],Re=Ye[2],_t=Ye[3],nn=function(Gn){ri(Gn)},cn=function(Gn){var Xn=Re.length,Jn=In;Jn===-1&&Gn<0&&(Jn=Xn);for(var Rn=0;Rn<Xn;Rn+=1){Jn=(Jn+Gn+Xn)%Xn;var ni=Re[Jn];if(ni&&!ni.disabled){var Qn=gn.slice(0,-1).concat(_t[Jn]?me(_t[Jn]):ni[_n.value]);nn(Qn);return}}},Bn=function(){if(gn.length>1){var Gn=gn.slice(0,-1);nn(Gn)}else He(!1)},Oe=function(){var Gn,Xn=((Gn=Re[In])===null||Gn===void 0?void 0:Gn[_n.children])||[],Jn=Xn.find(function(ni){return!ni.disabled});if(Jn){var Rn=[].concat((0,Ot.Z)(gn),[Jn[_n.value]]);nn(Rn)}};jt.useImperativeHandle(_e,function(){return{onKeyDown:function(Gn){var Xn=Gn.which;switch(Xn){case vn.Z.UP:case vn.Z.DOWN:{var Jn=0;Xn===vn.Z.UP?Jn=-1:Xn===vn.Z.DOWN&&(Jn=1),Jn!==0&&cn(Jn);break}case vn.Z.LEFT:{if(Zt)break;ye?Oe():Bn();break}case vn.Z.RIGHT:{if(Zt)break;ye?Bn():Oe();break}case vn.Z.BACKSPACE:{Zt||Bn();break}case vn.Z.ENTER:{if(gn.length){var Rn=Re[In],ni=(Rn==null?void 0:Rn[wt])||[];ni.length?hi(ni.map(function(Qn){return Qn[_n.value]}),ni[ni.length-1]):hi(gn,Re[In])}break}case vn.Z.ESC:He(!1),fn&&Gn.stopPropagation()}},onKeyUp:function(){}}})},Qe=jt.forwardRef(function(_e,Wn){var _n,si,ri,hi,Fe=(0,ce.lk)(),Ae=Fe.prefixCls,Zt=Fe.multiple,He=Fe.searchValue,fn=Fe.toggleOpen,ye=Fe.notFoundContent,ae=Fe.direction,Ye=Fe.open,gn=jt.useRef(),In=ae==="rtl",Re=jt.useContext(ht),_t=Re.options,nn=Re.values,cn=Re.halfValues,Bn=Re.fieldNames,Oe=Re.changeOnSelect,Xe=Re.onSelect,Gn=Re.searchOptions,Xn=Re.dropdownPrefixCls,Jn=Re.loadData,Rn=Re.expandTrigger,ni=Xn||Ae,Qn=jt.useState([]),qn=(0,we.Z)(Qn,2),Si=qn[0],Vi=qn[1],un=function(ji){if(!(!Jn||He)){var No=Mn(ji,_t,Bn),Mo=No.map(function(zi){var uo=zi.option;return uo}),Ii=Mo[Mo.length-1];if(Ii&&!Ge(Ii,Bn)){var Ni=me(ji);Vi(function(zi){return[].concat((0,Ot.Z)(zi),[Ni])}),Jn(Mo)}}};jt.useEffect(function(){Si.length&&Si.forEach(function(Yi){var ji=Le(Yi),No=Mn(ji,_t,Bn,!0).map(function(Ii){var Ni=Ii.option;return Ni}),Mo=No[No.length-1];(!Mo||Mo[Bn.children]||Ge(Mo,Bn))&&Vi(function(Ii){return Ii.filter(function(Ni){return Ni!==Yi})})})},[_t,Si,Bn]);var lo=jt.useMemo(function(){return new Set(Vt(nn))},[nn]),to=jt.useMemo(function(){return new Set(Vt(cn))},[cn]),Ki=de(),en=(0,we.Z)(Ki,2),Dn=en[0],gi=en[1],ki=function(ji){gi(ji),un(ji)},Pi=function(ji){var No=ji.disabled,Mo=Ge(ji,Bn);return!No&&(Mo||Oe||Zt)},Di=function(ji,No){var Mo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Xe(ji),!Zt&&(No||Oe&&(Rn==="hover"||Mo))&&fn(!1)},Zi=jt.useMemo(function(){return He?Gn:_t},[He,Gn,_t]),Ri=jt.useMemo(function(){for(var Yi=[{options:Zi}],ji=Zi,No=Ve(ji,Bn),Mo=function(){var uo=Dn[Ii],li=ji.find(function(Ho,or){return(No[or]?me(No[or]):Ho[Bn.value])===uo}),$t=li==null?void 0:li[Bn.children];if(!($t!=null&&$t.length))return"break";ji=$t,Yi.push({options:$t})},Ii=0;Ii<Dn.length;Ii+=1){var Ni=Mo();if(Ni==="break")break}return Yi},[Zi,Dn,Bn]),$i=function(ji,No){Pi(No)&&Di(ji,Ge(No,Bn),!0)};bn(Wn,Zi,Bn,Dn,ki,$i),jt.useEffect(function(){for(var Yi=0;Yi<Dn.length;Yi+=1){var ji,No=Dn.slice(0,Yi+1),Mo=me(No),Ii=(ji=gn.current)===null||ji===void 0?void 0:ji.querySelector('li[data-path-key="'.concat(Mo.replace(/\\{0,2}"/g,'\\"'),'"]'));Ii&&Ke(Ii)}},[Dn]);var qi=!((_n=Ri[0])!==null&&_n!==void 0&&(si=_n.options)!==null&&si!==void 0&&si.length),mn=[(ri={},(0,gt.Z)(ri,Bn.value,"__EMPTY__"),(0,gt.Z)(ri,hn,ye),(0,gt.Z)(ri,"disabled",!0),ri)],Lo=(0,vt.Z)((0,vt.Z)({},_e),{},{multiple:!qi&&Zt,onSelect:Di,onActive:ki,onToggleOpen:fn,checkedSet:lo,halfCheckedSet:to,loadingKeys:Si,isSelectable:Pi}),tn=qi?[{options:mn}]:Ri,Gi=tn.map(function(Yi,ji){var No=Dn.slice(0,ji),Mo=Dn[ji];return jt.createElement(pn,(0,Ie.Z)({key:ji},Lo,{searchValue:He,prefixCls:ni,options:Yi.options,prevValuePath:No,activeValue:Mo}))});return jt.createElement(dn,{open:Ye},jt.createElement("div",{className:Nt()("".concat(ni,"-menus"),(hi={},(0,gt.Z)(hi,"".concat(ni,"-menu-empty"),qi),(0,gt.Z)(hi,"".concat(ni,"-rtl"),In),hi)),ref:gn},Gi))}),Pn=Qe;function Ne(_e){var Wn=_e.onPopupVisibleChange,_n=_e.popupVisible,si=_e.popupClassName,ri=_e.popupPlacement;warning(!Wn,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(_n===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(si===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(ri===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Pe(_e,Wn){if(_e){var _n=function si(ri){for(var hi=0;hi<ri.length;hi++){var Fe=ri[hi];if(Fe[Wn==null?void 0:Wn.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Fe[Wn==null?void 0:Wn.children])&&si(Fe[Wn==null?void 0:Wn.children]))return!0}};_n(_e)}}var ie=null,Dt=["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 fe(_e){return Array.isArray(_e)&&Array.isArray(_e[0])}function Se(_e){return _e?fe(_e)?_e:(_e.length===0?[]:[_e]).map(function(Wn){return Array.isArray(Wn)?Wn:[Wn]}):[]}var ee=jt.forwardRef(function(_e,Wn){var _n=_e.id,si=_e.prefixCls,ri=si===void 0?"rc-cascader":si,hi=_e.fieldNames,Fe=_e.defaultValue,Ae=_e.value,Zt=_e.changeOnSelect,He=_e.onChange,fn=_e.displayRender,ye=_e.checkable,ae=_e.autoClearSearchValue,Ye=ae===void 0?!0:ae,gn=_e.searchValue,In=_e.onSearch,Re=_e.showSearch,_t=_e.expandTrigger,nn=_e.options,cn=_e.dropdownPrefixCls,Bn=_e.loadData,Oe=_e.popupVisible,Xe=_e.open,Gn=_e.popupClassName,Xn=_e.dropdownClassName,Jn=_e.dropdownMenuColumnStyle,Rn=_e.popupPlacement,ni=_e.placement,Qn=_e.onDropdownVisibleChange,qn=_e.onPopupVisibleChange,Si=_e.expandIcon,Vi=Si===void 0?">":Si,un=_e.loadingIcon,lo=_e.children,to=_e.dropdownMatchSelectWidth,Ki=to===void 0?!1:to,en=_e.showCheckedStrategy,Dn=en===void 0?re:en,gi=(0,qt.Z)(_e,Dt),ki=(0,Ce.ZP)(_n),Pi=!!ye,Di=(0,et.Z)(Fe,{value:Ae,postState:Se}),Zi=(0,we.Z)(Di,2),Ri=Zi[0],$i=Zi[1],qi=jt.useMemo(function(){return he(hi)},[JSON.stringify(hi)]),mn=jt.useMemo(function(){return nn||[]},[nn]),Lo=Je(mn,qi),tn=jt.useCallback(function(ur){var Yo=Lo();return ur.map(function(xr){var wr=Yo[xr].nodes;return wr.map(function(ta){return ta[qi.value]})})},[Lo,qi]),Gi=(0,et.Z)("",{value:gn,postState:function(Yo){return Yo||""}}),Yi=(0,we.Z)(Gi,2),ji=Yi[0],No=Yi[1],Mo=function(Yo,xr){No(Yo),xr.source!=="blur"&&In&&In(Yo)},Ii=ze(Re),Ni=(0,we.Z)(Ii,2),zi=Ni[0],uo=Ni[1],li=At(ji,mn,qi,cn||ri,uo,Zt),$t=Tn(mn,qi),Ho=jt.useMemo(function(){var ur=$t(Ri),Yo=(0,we.Z)(ur,2),xr=Yo[0],wr=Yo[1];if(!Pi||!Ri.length)return[xr,[],wr];var ta=Vt(xr),da=Lo(),wa=(0,Be.S)(ta,!0,da),an=wa.checkedKeys,Jr=wa.halfCheckedKeys;return[tn(an),tn(Jr),wr]},[Pi,Ri,Lo,tn,$t]),or=(0,we.Z)(Ho,3),Cr=or[0],Fr=or[1],cr=or[2],oo=jt.useMemo(function(){var ur=Vt(Cr),Yo=sn(ur,Lo,Dn);return[].concat((0,Ot.Z)(cr),(0,Ot.Z)(tn(Yo)))},[Cr,Lo,tn,cr,Dn]),fo=xe(oo,mn,qi,Pi,fn),_o=(0,Tt.Z)(function(ur){if($i(ur),He){var Yo=Se(ur),xr=Yo.map(function(da){return Mn(da,mn,qi).map(function(wa){return wa.option})}),wr=Pi?Yo:Yo[0],ta=Pi?xr:xr[0];He(wr,ta)}}),Co=(0,Tt.Z)(function(ur){if((!Pi||Ye)&&No(""),!Pi)_o(ur);else{var Yo=me(ur),xr=Vt(Cr),wr=Vt(Fr),ta=xr.includes(Yo),da=cr.some(function(Nr){return me(Nr)===Yo}),wa=Cr,an=cr;if(da&&!ta)an=cr.filter(function(Nr){return me(Nr)!==Yo});else{var Jr=ta?xr.filter(function(Nr){return Nr!==Yo}):[].concat((0,Ot.Z)(xr),[Yo]),Zs=Lo(),ps;if(ta){var Ds=(0,Be.S)(Jr,{checked:!1,halfCheckedKeys:wr},Zs);ps=Ds.checkedKeys}else{var $o=(0,Be.S)(Jr,!0,Zs);ps=$o.checkedKeys}var Ms=sn(ps,Lo,Dn);wa=tn(Ms)}_o([].concat((0,Ot.Z)(an),(0,Ot.Z)(wa)))}}),lr=function(Yo,xr){if(xr.type==="clear"){_o([]);return}var wr=xr.values[0],ta=wr.valueCells;Co(ta)},ha=Xe!==void 0?Xe:Oe,So=Xn||Gn,Xi=ni||Rn,Zn=function(Yo){Qn==null||Qn(Yo),qn==null||qn(Yo)},Ji=jt.useMemo(function(){return{options:mn,fieldNames:qi,values:Cr,halfValues:Fr,changeOnSelect:Zt,onSelect:Co,checkable:ye,searchOptions:li,dropdownPrefixCls:cn,loadData:Bn,expandTrigger:_t,expandIcon:Vi,loadingIcon:un,dropdownMenuColumnStyle:Jn}},[mn,qi,Cr,Fr,Zt,Co,ye,li,cn,Bn,_t,Vi,un,Jn]),qo=!(ji?li:mn).length,Or=ji&&uo.matchInputWidth||qo?{}:{minWidth:"auto"};return jt.createElement(ht.Provider,{value:Ji},jt.createElement(ce.Ac,(0,Ie.Z)({},gi,{ref:Wn,id:ki,prefixCls:ri,autoClearSearchValue:Ye,dropdownMatchSelectWidth:Ki,dropdownStyle:Or,displayValues:fo,onDisplayValuesChange:lr,mode:Pi?"multiple":void 0,searchValue:ji,onSearch:Mo,showSearch:zi,OptionList:Pn,emptyOptions:qo,open:ha,dropdownClassName:So,placement:Xi,onDropdownVisibleChange:Zn,getRawInputElement:function(){return lo}})))});ee.SHOW_PARENT=re,ee.SHOW_CHILD=ne;var Kt=ee,kt=Kt,St=xt(2738),mt=xt(62892),Lt=xt(53487),zt=xt(19080),Et=xt(36355),Yt=xt(93891),$e=xt(1684),ln=xt(19716),qe=xt(32441),Nn=xt(14154),ai=xt(58582),Kn=xt(84443),ci=xt(66339),Ci=xt(33234),Wi=xt(98447),Oi=xt(17313),mo=xt(74207),Bo=xt(83116);const Ao=_e=>{const{prefixCls:Wn,componentCls:_n,antCls:si}=_e,ri=`${_n}-menu-item`,hi=`
|
|
|
&${ri}-expand ${ri}-expand-icon,
|
|
|
${ri}-loading-icon
|
|
|
`;return[{[_n]:{width:_e.controlWidth}},{[`${_n}-dropdown`]:[(0,Wi.C2)(`${Wn}-checkbox`,_e),{[`&${si}-select-dropdown`]:{padding:0}},{[_n]:{"&-checkbox":{top:0,marginInlineEnd:_e.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${_n}-menu-empty`]:{[`${_n}-menu`]:{width:"100%",height:"auto",[ri]:{color:_e.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:_e.controlItemWidth,height:_e.dropdownHeight,margin:0,padding:_e.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${_e.lineWidth}px ${_e.lineType} ${_e.colorSplit}`},"&-item":Object.assign(Object.assign({},Oi.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:_e.optionPadding,lineHeight:_e.lineHeight,cursor:"pointer",transition:`all ${_e.motionDurationMid}`,borderRadius:_e.borderRadiusSM,"&:hover":{background:_e.controlItemBgHover},"&-disabled":{color:_e.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[hi]:{color:_e.colorTextDisabled}},[`&-active:not(${ri}-disabled)`]:{"&, &:hover":{fontWeight:_e.optionSelectedFontWeight,backgroundColor:_e.optionSelectedBg}},"&-content":{flex:"auto"},[hi]:{marginInlineStart:_e.paddingXXS,color:_e.colorTextDescription,fontSize:_e.fontSizeIcon},"&-keyword":{color:_e.colorHighlight}})}}}]},{[`${_n}-dropdown-rtl`]:{direction:"rtl"}},(0,mo.c)(_e)]};var oi=(0,Bo.Z)("Cascader",_e=>[Ao(_e)],_e=>{const Wn=Math.round((_e.controlHeight-_e.fontSize*_e.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:_e.controlItemBgActive,optionSelectedFontWeight:_e.fontWeightStrong,optionPadding:`${Wn}px ${_e.paddingSM}px`,menuPadding:_e.paddingXXS}}),fi=function(_e,Wn){var _n={};for(var si in _e)Object.prototype.hasOwnProperty.call(_e,si)&&Wn.indexOf(si)<0&&(_n[si]=_e[si]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ri=0,si=Object.getOwnPropertySymbols(_e);ri<si.length;ri++)Wn.indexOf(si[ri])<0&&Object.prototype.propertyIsEnumerable.call(_e,si[ri])&&(_n[si[ri]]=_e[si[ri]]);return _n};const{SHOW_CHILD:di,SHOW_PARENT:mi}=kt;function co(_e,Wn,_n){const si=_e.toLowerCase().split(Wn).reduce((Fe,Ae,Zt)=>Zt===0?[Ae]:[].concat((0,Ot.Z)(Fe),[Wn,Ae]),[]),ri=[];let hi=0;return si.forEach((Fe,Ae)=>{const Zt=hi+Fe.length;let He=_e.slice(hi,Zt);hi=Zt,Ae%2===1&&(He=jt.createElement("span",{className:`${_n}-menu-item-keyword`,key:`separator-${Ae}`},He)),ri.push(He)}),ri}const Sn=(_e,Wn,_n,si)=>{const ri=[],hi=_e.toLowerCase();return Wn.forEach((Fe,Ae)=>{Ae!==0&&ri.push(" / ");let Zt=Fe[si.label];const He=typeof Zt;(He==="string"||He==="number")&&(Zt=co(String(Zt),hi,_n)),ri.push(Zt)}),ri},Ct=jt.forwardRef((_e,Wn)=>{const{prefixCls:_n,size:si,disabled:ri,className:hi,rootClassName:Fe,multiple:Ae,bordered:Zt=!0,transitionName:He,choiceTransitionName:fn="",popupClassName:ye,dropdownClassName:ae,expandIcon:Ye,placement:gn,showSearch:In,allowClear:Re=!0,notFoundContent:_t,direction:nn,getPopupContainer:cn,status:Bn,showArrow:Oe,builtinPlacements:Xe,style:Gn}=_e,Xn=fi(_e,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),Jn=(0,St.Z)(Xn,["suffixIcon"]),{getPopupContainer:Rn,getPrefixCls:ni,renderEmpty:Qn,direction:qn,popupOverflow:Si,cascader:Vi}=jt.useContext(Et.E_),un=nn||qn,lo=un==="rtl",{status:to,hasFeedback:Ki,isFormItemInput:en,feedbackIcon:Dn}=jt.useContext(qe.aM),gi=(0,zt.F)(to,Bn),ki=_t||(Qn==null?void 0:Qn("Cascader"))||jt.createElement(Yt.Z,{componentName:"Cascader"}),Pi=ni(),Di=ni("select",_n),Zi=ni("cascader",_n),[Ri,$i]=(0,Nn.Z)(Di),[qi]=oi(Zi),{compactSize:mn,compactItemClassnames:Lo}=(0,Ci.ri)(Di,nn),tn=Nt()(ye||ae,`${Zi}-dropdown`,{[`${Zi}-dropdown-rtl`]:un==="rtl"},Fe,$i),Gi=jt.useMemo(()=>{if(!In)return In;let cr={render:Sn};return typeof In=="object"&&(cr=Object.assign(Object.assign({},cr),In)),cr},[In]),Yi=(0,ln.Z)(cr=>{var oo;return(oo=si!=null?si:mn)!==null&&oo!==void 0?oo:cr}),ji=jt.useContext($e.Z),No=ri!=null?ri:ji;let Mo=Ye;Ye||(Mo=lo?jt.createElement(Qt.Z,null):jt.createElement(Ut.Z,null));const Ii=jt.createElement("span",{className:`${Di}-menu-item-loading-icon`},jt.createElement(Me.Z,{spin:!0})),Ni=jt.useMemo(()=>Ae?jt.createElement("span",{className:`${Zi}-checkbox-inner`}):!1,[Ae]),zi=(0,Kn.Z)(_e.suffixIcon,Oe),{suffixIcon:uo,removeIcon:li,clearIcon:$t}=(0,ci.Z)(Object.assign(Object.assign({},_e),{hasFeedback:Ki,feedbackIcon:Dn,showSuffixIcon:zi,multiple:Ae,prefixCls:Di,componentName:"Cascader"})),Ho=jt.useMemo(()=>gn!==void 0?gn:lo?"bottomRight":"bottomLeft",[gn,lo]),or=(0,ai.Z)(Xe,Si),Cr=Re===!0?{clearIcon:$t}:Re,Fr=jt.createElement(kt,Object.assign({prefixCls:Di,className:Nt()(!_n&&Zi,{[`${Di}-lg`]:Yi==="large",[`${Di}-sm`]:Yi==="small",[`${Di}-rtl`]:lo,[`${Di}-borderless`]:!Zt,[`${Di}-in-form-item`]:en},(0,zt.Z)(Di,gi,Ki),Lo,Vi==null?void 0:Vi.className,hi,Fe,$i),disabled:No,style:Object.assign(Object.assign({},Vi==null?void 0:Vi.style),Gn)},Jn,{builtinPlacements:or,direction:un,placement:Ho,notFoundContent:ki,allowClear:Cr,showSearch:Gi,expandIcon:Mo,suffixIcon:uo,removeIcon:li,loadingIcon:Ii,checkable:Ni,dropdownClassName:tn,dropdownPrefixCls:_n||Zi,choiceTransitionName:(0,mt.m)(Pi,"",fn),transitionName:(0,mt.m)(Pi,"slide-up",He),getPopupContainer:cn||Rn,ref:Wn}));return qi(Ri(Fr))}),Yn=(0,Lt.Z)(Ct);Ct.SHOW_PARENT=mi,Ct.SHOW_CHILD=di,Ct._InternalPanelDoNotUseOrYouWillBeFired=Yn;var yi=Ct},24905:function(En,yn,xt){"use strict";xt.d(yn,{default:function(){return At}});var Ot=xt(92310),jt=xt.n(Ot),Qt=xt(5630),Me=xt(59301),Ut=xt(36355),pe=xt(1684),Nt=xt(32441),we=Me.createContext(null),qt=xt(98447),ce=xt(14088),Ce=xt(4572),Be=function(Wt,re){var ne={};for(var me in Wt)Object.prototype.hasOwnProperty.call(Wt,me)&&re.indexOf(me)<0&&(ne[me]=Wt[me]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vt=0,me=Object.getOwnPropertySymbols(Wt);Vt<me.length;Vt++)re.indexOf(me[Vt])<0&&Object.prototype.propertyIsEnumerable.call(Wt,me[Vt])&&(ne[me[Vt]]=Wt[me[Vt]]);return ne};const Tt=(Wt,re)=>{var ne;const{prefixCls:me,className:Vt,rootClassName:Le,children:he,indeterminate:Ge=!1,style:Ke,onMouseEnter:Ve,onMouseLeave:sn,skipGroup:Mn=!1,disabled:xe}=Wt,Ht=Be(Wt,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Je,direction:Tn,checkbox:An}=Me.useContext(Ut.E_),ze=Me.useContext(we),{isFormItemInput:Te}=Me.useContext(Nt.aM),dn=Me.useContext(pe.Z),Hn=(ne=(ze==null?void 0:ze.disabled)||xe)!==null&&ne!==void 0?ne:dn,hn=Me.useRef(Ht.value);Me.useEffect(()=>{ze==null||ze.registerValue(Ht.value)},[]),Me.useEffect(()=>{if(!Mn)return Ht.value!==hn.current&&(ze==null||ze.cancelValue(hn.current),ze==null||ze.registerValue(Ht.value),hn.current=Ht.value),()=>ze==null?void 0:ze.cancelValue(Ht.value)},[Ht.value]);const pn=Je("checkbox",me),[de,vn]=(0,qt.ZP)(pn),bn=Object.assign({},Ht);ze&&!Mn&&(bn.onChange=function(){Ht.onChange&&Ht.onChange.apply(Ht,arguments),ze.toggleOption&&ze.toggleOption({label:he,value:Ht.value})},bn.name=ze.name,bn.checked=ze.value.includes(Ht.value));const Qe=jt()(`${pn}-wrapper`,{[`${pn}-rtl`]:Tn==="rtl",[`${pn}-wrapper-checked`]:bn.checked,[`${pn}-wrapper-disabled`]:Hn,[`${pn}-wrapper-in-form-item`]:Te},An==null?void 0:An.className,Vt,Le,vn),Pn=jt()({[`${pn}-indeterminate`]:Ge},Ce.A,vn),Ne=Ge?"mixed":void 0;return de(Me.createElement(ce.Z,{component:"Checkbox",disabled:Hn},Me.createElement("label",{className:Qe,style:Object.assign(Object.assign({},An==null?void 0:An.style),Ke),onMouseEnter:Ve,onMouseLeave:sn},Me.createElement(Qt.Z,Object.assign({"aria-checked":Ne},bn,{prefixCls:pn,className:Pn,disabled:Hn,ref:re})),he!==void 0&&Me.createElement("span",null,he))))};var nt=Me.forwardRef(Tt),ht=xt(80702),st=xt(2738),gt=function(Wt,re){var ne={};for(var me in Wt)Object.prototype.hasOwnProperty.call(Wt,me)&&re.indexOf(me)<0&&(ne[me]=Wt[me]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vt=0,me=Object.getOwnPropertySymbols(Wt);Vt<me.length;Vt++)re.indexOf(me[Vt])<0&&Object.prototype.propertyIsEnumerable.call(Wt,me[Vt])&&(ne[me[Vt]]=Wt[me[Vt]]);return ne};const vt=(Wt,re)=>{const{defaultValue:ne,children:me,options:Vt=[],prefixCls:Le,className:he,rootClassName:Ge,style:Ke,onChange:Ve}=Wt,sn=gt(Wt,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Mn,direction:xe}=Me.useContext(Ut.E_),[Ht,Je]=Me.useState(sn.value||ne||[]),[Tn,An]=Me.useState([]);Me.useEffect(()=>{"value"in sn&&Je(sn.value||[])},[sn.value]);const ze=Me.useMemo(()=>Vt.map(Pe=>typeof Pe=="string"||typeof Pe=="number"?{label:Pe,value:Pe}:Pe),[Vt]),Te=Pe=>{An(ie=>ie.filter(Dt=>Dt!==Pe))},dn=Pe=>{An(ie=>[].concat((0,ht.Z)(ie),[Pe]))},Hn=Pe=>{const ie=Ht.indexOf(Pe.value),Dt=(0,ht.Z)(Ht);ie===-1?Dt.push(Pe.value):Dt.splice(ie,1),"value"in sn||Je(Dt),Ve==null||Ve(Dt.filter(fe=>Tn.includes(fe)).sort((fe,Se)=>{const ee=ze.findIndex(kt=>kt.value===fe),Kt=ze.findIndex(kt=>kt.value===Se);return ee-Kt}))},hn=Mn("checkbox",Le),pn=`${hn}-group`,[de,vn]=(0,qt.ZP)(hn),bn=(0,st.Z)(sn,["value","disabled"]),Qe=Vt.length?ze.map(Pe=>Me.createElement(nt,{prefixCls:hn,key:Pe.value.toString(),disabled:"disabled"in Pe?Pe.disabled:sn.disabled,value:Pe.value,checked:Ht.includes(Pe.value),onChange:Pe.onChange,className:`${pn}-item`,style:Pe.style,title:Pe.title},Pe.label)):me,Pn={toggleOption:Hn,value:Ht,disabled:sn.disabled,name:sn.name,registerValue:dn,cancelValue:Te},Ne=jt()(pn,{[`${pn}-rtl`]:xe==="rtl"},he,Ge,vn);return de(Me.createElement("div",Object.assign({className:Ne,style:Ke},bn,{ref:re}),Me.createElement(we.Provider,{value:Pn},Qe)))},wt=Me.forwardRef(vt);var Ft=Me.memo(wt);const It=nt;It.Group=Ft,It.__ANT_CHECKBOX=!0;var At=It},98447:function(En,yn,xt){"use strict";xt.d(yn,{C2:function(){return Ut}});var Ot=xt(17313),jt=xt(37613),Qt=xt(83116);const Me=pe=>{const{checkboxCls:Nt}=pe,Ie=`${Nt}-wrapper`;return[{[`${Nt}-group`]:Object.assign(Object.assign({},(0,Ot.Wf)(pe)),{display:"inline-flex",flexWrap:"wrap",columnGap:pe.marginXS,[`> ${pe.antCls}-row`]:{flex:1}}),[Ie]:Object.assign(Object.assign({},(0,Ot.Wf)(pe)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Ie}`]:{marginInlineStart:0},[`&${Ie}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Nt]:Object.assign(Object.assign({},(0,Ot.Wf)(pe)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:pe.borderRadiusSM,alignSelf:"center",[`${Nt}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Nt}-inner`]:Object.assign({},(0,Ot.oN)(pe))},[`${Nt}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:pe.checkboxSize,height:pe.checkboxSize,direction:"ltr",backgroundColor:pe.colorBgContainer,border:`${pe.lineWidth}px ${pe.lineType} ${pe.colorBorder}`,borderRadius:pe.borderRadiusSM,borderCollapse:"separate",transition:`all ${pe.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:pe.checkboxSize/14*5,height:pe.checkboxSize/14*8,border:`${pe.lineWidthBold}px solid ${pe.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${pe.motionDurationFast} ${pe.motionEaseInBack}, opacity ${pe.motionDurationFast}`}},"& + span":{paddingInlineStart:pe.paddingXS,paddingInlineEnd:pe.paddingXS}})},{[`
|
|
|
${Ie}:not(${Ie}-disabled),
|
|
|
${Nt}:not(${Nt}-disabled)
|
|
|
`]:{[`&:hover ${Nt}-inner`]:{borderColor:pe.colorPrimary}},[`${Ie}:not(${Ie}-disabled)`]:{[`&:hover ${Nt}-checked:not(${Nt}-disabled) ${Nt}-inner`]:{backgroundColor:pe.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Nt}-checked:not(${Nt}-disabled):after`]:{borderColor:pe.colorPrimaryHover}}},{[`${Nt}-checked`]:{[`${Nt}-inner`]:{backgroundColor:pe.colorPrimary,borderColor:pe.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${pe.motionDurationMid} ${pe.motionEaseOutBack} ${pe.motionDurationFast}`}}},[`
|
|
|
${Ie}-checked:not(${Ie}-disabled),
|
|
|
${Nt}-checked:not(${Nt}-disabled)
|
|
|
`]:{[`&:hover ${Nt}-inner`]:{backgroundColor:pe.colorPrimaryHover,borderColor:"transparent"}}},{[Nt]:{"&-indeterminate":{[`${Nt}-inner`]:{backgroundColor:pe.colorBgContainer,borderColor:pe.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:pe.fontSizeLG/2,height:pe.fontSizeLG/2,backgroundColor:pe.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${Ie}-disabled`]:{cursor:"not-allowed"},[`${Nt}-disabled`]:{[`&, ${Nt}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Nt}-inner`]:{background:pe.colorBgContainerDisabled,borderColor:pe.colorBorder,"&:after":{borderColor:pe.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:pe.colorTextDisabled},[`&${Nt}-indeterminate ${Nt}-inner::after`]:{background:pe.colorTextDisabled}}}]};function Ut(pe,Nt){const Ie=(0,jt.TS)(Nt,{checkboxCls:`.${pe}`,checkboxSize:Nt.controlInteractiveSize});return[Me(Ie)]}yn.ZP=(0,Qt.Z)("Checkbox",(pe,Nt)=>{let{prefixCls:Ie}=Nt;return[Ut(Ie,pe)]})},93891:function(En,yn,xt){"use strict";var Ot=xt(59301),jt=xt(36355),Qt=xt(64165);const Me=Ut=>{const{componentName:pe}=Ut,{getPrefixCls:Nt}=(0,Ot.useContext)(jt.E_),Ie=Nt("empty");switch(pe){case"Table":case"List":return Ot.createElement(Qt.Z,{image:Qt.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Ot.createElement(Qt.Z,{image:Qt.Z.PRESENTED_IMAGE_SIMPLE,className:`${Ie}-small`});default:return Ot.createElement(Qt.Z,null)}};yn.Z=Me},91857:function(En,yn,xt){"use strict";var Ot=xt(59301),jt=xt(38819),Qt=xt(92310),Me=xt.n(Qt),Ut=xt(31561),pe=xt(70425),Nt=xt(18929),Ie=xt(2738),we=xt(79676),qt=xt(53487),ce=xt(92343),Ce=xt(36355),Be=xt(20834),Tt=xt(40875),et=xt(88088),nt=xt(47211);const ht=null,st=Ft=>{const{menu:It,arrow:At,prefixCls:Wt,children:re,trigger:ne,disabled:me,dropdownRender:Vt,getPopupContainer:Le,overlayClassName:he,rootClassName:Ge,open:Ke,onOpenChange:Ve,visible:sn,onVisibleChange:Mn,mouseEnterDelay:xe=.15,mouseLeaveDelay:Ht=.1,autoAdjustOverflow:Je=!0,placement:Tn="",overlay:An,transitionName:ze}=Ft,{getPopupContainer:Te,getPrefixCls:dn,direction:Hn}=Ot.useContext(Ce.E_),hn=Ot.useMemo(()=>{const mt=dn();return ze!==void 0?ze:Tn.includes("top")?`${mt}-slide-down`:`${mt}-slide-up`},[dn,Tn,ze]),pn=Ot.useMemo(()=>Tn?Tn.includes("Center")?Tn.slice(0,Tn.indexOf("Center")):Tn:Hn==="rtl"?"bottomRight":"bottomLeft",[Tn,Hn]),de=dn("dropdown",Wt),[vn,bn]=(0,nt.Z)(de),[,Qe]=(0,et.Z)(),Pn=Ot.Children.only(re),Ne=(0,ce.Tm)(Pn,{className:Me()(`${de}-trigger`,{[`${de}-rtl`]:Hn==="rtl"},Pn.props.className),disabled:me}),Pe=me?[]:ne;let ie;Pe&&Pe.includes("contextMenu")&&(ie=!0);const[Dt,fe]=(0,Nt.Z)(!1,{value:Ke!=null?Ke:sn}),Se=(0,pe.useEvent)(mt=>{Ve==null||Ve(mt),Mn==null||Mn(mt),fe(mt)}),ee=Me()(he,Ge,bn,{[`${de}-rtl`]:Hn==="rtl"}),Kt=(0,we.Z)({arrowPointAtCenter:typeof At=="object"&&At.pointAtCenter,autoAdjustOverflow:Je,offset:Qe.marginXXS,arrowWidth:At?Qe.sizePopupArrow:0,borderRadius:Qe.borderRadius}),kt=Ot.useCallback(()=>{fe(!1)},[]),St=()=>{let mt;return It!=null&&It.items?mt=Ot.createElement(Be.default,Object.assign({},It)):typeof An=="function"?mt=An():mt=An,Vt&&(mt=Vt(mt)),mt=Ot.Children.only(typeof mt=="string"?Ot.createElement("span",null,mt):mt),Ot.createElement(Tt.J,{prefixCls:`${de}-menu`,expandIcon:Ot.createElement("span",{className:`${de}-menu-submenu-arrow`},Ot.createElement(jt.Z,{className:`${de}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:kt,validator:Lt=>{let{mode:zt}=Lt}},mt)};return vn(Ot.createElement(Ut.Z,Object.assign({alignPoint:ie},(0,Ie.Z)(Ft,["rootClassName"]),{mouseEnterDelay:xe,mouseLeaveDelay:Ht,visible:Dt,builtinPlacements:Kt,arrow:!!At,overlayClassName:ee,prefixCls:de,getPopupContainer:Le||Te,transitionName:hn,trigger:Pe,overlay:St,placement:pn,onVisibleChange:Se}),Ne))};function gt(Ft){return Object.assign(Object.assign({},Ft),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const vt=(0,qt.Z)(st,"dropdown",Ft=>Ft,gt),wt=Ft=>Ot.createElement(vt,Object.assign({},Ft),Ot.createElement("span",null));st._InternalPanelDoNotUseOrYouWillBeFired=wt,yn.Z=st},38854:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return et}});var Ot=xt(91857),jt=xt(92310),Qt=xt.n(jt),Me=xt(59301),Ut=xt(18785),pe=xt(3113),Nt=xt(36355),Ie=xt(81327),we=xt(33234),qt=xt(47211),ce=function(nt,ht){var st={};for(var gt in nt)Object.prototype.hasOwnProperty.call(nt,gt)&&ht.indexOf(gt)<0&&(st[gt]=nt[gt]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vt=0,gt=Object.getOwnPropertySymbols(nt);vt<gt.length;vt++)ht.indexOf(gt[vt])<0&&Object.prototype.propertyIsEnumerable.call(nt,gt[vt])&&(st[gt[vt]]=nt[gt[vt]]);return st};const Ce=nt=>{const{getPopupContainer:ht,getPrefixCls:st,direction:gt}=Me.useContext(Nt.E_),{prefixCls:vt,type:wt="default",danger:Ft,disabled:It,loading:At,onClick:Wt,htmlType:re,children:ne,className:me,menu:Vt,arrow:Le,autoFocus:he,overlay:Ge,trigger:Ke,align:Ve,open:sn,onOpenChange:Mn,placement:xe,getPopupContainer:Ht,href:Je,icon:Tn=Me.createElement(Ut.Z,null),title:An,buttonsRender:ze=St=>St,mouseEnterDelay:Te,mouseLeaveDelay:dn,overlayClassName:Hn,overlayStyle:hn,destroyPopupOnHide:pn,dropdownRender:de}=nt,vn=ce(nt,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),bn=st("dropdown",vt),Qe=`${bn}-button`,[Pn,Ne]=(0,qt.Z)(bn),Pe={menu:Vt,arrow:Le,autoFocus:he,align:Ve,disabled:It,trigger:It?[]:Ke,onOpenChange:Mn,getPopupContainer:Ht||ht,mouseEnterDelay:Te,mouseLeaveDelay:dn,overlayClassName:Hn,overlayStyle:hn,destroyPopupOnHide:pn,dropdownRender:de},{compactSize:ie,compactItemClassnames:Dt}=(0,we.ri)(bn,gt),fe=Qt()(Qe,Dt,me,Ne);"overlay"in nt&&(Pe.overlay=Ge),"open"in nt&&(Pe.open=sn),"placement"in nt?Pe.placement=xe:Pe.placement=gt==="rtl"?"bottomLeft":"bottomRight";const Se=Me.createElement(pe.ZP,{type:wt,danger:Ft,disabled:It,loading:At,onClick:Wt,htmlType:re,href:Je,title:An},ne),ee=Me.createElement(pe.ZP,{type:wt,danger:Ft,icon:Tn}),[Kt,kt]=ze([Se,ee]);return Pn(Me.createElement(Ie.Z.Compact,Object.assign({className:fe,size:ie,block:!0},vn),Kt,Me.createElement(Ot.Z,Object.assign({},Pe),kt)))};Ce.__ANT_BUTTON=!0;var Be=Ce;const Tt=Ot.Z;Tt.Button=Be;var et=Tt},47211:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return ce}});var Ot=xt(17313),jt=xt(13826),Qt=xt(92899),Me=xt(29878),Ut=xt(19447),pe=xt(83116),Nt=xt(37613),we=Ce=>{const{componentCls:Be,menuCls:Tt,colorError:et,colorTextLightSolid:nt}=Ce,ht=`${Tt}-item`;return{[`${Be}, ${Be}-menu-submenu`]:{[`${Tt} ${ht}`]:{[`&${ht}-danger:not(${ht}-disabled)`]:{color:et,"&:hover":{color:nt,backgroundColor:et}}}}}};const qt=Ce=>{const{componentCls:Be,menuCls:Tt,zIndexPopup:et,dropdownArrowDistance:nt,sizePopupArrow:ht,antCls:st,iconCls:gt,motionDurationMid:vt,dropdownPaddingVertical:wt,fontSize:Ft,dropdownEdgeChildPadding:It,colorTextDisabled:At,fontSizeIcon:Wt,controlPaddingHorizontal:re,colorBgElevated:ne}=Ce;return[{[Be]:Object.assign(Object.assign({},(0,Ot.Wf)(Ce)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:et,display:"block","&::before":{position:"absolute",insetBlock:-nt+ht/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${st}-btn`]:{[`& > ${gt}-down, & > ${st}-btn-icon > ${gt}-down`]:{fontSize:Wt}},[`${Be}-wrap`]:{position:"relative",[`${st}-btn > ${gt}-down`]:{fontSize:Wt},[`${gt}-down::before`]:{transition:`transform ${vt}`}},[`${Be}-wrap-open`]:{[`${gt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${st}-slide-down-enter${st}-slide-down-enter-active${Be}-placement-bottomLeft,
|
|
|
&${st}-slide-down-appear${st}-slide-down-appear-active${Be}-placement-bottomLeft,
|
|
|
&${st}-slide-down-enter${st}-slide-down-enter-active${Be}-placement-bottom,
|
|
|
&${st}-slide-down-appear${st}-slide-down-appear-active${Be}-placement-bottom,
|
|
|
&${st}-slide-down-enter${st}-slide-down-enter-active${Be}-placement-bottomRight,
|
|
|
&${st}-slide-down-appear${st}-slide-down-appear-active${Be}-placement-bottomRight`]:{animationName:jt.fJ},[`&${st}-slide-up-enter${st}-slide-up-enter-active${Be}-placement-topLeft,
|
|
|
&${st}-slide-up-appear${st}-slide-up-appear-active${Be}-placement-topLeft,
|
|
|
&${st}-slide-up-enter${st}-slide-up-enter-active${Be}-placement-top,
|
|
|
&${st}-slide-up-appear${st}-slide-up-appear-active${Be}-placement-top,
|
|
|
&${st}-slide-up-enter${st}-slide-up-enter-active${Be}-placement-topRight,
|
|
|
&${st}-slide-up-appear${st}-slide-up-appear-active${Be}-placement-topRight`]:{animationName:jt.Qt},[`&${st}-slide-down-leave${st}-slide-down-leave-active${Be}-placement-bottomLeft,
|
|
|
&${st}-slide-down-leave${st}-slide-down-leave-active${Be}-placement-bottom,
|
|
|
&${st}-slide-down-leave${st}-slide-down-leave-active${Be}-placement-bottomRight`]:{animationName:jt.Uw},[`&${st}-slide-up-leave${st}-slide-up-leave-active${Be}-placement-topLeft,
|
|
|
&${st}-slide-up-leave${st}-slide-up-leave-active${Be}-placement-top,
|
|
|
&${st}-slide-up-leave${st}-slide-up-leave-active${Be}-placement-topRight`]:{animationName:jt.ly}})},(0,Ut.ZP)(Ce,{colorBg:ne,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${Be} ${Tt}`]:{position:"relative",margin:0},[`${Tt}-submenu-popup`]:{position:"absolute",zIndex:et,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${Be}, ${Be}-menu-submenu`]:{[Tt]:Object.assign(Object.assign({padding:It,listStyleType:"none",backgroundColor:ne,backgroundClip:"padding-box",borderRadius:Ce.borderRadiusLG,outline:"none",boxShadow:Ce.boxShadowSecondary},(0,Ot.Qy)(Ce)),{[`${Tt}-item-group-title`]:{padding:`${wt}px ${re}px`,color:Ce.colorTextDescription,transition:`all ${vt}`},[`${Tt}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Tt}-item-icon`]:{minWidth:Ft,marginInlineEnd:Ce.marginXS,fontSize:Ce.fontSizeSM},[`${Tt}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${vt}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Tt}-item, ${Tt}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${wt}px ${re}px`,color:Ce.colorText,fontWeight:"normal",fontSize:Ft,lineHeight:Ce.lineHeight,cursor:"pointer",transition:`all ${vt}`,borderRadius:Ce.borderRadiusSM,"&:hover, &-active":{backgroundColor:Ce.controlItemBgHover}},(0,Ot.Qy)(Ce)),{"&-selected":{color:Ce.colorPrimary,backgroundColor:Ce.controlItemBgActive,"&:hover, &-active":{backgroundColor:Ce.controlItemBgActiveHover}},"&-disabled":{color:At,cursor:"not-allowed","&:hover":{color:At,backgroundColor:ne,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Ce.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:Ce.colorSplit},[`${Be}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:Ce.paddingXS,[`${Be}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:Ce.colorTextDescription,fontSize:Wt,fontStyle:"normal"}}}),[`${Tt}-item-group-list`]:{margin:`0 ${Ce.marginXS}px`,padding:0,listStyle:"none"},[`${Tt}-submenu-title`]:{paddingInlineEnd:re+Ce.fontSizeSM},[`${Tt}-submenu-vertical`]:{position:"relative"},[`${Tt}-submenu${Tt}-submenu-disabled ${Be}-menu-submenu-title`]:{[`&, ${Be}-menu-submenu-arrow-icon`]:{color:At,backgroundColor:ne,cursor:"not-allowed"}},[`${Tt}-submenu-selected ${Be}-menu-submenu-title`]:{color:Ce.colorPrimary}})}},[(0,jt.oN)(Ce,"slide-up"),(0,jt.oN)(Ce,"slide-down"),(0,Qt.Fm)(Ce,"move-up"),(0,Qt.Fm)(Ce,"move-down"),(0,Me._y)(Ce,"zoom-big")]]};var ce=(0,pe.Z)("Dropdown",(Ce,Be)=>{let{rootPrefixCls:Tt}=Be;const{marginXXS:et,sizePopupArrow:nt,controlHeight:ht,fontSize:st,lineHeight:gt,paddingXXS:vt,componentCls:wt,borderRadiusLG:Ft}=Ce,It=(ht-st*gt)/2,{dropdownArrowOffset:At}=(0,Ut.fS)({contentRadius:Ft}),Wt=(0,Nt.TS)(Ce,{menuCls:`${wt}-menu`,rootPrefixCls:Tt,dropdownArrowDistance:nt/2+et,dropdownArrowOffset:At,dropdownPaddingVertical:It,dropdownEdgeChildPadding:vt});return[qt(Wt),we(Wt)]},Ce=>({zIndexPopup:Ce.zIndexPopupBase+50}))},64165:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return vt}});var Ot=xt(92310),jt=xt.n(Ot),Qt=xt(59301),Me=xt(36355),Ut=xt(9763),pe=xt(64993),Nt=xt(88088),we=()=>{const[,wt]=(0,Nt.Z)(),It=new pe.C(wt.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Qt.createElement("svg",{style:It,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Qt.createElement("g",{fill:"none",fillRule:"evenodd"},Qt.createElement("g",{transform:"translate(24 31.67)"},Qt.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Qt.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"}),Qt.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)"}),Qt.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"}),Qt.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"})),Qt.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"}),Qt.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Qt.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Qt.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},ce=()=>{const[,wt]=(0,Nt.Z)(),{colorFill:Ft,colorFillTertiary:It,colorFillQuaternary:At,colorBgContainer:Wt}=wt,{borderColor:re,shadowColor:ne,contentColor:me}=(0,Qt.useMemo)(()=>({borderColor:new pe.C(Ft).onBackground(Wt).toHexShortString(),shadowColor:new pe.C(It).onBackground(Wt).toHexShortString(),contentColor:new pe.C(At).onBackground(Wt).toHexShortString()}),[Ft,It,At,Wt]);return Qt.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Qt.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Qt.createElement("ellipse",{fill:ne,cx:"32",cy:"33",rx:"32",ry:"7"}),Qt.createElement("g",{fillRule:"nonzero",stroke:re},Qt.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"}),Qt.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:me}))))},Ce=xt(83116),Be=xt(37613);const Tt=wt=>{const{componentCls:Ft,margin:It,marginXS:At,marginXL:Wt,fontSize:re,lineHeight:ne}=wt;return{[Ft]:{marginInline:At,fontSize:re,lineHeight:ne,textAlign:"center",[`${Ft}-image`]:{height:wt.emptyImgHeight,marginBottom:At,opacity:wt.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Ft}-description`]:{color:wt.colorText},[`${Ft}-footer`]:{marginTop:It},"&-normal":{marginBlock:Wt,color:wt.colorTextDisabled,[`${Ft}-description`]:{color:wt.colorTextDisabled},[`${Ft}-image`]:{height:wt.emptyImgHeightMD}},"&-small":{marginBlock:At,color:wt.colorTextDisabled,[`${Ft}-image`]:{height:wt.emptyImgHeightSM}}}}};var et=(0,Ce.Z)("Empty",wt=>{const{componentCls:Ft,controlHeightLG:It}=wt,At=(0,Be.TS)(wt,{emptyImgCls:`${Ft}-img`,emptyImgHeight:It*2.5,emptyImgHeightMD:It,emptyImgHeightSM:It*.875});return[Tt(At)]}),nt=function(wt,Ft){var It={};for(var At in wt)Object.prototype.hasOwnProperty.call(wt,At)&&Ft.indexOf(At)<0&&(It[At]=wt[At]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,At=Object.getOwnPropertySymbols(wt);Wt<At.length;Wt++)Ft.indexOf(At[Wt])<0&&Object.prototype.propertyIsEnumerable.call(wt,At[Wt])&&(It[At[Wt]]=wt[At[Wt]]);return It};const ht=Qt.createElement(we,null),st=Qt.createElement(ce,null),gt=wt=>{var{className:Ft,rootClassName:It,prefixCls:At,image:Wt=ht,description:re,children:ne,imageStyle:me,style:Vt}=wt,Le=nt(wt,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:he,direction:Ge,empty:Ke}=Qt.useContext(Me.E_),Ve=he("empty",At),[sn,Mn]=et(Ve),[xe]=(0,Ut.Z)("Empty"),Ht=typeof re!="undefined"?re:xe==null?void 0:xe.description,Je=typeof Ht=="string"?Ht:"empty";let Tn=null;return typeof Wt=="string"?Tn=Qt.createElement("img",{alt:Je,src:Wt}):Tn=Wt,sn(Qt.createElement("div",Object.assign({className:jt()(Mn,Ve,Ke==null?void 0:Ke.className,{[`${Ve}-normal`]:Wt===st,[`${Ve}-rtl`]:Ge==="rtl"},Ft,It),style:Object.assign(Object.assign({},Ke==null?void 0:Ke.style),Vt)},Le),Qt.createElement("div",{className:`${Ve}-image`,style:me},Tn),Ht&&Qt.createElement("div",{className:`${Ve}-description`},Ht),ne&&Qt.createElement("div",{className:`${Ve}-footer`},ne)))};gt.PRESENTED_IMAGE_DEFAULT=ht,gt.PRESENTED_IMAGE_SIMPLE=st;var vt=gt},78241:function(En,yn,xt){"use strict";xt.d(yn,{default:function(){return Ae}});var Ot=xt(80702),jt=xt(92310),Qt=xt.n(jt),Me=xt(77900),Ut=xt(59301),pe=xt(62892),Nt=xt(32441);function Ie(Zt){const[He,fn]=Ut.useState(Zt);return Ut.useEffect(()=>{const ye=setTimeout(()=>{fn(Zt)},Zt.length?0:10);return()=>{clearTimeout(ye)}},[Zt]),He}var we=xt(17313),qt=xt(29878),ce=xt(8378),Ce=xt(37613),Be=xt(83116),et=Zt=>{const{componentCls:He}=Zt,fn=`${He}-show-help`,ye=`${He}-show-help-item`;return{[fn]:{transition:`opacity ${Zt.motionDurationSlow} ${Zt.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[ye]:{overflow:"hidden",transition:`height ${Zt.motionDurationSlow} ${Zt.motionEaseInOut},
|
|
|
opacity ${Zt.motionDurationSlow} ${Zt.motionEaseInOut},
|
|
|
transform ${Zt.motionDurationSlow} ${Zt.motionEaseInOut} !important`,[`&${ye}-appear, &${ye}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${ye}-leave-active`]:{transform:"translateY(-5px)"}}}}};const nt=Zt=>({legend:{display:"block",width:"100%",marginBottom:Zt.marginLG,padding:0,color:Zt.colorTextDescription,fontSize:Zt.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Zt.lineWidth}px ${Zt.lineType} ${Zt.colorBorder}`},label:{fontSize:Zt.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 ${Zt.controlOutlineWidth}px ${Zt.controlOutline}`},output:{display:"block",paddingTop:15,color:Zt.colorText,fontSize:Zt.fontSize,lineHeight:Zt.lineHeight}}),ht=(Zt,He)=>{const{formItemCls:fn}=Zt;return{[fn]:{[`${fn}-label > label`]:{height:He},[`${fn}-control-input`]:{minHeight:He}}}},st=Zt=>{const{componentCls:He}=Zt;return{[Zt.componentCls]:Object.assign(Object.assign(Object.assign({},(0,we.Wf)(Zt)),nt(Zt)),{[`${He}-text`]:{display:"inline-block",paddingInlineEnd:Zt.paddingSM},"&-small":Object.assign({},ht(Zt,Zt.controlHeightSM)),"&-large":Object.assign({},ht(Zt,Zt.controlHeightLG))})}},gt=Zt=>{const{formItemCls:He,iconCls:fn,componentCls:ye,rootPrefixCls:ae,labelRequiredMarkColor:Ye,labelColor:gn,labelFontSize:In,labelHeight:Re,labelColonMarginInlineStart:_t,labelColonMarginInlineEnd:nn,itemMarginBottom:cn}=Zt;return{[He]:Object.assign(Object.assign({},(0,we.Wf)(Zt)),{marginBottom:cn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${ae}-row`]:{display:"none"},"&-has-warning":{[`${He}-split`]:{color:Zt.colorError}},"&-has-error":{[`${He}-split`]:{color:Zt.colorWarning}},[`${He}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Zt.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Re,color:gn,fontSize:In,[`> ${fn}`]:{fontSize:Zt.fontSize,verticalAlign:"top"},[`&${He}-required:not(${He}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Zt.marginXXS,color:Ye,fontSize:Zt.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${ye}-hide-required-mark &`]:{display:"none"}},[`${He}-optional`]:{display:"inline-block",marginInlineStart:Zt.marginXXS,color:Zt.colorTextDescription,[`${ye}-hide-required-mark &`]:{display:"none"}},[`${He}-tooltip`]:{color:Zt.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Zt.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:_t,marginInlineEnd:nn},[`&${He}-no-colon::after`]:{content:'"\\a0"'}}},[`${He}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${ae}-col-'"]):not([class*="' ${ae}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Zt.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[He]:{"&-explain, &-extra":{clear:"both",color:Zt.colorTextDescription,fontSize:Zt.fontSize,lineHeight:Zt.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Zt.controlHeightSM,transition:`color ${Zt.motionDurationMid} ${Zt.motionEaseOut}`},"&-explain":{"&-error":{color:Zt.colorError},"&-warning":{color:Zt.colorWarning}}},[`&-with-help ${He}-explain`]:{height:"auto",opacity:1},[`${He}-feedback-icon`]:{fontSize:Zt.fontSize,textAlign:"center",visibility:"visible",animationName:qt.kr,animationDuration:Zt.motionDurationMid,animationTimingFunction:Zt.motionEaseOutBack,pointerEvents:"none","&-success":{color:Zt.colorSuccess},"&-error":{color:Zt.colorError},"&-warning":{color:Zt.colorWarning},"&-validating":{color:Zt.colorPrimary}}})}},vt=Zt=>{const{componentCls:He,formItemCls:fn}=Zt;return{[`${He}-horizontal`]:{[`${fn}-label`]:{flexGrow:0},[`${fn}-control`]:{flex:"1 1 0",minWidth:0},[`${fn}-label[class$='-24'], ${fn}-label[class*='-24 ']`]:{[`& + ${fn}-control`]:{minWidth:"unset"}}}}},wt=Zt=>{const{componentCls:He,formItemCls:fn}=Zt;return{[`${He}-inline`]:{display:"flex",flexWrap:"wrap",[fn]:{flex:"none",marginInlineEnd:Zt.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${fn}-label,
|
|
|
> ${fn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${fn}-label`]:{flex:"none"},[`${He}-text`]:{display:"inline-block"},[`${fn}-has-feedback`]:{display:"inline-block"}}}}},Ft=Zt=>({padding:Zt.verticalLabelPadding,margin:Zt.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),It=Zt=>{const{componentCls:He,formItemCls:fn,rootPrefixCls:ye}=Zt;return{[`${fn} ${fn}-label`]:Ft(Zt),[He]:{[fn]:{flexWrap:"wrap",[`${fn}-label, ${fn}-control`]:{[`&:not([class*=" ${ye}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},At=Zt=>{const{componentCls:He,formItemCls:fn,rootPrefixCls:ye}=Zt;return{[`${He}-vertical`]:{[fn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${He}-item-control`]:{width:"100%"}}},[`${He}-vertical ${fn}-label,
|
|
|
.${ye}-col-24${fn}-label,
|
|
|
.${ye}-col-xl-24${fn}-label`]:Ft(Zt),[`@media (max-width: ${Zt.screenXSMax}px)`]:[It(Zt),{[He]:{[`.${ye}-col-xs-24${fn}-label`]:Ft(Zt)}}],[`@media (max-width: ${Zt.screenSMMax}px)`]:{[He]:{[`.${ye}-col-sm-24${fn}-label`]:Ft(Zt)}},[`@media (max-width: ${Zt.screenMDMax}px)`]:{[He]:{[`.${ye}-col-md-24${fn}-label`]:Ft(Zt)}},[`@media (max-width: ${Zt.screenLGMax}px)`]:{[He]:{[`.${ye}-col-lg-24${fn}-label`]:Ft(Zt)}}}},Wt=(Zt,He)=>(0,Ce.TS)(Zt,{formItemCls:`${Zt.componentCls}-item`,rootPrefixCls:He});var re=(0,Be.Z)("Form",(Zt,He)=>{let{rootPrefixCls:fn}=He;const ye=Wt(Zt,fn);return[st(ye),gt(ye),et(ye),vt(ye),wt(ye),At(ye),(0,ce.Z)(ye),qt.kr]},Zt=>({labelRequiredMarkColor:Zt.colorError,labelColor:Zt.colorTextHeading,labelFontSize:Zt.fontSize,labelHeight:Zt.controlHeight,labelColonMarginInlineStart:Zt.marginXXS/2,labelColonMarginInlineEnd:Zt.marginXS,itemMarginBottom:Zt.marginLG,verticalLabelPadding:`0 0 ${Zt.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const ne=[];function me(Zt,He,fn){let ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Zt=="string"?Zt:`${He}-${ye}`,error:Zt,errorStatus:fn}}var Le=Zt=>{let{help:He,helpStatus:fn,errors:ye=ne,warnings:ae=ne,className:Ye,fieldId:gn,onVisibleChanged:In}=Zt;const{prefixCls:Re}=Ut.useContext(Nt.Rk),_t=`${Re}-item-explain`,[,nn]=re(Re),cn=(0,Ut.useMemo)(()=>(0,pe.Z)(Re),[Re]),Bn=Ie(ye),Oe=Ie(ae),Xe=Ut.useMemo(()=>He!=null?[me(He,"help",fn)]:[].concat((0,Ot.Z)(Bn.map((Xn,Jn)=>me(Xn,"error","error",Jn))),(0,Ot.Z)(Oe.map((Xn,Jn)=>me(Xn,"warning","warning",Jn)))),[He,fn,Bn,Oe]),Gn={};return gn&&(Gn.id=`${gn}_help`),Ut.createElement(Me.default,{motionDeadline:cn.motionDeadline,motionName:`${Re}-show-help`,visible:!!Xe.length,onVisibleChanged:In},Xn=>{const{className:Jn,style:Rn}=Xn;return Ut.createElement("div",Object.assign({},Gn,{className:Qt()(_t,Jn,Ye,nn),style:Rn,role:"alert"}),Ut.createElement(Me.CSSMotionList,Object.assign({keys:Xe},(0,pe.Z)(Re),{motionName:`${Re}-show-help-item`,component:!1}),ni=>{const{key:Qn,error:qn,errorStatus:Si,className:Vi,style:un}=ni;return Ut.createElement("div",{key:Qn,className:Qt()(Vi,{[`${_t}-${Si}`]:Si}),style:un},qn)}))})},he=xt(95013),Ge=xt(36355),Ke=xt(1684),Ve=xt(52946),sn=xt(19716),Mn=xt(16722);const xe=["parentNode"],Ht="form_item";function Je(Zt){return Zt===void 0||Zt===!1?[]:Array.isArray(Zt)?Zt:[Zt]}function Tn(Zt,He){if(!Zt.length)return;const fn=Zt.join("_");return He?`${He}_${fn}`:xe.includes(fn)?`${Ht}_${fn}`:fn}function An(Zt,He,fn,ye,ae,Ye){let gn=ye;return Ye!==void 0?gn=Ye:fn.validating?gn="validating":Zt.length?gn="error":He.length?gn="warning":(fn.touched||ae&&fn.validated)&&(gn="success"),gn}function ze(Zt){return Je(Zt).join("_")}function Te(Zt){const[He]=(0,he.useForm)(),fn=Ut.useRef({}),ye=Ut.useMemo(()=>Zt!=null?Zt:Object.assign(Object.assign({},He),{__INTERNAL__:{itemRef:ae=>Ye=>{const gn=ze(ae);Ye?fn.current[gn]=Ye:delete fn.current[gn]}},scrollToField:function(ae){let Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const gn=Je(ae),In=Tn(gn,ye.__INTERNAL__.name),Re=In?document.getElementById(In):null;Re&&(0,Mn.Z)(Re,Object.assign({scrollMode:"if-needed",block:"nearest"},Ye))},getFieldInstance:ae=>{const Ye=ze(ae);return fn.current[Ye]}}),[Zt,He]);return[ye]}var dn=xt(28726),Hn=function(Zt,He){var fn={};for(var ye in Zt)Object.prototype.hasOwnProperty.call(Zt,ye)&&He.indexOf(ye)<0&&(fn[ye]=Zt[ye]);if(Zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,ye=Object.getOwnPropertySymbols(Zt);ae<ye.length;ae++)He.indexOf(ye[ae])<0&&Object.prototype.propertyIsEnumerable.call(Zt,ye[ae])&&(fn[ye[ae]]=Zt[ye[ae]]);return fn};const hn=(Zt,He)=>{const fn=Ut.useContext(Ke.Z),{getPrefixCls:ye,direction:ae,form:Ye}=Ut.useContext(Ge.E_),{prefixCls:gn,className:In,rootClassName:Re,size:_t,disabled:nn=fn,form:cn,colon:Bn,labelAlign:Oe,labelWrap:Xe,labelCol:Gn,wrapperCol:Xn,hideRequiredMark:Jn,layout:Rn="horizontal",scrollToFirstError:ni,requiredMark:Qn,onFinishFailed:qn,name:Si,style:Vi,feedbackIcons:un}=Zt,lo=Hn(Zt,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),to=(0,sn.Z)(_t),Ki=Ut.useContext(dn.Z),en=(0,Ut.useMemo)(()=>Qn!==void 0?Qn:Ye&&Ye.requiredMark!==void 0?Ye.requiredMark:!Jn,[Jn,Qn,Ye]),Dn=Bn!=null?Bn:Ye==null?void 0:Ye.colon,gi=ye("form",gn),[ki,Pi]=re(gi),Di=Qt()(gi,`${gi}-${Rn}`,{[`${gi}-hide-required-mark`]:en===!1,[`${gi}-rtl`]:ae==="rtl",[`${gi}-${to}`]:to},Pi,Ye==null?void 0:Ye.className,In,Re),[Zi]=Te(cn),{__INTERNAL__:Ri}=Zi;Ri.name=Si;const $i=(0,Ut.useMemo)(()=>({name:Si,labelAlign:Oe,labelCol:Gn,labelWrap:Xe,wrapperCol:Xn,vertical:Rn==="vertical",colon:Dn,requiredMark:en,itemRef:Ri.itemRef,form:Zi,feedbackIcons:un}),[Si,Oe,Gn,Xn,Rn,Dn,en,Zi,un]);Ut.useImperativeHandle(He,()=>Zi);const qi=(Lo,tn)=>{if(Lo){let Gi={block:"nearest"};typeof Lo=="object"&&(Gi=Lo),Zi.scrollToField(tn,Gi)}},mn=Lo=>{if(qn==null||qn(Lo),Lo.errorFields.length){const tn=Lo.errorFields[0].name;if(ni!==void 0){qi(ni,tn);return}Ye&&Ye.scrollToFirstError!==void 0&&qi(Ye.scrollToFirstError,tn)}};return ki(Ut.createElement(Ke.n,{disabled:nn},Ut.createElement(Ve.q,{size:to},Ut.createElement(Nt.RV,Object.assign({},{validateMessages:Ki}),Ut.createElement(Nt.q3.Provider,{value:$i},Ut.createElement(he.default,Object.assign({id:Si},lo,{name:Si,onFinishFailed:mn,form:Zi,style:Object.assign(Object.assign({},Ye==null?void 0:Ye.style),Vi),className:Di})))))))};var de=Ut.forwardRef(hn),vn=xt(41799),bn=xt(8654),Qe=xt(92343),Pn=xt(11592);function Ne(Zt){if(typeof Zt=="function")return Zt;const He=(0,Pn.Z)(Zt);return He.length<=1?He[0]:He}const Pe=()=>{const{status:Zt,errors:He=[],warnings:fn=[]}=(0,Ut.useContext)(Nt.aM);return{status:Zt,errors:He,warnings:fn}};Pe.Context=Nt.aM;var ie=Pe,Dt=xt(16089);function fe(Zt){const[He,fn]=Ut.useState(Zt),ye=(0,Ut.useRef)(null),ae=(0,Ut.useRef)([]),Ye=(0,Ut.useRef)(!1);Ut.useEffect(()=>(Ye.current=!1,()=>{Ye.current=!0,Dt.Z.cancel(ye.current),ye.current=null}),[]);function gn(In){Ye.current||(ye.current===null&&(ae.current=[],ye.current=(0,Dt.Z)(()=>{ye.current=null,fn(Re=>{let _t=Re;return ae.current.forEach(nn=>{_t=nn(_t)}),_t})})),ae.current.push(In))}return[He,gn]}function Se(){const{itemRef:Zt}=Ut.useContext(Nt.q3),He=Ut.useRef({});function fn(ye,ae){const Ye=ae&&typeof ae=="object"&&ae.ref,gn=ye.join("_");return(He.current.name!==gn||He.current.originRef!==Ye)&&(He.current.name=gn,He.current.originRef=Ye,He.current.ref=(0,bn.sQ)(Zt(ye),Ye)),He.current.ref}return fn}var ee=xt(29194),Kt=xt(34280),kt=xt(2738),St=xt(27382),mt=xt(37028);const Lt=Zt=>{const{formItemCls:He}=Zt;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${He}-control`]:{display:"flex"}}}};var zt=(0,Be.b)(["Form","item-item"],(Zt,He)=>{let{rootPrefixCls:fn}=He;const ye=Wt(Zt,fn);return[Lt(ye)]}),Yt=Zt=>{const{prefixCls:He,status:fn,wrapperCol:ye,children:ae,errors:Ye,warnings:gn,_internalItemRender:In,extra:Re,help:_t,fieldId:nn,marginBottom:cn,onErrorVisibleChanged:Bn}=Zt,Oe=`${He}-item`,Xe=Ut.useContext(Nt.q3),Gn=ye||Xe.wrapperCol||{},Xn=Qt()(`${Oe}-control`,Gn.className),Jn=Ut.useMemo(()=>Object.assign({},Xe),[Xe]);delete Jn.labelCol,delete Jn.wrapperCol;const Rn=Ut.createElement("div",{className:`${Oe}-control-input`},Ut.createElement("div",{className:`${Oe}-control-input-content`},ae)),ni=Ut.useMemo(()=>({prefixCls:He,status:fn}),[He,fn]),Qn=cn!==null||Ye.length||gn.length?Ut.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Ut.createElement(Nt.Rk.Provider,{value:ni},Ut.createElement(Le,{fieldId:nn,errors:Ye,warnings:gn,help:_t,helpStatus:fn,className:`${Oe}-explain-connected`,onVisibleChanged:Bn})),!!cn&&Ut.createElement("div",{style:{width:0,height:cn}})):null,qn={};nn&&(qn.id=`${nn}_extra`);const Si=Re?Ut.createElement("div",Object.assign({},qn,{className:`${Oe}-extra`}),Re):null,Vi=In&&In.mark==="pro_table_render"&&In.render?In.render(Zt,{input:Rn,errorList:Qn,extra:Si}):Ut.createElement(Ut.Fragment,null,Rn,Qn,Si);return Ut.createElement(Nt.q3.Provider,{value:Jn},Ut.createElement(mt.Z,Object.assign({},Gn,{className:Xn}),Vi),Ut.createElement(zt,{prefixCls:He}))},$e=xt(61485),ln=xt(31724),qe=xt(9763),Nn=xt(6848),ai=function(Zt,He){var fn={};for(var ye in Zt)Object.prototype.hasOwnProperty.call(Zt,ye)&&He.indexOf(ye)<0&&(fn[ye]=Zt[ye]);if(Zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,ye=Object.getOwnPropertySymbols(Zt);ae<ye.length;ae++)He.indexOf(ye[ae])<0&&Object.prototype.propertyIsEnumerable.call(Zt,ye[ae])&&(fn[ye[ae]]=Zt[ye[ae]]);return fn};function Kn(Zt){return Zt?typeof Zt=="object"&&!Ut.isValidElement(Zt)?Zt:{title:Zt}:null}var Ci=Zt=>{let{prefixCls:He,label:fn,htmlFor:ye,labelCol:ae,labelAlign:Ye,colon:gn,required:In,requiredMark:Re,tooltip:_t}=Zt;var nn;const[cn]=(0,qe.Z)("Form"),{vertical:Bn,labelAlign:Oe,labelCol:Xe,labelWrap:Gn,colon:Xn}=Ut.useContext(Nt.q3);if(!fn)return null;const Jn=ae||Xe||{},Rn=Ye||Oe,ni=`${He}-item-label`,Qn=Qt()(ni,Rn==="left"&&`${ni}-left`,Jn.className,{[`${ni}-wrap`]:!!Gn});let qn=fn;const Si=gn===!0||Xn!==!1&&gn!==!1;Si&&!Bn&&typeof fn=="string"&&fn.trim()!==""&&(qn=fn.replace(/[:|:]\s*$/,""));const un=Kn(_t);if(un){const{icon:en=Ut.createElement($e.Z,null)}=un,Dn=ai(un,["icon"]),gi=Ut.createElement(Nn.Z,Object.assign({},Dn),Ut.cloneElement(en,{className:`${He}-item-tooltip`,title:""}));qn=Ut.createElement(Ut.Fragment,null,qn,gi)}const lo=Re==="optional",to=typeof Re=="function";to?qn=Re(qn,{required:!!In}):lo&&!In&&(qn=Ut.createElement(Ut.Fragment,null,qn,Ut.createElement("span",{className:`${He}-item-optional`,title:""},(cn==null?void 0:cn.optional)||((nn=ln.Z.Form)===null||nn===void 0?void 0:nn.optional))));const Ki=Qt()({[`${He}-item-required`]:In,[`${He}-item-required-mark-optional`]:lo||to,[`${He}-item-no-colon`]:!Si});return Ut.createElement(mt.Z,Object.assign({},Jn,{className:Qn}),Ut.createElement("label",{htmlFor:ye,className:Ki,title:typeof fn=="string"?fn:""},qn))},Wi=xt(29679),Oi=xt(19248),mo=xt(96512),Bo=xt(58617);const Ao={success:Wi.Z,warning:mo.Z,error:Oi.Z,validating:Bo.Z};function oi(Zt){let{children:He,errors:fn,warnings:ye,hasFeedback:ae,validateStatus:Ye,prefixCls:gn,meta:In,noStyle:Re}=Zt;const _t=`${gn}-item`,{feedbackIcons:nn}=Ut.useContext(Nt.q3),cn=An(fn,ye,In,null,!!ae,Ye),{isFormItemInput:Bn,status:Oe}=Ut.useContext(Nt.aM),Xe=Ut.useMemo(()=>{var Gn;let Xn;if(ae){const ni=ae!==!0&&ae.icons||nn,Qn=cn&&((Gn=ni==null?void 0:ni({status:cn,errors:fn,warnings:ye}))===null||Gn===void 0?void 0:Gn[cn]),qn=cn&&Ao[cn];Xn=Qn!==!1&&qn?Ut.createElement("span",{className:Qt()(`${_t}-feedback-icon`,`${_t}-feedback-icon-${cn}`)},Qn||Ut.createElement(qn,null)):null}let Jn=!0,Rn=cn||"";return Re&&(Jn=Bn,Rn=(cn!=null?cn:Oe)||""),{status:Rn,errors:fn,warnings:ye,hasFeedback:!!ae,feedbackIcon:Xn,isFormItemInput:Jn}},[cn,ae,Re,Bn,Oe]);return Ut.createElement(Nt.aM.Provider,{value:Xe},He)}var fi=function(Zt,He){var fn={};for(var ye in Zt)Object.prototype.hasOwnProperty.call(Zt,ye)&&He.indexOf(ye)<0&&(fn[ye]=Zt[ye]);if(Zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,ye=Object.getOwnPropertySymbols(Zt);ae<ye.length;ae++)He.indexOf(ye[ae])<0&&Object.prototype.propertyIsEnumerable.call(Zt,ye[ae])&&(fn[ye[ae]]=Zt[ye[ae]]);return fn};function di(Zt){const{prefixCls:He,className:fn,rootClassName:ye,style:ae,help:Ye,errors:gn,warnings:In,validateStatus:Re,meta:_t,hasFeedback:nn,hidden:cn,children:Bn,fieldId:Oe,required:Xe,isRequired:Gn,onSubItemMetaChange:Xn}=Zt,Jn=fi(Zt,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Rn=`${He}-item`,{requiredMark:ni}=Ut.useContext(Nt.q3),Qn=Ut.useRef(null),qn=Ie(gn),Si=Ie(In),Vi=Ye!=null,un=!!(Vi||gn.length||In.length),lo=!!Qn.current&&(0,ee.Z)(Qn.current),[to,Ki]=Ut.useState(null);(0,Kt.Z)(()=>{if(un&&Qn.current){const Pi=getComputedStyle(Qn.current);Ki(parseInt(Pi.marginBottom,10))}},[un,lo]);const en=Pi=>{Pi||Ki(null)},gi=function(){let Pi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Di=Pi?qn:_t.errors,Zi=Pi?Si:_t.warnings;return An(Di,Zi,_t,"",!!nn,Re)}(),ki=Qt()(Rn,fn,ye,{[`${Rn}-with-help`]:Vi||qn.length||Si.length,[`${Rn}-has-feedback`]:gi&&nn,[`${Rn}-has-success`]:gi==="success",[`${Rn}-has-warning`]:gi==="warning",[`${Rn}-has-error`]:gi==="error",[`${Rn}-is-validating`]:gi==="validating",[`${Rn}-hidden`]:cn});return Ut.createElement("div",{className:ki,style:ae,ref:Qn},Ut.createElement(St.Z,Object.assign({className:`${Rn}-row`},(0,kt.Z)(Jn,["_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"])),Ut.createElement(Ci,Object.assign({htmlFor:Oe},Zt,{requiredMark:ni,required:Xe!=null?Xe:Gn,prefixCls:He})),Ut.createElement(Yt,Object.assign({},Zt,_t,{errors:qn,warnings:Si,prefixCls:He,status:gi,help:Ye,marginBottom:to,onErrorVisibleChanged:en}),Ut.createElement(Nt.qI.Provider,{value:Xn},Ut.createElement(oi,{prefixCls:He,meta:_t,errors:_t.errors,warnings:_t.warnings,hasFeedback:nn,validateStatus:gi},Bn)))),!!to&&Ut.createElement("div",{className:`${Rn}-margin-offset`,style:{marginBottom:-to}}))}const mi="__SPLIT__",co=null,Sn=Ut.memo(Zt=>{let{children:He}=Zt;return He},(Zt,He)=>Zt.value===He.value&&Zt.update===He.update&&Zt.childProps.length===He.childProps.length&&Zt.childProps.every((fn,ye)=>fn===He.childProps[ye]));function Ct(Zt){return Zt!=null}function Yn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function yi(Zt){const{name:He,noStyle:fn,className:ye,dependencies:ae,prefixCls:Ye,shouldUpdate:gn,rules:In,children:Re,required:_t,label:nn,messageVariables:cn,trigger:Bn="onChange",validateTrigger:Oe,hidden:Xe,help:Gn}=Zt,{getPrefixCls:Xn}=Ut.useContext(Ge.E_),{name:Jn}=Ut.useContext(Nt.q3),Rn=Ne(Re),ni=typeof Rn=="function",Qn=Ut.useContext(Nt.qI),{validateTrigger:qn}=Ut.useContext(he.FieldContext),Si=Oe!==void 0?Oe:qn,Vi=Ct(He),un=Xn("form",Ye),[lo,to]=re(un),Ki=Ut.useContext(he.ListContext),en=Ut.useRef(),[Dn,gi]=fe({}),[ki,Pi]=(0,vn.Z)(()=>Yn()),Di=tn=>{const Gi=Ki==null?void 0:Ki.getKey(tn.name);if(Pi(tn.destroy?Yn():tn,!0),fn&&Gn!==!1&&Qn){let Yi=tn.name;if(tn.destroy)Yi=en.current||Yi;else if(Gi!==void 0){const[ji,No]=Gi;Yi=[ji].concat((0,Ot.Z)(No)),en.current=Yi}Qn(tn,Yi)}},Zi=(tn,Gi)=>{gi(Yi=>{const ji=Object.assign({},Yi),Mo=[].concat((0,Ot.Z)(tn.name.slice(0,-1)),(0,Ot.Z)(Gi)).join(mi);return tn.destroy?delete ji[Mo]:ji[Mo]=tn,ji})},[Ri,$i]=Ut.useMemo(()=>{const tn=(0,Ot.Z)(ki.errors),Gi=(0,Ot.Z)(ki.warnings);return Object.values(Dn).forEach(Yi=>{tn.push.apply(tn,(0,Ot.Z)(Yi.errors||[])),Gi.push.apply(Gi,(0,Ot.Z)(Yi.warnings||[]))}),[tn,Gi]},[Dn,ki.errors,ki.warnings]),qi=Se();function mn(tn,Gi,Yi){return fn&&!Xe?Ut.createElement(oi,{prefixCls:un,hasFeedback:Zt.hasFeedback,validateStatus:Zt.validateStatus,meta:ki,errors:Ri,warnings:$i,noStyle:!0},tn):Ut.createElement(di,Object.assign({key:"row"},Zt,{className:Qt()(ye,to),prefixCls:un,fieldId:Gi,isRequired:Yi,errors:Ri,warnings:$i,meta:ki,onSubItemMetaChange:Zi}),tn)}if(!Vi&&!ni&&!ae)return lo(mn(Rn));let Lo={};return typeof nn=="string"?Lo.label=nn:He&&(Lo.label=String(He)),cn&&(Lo=Object.assign(Object.assign({},Lo),cn)),lo(Ut.createElement(he.Field,Object.assign({},Zt,{messageVariables:Lo,trigger:Bn,validateTrigger:Si,onMetaChange:Di}),(tn,Gi,Yi)=>{const ji=Je(He).length&&Gi?Gi.name:[],No=Tn(ji,Jn),Mo=_t!==void 0?_t:!!(In&&In.some(zi=>{if(zi&&typeof zi=="object"&&zi.required&&!zi.warningOnly)return!0;if(typeof zi=="function"){const uo=zi(Yi);return uo&&uo.required&&!uo.warningOnly}return!1})),Ii=Object.assign({},tn);let Ni=null;if(Array.isArray(Rn)&&Vi)Ni=Rn;else if(!(ni&&(!(gn||ae)||Vi))){if(!(ae&&!ni&&!Vi))if((0,Qe.l$)(Rn)){const zi=Object.assign(Object.assign({},Rn.props),Ii);if(zi.id||(zi.id=No),Gn||Ri.length>0||$i.length>0||Zt.extra){const $t=[];(Gn||Ri.length>0)&&$t.push(`${No}_help`),Zt.extra&&$t.push(`${No}_extra`),zi["aria-describedby"]=$t.join(" ")}Ri.length>0&&(zi["aria-invalid"]="true"),Mo&&(zi["aria-required"]="true"),(0,bn.Yr)(Rn)&&(zi.ref=qi(ji,Rn)),new Set([].concat((0,Ot.Z)(Je(Bn)),(0,Ot.Z)(Je(Si)))).forEach($t=>{zi[$t]=function(){for(var Ho,or,Cr,Fr,cr,oo=arguments.length,fo=new Array(oo),_o=0;_o<oo;_o++)fo[_o]=arguments[_o];(Cr=Ii[$t])===null||Cr===void 0||(Ho=Cr).call.apply(Ho,[Ii].concat(fo)),(cr=(Fr=Rn.props)[$t])===null||cr===void 0||(or=cr).call.apply(or,[Fr].concat(fo))}});const li=[zi["aria-required"],zi["aria-invalid"],zi["aria-describedby"]];Ni=Ut.createElement(Sn,{value:Ii[Zt.valuePropName||"value"],update:Rn,childProps:li},(0,Qe.Tm)(Rn,zi))}else ni&&(gn||ae)&&!Vi?Ni=Rn(Yi):Ni=Rn}return mn(Ni,No,Mo)}))}const _e=yi;_e.useStatus=ie;var Wn=_e,_n=function(Zt,He){var fn={};for(var ye in Zt)Object.prototype.hasOwnProperty.call(Zt,ye)&&He.indexOf(ye)<0&&(fn[ye]=Zt[ye]);if(Zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,ye=Object.getOwnPropertySymbols(Zt);ae<ye.length;ae++)He.indexOf(ye[ae])<0&&Object.prototype.propertyIsEnumerable.call(Zt,ye[ae])&&(fn[ye[ae]]=Zt[ye[ae]]);return fn},ri=Zt=>{var{prefixCls:He,children:fn}=Zt,ye=_n(Zt,["prefixCls","children"]);const{getPrefixCls:ae}=Ut.useContext(Ge.E_),Ye=ae("form",He),gn=Ut.useMemo(()=>({prefixCls:Ye,status:"error"}),[Ye]);return Ut.createElement(he.List,Object.assign({},ye),(In,Re,_t)=>Ut.createElement(Nt.Rk.Provider,{value:gn},fn(In.map(nn=>Object.assign(Object.assign({},nn),{fieldKey:nn.key})),Re,{errors:_t.errors,warnings:_t.warnings})))};function hi(){const{form:Zt}=(0,Ut.useContext)(Nt.q3);return Zt}const Fe=de;Fe.Item=Wn,Fe.List=ri,Fe.ErrorList=Le,Fe.useForm=Te,Fe.useFormInstance=hi,Fe.useWatch=he.useWatch,Fe.Provider=Nt.RV,Fe.create=()=>{};var Ae=Fe},8628:function(En,yn,xt){"use strict";var Ot=xt(59301),jt=xt(34280),Qt=xt(56762),Me=xt(69507);function Ut(){let pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Nt=(0,Ot.useRef)({}),Ie=(0,Qt.Z)(),we=(0,Me.ZP)();return(0,jt.Z)(()=>{const qt=we.subscribe(ce=>{Nt.current=ce,pe&&Ie()});return()=>we.unsubscribe(qt)},[]),Nt.current}yn.Z=Ut},9432:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return gt},n:function(){return ht}});var Ot=xt(19248),jt=xt(92310),Qt=xt.n(jt),Me=xt(93681),Ut=xt(8654),pe=xt(59301),Nt=xt(19080),Ie=xt(36355),we=xt(1684),qt=xt(19716),ce=xt(32441),Ce=xt(33234),Be=xt(59412),Tt=xt(9937);function et(vt){return!!(vt.prefix||vt.suffix||vt.allowClear)}var nt=function(vt,wt){var Ft={};for(var It in vt)Object.prototype.hasOwnProperty.call(vt,It)&&wt.indexOf(It)<0&&(Ft[It]=vt[It]);if(vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var At=0,It=Object.getOwnPropertySymbols(vt);At<It.length;At++)wt.indexOf(It[At])<0&&Object.prototype.propertyIsEnumerable.call(vt,It[At])&&(Ft[It[At]]=vt[It[At]]);return Ft};function ht(vt,wt){if(!vt)return;vt.focus(wt);const{cursor:Ft}=wt||{};if(Ft){const It=vt.value.length;switch(Ft){case"start":vt.setSelectionRange(0,0);break;case"end":vt.setSelectionRange(It,It);break;default:vt.setSelectionRange(0,It);break}}}var gt=(0,pe.forwardRef)((vt,wt)=>{var Ft;const{prefixCls:It,bordered:At=!0,status:Wt,size:re,disabled:ne,onBlur:me,onFocus:Vt,suffix:Le,allowClear:he,addonAfter:Ge,addonBefore:Ke,className:Ve,style:sn,styles:Mn,rootClassName:xe,onChange:Ht,classNames:Je}=vt,Tn=nt(vt,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:An,direction:ze,input:Te}=pe.useContext(Ie.E_),dn=An("input",It),Hn=(0,pe.useRef)(null),[hn,pn]=(0,Tt.ZP)(dn),{compactSize:de,compactItemClassnames:vn}=(0,Ce.ri)(dn,ze),bn=(0,qt.Z)(zt=>{var Et;return(Et=re!=null?re:de)!==null&&Et!==void 0?Et:zt}),Qe=pe.useContext(we.Z),Pn=ne!=null?ne:Qe,{status:Ne,hasFeedback:Pe,feedbackIcon:ie}=(0,pe.useContext)(ce.aM),Dt=(0,Nt.F)(Ne,Wt),fe=et(vt)||!!Pe,Se=(0,pe.useRef)(fe);(0,pe.useEffect)(()=>{var zt;fe&&Se.current,Se.current=fe},[fe]);const ee=(0,Be.Z)(Hn,!0),Kt=zt=>{ee(),me==null||me(zt)},kt=zt=>{ee(),Vt==null||Vt(zt)},St=zt=>{ee(),Ht==null||Ht(zt)},mt=(Pe||Le)&&pe.createElement(pe.Fragment,null,Le,Pe&&ie);let Lt;return typeof he=="object"&&(he!=null&&he.clearIcon)?Lt=he:he&&(Lt={clearIcon:pe.createElement(Ot.Z,null)}),hn(pe.createElement(Me.default,Object.assign({ref:(0,Ut.sQ)(wt,Hn),prefixCls:dn,autoComplete:Te==null?void 0:Te.autoComplete},Tn,{disabled:Pn,onBlur:Kt,onFocus:kt,style:Object.assign(Object.assign({},Te==null?void 0:Te.style),sn),styles:Object.assign(Object.assign({},Te==null?void 0:Te.styles),Mn),suffix:mt,allowClear:Lt,className:Qt()(Ve,xe,vn,Te==null?void 0:Te.className),onChange:St,addonAfter:Ge&&pe.createElement(Ce.BR,null,pe.createElement(ce.Ux,{override:!0,status:!0},Ge)),addonBefore:Ke&&pe.createElement(Ce.BR,null,pe.createElement(ce.Ux,{override:!0,status:!0},Ke)),classNames:Object.assign(Object.assign(Object.assign({},Je),Te==null?void 0:Te.classNames),{input:Qt()({[`${dn}-sm`]:bn==="small",[`${dn}-lg`]:bn==="large",[`${dn}-rtl`]:ze==="rtl",[`${dn}-borderless`]:!At},!fe&&(0,Nt.Z)(dn,Dt),Je==null?void 0:Je.input,(Ft=Te==null?void 0:Te.classNames)===null||Ft===void 0?void 0:Ft.input,pn)}),classes:{affixWrapper:Qt()({[`${dn}-affix-wrapper-sm`]:bn==="small",[`${dn}-affix-wrapper-lg`]:bn==="large",[`${dn}-affix-wrapper-rtl`]:ze==="rtl",[`${dn}-affix-wrapper-borderless`]:!At},(0,Nt.Z)(`${dn}-affix-wrapper`,Dt,Pe),pn),wrapper:Qt()({[`${dn}-group-rtl`]:ze==="rtl"},pn),group:Qt()({[`${dn}-group-wrapper-sm`]:bn==="small",[`${dn}-group-wrapper-lg`]:bn==="large",[`${dn}-group-wrapper-rtl`]:ze==="rtl",[`${dn}-group-wrapper-disabled`]:Pn},(0,Nt.Z)(`${dn}-group-wrapper`,Dt,Pe),pn)}})))})},1643:function(En,yn,xt){"use strict";var Ot=xt(19248),jt=xt(92310),Qt=xt.n(jt),Me=xt(9296),Ut=xt(59301),pe=xt(19080),Nt=xt(36355),Ie=xt(1684),we=xt(19716),qt=xt(32441),ce=xt(9432),Ce=xt(9937),Be=function(et,nt){var ht={};for(var st in et)Object.prototype.hasOwnProperty.call(et,st)&&nt.indexOf(st)<0&&(ht[st]=et[st]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,st=Object.getOwnPropertySymbols(et);gt<st.length;gt++)nt.indexOf(st[gt])<0&&Object.prototype.propertyIsEnumerable.call(et,st[gt])&&(ht[st[gt]]=et[st[gt]]);return ht};const Tt=(0,Ut.forwardRef)((et,nt)=>{const{prefixCls:ht,bordered:st=!0,size:gt,disabled:vt,status:wt,allowClear:Ft,showCount:It,classNames:At,rootClassName:Wt,className:re}=et,ne=Be(et,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:me,direction:Vt}=Ut.useContext(Nt.E_),Le=(0,we.Z)(gt),he=Ut.useContext(Ie.Z),Ge=vt!=null?vt:he,{status:Ke,hasFeedback:Ve,feedbackIcon:sn}=Ut.useContext(qt.aM),Mn=(0,pe.F)(Ke,wt),xe=Ut.useRef(null);Ut.useImperativeHandle(nt,()=>{var ze;return{resizableTextArea:(ze=xe.current)===null||ze===void 0?void 0:ze.resizableTextArea,focus:Te=>{var dn,Hn;(0,ce.n)((Hn=(dn=xe.current)===null||dn===void 0?void 0:dn.resizableTextArea)===null||Hn===void 0?void 0:Hn.textArea,Te)},blur:()=>{var Te;return(Te=xe.current)===null||Te===void 0?void 0:Te.blur()}}});const Ht=me("input",ht);let Je;typeof Ft=="object"&&(Ft!=null&&Ft.clearIcon)?Je=Ft:Ft&&(Je={clearIcon:Ut.createElement(Ot.Z,null)});const[Tn,An]=(0,Ce.ZP)(Ht);return Tn(Ut.createElement(Me.default,Object.assign({},ne,{disabled:Ge,allowClear:Je,className:Qt()(re,Wt),classes:{affixWrapper:Qt()(`${Ht}-textarea-affix-wrapper`,{[`${Ht}-affix-wrapper-rtl`]:Vt==="rtl",[`${Ht}-affix-wrapper-borderless`]:!st,[`${Ht}-affix-wrapper-sm`]:Le==="small",[`${Ht}-affix-wrapper-lg`]:Le==="large",[`${Ht}-textarea-show-count`]:It},(0,pe.Z)(`${Ht}-affix-wrapper`,Mn),An)},classNames:Object.assign(Object.assign({},At),{textarea:Qt()({[`${Ht}-borderless`]:!st,[`${Ht}-sm`]:Le==="small",[`${Ht}-lg`]:Le==="large"},(0,pe.Z)(Ht,Mn),An,At==null?void 0:At.textarea)}),prefixCls:Ht,suffix:Ve&&Ut.createElement("span",{className:`${Ht}-textarea-suffix`},sn),showCount:It,ref:xe})))});yn.Z=Tt},59412:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return jt}});var Ot=xt(59301);function jt(Qt,Me){const Ut=(0,Ot.useRef)([]),pe=()=>{Ut.current.push(setTimeout(()=>{var Nt,Ie,we,qt;!((Nt=Qt.current)===null||Nt===void 0)&&Nt.input&&((Ie=Qt.current)===null||Ie===void 0?void 0:Ie.input.getAttribute("type"))==="password"&&(!((we=Qt.current)===null||we===void 0)&&we.input.hasAttribute("value"))&&((qt=Qt.current)===null||qt===void 0||qt.input.removeAttribute("value"))}))};return(0,Ot.useEffect)(()=>(Me&&pe(),()=>Ut.current.forEach(Nt=>{Nt&&clearTimeout(Nt)})),[]),pe}},92832:function(En,yn,xt){"use strict";xt.d(yn,{default:function(){return Le}});var Ot=xt(92310),jt=xt.n(Ot),Qt=xt(59301),Me=xt(36355),Ut=xt(32441),pe=xt(9937),Ie=he=>{const{getPrefixCls:Ge,direction:Ke}=(0,Qt.useContext)(Me.E_),{prefixCls:Ve,className:sn}=he,Mn=Ge("input-group",Ve),xe=Ge("input"),[Ht,Je]=(0,pe.ZP)(xe),Tn=jt()(Mn,{[`${Mn}-lg`]:he.size==="large",[`${Mn}-sm`]:he.size==="small",[`${Mn}-compact`]:he.compact,[`${Mn}-rtl`]:Ke==="rtl"},Je,sn),An=(0,Qt.useContext)(Ut.aM),ze=(0,Qt.useMemo)(()=>Object.assign(Object.assign({},An),{isFormItemInput:!1}),[An]);return Ht(Qt.createElement("span",{className:Tn,style:he.style,onMouseEnter:he.onMouseEnter,onMouseLeave:he.onMouseLeave,onFocus:he.onFocus,onBlur:he.onBlur},Qt.createElement(Ut.aM.Provider,{value:ze},he.children)))},we=xt(9432),qt=xt(73331),ce=xt(15277),Ce=xt(2738),Be=xt(8654),Tt=xt(59412),et=function(he,Ge){var Ke={};for(var Ve in he)Object.prototype.hasOwnProperty.call(he,Ve)&&Ge.indexOf(Ve)<0&&(Ke[Ve]=he[Ve]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var sn=0,Ve=Object.getOwnPropertySymbols(he);sn<Ve.length;sn++)Ge.indexOf(Ve[sn])<0&&Object.prototype.propertyIsEnumerable.call(he,Ve[sn])&&(Ke[Ve[sn]]=he[Ve[sn]]);return Ke};const nt=he=>he?Qt.createElement(ce.Z,null):Qt.createElement(qt.Z,null),ht={click:"onClick",hover:"onMouseOver"};var gt=Qt.forwardRef((he,Ge)=>{const{visibilityToggle:Ke=!0}=he,Ve=typeof Ke=="object"&&Ke.visible!==void 0,[sn,Mn]=(0,Qt.useState)(()=>Ve?Ke.visible:!1),xe=(0,Qt.useRef)(null);Qt.useEffect(()=>{Ve&&Mn(Ke.visible)},[Ve,Ke]);const Ht=(0,Tt.Z)(xe),Je=()=>{const{disabled:Pn}=he;Pn||(sn&&Ht(),Mn(Ne=>{var Pe;const ie=!Ne;return typeof Ke=="object"&&((Pe=Ke.onVisibleChange)===null||Pe===void 0||Pe.call(Ke,ie)),ie}))},Tn=Pn=>{const{action:Ne="click",iconRender:Pe=nt}=he,ie=ht[Ne]||"",Dt=Pe(sn),fe={[ie]:Je,className:`${Pn}-icon`,key:"passwordIcon",onMouseDown:Se=>{Se.preventDefault()},onMouseUp:Se=>{Se.preventDefault()}};return Qt.cloneElement(Qt.isValidElement(Dt)?Dt:Qt.createElement("span",null,Dt),fe)},{className:An,prefixCls:ze,inputPrefixCls:Te,size:dn}=he,Hn=et(he,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:hn}=Qt.useContext(Me.E_),pn=hn("input",Te),de=hn("input-password",ze),vn=Ke&&Tn(de),bn=jt()(de,An,{[`${de}-${dn}`]:!!dn}),Qe=Object.assign(Object.assign({},(0,Ce.Z)(Hn,["suffix","iconRender","visibilityToggle"])),{type:sn?"text":"password",className:bn,prefixCls:pn,suffix:vn});return dn&&(Qe.size=dn),Qt.createElement(we.Z,Object.assign({ref:(0,Be.sQ)(Ge,xe)},Qe))}),vt=xt(47472),wt=xt(92343),Ft=xt(3113),It=xt(19716),At=xt(33234),Wt=function(he,Ge){var Ke={};for(var Ve in he)Object.prototype.hasOwnProperty.call(he,Ve)&&Ge.indexOf(Ve)<0&&(Ke[Ve]=he[Ve]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var sn=0,Ve=Object.getOwnPropertySymbols(he);sn<Ve.length;sn++)Ge.indexOf(Ve[sn])<0&&Object.prototype.propertyIsEnumerable.call(he,Ve[sn])&&(Ke[Ve[sn]]=he[Ve[sn]]);return Ke},ne=Qt.forwardRef((he,Ge)=>{const{prefixCls:Ke,inputPrefixCls:Ve,className:sn,size:Mn,suffix:xe,enterButton:Ht=!1,addonAfter:Je,loading:Tn,disabled:An,onSearch:ze,onChange:Te,onCompositionStart:dn,onCompositionEnd:Hn}=he,hn=Wt(he,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:pn,direction:de}=Qt.useContext(Me.E_),vn=Qt.useRef(!1),bn=pn("input-search",Ke),Qe=pn("input",Ve),{compactSize:Pn}=(0,At.ri)(bn,de),Ne=(0,It.Z)(Yt=>{var $e;return($e=Mn!=null?Mn:Pn)!==null&&$e!==void 0?$e:Yt}),Pe=Qt.useRef(null),ie=Yt=>{Yt&&Yt.target&&Yt.type==="click"&&ze&&ze(Yt.target.value,Yt,{source:"clear"}),Te&&Te(Yt)},Dt=Yt=>{var $e;document.activeElement===(($e=Pe.current)===null||$e===void 0?void 0:$e.input)&&Yt.preventDefault()},fe=Yt=>{var $e,ln;ze&&ze((ln=($e=Pe.current)===null||$e===void 0?void 0:$e.input)===null||ln===void 0?void 0:ln.value,Yt,{source:"input"})},Se=Yt=>{vn.current||Tn||fe(Yt)},ee=typeof Ht=="boolean"?Qt.createElement(vt.Z,null):null,Kt=`${bn}-button`;let kt;const St=Ht||{},mt=St.type&&St.type.__ANT_BUTTON===!0;mt||St.type==="button"?kt=(0,wt.Tm)(St,Object.assign({onMouseDown:Dt,onClick:Yt=>{var $e,ln;(ln=($e=St==null?void 0:St.props)===null||$e===void 0?void 0:$e.onClick)===null||ln===void 0||ln.call($e,Yt),fe(Yt)},key:"enterButton"},mt?{className:Kt,size:Ne}:{})):kt=Qt.createElement(Ft.ZP,{className:Kt,type:Ht?"primary":void 0,size:Ne,disabled:An,key:"enterButton",onMouseDown:Dt,onClick:fe,loading:Tn,icon:ee},Ht),Je&&(kt=[kt,(0,wt.Tm)(Je,{key:"addonAfter"})]);const Lt=jt()(bn,{[`${bn}-rtl`]:de==="rtl",[`${bn}-${Ne}`]:!!Ne,[`${bn}-with-button`]:!!Ht},sn),zt=Yt=>{vn.current=!0,dn==null||dn(Yt)},Et=Yt=>{vn.current=!1,Hn==null||Hn(Yt)};return Qt.createElement(we.Z,Object.assign({ref:(0,Be.sQ)(Pe,Ge),onPressEnter:Se},hn,{size:Ne,onCompositionStart:zt,onCompositionEnd:Et,prefixCls:Qe,addonAfter:kt,suffix:xe,onChange:ie,className:Lt,disabled:An}))}),me=xt(1643);const Vt=we.Z;Vt.Group=Ie,Vt.Search=ne,Vt.TextArea=me.Z,Vt.Password=gt;var Le=Vt},45818:function(En,yn,xt){"use strict";xt.d(yn,{D:function(){return vt},Z:function(){return It}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(Wt,re){return jt.createElement(Ut.Z,(0,Ot.Z)({},Wt,{ref:re,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt,we=xt(33853),qt=xt(38819),ce=xt(92310),Ce=xt.n(ce),Be=xt(2738),et=At=>!isNaN(parseFloat(At))&&isFinite(At),nt=xt(36355),ht=xt(84966),st=function(At,Wt){var re={};for(var ne in At)Object.prototype.hasOwnProperty.call(At,ne)&&Wt.indexOf(ne)<0&&(re[ne]=At[ne]);if(At!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,ne=Object.getOwnPropertySymbols(At);me<ne.length;me++)Wt.indexOf(ne[me])<0&&Object.prototype.propertyIsEnumerable.call(At,ne[me])&&(re[ne[me]]=At[ne[me]]);return re};const gt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},vt=jt.createContext({}),wt=(()=>{let At=0;return function(){let Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return At+=1,`${Wt}${At}`}})();var It=jt.forwardRef((At,Wt)=>{const{prefixCls:re,className:ne,trigger:me,children:Vt,defaultCollapsed:Le=!1,theme:he="dark",style:Ge={},collapsible:Ke=!1,reverseArrow:Ve=!1,width:sn=200,collapsedWidth:Mn=80,zeroWidthTriggerStyle:xe,breakpoint:Ht,onCollapse:Je,onBreakpoint:Tn}=At,An=st(At,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:ze}=(0,jt.useContext)(ht.Gs),[Te,dn]=(0,jt.useState)("collapsed"in At?At.collapsed:Le),[Hn,hn]=(0,jt.useState)(!1);(0,jt.useEffect)(()=>{"collapsed"in At&&dn(At.collapsed)},[At.collapsed]);const pn=(Ne,Pe)=>{"collapsed"in At||dn(Ne),Je==null||Je(Ne,Pe)},de=(0,jt.useRef)();de.current=Ne=>{hn(Ne.matches),Tn==null||Tn(Ne.matches),Te!==Ne.matches&&pn(Ne.matches,"responsive")},(0,jt.useEffect)(()=>{function Ne(ie){return de.current(ie)}let Pe;if(typeof window!="undefined"){const{matchMedia:ie}=window;if(ie&&Ht&&Ht in gt){Pe=ie(`(max-width: ${gt[Ht]})`);try{Pe.addEventListener("change",Ne)}catch(Dt){Pe.addListener(Ne)}Ne(Pe)}}return()=>{try{Pe==null||Pe.removeEventListener("change",Ne)}catch(ie){Pe==null||Pe.removeListener(Ne)}}},[Ht]),(0,jt.useEffect)(()=>{const Ne=wt("ant-sider-");return ze.addSider(Ne),()=>ze.removeSider(Ne)},[]);const vn=()=>{pn(!Te,"clickTrigger")},{getPrefixCls:bn}=(0,jt.useContext)(nt.E_),Qe=()=>{const Ne=bn("layout-sider",re),Pe=(0,Be.Z)(An,["collapsed"]),ie=Te?Mn:sn,Dt=et(ie)?`${ie}px`:String(ie),fe=parseFloat(String(Mn||0))===0?jt.createElement("span",{onClick:vn,className:Ce()(`${Ne}-zero-width-trigger`,`${Ne}-zero-width-trigger-${Ve?"right":"left"}`),style:xe},me||jt.createElement(Ie,null)):null,Kt={expanded:Ve?jt.createElement(qt.Z,null):jt.createElement(we.Z,null),collapsed:Ve?jt.createElement(we.Z,null):jt.createElement(qt.Z,null)}[Te?"collapsed":"expanded"],kt=me!==null?fe||jt.createElement("div",{className:`${Ne}-trigger`,onClick:vn,style:{width:Dt}},me||Kt):null,St=Object.assign(Object.assign({},Ge),{flex:`0 0 ${Dt}`,maxWidth:Dt,minWidth:Dt,width:Dt}),mt=Ce()(Ne,`${Ne}-${he}`,{[`${Ne}-collapsed`]:!!Te,[`${Ne}-has-trigger`]:Ke&&me!==null&&!fe,[`${Ne}-below`]:!!Hn,[`${Ne}-zero-width`]:parseFloat(Dt)===0},ne);return jt.createElement("aside",Object.assign({className:mt},Pe,{style:St,ref:Wt}),jt.createElement("div",{className:`${Ne}-children`},Vt),Ke||Hn&&fe?kt:null)},Pn=jt.useMemo(()=>({siderCollapsed:Te}),[Te]);return jt.createElement(vt.Provider,{value:Pn},Qe())})},84966:function(En,yn,xt){"use strict";xt.d(yn,{VY:function(){return vt},$_:function(){return gt},h4:function(){return st},Gs:function(){return Be},ZP:function(){return wt}});var Ot=xt(80702),jt=xt(92310),Qt=xt.n(jt),Me=xt(2738),Ut=xt(59301),pe=xt(36355),Nt=xt(83116),we=Ft=>{const{componentCls:It,bodyBg:At,lightSiderBg:Wt,lightTriggerBg:re,lightTriggerColor:ne}=Ft;return{[`${It}-sider-light`]:{background:Wt,[`${It}-sider-trigger`]:{color:ne,background:re},[`${It}-sider-zero-width-trigger`]:{color:ne,background:re,border:`1px solid ${At}`,borderInlineStart:0}}}};const qt=Ft=>{const{antCls:It,componentCls:At,colorText:Wt,triggerColor:re,footerBg:ne,triggerBg:me,headerHeight:Vt,headerPadding:Le,headerColor:he,footerPadding:Ge,triggerHeight:Ke,zeroTriggerHeight:Ve,zeroTriggerWidth:sn,motionDurationMid:Mn,motionDurationSlow:xe,fontSize:Ht,borderRadius:Je,bodyBg:Tn,headerBg:An,siderBg:ze}=Ft;return{[At]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Tn,"&, *":{boxSizing:"border-box"},[`&${At}-has-sider`]:{flexDirection:"row",[`> ${At}, > ${At}-content`]:{width:0}},[`${At}-header, &${At}-footer`]:{flex:"0 0 auto"},[`${At}-sider`]:{position:"relative",minWidth:0,background:ze,transition:`all ${Mn}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${It}-menu${It}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:Ke},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:Ke,color:re,lineHeight:`${Ke}px`,textAlign:"center",background:me,cursor:"pointer",transition:`all ${Mn}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Vt,insetInlineEnd:-sn,zIndex:1,width:sn,height:Ve,color:re,fontSize:Ft.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:ze,borderStartStartRadius:0,borderStartEndRadius:Je,borderEndEndRadius:Je,borderEndStartRadius:0,cursor:"pointer",transition:`background ${xe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${xe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-sn,borderStartStartRadius:Je,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Je}}}}},we(Ft)),{"&-rtl":{direction:"rtl"}}),[`${At}-header`]:{height:Vt,padding:Le,color:he,lineHeight:`${Vt}px`,background:An,[`${It}-menu`]:{lineHeight:"inherit"}},[`${At}-footer`]:{padding:Ge,color:Wt,fontSize:Ht,background:ne},[`${At}-content`]:{flex:"auto",minHeight:0}}};var ce=(0,Nt.Z)("Layout",Ft=>[qt(Ft)],Ft=>{const{colorBgLayout:It,controlHeight:At,controlHeightLG:Wt,colorText:re,controlHeightSM:ne,marginXXS:me,colorTextLightSolid:Vt,colorBgContainer:Le}=Ft,he=Wt*1.25;return{colorBgHeader:"#001529",colorBgBody:It,colorBgTrigger:"#002140",bodyBg:It,headerBg:"#001529",headerHeight:At*2,headerPadding:`0 ${he}px`,headerColor:re,footerPadding:`${ne}px ${he}px`,footerBg:It,siderBg:"#001529",triggerHeight:Wt+me*2,triggerBg:"#002140",triggerColor:Vt,zeroTriggerWidth:Wt,zeroTriggerHeight:Wt,lightSiderBg:Le,lightTriggerBg:Le,lightTriggerColor:re}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),Ce=function(Ft,It){var At={};for(var Wt in Ft)Object.prototype.hasOwnProperty.call(Ft,Wt)&&It.indexOf(Wt)<0&&(At[Wt]=Ft[Wt]);if(Ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var re=0,Wt=Object.getOwnPropertySymbols(Ft);re<Wt.length;re++)It.indexOf(Wt[re])<0&&Object.prototype.propertyIsEnumerable.call(Ft,Wt[re])&&(At[Wt[re]]=Ft[Wt[re]]);return At};const Be=Ut.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Tt(Ft){let{suffixCls:It,tagName:At,displayName:Wt}=Ft;return re=>Ut.forwardRef((me,Vt)=>Ut.createElement(re,Object.assign({ref:Vt,suffixCls:It,tagName:At},me)))}const et=Ut.forwardRef((Ft,It)=>{const{prefixCls:At,suffixCls:Wt,className:re,tagName:ne}=Ft,me=Ce(Ft,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Vt}=Ut.useContext(pe.E_),Le=Vt("layout",At),[he,Ge]=ce(Le),Ke=Wt?`${Le}-${Wt}`:Le;return he(Ut.createElement(ne,Object.assign({className:Qt()(At||Ke,re,Ge),ref:It},me)))}),nt=Ut.forwardRef((Ft,It)=>{const{direction:At}=Ut.useContext(pe.E_),[Wt,re]=Ut.useState([]),{prefixCls:ne,className:me,rootClassName:Vt,children:Le,hasSider:he,tagName:Ge,style:Ke}=Ft,Ve=Ce(Ft,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),sn=(0,Me.Z)(Ve,["suffixCls"]),{getPrefixCls:Mn,layout:xe}=Ut.useContext(pe.E_),Ht=Mn("layout",ne),[Je,Tn]=ce(Ht),An=Qt()(Ht,{[`${Ht}-has-sider`]:typeof he=="boolean"?he:Wt.length>0,[`${Ht}-rtl`]:At==="rtl"},xe==null?void 0:xe.className,me,Vt,Tn),ze=Ut.useMemo(()=>({siderHook:{addSider:Te=>{re(dn=>[].concat((0,Ot.Z)(dn),[Te]))},removeSider:Te=>{re(dn=>dn.filter(Hn=>Hn!==Te))}}}),[]);return Je(Ut.createElement(Be.Provider,{value:ze},Ut.createElement(Ge,Object.assign({ref:It,className:An,style:Object.assign(Object.assign({},xe==null?void 0:xe.style),Ke)},sn),Le)))}),ht=Tt({tagName:"div",displayName:"Layout"})(nt),st=Tt({suffixCls:"header",tagName:"header",displayName:"Header"})(et),gt=Tt({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(et),vt=Tt({suffixCls:"content",tagName:"main",displayName:"Content"})(et);var wt=ht},40875:function(En,yn,xt){"use strict";xt.d(yn,{J:function(){return pe}});var Ot=xt(59301),jt=xt(33234),Qt=xt(70425),Me=function(Nt,Ie){var we={};for(var qt in Nt)Object.prototype.hasOwnProperty.call(Nt,qt)&&Ie.indexOf(qt)<0&&(we[qt]=Nt[qt]);if(Nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,qt=Object.getOwnPropertySymbols(Nt);ce<qt.length;ce++)Ie.indexOf(qt[ce])<0&&Object.prototype.propertyIsEnumerable.call(Nt,qt[ce])&&(we[qt[ce]]=Nt[qt[ce]]);return we};const Ut=Ot.createContext(null),pe=Ot.forwardRef((Nt,Ie)=>{const{children:we}=Nt,qt=Me(Nt,["children"]),ce=Ot.useContext(Ut),Ce=Ot.useMemo(()=>Object.assign(Object.assign({},ce),qt),[ce,qt.prefixCls,qt.mode,qt.selectable]);return Ot.createElement(Ut.Provider,{value:Ce},Ot.createElement(jt.BR,null,(0,Qt.supportNodeRef)(we)?Ot.cloneElement(we,{ref:Ie}):we))});yn.Z=Ut},20834:function(En,yn,xt){"use strict";xt.d(yn,{default:function(){return Pn}});var Ot=xt(15285),jt=xt(59301),Qt=xt(45818),Me=xt(92310),Ut=xt.n(Me),pe=xt(36355),Nt=function(Ne,Pe){var ie={};for(var Dt in Ne)Object.prototype.hasOwnProperty.call(Ne,Dt)&&Pe.indexOf(Dt)<0&&(ie[Dt]=Ne[Dt]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fe=0,Dt=Object.getOwnPropertySymbols(Ne);fe<Dt.length;fe++)Pe.indexOf(Dt[fe])<0&&Object.prototype.propertyIsEnumerable.call(Ne,Dt[fe])&&(ie[Dt[fe]]=Ne[Dt[fe]]);return ie},we=Ne=>{const{prefixCls:Pe,className:ie,dashed:Dt}=Ne,fe=Nt(Ne,["prefixCls","className","dashed"]),{getPrefixCls:Se}=jt.useContext(pe.E_),ee=Se("menu",Pe),Kt=Ut()({[`${ee}-item-divider-dashed`]:!!Dt},ie);return jt.createElement(Ot.iz,Object.assign({className:Kt},fe))},qt=xt(11592),ce=xt(2738),Ce=xt(6848),Be=xt(92343),et=(0,jt.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ht=Ne=>{var Pe;const{className:ie,children:Dt,icon:fe,title:Se,danger:ee}=Ne,{prefixCls:Kt,firstLevel:kt,direction:St,disableMenuItemTitleTooltip:mt,inlineCollapsed:Lt}=jt.useContext(et),zt=Nn=>{const ai=jt.createElement("span",{className:`${Kt}-title-content`},Dt);return(!fe||(0,Be.l$)(Dt)&&Dt.type==="span")&&Dt&&Nn&&kt&&typeof Dt=="string"?jt.createElement("div",{className:`${Kt}-inline-collapsed-noicon`},Dt.charAt(0)):ai},{siderCollapsed:Et}=jt.useContext(Qt.D);let Yt=Se;typeof Se=="undefined"?Yt=kt?Dt:"":Se===!1&&(Yt="");const $e={title:Yt};!Et&&!Lt&&($e.title=null,$e.open=!1);const ln=(0,qt.Z)(Dt).length;let qe=jt.createElement(Ot.ck,Object.assign({},(0,ce.Z)(Ne,["title","icon","danger"]),{className:Ut()({[`${Kt}-item-danger`]:ee,[`${Kt}-item-only-child`]:(fe?ln+1:ln)===1},ie),title:typeof Se=="string"?Se:void 0}),(0,Be.Tm)(fe,{className:Ut()((0,Be.l$)(fe)?(Pe=fe.props)===null||Pe===void 0?void 0:Pe.className:"",`${Kt}-item-icon`)}),zt(Lt));return mt||(qe=jt.createElement(Ce.Z,Object.assign({},$e,{placement:St==="rtl"?"left":"right",overlayClassName:`${Kt}-inline-collapsed-tooltip`}),qe)),qe},gt=Ne=>{var Pe;const{popupClassName:ie,icon:Dt,title:fe,theme:Se}=Ne,ee=jt.useContext(et),{prefixCls:Kt,inlineCollapsed:kt,theme:St}=ee,mt=(0,Ot.Xl)();let Lt;if(!Dt)Lt=kt&&!mt.length&&fe&&typeof fe=="string"?jt.createElement("div",{className:`${Kt}-inline-collapsed-noicon`},fe.charAt(0)):jt.createElement("span",{className:`${Kt}-title-content`},fe);else{const Et=(0,Be.l$)(fe)&&fe.type==="span";Lt=jt.createElement(jt.Fragment,null,(0,Be.Tm)(Dt,{className:Ut()((0,Be.l$)(Dt)?(Pe=Dt.props)===null||Pe===void 0?void 0:Pe.className:"",`${Kt}-item-icon`)}),Et?fe:jt.createElement("span",{className:`${Kt}-title-content`},fe))}const zt=jt.useMemo(()=>Object.assign(Object.assign({},ee),{firstLevel:!1}),[ee]);return jt.createElement(et.Provider,{value:zt},jt.createElement(Ot.Wd,Object.assign({},(0,ce.Z)(Ne,["icon"]),{title:Lt,popupClassName:Ut()(Kt,ie,`${Kt}-${Se||St}`)})))},vt=xt(18785),wt=xt(70425),Ft=xt(62892),It=xt(40875),At=function(Ne,Pe){var ie={};for(var Dt in Ne)Object.prototype.hasOwnProperty.call(Ne,Dt)&&Pe.indexOf(Dt)<0&&(ie[Dt]=Ne[Dt]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fe=0,Dt=Object.getOwnPropertySymbols(Ne);fe<Dt.length;fe++)Pe.indexOf(Dt[fe])<0&&Object.prototype.propertyIsEnumerable.call(Ne,Dt[fe])&&(ie[Dt[fe]]=Ne[Dt[fe]]);return ie};function Wt(Ne){return(Ne||[]).map((Pe,ie)=>{if(Pe&&typeof Pe=="object"){const Dt=Pe,{label:fe,children:Se,key:ee,type:Kt}=Dt,kt=At(Dt,["label","children","key","type"]),St=ee!=null?ee:`tmp-${ie}`;return Se||Kt==="group"?Kt==="group"?jt.createElement(Ot.BW,Object.assign({key:St},kt,{title:fe}),Wt(Se)):jt.createElement(gt,Object.assign({key:St},kt,{title:fe}),Wt(Se)):Kt==="divider"?jt.createElement(we,Object.assign({key:St},kt)):jt.createElement(ht,Object.assign({key:St},kt),fe)}return null}).filter(Pe=>Pe)}function re(Ne){return jt.useMemo(()=>Ne&&Wt(Ne),[Ne])}var ne=xt(64993),me=xt(17313),Vt=xt(8378),Le=xt(13826),he=xt(29878),Ge=xt(83116),Ke=xt(37613),sn=Ne=>{const{componentCls:Pe,motionDurationSlow:ie,horizontalLineHeight:Dt,colorSplit:fe,lineWidth:Se,lineType:ee,itemPaddingInline:Kt}=Ne;return{[`${Pe}-horizontal`]:{lineHeight:Dt,border:0,borderBottom:`${Se}px ${ee} ${fe}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Pe}-item, ${Pe}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Kt},[`> ${Pe}-item:hover,
|
|
|
> ${Pe}-item-active,
|
|
|
> ${Pe}-submenu ${Pe}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Pe}-item, ${Pe}-submenu-title`]:{transition:[`border-color ${ie}`,`background ${ie}`].join(",")},[`${Pe}-submenu-arrow`]:{display:"none"}}}},xe=Ne=>{let{componentCls:Pe,menuArrowOffset:ie}=Ne;return{[`${Pe}-rtl`]:{direction:"rtl"},[`${Pe}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Pe}-rtl${Pe}-vertical,
|
|
|
${Pe}-submenu-rtl ${Pe}-vertical`]:{[`${Pe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${ie})`},"&::after":{transform:`rotate(45deg) translateY(${ie})`}}}}};const Ht=Ne=>Object.assign({},(0,me.oN)(Ne));var Tn=(Ne,Pe)=>{const{componentCls:ie,itemColor:Dt,itemSelectedColor:fe,groupTitleColor:Se,itemBg:ee,subMenuItemBg:Kt,itemSelectedBg:kt,activeBarHeight:St,activeBarWidth:mt,activeBarBorderWidth:Lt,motionDurationSlow:zt,motionEaseInOut:Et,motionEaseOut:Yt,itemPaddingInline:$e,motionDurationMid:ln,itemHoverColor:qe,lineType:Nn,colorSplit:ai,itemDisabledColor:Kn,dangerItemColor:ci,dangerItemHoverColor:Ci,dangerItemSelectedColor:Wi,dangerItemActiveBg:Oi,dangerItemSelectedBg:mo,itemHoverBg:Bo,itemActiveBg:Ao,menuSubMenuBg:oi,horizontalItemSelectedColor:fi,horizontalItemSelectedBg:di,horizontalItemBorderRadius:mi,horizontalItemHoverBg:co,popupBg:Sn}=Ne;return{[`${ie}-${Pe}, ${ie}-${Pe} > ${ie}`]:{color:Dt,background:ee,[`&${ie}-root:focus-visible`]:Object.assign({},Ht(Ne)),[`${ie}-item-group-title`]:{color:Se},[`${ie}-submenu-selected`]:{[`> ${ie}-submenu-title`]:{color:fe}},[`${ie}-item-disabled, ${ie}-submenu-disabled`]:{color:`${Kn} !important`},[`${ie}-item:not(${ie}-item-selected):not(${ie}-submenu-selected)`]:{[`&:hover, > ${ie}-submenu-title:hover`]:{color:qe}},[`&:not(${ie}-horizontal)`]:{[`${ie}-item:not(${ie}-item-selected)`]:{"&:hover":{backgroundColor:Bo},"&:active":{backgroundColor:Ao}},[`${ie}-submenu-title`]:{"&:hover":{backgroundColor:Bo},"&:active":{backgroundColor:Ao}}},[`${ie}-item-danger`]:{color:ci,[`&${ie}-item:hover`]:{[`&:not(${ie}-item-selected):not(${ie}-submenu-selected)`]:{color:Ci}},[`&${ie}-item:active`]:{background:Oi}},[`${ie}-item a`]:{"&, &:hover":{color:"inherit"}},[`${ie}-item-selected`]:{color:fe,[`&${ie}-item-danger`]:{color:Wi},"a, a:hover":{color:"inherit"}},[`& ${ie}-item-selected`]:{backgroundColor:kt,[`&${ie}-item-danger`]:{backgroundColor:mo}},[`${ie}-item, ${ie}-submenu-title`]:{[`&:not(${ie}-item-disabled):focus-visible`]:Object.assign({},Ht(Ne))},[`&${ie}-submenu > ${ie}`]:{backgroundColor:oi},[`&${ie}-popup > ${ie}`]:{backgroundColor:Sn},[`&${ie}-horizontal`]:Object.assign(Object.assign({},Pe==="dark"?{borderBottom:0}:{}),{[`> ${ie}-item, > ${ie}-submenu`]:{top:Lt,marginTop:-Lt,marginBottom:0,borderRadius:mi,"&::after":{position:"absolute",insetInline:$e,bottom:0,borderBottom:`${St}px solid transparent`,transition:`border-color ${zt} ${Et}`,content:'""'},"&:hover, &-active, &-open":{background:co,"&::after":{borderBottomWidth:St,borderBottomColor:fi}},"&-selected":{color:fi,backgroundColor:di,"&:hover":{backgroundColor:di},"&::after":{borderBottomWidth:St,borderBottomColor:fi}}}}),[`&${ie}-root`]:{[`&${ie}-inline, &${ie}-vertical`]:{borderInlineEnd:`${Lt}px ${Nn} ${ai}`}},[`&${ie}-inline`]:{[`${ie}-sub${ie}-inline`]:{background:Kt},[`${ie}-item, ${ie}-submenu-title`]:Lt&&mt?{width:`calc(100% + ${Lt}px)`}:{},[`${ie}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${mt}px solid ${fe}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${ln} ${Yt}`,`opacity ${ln} ${Yt}`].join(","),content:'""'},[`&${ie}-item-danger`]:{"&::after":{borderInlineEndColor:Wi}}},[`${ie}-selected, ${ie}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${ln} ${Et}`,`opacity ${ln} ${Et}`].join(",")}}}}}};const An=Ne=>{const{componentCls:Pe,itemHeight:ie,itemMarginInline:Dt,padding:fe,menuArrowSize:Se,marginXS:ee,itemMarginBlock:Kt}=Ne,kt=fe+Se+ee;return{[`${Pe}-item`]:{position:"relative",overflow:"hidden"},[`${Pe}-item, ${Pe}-submenu-title`]:{height:ie,lineHeight:`${ie}px`,paddingInline:fe,overflow:"hidden",textOverflow:"ellipsis",marginInline:Dt,marginBlock:Kt,width:`calc(100% - ${Dt*2}px)`},[`> ${Pe}-item,
|
|
|
> ${Pe}-submenu > ${Pe}-submenu-title`]:{height:ie,lineHeight:`${ie}px`},[`${Pe}-item-group-list ${Pe}-submenu-title,
|
|
|
${Pe}-submenu-title`]:{paddingInlineEnd:kt}}};var Te=Ne=>{const{componentCls:Pe,iconCls:ie,itemHeight:Dt,colorTextLightSolid:fe,dropdownWidth:Se,controlHeightLG:ee,motionDurationMid:Kt,motionEaseOut:kt,paddingXL:St,itemMarginInline:mt,fontSizeLG:Lt,motionDurationSlow:zt,paddingXS:Et,boxShadowSecondary:Yt,collapsedWidth:$e,collapsedIconSize:ln}=Ne,qe={height:Dt,lineHeight:`${Dt}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Pe]:{"&-inline, &-vertical":Object.assign({[`&${Pe}-root`]:{boxShadow:"none"}},An(Ne))},[`${Pe}-submenu-popup`]:{[`${Pe}-vertical`]:Object.assign(Object.assign({},An(Ne)),{boxShadow:Yt})}},{[`${Pe}-submenu-popup ${Pe}-vertical${Pe}-sub`]:{minWidth:Se,maxHeight:`calc(100vh - ${ee*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Pe}-inline`]:{width:"100%",[`&${Pe}-root`]:{[`${Pe}-item, ${Pe}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${zt}`,`background ${zt}`,`padding ${Kt} ${kt}`].join(","),[`> ${Pe}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Pe}-sub${Pe}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Pe}-submenu > ${Pe}-submenu-title`]:qe,[`& ${Pe}-item-group-title`]:{paddingInlineStart:St}},[`${Pe}-item`]:qe}},{[`${Pe}-inline-collapsed`]:{width:$e,[`&${Pe}-root`]:{[`${Pe}-item, ${Pe}-submenu ${Pe}-submenu-title`]:{[`> ${Pe}-inline-collapsed-noicon`]:{fontSize:Lt,textAlign:"center"}}},[`> ${Pe}-item,
|
|
|
> ${Pe}-item-group > ${Pe}-item-group-list > ${Pe}-item,
|
|
|
> ${Pe}-item-group > ${Pe}-item-group-list > ${Pe}-submenu > ${Pe}-submenu-title,
|
|
|
> ${Pe}-submenu > ${Pe}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Lt/2}px - ${mt}px)`,textOverflow:"clip",[`
|
|
|
${Pe}-submenu-arrow,
|
|
|
${Pe}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Pe}-item-icon, ${ie}`]:{margin:0,fontSize:ln,lineHeight:`${Dt}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Pe}-item-icon, ${ie}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Pe}-item-icon, ${ie}`]:{display:"none"},"a, a:hover":{color:fe}},[`${Pe}-item-group-title`]:Object.assign(Object.assign({},me.vS),{paddingInline:Et})}}]};const dn=Ne=>{const{componentCls:Pe,motionDurationSlow:ie,motionDurationMid:Dt,motionEaseInOut:fe,motionEaseOut:Se,iconCls:ee,iconSize:Kt,iconMarginInlineEnd:kt}=Ne;return{[`${Pe}-item, ${Pe}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${ie}`,`background ${ie}`,`padding ${ie} ${fe}`].join(","),[`${Pe}-item-icon, ${ee}`]:{minWidth:Kt,fontSize:Kt,transition:[`font-size ${Dt} ${Se}`,`margin ${ie} ${fe}`,`color ${ie}`].join(","),"+ span":{marginInlineStart:kt,opacity:1,transition:[`opacity ${ie} ${fe}`,`margin ${ie}`,`color ${ie}`].join(",")}},[`${Pe}-item-icon`]:Object.assign({},(0,me.Ro)()),[`&${Pe}-item-only-child`]:{[`> ${ee}, > ${Pe}-item-icon`]:{marginInlineEnd:0}}},[`${Pe}-item-disabled, ${Pe}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Pe}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Hn=Ne=>{const{componentCls:Pe,motionDurationSlow:ie,motionEaseInOut:Dt,borderRadius:fe,menuArrowSize:Se,menuArrowOffset:ee}=Ne;return{[`${Pe}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Ne.margin,width:Se,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${ie} ${Dt}, opacity ${ie}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Se*.6,height:Se*.15,backgroundColor:"currentcolor",borderRadius:fe,transition:[`background ${ie} ${Dt}`,`transform ${ie} ${Dt}`,`top ${ie} ${Dt}`,`color ${ie} ${Dt}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${ee})`},"&::after":{transform:`rotate(-45deg) translateY(${ee})`}}}}},hn=Ne=>{const{antCls:Pe,componentCls:ie,fontSize:Dt,motionDurationSlow:fe,motionDurationMid:Se,motionEaseInOut:ee,paddingXS:Kt,padding:kt,colorSplit:St,lineWidth:mt,zIndexPopup:Lt,borderRadiusLG:zt,subMenuItemBorderRadius:Et,menuArrowSize:Yt,menuArrowOffset:$e,lineType:ln,menuPanelMaskInset:qe,groupTitleLineHeight:Nn,groupTitleFontSize:ai}=Ne;return[{"":{[`${ie}`]:Object.assign(Object.assign({},(0,me.dF)()),{"&-hidden":{display:"none"}})},[`${ie}-submenu-hidden`]:{display:"none"}},{[ie]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,me.Wf)(Ne)),(0,me.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:Dt,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${fe} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${ie}-item`]:{flex:"none"}},[`${ie}-item, ${ie}-submenu, ${ie}-submenu-title`]:{borderRadius:Ne.itemBorderRadius},[`${ie}-item-group-title`]:{padding:`${Kt}px ${kt}px`,fontSize:ai,lineHeight:Nn,transition:`all ${fe}`},[`&-horizontal ${ie}-submenu`]:{transition:[`border-color ${fe} ${ee}`,`background ${fe} ${ee}`].join(",")},[`${ie}-submenu, ${ie}-submenu-inline`]:{transition:[`border-color ${fe} ${ee}`,`background ${fe} ${ee}`,`padding ${Se} ${ee}`].join(",")},[`${ie}-submenu ${ie}-sub`]:{cursor:"initial",transition:[`background ${fe} ${ee}`,`padding ${fe} ${ee}`].join(",")},[`${ie}-title-content`]:{transition:`color ${fe}`},[`${ie}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${ie}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:St,borderStyle:ln,borderWidth:0,borderTopWidth:mt,marginBlock:mt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),dn(Ne)),{[`${ie}-item-group`]:{[`${ie}-item-group-list`]:{margin:0,padding:0,[`${ie}-item, ${ie}-submenu-title`]:{paddingInline:`${Dt*2}px ${kt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Lt,borderRadius:zt,boxShadow:"none",transformOrigin:"0 0",[`&${ie}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${qe}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:qe},"\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:Ne.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Ne.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Ne.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Ne.paddingXS},[`> ${ie}`]:Object.assign(Object.assign(Object.assign({borderRadius:zt},dn(Ne)),Hn(Ne)),{[`${ie}-item, ${ie}-submenu > ${ie}-submenu-title`]:{borderRadius:Et},[`${ie}-submenu-title::after`]:{transition:`transform ${fe} ${ee}`}})}}),Hn(Ne)),{[`&-inline-collapsed ${ie}-submenu-arrow,
|
|
|
&-inline ${ie}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${$e})`},"&::after":{transform:`rotate(45deg) translateX(-${$e})`}},[`${ie}-submenu-open${ie}-submenu-inline > ${ie}-submenu-title > ${ie}-submenu-arrow`]:{transform:`translateY(-${Yt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${$e})`},"&::before":{transform:`rotate(45deg) translateX(${$e})`}}})},{[`${Pe}-layout-header`]:{[ie]:{lineHeight:"inherit"}}}]};var pn=(Ne,Pe)=>(0,Ge.Z)("Menu",Dt=>{if(Pe===!1)return[];const{colorBgElevated:fe,colorPrimary:Se,colorTextLightSolid:ee,controlHeightLG:Kt,fontSize:kt,darkItemColor:St,darkDangerItemColor:mt,darkItemBg:Lt,darkSubMenuItemBg:zt,darkItemSelectedColor:Et,darkItemSelectedBg:Yt,darkDangerItemSelectedBg:$e,darkItemHoverBg:ln,darkGroupTitleColor:qe,darkItemHoverColor:Nn,darkItemDisabledColor:ai,darkDangerItemHoverColor:Kn,darkDangerItemSelectedColor:ci,darkDangerItemActiveBg:Ci}=Dt,Wi=kt/7*5,Oi=(0,Ke.TS)(Dt,{menuArrowSize:Wi,menuHorizontalHeight:Kt*1.15,menuArrowOffset:`${Wi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:fe}),mo=(0,Ke.TS)(Oi,{itemColor:St,itemHoverColor:Nn,groupTitleColor:qe,itemSelectedColor:Et,itemBg:Lt,popupBg:Lt,subMenuItemBg:zt,itemActiveBg:"transparent",itemSelectedBg:Yt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:ln,itemDisabledColor:ai,dangerItemColor:mt,dangerItemHoverColor:Kn,dangerItemSelectedColor:ci,dangerItemActiveBg:Ci,dangerItemSelectedBg:$e,menuSubMenuBg:zt,horizontalItemSelectedColor:ee,horizontalItemSelectedBg:Se});return[hn(Oi),sn(Oi),Te(Oi),Tn(Oi,"light"),Tn(mo,"dark"),xe(Oi),(0,Vt.Z)(Oi),(0,Le.oN)(Oi,"slide-up"),(0,Le.oN)(Oi,"slide-down"),(0,he._y)(Oi,"zoom-big")]},Dt=>{const{colorPrimary:fe,colorError:Se,colorTextDisabled:ee,colorErrorBg:Kt,colorText:kt,colorTextDescription:St,colorBgContainer:mt,colorFillAlter:Lt,colorFillContent:zt,lineWidth:Et,lineWidthBold:Yt,controlItemBgActive:$e,colorBgTextHover:ln,controlHeightLG:qe,lineHeight:Nn,colorBgElevated:ai,marginXXS:Kn,padding:ci,fontSize:Ci,controlHeightSM:Wi,fontSizeLG:Oi,colorTextLightSolid:mo,colorErrorHover:Bo}=Dt,Ao=new ne.C(mo).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Dt.zIndexPopupBase+50,radiusItem:Dt.borderRadiusLG,itemBorderRadius:Dt.borderRadiusLG,radiusSubMenuItem:Dt.borderRadiusSM,subMenuItemBorderRadius:Dt.borderRadiusSM,colorItemText:kt,itemColor:kt,colorItemTextHover:kt,itemHoverColor:kt,colorItemTextHoverHorizontal:fe,horizontalItemHoverColor:fe,colorGroupTitle:St,groupTitleColor:St,colorItemTextSelected:fe,itemSelectedColor:fe,colorItemTextSelectedHorizontal:fe,horizontalItemSelectedColor:fe,colorItemBg:mt,itemBg:mt,colorItemBgHover:ln,itemHoverBg:ln,colorItemBgActive:zt,itemActiveBg:$e,colorSubItemBg:Lt,subMenuItemBg:Lt,colorItemBgSelected:$e,itemSelectedBg:$e,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Yt,activeBarHeight:Yt,colorActiveBarBorderSize:Et,activeBarBorderWidth:Et,colorItemTextDisabled:ee,itemDisabledColor:ee,colorDangerItemText:Se,dangerItemColor:Se,colorDangerItemTextHover:Se,dangerItemHoverColor:Se,colorDangerItemTextSelected:Se,dangerItemSelectedColor:Se,colorDangerItemBgActive:Kt,dangerItemActiveBg:Kt,colorDangerItemBgSelected:Kt,dangerItemSelectedBg:Kt,itemMarginInline:Dt.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:qe,groupTitleLineHeight:Nn,collapsedWidth:qe*2,popupBg:ai,itemMarginBlock:Kn,itemPaddingInline:ci,horizontalLineHeight:`${qe*1.15}px`,iconSize:Ci,iconMarginInlineEnd:Wi-Ci,collapsedIconSize:Oi,groupTitleFontSize:Ci,darkItemDisabledColor:new ne.C(mo).setAlpha(.25).toRgbString(),darkItemColor:Ao,darkDangerItemColor:Se,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:mo,darkItemSelectedBg:fe,darkDangerItemSelectedBg:Se,darkItemHoverBg:"transparent",darkGroupTitleColor:Ao,darkItemHoverColor:mo,darkDangerItemHoverColor:Bo,darkDangerItemSelectedColor:mo,darkDangerItemActiveBg:Se}},{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"]]})(Ne),de=function(Ne,Pe){var ie={};for(var Dt in Ne)Object.prototype.hasOwnProperty.call(Ne,Dt)&&Pe.indexOf(Dt)<0&&(ie[Dt]=Ne[Dt]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fe=0,Dt=Object.getOwnPropertySymbols(Ne);fe<Dt.length;fe++)Pe.indexOf(Dt[fe])<0&&Object.prototype.propertyIsEnumerable.call(Ne,Dt[fe])&&(ie[Dt[fe]]=Ne[Dt[fe]]);return ie},bn=(0,jt.forwardRef)((Ne,Pe)=>{var ie,Dt;const fe=jt.useContext(It.Z),Se=fe||{},{getPrefixCls:ee,getPopupContainer:Kt,direction:kt,menu:St}=jt.useContext(pe.E_),mt=ee(),{prefixCls:Lt,className:zt,style:Et,theme:Yt="light",expandIcon:$e,_internalDisableMenuItemTitleTooltip:ln,inlineCollapsed:qe,siderCollapsed:Nn,items:ai,children:Kn,rootClassName:ci,mode:Ci,selectable:Wi,onClick:Oi,overflowedIndicatorPopupClassName:mo}=Ne,Bo=de(Ne,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Ao=(0,ce.Z)(Bo,["collapsedWidth"]),oi=re(ai)||Kn;(ie=Se.validator)===null||ie===void 0||ie.call(Se,{mode:Ci});const fi=(0,wt.useEvent)(function(){var si;Oi==null||Oi.apply(void 0,arguments),(si=Se.onClick)===null||si===void 0||si.call(Se)}),di=Se.mode||Ci,mi=Wi!=null?Wi:Se.selectable,co=jt.useMemo(()=>Nn!==void 0?Nn:qe,[qe,Nn]),Sn={horizontal:{motionName:`${mt}-slide-up`},inline:(0,Ft.Z)(mt),other:{motionName:`${mt}-zoom-big`}},Ct=ee("menu",Lt||Se.prefixCls),[Yn,yi]=pn(Ct,!fe),_e=Ut()(`${Ct}-${Yt}`,St==null?void 0:St.className,zt);let Wn;if(typeof $e=="function")Wn=$e;else if($e===null||$e===!1)Wn=null;else if(Se.expandIcon===null||Se.expandIcon===!1)Wn=null;else{const si=$e!=null?$e:Se.expandIcon;Wn=(0,Be.Tm)(si,{className:Ut()(`${Ct}-submenu-expand-icon`,(0,Be.l$)(si)?(Dt=si.props)===null||Dt===void 0?void 0:Dt.className:"")})}const _n=jt.useMemo(()=>({prefixCls:Ct,inlineCollapsed:co||!1,direction:kt,firstLevel:!0,theme:Yt,mode:di,disableMenuItemTitleTooltip:ln}),[Ct,co,kt,ln,Yt]);return Yn(jt.createElement(It.Z.Provider,{value:null},jt.createElement(et.Provider,{value:_n},jt.createElement(Ot.ZP,Object.assign({getPopupContainer:Kt,overflowedIndicator:jt.createElement(vt.Z,null),overflowedIndicatorPopupClassName:Ut()(Ct,`${Ct}-${Yt}`,mo),mode:di,selectable:mi,onClick:fi},Ao,{inlineCollapsed:co,style:Object.assign(Object.assign({},St==null?void 0:St.style),Et),className:_e,prefixCls:Ct,direction:kt,defaultMotions:Sn,expandIcon:Wn,ref:Pe,rootClassName:Ut()(ci,yi)}),oi))))});const Qe=(0,jt.forwardRef)((Ne,Pe)=>{const ie=(0,jt.useRef)(null),Dt=jt.useContext(Qt.D);return(0,jt.useImperativeHandle)(Pe,()=>({menu:ie.current,focus:fe=>{var Se;(Se=ie.current)===null||Se===void 0||Se.focus(fe)}})),jt.createElement(bn,Object.assign({ref:ie},Ne,Dt))});Qe.Item=ht,Qe.SubMenu=gt,Qe.Divider=we,Qe.ItemGroup=Ot.BW;var Pn=Qe},58421:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Se}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(Kt,kt){return jt.createElement(Ut.Z,(0,Ot.Z)({},Kt,{ref:kt,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt,we=xt(49198),qt=xt(33853),ce=xt(38819),Ce=xt(92310),Be=xt.n(Ce),Tt=xt(49618),et=xt(77321),nt=xt(96949),ht=xt(55090),st=xt(77205),gt=xt(38793),vt=xt(26112),wt={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Ft=wt,It=xt(91735),At=function(ee){(0,st.Z)(kt,ee);var Kt=(0,gt.Z)(kt);function kt(){var St;(0,nt.Z)(this,kt);for(var mt=arguments.length,Lt=new Array(mt),zt=0;zt<mt;zt++)Lt[zt]=arguments[zt];return St=Kt.call.apply(Kt,[this].concat(Lt)),St.state={goInputText:""},St.getValidValue=function(){var Et=St.state.goInputText;return!Et||Number.isNaN(Et)?void 0:Number(Et)},St.buildOptionText=function(Et){return"".concat(Et," ").concat(St.props.locale.items_per_page)},St.changeSize=function(Et){St.props.changeSize(Number(Et))},St.handleChange=function(Et){St.setState({goInputText:Et.target.value})},St.handleBlur=function(Et){var Yt=St.props,$e=Yt.goButton,ln=Yt.quickGo,qe=Yt.rootPrefixCls,Nn=St.state.goInputText;$e||Nn===""||(St.setState({goInputText:""}),!(Et.relatedTarget&&(Et.relatedTarget.className.indexOf("".concat(qe,"-item-link"))>=0||Et.relatedTarget.className.indexOf("".concat(qe,"-item"))>=0))&&ln(St.getValidValue()))},St.go=function(Et){var Yt=St.state.goInputText;Yt!==""&&(Et.keyCode===Ft.ENTER||Et.type==="click")&&(St.setState({goInputText:""}),St.props.quickGo(St.getValidValue()))},St}return(0,ht.Z)(kt,[{key:"getPageSizeOptions",value:function(){var mt=this.props,Lt=mt.pageSize,zt=mt.pageSizeOptions;return zt.some(function(Et){return Et.toString()===Lt.toString()})?zt:zt.concat([Lt.toString()]).sort(function(Et,Yt){var $e=Number.isNaN(Number(Et))?0:Number(Et),ln=Number.isNaN(Number(Yt))?0:Number(Yt);return $e-ln})}},{key:"render",value:function(){var mt=this,Lt=this.props,zt=Lt.pageSize,Et=Lt.locale,Yt=Lt.rootPrefixCls,$e=Lt.changeSize,ln=Lt.quickGo,qe=Lt.goButton,Nn=Lt.selectComponentClass,ai=Lt.buildOptionText,Kn=Lt.selectPrefixCls,ci=Lt.disabled,Ci=this.state.goInputText,Wi="".concat(Yt,"-options"),Oi=Nn,mo=null,Bo=null,Ao=null;if(!$e&&!ln)return null;var oi=this.getPageSizeOptions();if($e&&Oi){var fi=oi.map(function(di,mi){return jt.createElement(Oi.Option,{key:mi,value:di.toString()},(ai||mt.buildOptionText)(di))});mo=jt.createElement(Oi,{disabled:ci,prefixCls:Kn,showSearch:!1,className:"".concat(Wi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(zt||oi[0]).toString(),onChange:this.changeSize,getPopupContainer:function(mi){return mi.parentNode},"aria-label":Et.page_size,defaultOpen:!1},fi)}return ln&&(qe&&(Ao=typeof qe=="boolean"?jt.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:ci,className:"".concat(Wi,"-quick-jumper-button")},Et.jump_to_confirm):jt.createElement("span",{onClick:this.go,onKeyUp:this.go},qe)),Bo=jt.createElement("div",{className:"".concat(Wi,"-quick-jumper")},Et.jump_to,jt.createElement("input",{disabled:ci,type:"text",value:Ci,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Et.page}),Et.page,Ao)),jt.createElement("li",{className:"".concat(Wi)},mo,Bo)}}]),kt}(jt.Component);At.defaultProps={pageSizeOptions:["10","20","50","100"]};var Wt=At,re=function(Kt){var kt,St=Kt.rootPrefixCls,mt=Kt.page,Lt=Kt.active,zt=Kt.className,Et=Kt.showTitle,Yt=Kt.onClick,$e=Kt.onKeyPress,ln=Kt.itemRender,qe="".concat(St,"-item"),Nn=Be()(qe,"".concat(qe,"-").concat(mt),(kt={},(0,Tt.Z)(kt,"".concat(qe,"-active"),Lt),(0,Tt.Z)(kt,"".concat(qe,"-disabled"),!mt),(0,Tt.Z)(kt,Kt.className,zt),kt)),ai=function(){Yt(mt)},Kn=function(Wi){$e(Wi,Yt,mt)},ci=ln(mt,"page",jt.createElement("a",{rel:"nofollow"},mt));return ci?jt.createElement("li",{title:Et?mt.toString():null,className:Nn,onClick:ai,onKeyPress:Kn,tabIndex:0},ci):null},ne=re;function me(){}function Vt(ee){var Kt=Number(ee);return typeof Kt=="number"&&!Number.isNaN(Kt)&&isFinite(Kt)&&Math.floor(Kt)===Kt}var Le=function(Kt,kt,St){return St};function he(ee,Kt,kt){var St=typeof ee=="undefined"?Kt.pageSize:ee;return Math.floor((kt.total-1)/St)+1}var Ge=function(ee){(0,st.Z)(kt,ee);var Kt=(0,gt.Z)(kt);function kt(St){var mt;(0,nt.Z)(this,kt),mt=Kt.call(this,St),mt.paginationNode=jt.createRef(),mt.getJumpPrevPage=function(){return Math.max(1,mt.state.current-(mt.props.showLessItems?3:5))},mt.getJumpNextPage=function(){return Math.min(he(void 0,mt.state,mt.props),mt.state.current+(mt.props.showLessItems?3:5))},mt.getItemIcon=function($e,ln){var qe=mt.props.prefixCls,Nn=$e||jt.createElement("button",{type:"button","aria-label":ln,className:"".concat(qe,"-item-link")});return typeof $e=="function"&&(Nn=jt.createElement($e,(0,et.Z)({},mt.props))),Nn},mt.isValid=function($e){var ln=mt.props.total;return Vt($e)&&$e!==mt.state.current&&Vt(ln)&&ln>0},mt.shouldDisplayQuickJumper=function(){var $e=mt.props,ln=$e.showQuickJumper,qe=$e.total,Nn=mt.state.pageSize;return qe<=Nn?!1:ln},mt.handleKeyDown=function($e){($e.keyCode===Ft.ARROW_UP||$e.keyCode===Ft.ARROW_DOWN)&&$e.preventDefault()},mt.handleKeyUp=function($e){var ln=mt.getValidValue($e),qe=mt.state.currentInputValue;ln!==qe&&mt.setState({currentInputValue:ln}),$e.keyCode===Ft.ENTER?mt.handleChange(ln):$e.keyCode===Ft.ARROW_UP?mt.handleChange(ln-1):$e.keyCode===Ft.ARROW_DOWN&&mt.handleChange(ln+1)},mt.handleBlur=function($e){var ln=mt.getValidValue($e);mt.handleChange(ln)},mt.changePageSize=function($e){var ln=mt.state.current,qe=he($e,mt.state,mt.props);ln=ln>qe?qe:ln,qe===0&&(ln=mt.state.current),typeof $e=="number"&&("pageSize"in mt.props||mt.setState({pageSize:$e}),"current"in mt.props||mt.setState({current:ln,currentInputValue:ln})),mt.props.onShowSizeChange(ln,$e),"onChange"in mt.props&&mt.props.onChange&&mt.props.onChange(ln,$e)},mt.handleChange=function($e){var ln=mt.props,qe=ln.disabled,Nn=ln.onChange,ai=mt.state,Kn=ai.pageSize,ci=ai.current,Ci=ai.currentInputValue;if(mt.isValid($e)&&!qe){var Wi=he(void 0,mt.state,mt.props),Oi=$e;return $e>Wi?Oi=Wi:$e<1&&(Oi=1),"current"in mt.props||mt.setState({current:Oi}),Oi!==Ci&&mt.setState({currentInputValue:Oi}),Nn(Oi,Kn),Oi}return ci},mt.prev=function(){mt.hasPrev()&&mt.handleChange(mt.state.current-1)},mt.next=function(){mt.hasNext()&&mt.handleChange(mt.state.current+1)},mt.jumpPrev=function(){mt.handleChange(mt.getJumpPrevPage())},mt.jumpNext=function(){mt.handleChange(mt.getJumpNextPage())},mt.hasPrev=function(){return mt.state.current>1},mt.hasNext=function(){return mt.state.current<he(void 0,mt.state,mt.props)},mt.runIfEnter=function($e,ln){if($e.key==="Enter"||$e.charCode===13){for(var qe=arguments.length,Nn=new Array(qe>2?qe-2:0),ai=2;ai<qe;ai++)Nn[ai-2]=arguments[ai];ln.apply(void 0,Nn)}},mt.runIfEnterPrev=function($e){mt.runIfEnter($e,mt.prev)},mt.runIfEnterNext=function($e){mt.runIfEnter($e,mt.next)},mt.runIfEnterJumpPrev=function($e){mt.runIfEnter($e,mt.jumpPrev)},mt.runIfEnterJumpNext=function($e){mt.runIfEnter($e,mt.jumpNext)},mt.handleGoTO=function($e){($e.keyCode===Ft.ENTER||$e.type==="click")&&mt.handleChange(mt.state.currentInputValue)},mt.renderPrev=function($e){var ln=mt.props,qe=ln.prevIcon,Nn=ln.itemRender,ai=Nn($e,"prev",mt.getItemIcon(qe,"prev page")),Kn=!mt.hasPrev();return(0,jt.isValidElement)(ai)?(0,jt.cloneElement)(ai,{disabled:Kn}):ai},mt.renderNext=function($e){var ln=mt.props,qe=ln.nextIcon,Nn=ln.itemRender,ai=Nn($e,"next",mt.getItemIcon(qe,"next page")),Kn=!mt.hasNext();return(0,jt.isValidElement)(ai)?(0,jt.cloneElement)(ai,{disabled:Kn}):ai};var Lt=St.onChange!==me,zt="current"in St;zt&&!Lt&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Et=St.defaultCurrent;"current"in St&&(Et=St.current);var Yt=St.defaultPageSize;return"pageSize"in St&&(Yt=St.pageSize),Et=Math.min(Et,he(Yt,void 0,St)),mt.state={current:Et,currentInputValue:Et,pageSize:Yt},mt}return(0,ht.Z)(kt,[{key:"componentDidUpdate",value:function(mt,Lt){var zt=this.props.prefixCls;if(Lt.current!==this.state.current&&this.paginationNode.current){var Et=this.paginationNode.current.querySelector(".".concat(zt,"-item-").concat(Lt.current));if(Et&&document.activeElement===Et){var Yt;Et==null||(Yt=Et.blur)===null||Yt===void 0||Yt.call(Et)}}}},{key:"getValidValue",value:function(mt){var Lt=mt.target.value,zt=he(void 0,this.state,this.props),Et=this.state.currentInputValue,Yt;return Lt===""?Yt=Lt:Number.isNaN(Number(Lt))?Yt=Et:Lt>=zt?Yt=zt:Yt=Number(Lt),Yt}},{key:"getShowSizeChanger",value:function(){var mt=this.props,Lt=mt.showSizeChanger,zt=mt.total,Et=mt.totalBoundaryShowSizeChanger;return typeof Lt!="undefined"?Lt:zt>Et}},{key:"render",value:function(){var mt=this.props,Lt=mt.prefixCls,zt=mt.className,Et=mt.style,Yt=mt.disabled,$e=mt.hideOnSinglePage,ln=mt.total,qe=mt.locale,Nn=mt.showQuickJumper,ai=mt.showLessItems,Kn=mt.showTitle,ci=mt.showTotal,Ci=mt.simple,Wi=mt.itemRender,Oi=mt.showPrevNextJumpers,mo=mt.jumpPrevIcon,Bo=mt.jumpNextIcon,Ao=mt.selectComponentClass,oi=mt.selectPrefixCls,fi=mt.pageSizeOptions,di=this.state,mi=di.current,co=di.pageSize,Sn=di.currentInputValue;if($e===!0&&ln<=co)return null;var Ct=he(void 0,this.state,this.props),Yn=[],yi=null,_e=null,Wn=null,_n=null,si=null,ri=Nn&&Nn.goButton,hi=ai?1:2,Fe=mi-1>0?mi-1:0,Ae=mi+1<Ct?mi+1:Ct,Zt=(0,vt.Z)(this.props,{aria:!0,data:!0}),He=ci&&jt.createElement("li",{className:"".concat(Lt,"-total-text")},ci(ln,[ln===0?0:(mi-1)*co+1,mi*co>ln?ln:mi*co]));if(Ci){ri&&(typeof ri=="boolean"?si=jt.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},qe.jump_to_confirm):si=jt.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ri),si=jt.createElement("li",{title:Kn?"".concat(qe.jump_to).concat(mi,"/").concat(Ct):null,className:"".concat(Lt,"-simple-pager")},si));var fn=this.renderPrev(Fe);return jt.createElement("ul",(0,Ot.Z)({className:Be()(Lt,"".concat(Lt,"-simple"),(0,Tt.Z)({},"".concat(Lt,"-disabled"),Yt),zt),style:Et,ref:this.paginationNode},Zt),He,fn?jt.createElement("li",{title:Kn?qe.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:Be()("".concat(Lt,"-prev"),(0,Tt.Z)({},"".concat(Lt,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},fn):null,jt.createElement("li",{title:Kn?"".concat(mi,"/").concat(Ct):null,className:"".concat(Lt,"-simple-pager")},jt.createElement("input",{type:"text",value:Sn,disabled:Yt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),jt.createElement("span",{className:"".concat(Lt,"-slash")},"/"),Ct),jt.createElement("li",{title:Kn?qe.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:Be()("".concat(Lt,"-next"),(0,Tt.Z)({},"".concat(Lt,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ae)),si)}if(Ct<=3+hi*2){var ye={locale:qe,rootPrefixCls:Lt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Kn,itemRender:Wi};Ct||Yn.push(jt.createElement(ne,(0,Ot.Z)({},ye,{key:"noPager",page:1,className:"".concat(Lt,"-item-disabled")})));for(var ae=1;ae<=Ct;ae+=1){var Ye=mi===ae;Yn.push(jt.createElement(ne,(0,Ot.Z)({},ye,{key:ae,page:ae,active:Ye})))}}else{var gn=ai?qe.prev_3:qe.prev_5,In=ai?qe.next_3:qe.next_5,Re=Wi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(mo,"prev page")),_t=Wi(this.getJumpNextPage(),"jump-next",this.getItemIcon(Bo,"next page"));Oi&&(yi=Re?jt.createElement("li",{title:Kn?gn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:Be()("".concat(Lt,"-jump-prev"),(0,Tt.Z)({},"".concat(Lt,"-jump-prev-custom-icon"),!!mo))},Re):null,_e=_t?jt.createElement("li",{title:Kn?In:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:Be()("".concat(Lt,"-jump-next"),(0,Tt.Z)({},"".concat(Lt,"-jump-next-custom-icon"),!!Bo))},_t):null),_n=jt.createElement(ne,{locale:qe,last:!0,rootPrefixCls:Lt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ct,page:Ct,active:!1,showTitle:Kn,itemRender:Wi}),Wn=jt.createElement(ne,{locale:qe,rootPrefixCls:Lt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Kn,itemRender:Wi});var nn=Math.max(1,mi-hi),cn=Math.min(mi+hi,Ct);mi-1<=hi&&(cn=1+hi*2),Ct-mi<=hi&&(nn=Ct-hi*2);for(var Bn=nn;Bn<=cn;Bn+=1){var Oe=mi===Bn;Yn.push(jt.createElement(ne,{locale:qe,rootPrefixCls:Lt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Bn,page:Bn,active:Oe,showTitle:Kn,itemRender:Wi}))}mi-1>=hi*2&&mi!==3&&(Yn[0]=(0,jt.cloneElement)(Yn[0],{className:"".concat(Lt,"-item-after-jump-prev")}),Yn.unshift(yi)),Ct-mi>=hi*2&&mi!==Ct-2&&(Yn[Yn.length-1]=(0,jt.cloneElement)(Yn[Yn.length-1],{className:"".concat(Lt,"-item-before-jump-next")}),Yn.push(_e)),nn!==1&&Yn.unshift(Wn),cn!==Ct&&Yn.push(_n)}var Xe=!this.hasPrev()||!Ct,Gn=!this.hasNext()||!Ct,Xn=this.renderPrev(Fe),Jn=this.renderNext(Ae);return jt.createElement("ul",(0,Ot.Z)({className:Be()(Lt,zt,(0,Tt.Z)({},"".concat(Lt,"-disabled"),Yt)),style:Et,ref:this.paginationNode},Zt),He,Xn?jt.createElement("li",{title:Kn?qe.prev_page:null,onClick:this.prev,tabIndex:Xe?null:0,onKeyPress:this.runIfEnterPrev,className:Be()("".concat(Lt,"-prev"),(0,Tt.Z)({},"".concat(Lt,"-disabled"),Xe)),"aria-disabled":Xe},Xn):null,Yn,Jn?jt.createElement("li",{title:Kn?qe.next_page:null,onClick:this.next,tabIndex:Gn?null:0,onKeyPress:this.runIfEnterNext,className:Be()("".concat(Lt,"-next"),(0,Tt.Z)({},"".concat(Lt,"-disabled"),Gn)),"aria-disabled":Gn},Jn):null,jt.createElement(Wt,{disabled:Yt,locale:qe,rootPrefixCls:Lt,selectComponentClass:Ao,selectPrefixCls:oi,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:mi,pageSize:co,pageSizeOptions:fi,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ri}))}}],[{key:"getDerivedStateFromProps",value:function(mt,Lt){var zt={};if("current"in mt&&(zt.current=mt.current,mt.current!==Lt.current&&(zt.currentInputValue=zt.current)),"pageSize"in mt&&mt.pageSize!==Lt.pageSize){var Et=Lt.current,Yt=he(mt.pageSize,Lt,mt);Et=Et>Yt?Yt:Et,"current"in mt||(zt.current=Et,zt.currentInputValue=Et),zt.pageSize=mt.pageSize}return zt}}]),kt}(jt.Component);Ge.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:me,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:me,locale:It.Z,style:{},itemRender:Le,totalBoundaryShowSizeChanger:50};var Ke=Ge,Ve=xt(22075),sn=xt(36355),Mn=xt(19716),xe=xt(8628),Ht=xt(9763),Je=xt(57809);const Tn=ee=>jt.createElement(Je.default,Object.assign({},ee,{showSearch:!0,size:"small"})),An=ee=>jt.createElement(Je.default,Object.assign({},ee,{showSearch:!0,size:"middle"}));Tn.Option=Je.default.Option,An.Option=Je.default.Option;var ze=xt(9937),Te=xt(17313),dn=xt(83116),Hn=xt(37613);const hn=ee=>{const{componentCls:Kt}=ee;return{[`${Kt}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Kt}-item-link`]:{color:ee.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Kt}-item-link`]:{color:ee.colorTextDisabled,cursor:"not-allowed"}}},[`&${Kt}-disabled`]:{cursor:"not-allowed",[`${Kt}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:ee.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:ee.colorBorder,backgroundColor:ee.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:ee.itemActiveBgDisabled},a:{color:ee.itemActiveColorDisabled}}},[`${Kt}-item-link`]:{color:ee.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Kt}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Kt}-simple-pager`]:{color:ee.colorTextDisabled},[`${Kt}-jump-prev, ${Kt}-jump-next`]:{[`${Kt}-item-link-icon`]:{opacity:0},[`${Kt}-item-ellipsis`]:{opacity:1}}},[`&${Kt}-simple`]:{[`${Kt}-prev, ${Kt}-next`]:{[`&${Kt}-disabled ${Kt}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},pn=ee=>{const{componentCls:Kt}=ee;return{[`&${Kt}-mini ${Kt}-total-text, &${Kt}-mini ${Kt}-simple-pager`]:{height:ee.itemSizeSM,lineHeight:`${ee.itemSizeSM}px`},[`&${Kt}-mini ${Kt}-item`]:{minWidth:ee.itemSizeSM,height:ee.itemSizeSM,margin:0,lineHeight:`${ee.itemSizeSM-2}px`},[`&${Kt}-mini:not(${Kt}-disabled) ${Kt}-item:not(${Kt}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:ee.colorBgTextHover},"&:active":{backgroundColor:ee.colorBgTextActive}},[`&${Kt}-mini ${Kt}-prev, &${Kt}-mini ${Kt}-next`]:{minWidth:ee.itemSizeSM,height:ee.itemSizeSM,margin:0,lineHeight:`${ee.itemSizeSM}px`},[`&${Kt}-mini:not(${Kt}-disabled)`]:{[`${Kt}-prev, ${Kt}-next`]:{[`&:hover ${Kt}-item-link`]:{backgroundColor:ee.colorBgTextHover},[`&:active ${Kt}-item-link`]:{backgroundColor:ee.colorBgTextActive},[`&${Kt}-disabled:hover ${Kt}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${Kt}-mini ${Kt}-prev ${Kt}-item-link,
|
|
|
&${Kt}-mini ${Kt}-next ${Kt}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:ee.itemSizeSM,lineHeight:`${ee.itemSizeSM}px`}},[`&${Kt}-mini ${Kt}-jump-prev, &${Kt}-mini ${Kt}-jump-next`]:{height:ee.itemSizeSM,marginInlineEnd:0,lineHeight:`${ee.itemSizeSM}px`},[`&${Kt}-mini ${Kt}-options`]:{marginInlineStart:ee.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:ee.miniOptionsSizeChangerTop},"&-quick-jumper":{height:ee.itemSizeSM,lineHeight:`${ee.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,ze.x0)(ee)),{width:ee.paginationMiniQuickJumperInputWidth,height:ee.controlHeightSM})}}}},de=ee=>{const{componentCls:Kt}=ee;return{[`
|
|
|
&${Kt}-simple ${Kt}-prev,
|
|
|
&${Kt}-simple ${Kt}-next
|
|
|
`]:{height:ee.itemSizeSM,lineHeight:`${ee.itemSizeSM}px`,verticalAlign:"top",[`${Kt}-item-link`]:{height:ee.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:ee.colorBgTextHover},"&:active":{backgroundColor:ee.colorBgTextActive},"&::after":{height:ee.itemSizeSM,lineHeight:`${ee.itemSizeSM}px`}}},[`&${Kt}-simple ${Kt}-simple-pager`]:{display:"inline-block",height:ee.itemSizeSM,marginInlineEnd:ee.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:ee.marginXS,padding:`0 ${ee.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:ee.itemInputBg,border:`${ee.lineWidth}px ${ee.lineType} ${ee.colorBorder}`,borderRadius:ee.borderRadius,outline:"none",transition:`border-color ${ee.motionDurationMid}`,color:"inherit","&:hover":{borderColor:ee.colorPrimary},"&:focus":{borderColor:ee.colorPrimaryHover,boxShadow:`${ee.inputOutlineOffset}px 0 ${ee.controlOutlineWidth}px ${ee.controlOutline}`},"&[disabled]":{color:ee.colorTextDisabled,backgroundColor:ee.colorBgContainerDisabled,borderColor:ee.colorBorder,cursor:"not-allowed"}}}}},vn=ee=>{const{componentCls:Kt}=ee;return{[`${Kt}-jump-prev, ${Kt}-jump-next`]:{outline:0,[`${Kt}-item-container`]:{position:"relative",[`${Kt}-item-link-icon`]:{color:ee.colorPrimary,fontSize:ee.fontSizeSM,opacity:0,transition:`all ${ee.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${Kt}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:ee.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:ee.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:ee.paginationEllipsisTextIndent,opacity:1,transition:`all ${ee.motionDurationMid}`}},"&:hover":{[`${Kt}-item-link-icon`]:{opacity:1},[`${Kt}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${Kt}-prev,
|
|
|
${Kt}-jump-prev,
|
|
|
${Kt}-jump-next
|
|
|
`]:{marginInlineEnd:ee.marginXS},[`
|
|
|
${Kt}-prev,
|
|
|
${Kt}-next,
|
|
|
${Kt}-jump-prev,
|
|
|
${Kt}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:ee.itemSize,height:ee.itemSize,color:ee.colorText,fontFamily:ee.fontFamily,lineHeight:`${ee.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:ee.borderRadius,cursor:"pointer",transition:`all ${ee.motionDurationMid}`},[`${Kt}-prev, ${Kt}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:ee.colorText,cursor:"pointer",userSelect:"none"},[`${Kt}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:ee.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${ee.lineWidth}px ${ee.lineType} transparent`,borderRadius:ee.borderRadius,outline:"none",transition:`all ${ee.motionDurationMid}`},[`&:hover ${Kt}-item-link`]:{backgroundColor:ee.colorBgTextHover},[`&:active ${Kt}-item-link`]:{backgroundColor:ee.colorBgTextActive},[`&${Kt}-disabled:hover`]:{[`${Kt}-item-link`]:{backgroundColor:"transparent"}}},[`${Kt}-slash`]:{marginInlineEnd:ee.paginationSlashMarginInlineEnd,marginInlineStart:ee.paginationSlashMarginInlineStart},[`${Kt}-options`]:{display:"inline-block",marginInlineStart:ee.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:ee.controlHeight,marginInlineStart:ee.marginXS,lineHeight:`${ee.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,ze.ik)(ee)),{width:ee.controlHeightLG*1.25,height:ee.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:ee.marginXS,marginInlineEnd:ee.marginXS})}}}},bn=ee=>{const{componentCls:Kt}=ee;return{[`${Kt}-item`]:{display:"inline-block",minWidth:ee.itemSize,height:ee.itemSize,marginInlineEnd:ee.marginXS,fontFamily:ee.fontFamily,lineHeight:`${ee.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${ee.lineWidth}px ${ee.lineType} transparent`,borderRadius:ee.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${ee.paginationItemPaddingInline}px`,color:ee.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${Kt}-item-active)`]:{"&:hover":{transition:`all ${ee.motionDurationMid}`,backgroundColor:ee.colorBgTextHover},"&:active":{backgroundColor:ee.colorBgTextActive}},"&-active":{fontWeight:ee.fontWeightStrong,backgroundColor:ee.itemActiveBg,borderColor:ee.colorPrimary,a:{color:ee.colorPrimary},"&:hover":{borderColor:ee.colorPrimaryHover},"&:hover a":{color:ee.colorPrimaryHover}}}}},Qe=ee=>{const{componentCls:Kt}=ee;return{[Kt]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Te.Wf)(ee)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${Kt}-total-text`]:{display:"inline-block",height:ee.itemSize,marginInlineEnd:ee.marginXS,lineHeight:`${ee.itemSize-2}px`,verticalAlign:"middle"}}),bn(ee)),vn(ee)),de(ee)),pn(ee)),hn(ee)),{[`@media only screen and (max-width: ${ee.screenLG}px)`]:{[`${Kt}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${ee.screenSM}px)`]:{[`${Kt}-options`]:{display:"none"}}}),[`&${ee.componentCls}-rtl`]:{direction:"rtl"}}},Pn=ee=>{const{componentCls:Kt}=ee;return{[`${Kt}${Kt}-disabled:not(${Kt}-mini)`]:{"&, &:hover":{[`${Kt}-item-link`]:{borderColor:ee.colorBorder}},"&:focus-visible":{[`${Kt}-item-link`]:{borderColor:ee.colorBorder}},[`${Kt}-item, ${Kt}-item-link`]:{backgroundColor:ee.colorBgContainerDisabled,borderColor:ee.colorBorder,[`&:hover:not(${Kt}-item-active)`]:{backgroundColor:ee.colorBgContainerDisabled,borderColor:ee.colorBorder,a:{color:ee.colorTextDisabled}},[`&${Kt}-item-active`]:{backgroundColor:ee.itemActiveBgDisabled}},[`${Kt}-prev, ${Kt}-next`]:{"&:hover button":{backgroundColor:ee.colorBgContainerDisabled,borderColor:ee.colorBorder,color:ee.colorTextDisabled},[`${Kt}-item-link`]:{backgroundColor:ee.colorBgContainerDisabled,borderColor:ee.colorBorder}}},[`${Kt}:not(${Kt}-mini)`]:{[`${Kt}-prev, ${Kt}-next`]:{"&:hover button":{borderColor:ee.colorPrimaryHover,backgroundColor:ee.itemBg},[`${Kt}-item-link`]:{backgroundColor:ee.itemLinkBg,borderColor:ee.colorBorder},[`&:hover ${Kt}-item-link`]:{borderColor:ee.colorPrimary,backgroundColor:ee.itemBg,color:ee.colorPrimary},[`&${Kt}-disabled`]:{[`${Kt}-item-link`]:{borderColor:ee.colorBorder,color:ee.colorTextDisabled}}},[`${Kt}-item`]:{backgroundColor:ee.itemBg,border:`${ee.lineWidth}px ${ee.lineType} ${ee.colorBorder}`,[`&:hover:not(${Kt}-item-active)`]:{borderColor:ee.colorPrimary,backgroundColor:ee.itemBg,a:{color:ee.colorPrimary}},"&-active":{borderColor:ee.colorPrimary}}}}},Ne=ee=>{const{componentCls:Kt}=ee;return{[`${Kt}:not(${Kt}-disabled)`]:{[`${Kt}-item`]:Object.assign({},(0,Te.Qy)(ee)),[`${Kt}-jump-prev, ${Kt}-jump-next`]:{"&:focus-visible":Object.assign({[`${Kt}-item-link-icon`]:{opacity:1},[`${Kt}-item-ellipsis`]:{opacity:0}},(0,Te.oN)(ee))},[`${Kt}-prev, ${Kt}-next`]:{[`&:focus-visible ${Kt}-item-link`]:Object.assign({},(0,Te.oN)(ee))}}}};var Pe=(0,dn.Z)("Pagination",ee=>{const Kt=(0,Hn.TS)(ee,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:ee.marginXXS/2,paginationMiniQuickJumperInputWidth:ee.controlHeightLG*1.1,paginationItemPaddingInline:ee.marginXXS*1.5,paginationEllipsisLetterSpacing:ee.marginXXS/2,paginationSlashMarginInlineStart:ee.marginXXS,paginationSlashMarginInlineEnd:ee.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,ze.e5)(ee),(0,ze.TM)(ee));return[Qe(Kt),Ne(Kt),ee.wireframe&&Pn(Kt)]},ee=>({itemBg:ee.colorBgContainer,itemSize:ee.controlHeight,itemSizeSM:ee.controlHeightSM,itemActiveBg:ee.colorBgContainer,itemLinkBg:ee.colorBgContainer,itemActiveColorDisabled:ee.colorTextDisabled,itemActiveBgDisabled:ee.controlItemBgActiveDisabled,itemInputBg:ee.colorBgContainer,miniOptionsSizeChangerTop:0})),ie=function(ee,Kt){var kt={};for(var St in ee)Object.prototype.hasOwnProperty.call(ee,St)&&Kt.indexOf(St)<0&&(kt[St]=ee[St]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,St=Object.getOwnPropertySymbols(ee);mt<St.length;mt++)Kt.indexOf(St[mt])<0&&Object.prototype.propertyIsEnumerable.call(ee,St[mt])&&(kt[St[mt]]=ee[St[mt]]);return kt},fe=ee=>{const{prefixCls:Kt,selectPrefixCls:kt,className:St,rootClassName:mt,style:Lt,size:zt,locale:Et,selectComponentClass:Yt,responsive:$e,showSizeChanger:ln}=ee,qe=ie(ee,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:Nn}=(0,xe.Z)($e),{getPrefixCls:ai,direction:Kn,pagination:ci={}}=jt.useContext(sn.E_),Ci=ai("pagination",Kt),[Wi,Oi]=Pe(Ci),mo=ln!=null?ln:ci.showSizeChanger,Bo=jt.useMemo(()=>{const Ct=jt.createElement("span",{className:`${Ci}-item-ellipsis`},"\u2022\u2022\u2022"),Yn=jt.createElement("button",{className:`${Ci}-item-link`,type:"button",tabIndex:-1},Kn==="rtl"?jt.createElement(ce.Z,null):jt.createElement(qt.Z,null)),yi=jt.createElement("button",{className:`${Ci}-item-link`,type:"button",tabIndex:-1},Kn==="rtl"?jt.createElement(qt.Z,null):jt.createElement(ce.Z,null)),_e=jt.createElement("a",{className:`${Ci}-item-link`},jt.createElement("div",{className:`${Ci}-item-container`},Kn==="rtl"?jt.createElement(we.Z,{className:`${Ci}-item-link-icon`}):jt.createElement(Ie,{className:`${Ci}-item-link-icon`}),Ct)),Wn=jt.createElement("a",{className:`${Ci}-item-link`},jt.createElement("div",{className:`${Ci}-item-container`},Kn==="rtl"?jt.createElement(Ie,{className:`${Ci}-item-link-icon`}):jt.createElement(we.Z,{className:`${Ci}-item-link-icon`}),Ct));return{prevIcon:Yn,nextIcon:yi,jumpPrevIcon:_e,jumpNextIcon:Wn}},[Kn,Ci]),[Ao]=(0,Ht.Z)("Pagination",Ve.Z),oi=Object.assign(Object.assign({},Ao),Et),fi=(0,Mn.Z)(zt),di=fi==="small"||!!(Nn&&!fi&&$e),mi=ai("select",kt),co=Be()({[`${Ci}-mini`]:di,[`${Ci}-rtl`]:Kn==="rtl"},ci==null?void 0:ci.className,St,mt,Oi),Sn=Object.assign(Object.assign({},ci==null?void 0:ci.style),Lt);return Wi(jt.createElement(Ke,Object.assign({},Bo,qe,{style:Sn,prefixCls:Ci,selectPrefixCls:mi,className:co,selectComponentClass:Yt||(di?Tn:An),locale:oi,showSizeChanger:mo})))},Se=fe},39722:function(En,yn,xt){"use strict";xt.d(yn,{t5:function(){return qt}});var Ot=xt(92310),jt=xt.n(Ot),Qt=xt(55477),Me=xt(59301),Ut=xt(36355),pe=xt(77578),Nt=xt(17356),Ie=function(Ce,Be){var Tt={};for(var et in Ce)Object.prototype.hasOwnProperty.call(Ce,et)&&Be.indexOf(et)<0&&(Tt[et]=Ce[et]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,et=Object.getOwnPropertySymbols(Ce);nt<et.length;nt++)Be.indexOf(et[nt])<0&&Object.prototype.propertyIsEnumerable.call(Ce,et[nt])&&(Tt[et[nt]]=Ce[et[nt]]);return Tt};const we=(Ce,Be,Tt)=>{if(!(!Be&&!Tt))return Me.createElement(Me.Fragment,null,Be&&Me.createElement("div",{className:`${Ce}-title`},(0,pe.Z)(Be)),Me.createElement("div",{className:`${Ce}-inner-content`},(0,pe.Z)(Tt)))},qt=Ce=>{const{hashId:Be,prefixCls:Tt,className:et,style:nt,placement:ht="top",title:st,content:gt,children:vt}=Ce;return Me.createElement("div",{className:jt()(Be,Tt,`${Tt}-pure`,`${Tt}-placement-${ht}`,et),style:nt},Me.createElement("div",{className:`${Tt}-arrow`}),Me.createElement(Qt.G,Object.assign({},Ce,{className:Be,prefixCls:Tt}),vt||we(Tt,st,gt)))},ce=Ce=>{const{prefixCls:Be}=Ce,Tt=Ie(Ce,["prefixCls"]),{getPrefixCls:et}=Me.useContext(Ut.E_),nt=et("popover",Be),[ht,st]=(0,Nt.Z)(nt);return ht(Me.createElement(qt,Object.assign({},Tt,{prefixCls:nt,hashId:st})))};yn.ZP=ce},60324:function(En,yn,xt){"use strict";var Ot=xt(92310),jt=xt.n(Ot),Qt=xt(59301),Me=xt(77578),Ut=xt(62892),pe=xt(36355),Nt=xt(6848),Ie=xt(39722),we=xt(17356),qt=function(Be,Tt){var et={};for(var nt in Be)Object.prototype.hasOwnProperty.call(Be,nt)&&Tt.indexOf(nt)<0&&(et[nt]=Be[nt]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,nt=Object.getOwnPropertySymbols(Be);ht<nt.length;ht++)Tt.indexOf(nt[ht])<0&&Object.prototype.propertyIsEnumerable.call(Be,nt[ht])&&(et[nt[ht]]=Be[nt[ht]]);return et};const ce=Be=>{let{title:Tt,content:et,prefixCls:nt}=Be;return Qt.createElement(Qt.Fragment,null,Tt&&Qt.createElement("div",{className:`${nt}-title`},(0,Me.Z)(Tt)),Qt.createElement("div",{className:`${nt}-inner-content`},(0,Me.Z)(et)))},Ce=Qt.forwardRef((Be,Tt)=>{const{prefixCls:et,title:nt,content:ht,overlayClassName:st,placement:gt="top",trigger:vt="hover",mouseEnterDelay:wt=.1,mouseLeaveDelay:Ft=.1,overlayStyle:It={}}=Be,At=qt(Be,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:Wt}=Qt.useContext(pe.E_),re=Wt("popover",et),[ne,me]=(0,we.Z)(re),Vt=Wt(),Le=jt()(st,me);return ne(Qt.createElement(Nt.Z,Object.assign({placement:gt,trigger:vt,mouseEnterDelay:wt,mouseLeaveDelay:Ft,overlayStyle:It},At,{prefixCls:re,overlayClassName:Le,ref:Tt,overlay:nt||ht?Qt.createElement(ce,{prefixCls:re,title:nt,content:ht}):null,transitionName:(0,Ut.m)(Vt,"zoom-big",At.transitionName),"data-popover-inject":!0})))});Ce._InternalPanelDoNotUseOrYouWillBeFired=Ie.ZP,yn.Z=Ce},17356:function(En,yn,xt){"use strict";var Ot=xt(17313),jt=xt(29878),Qt=xt(19447),Me=xt(33166),Ut=xt(83116),pe=xt(37613);const Nt=qt=>{const{componentCls:ce,popoverColor:Ce,minWidth:Be,fontWeightStrong:Tt,popoverPadding:et,boxShadowSecondary:nt,colorTextHeading:ht,borderRadiusLG:st,zIndexPopup:gt,marginXS:vt,colorBgElevated:wt,popoverBg:Ft}=qt;return[{[ce]:Object.assign(Object.assign({},(0,Ot.Wf)(qt)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:gt,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":wt,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${ce}-content`]:{position:"relative"},[`${ce}-inner`]:{backgroundColor:Ft,backgroundClip:"padding-box",borderRadius:st,boxShadow:nt,padding:et},[`${ce}-title`]:{minWidth:Be,marginBottom:vt,color:ht,fontWeight:Tt},[`${ce}-inner-content`]:{color:Ce}})},(0,Qt.ZP)(qt,{colorBg:"var(--antd-arrow-background-color)"}),{[`${ce}-pure`]:{position:"relative",maxWidth:"none",margin:qt.sizePopupArrow,display:"inline-block",[`${ce}-content`]:{display:"inline-block"}}}]},Ie=qt=>{const{componentCls:ce}=qt;return{[ce]:Me.i.map(Ce=>{const Be=qt[`${Ce}6`];return{[`&${ce}-${Ce}`]:{"--antd-arrow-background-color":Be,[`${ce}-inner`]:{backgroundColor:Be},[`${ce}-arrow`]:{background:"transparent"}}}})}},we=qt=>{const{componentCls:ce,lineWidth:Ce,lineType:Be,colorSplit:Tt,paddingSM:et,controlHeight:nt,fontSize:ht,lineHeight:st,padding:gt}=qt,vt=nt-Math.round(ht*st),wt=vt/2,Ft=vt/2-Ce,It=gt;return{[ce]:{[`${ce}-inner`]:{padding:0},[`${ce}-title`]:{margin:0,padding:`${wt}px ${It}px ${Ft}px`,borderBottom:`${Ce}px ${Be} ${Tt}`},[`${ce}-inner-content`]:{padding:`${et}px ${It}px`}}}};yn.Z=(0,Ut.Z)("Popover",qt=>{const{colorBgElevated:ce,colorText:Ce,wireframe:Be}=qt,Tt=(0,pe.TS)(qt,{popoverPadding:12,popoverBg:ce,popoverColor:Ce});return[Nt(Tt),Ie(Tt),Be&&we(Tt),(0,jt._y)(Tt,"zoom-big")]},qt=>({width:177,minWidth:177,zIndexPopup:qt.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},9122:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return hn}});var Ot=xt(59301),jt=xt(72308),Qt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},Me=Qt,Ut=xt(7657),pe=function(de,vn){return Ot.createElement(Ut.Z,(0,jt.Z)({},de,{ref:vn,icon:Me}))},Nt=Ot.forwardRef(pe),Ie=Nt,we=xt(92310),qt=xt.n(we),ce=Object.defineProperty,Ce=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,et=(pn,de,vn)=>de in pn?ce(pn,de,{enumerable:!0,configurable:!0,writable:!0,value:vn}):pn[de]=vn,nt=(pn,de)=>{for(var vn in de||(de={}))Be.call(de,vn)&&et(pn,vn,de[vn]);if(Ce)for(var vn of Ce(de))Tt.call(de,vn)&&et(pn,vn,de[vn]);return pn},ht=(pn,de)=>{var vn={};for(var bn in pn)Be.call(pn,bn)&&de.indexOf(bn)<0&&(vn[bn]=pn[bn]);if(pn!=null&&Ce)for(var bn of Ce(pn))de.indexOf(bn)<0&&Tt.call(pn,bn)&&(vn[bn]=pn[bn]);return vn};var st;(pn=>{const de=class{constructor(ie,Dt,fe,Se){if(this.version=ie,this.errorCorrectionLevel=Dt,this.modules=[],this.isFunction=[],ie<de.MIN_VERSION||ie>de.MAX_VERSION)throw new RangeError("Version value out of range");if(Se<-1||Se>7)throw new RangeError("Mask value out of range");this.size=ie*4+17;let ee=[];for(let kt=0;kt<this.size;kt++)ee.push(!1);for(let kt=0;kt<this.size;kt++)this.modules.push(ee.slice()),this.isFunction.push(ee.slice());this.drawFunctionPatterns();const Kt=this.addEccAndInterleave(fe);if(this.drawCodewords(Kt),Se==-1){let kt=1e9;for(let St=0;St<8;St++){this.applyMask(St),this.drawFormatBits(St);const mt=this.getPenaltyScore();mt<kt&&(Se=St,kt=mt),this.applyMask(St)}}Pn(0<=Se&&Se<=7),this.mask=Se,this.applyMask(Se),this.drawFormatBits(Se),this.isFunction=[]}static encodeText(ie,Dt){const fe=pn.QrSegment.makeSegments(ie);return de.encodeSegments(fe,Dt)}static encodeBinary(ie,Dt){const fe=pn.QrSegment.makeBytes(ie);return de.encodeSegments([fe],Dt)}static encodeSegments(ie,Dt,fe=1,Se=40,ee=-1,Kt=!0){if(!(de.MIN_VERSION<=fe&&fe<=Se&&Se<=de.MAX_VERSION)||ee<-1||ee>7)throw new RangeError("Invalid value");let kt,St;for(kt=fe;;kt++){const Et=de.getNumDataCodewords(kt,Dt)*8,Yt=Pe.getTotalBits(ie,kt);if(Yt<=Et){St=Yt;break}if(kt>=Se)throw new RangeError("Data too long")}for(const Et of[de.Ecc.MEDIUM,de.Ecc.QUARTILE,de.Ecc.HIGH])Kt&&St<=de.getNumDataCodewords(kt,Et)*8&&(Dt=Et);let mt=[];for(const Et of ie){bn(Et.mode.modeBits,4,mt),bn(Et.numChars,Et.mode.numCharCountBits(kt),mt);for(const Yt of Et.getData())mt.push(Yt)}Pn(mt.length==St);const Lt=de.getNumDataCodewords(kt,Dt)*8;Pn(mt.length<=Lt),bn(0,Math.min(4,Lt-mt.length),mt),bn(0,(8-mt.length%8)%8,mt),Pn(mt.length%8==0);for(let Et=236;mt.length<Lt;Et^=253)bn(Et,8,mt);let zt=[];for(;zt.length*8<mt.length;)zt.push(0);return mt.forEach((Et,Yt)=>zt[Yt>>>3]|=Et<<7-(Yt&7)),new de(kt,Dt,zt,ee)}getModule(ie,Dt){return 0<=ie&&ie<this.size&&0<=Dt&&Dt<this.size&&this.modules[Dt][ie]}getModules(){return this.modules}drawFunctionPatterns(){for(let fe=0;fe<this.size;fe++)this.setFunctionModule(6,fe,fe%2==0),this.setFunctionModule(fe,6,fe%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const ie=this.getAlignmentPatternPositions(),Dt=ie.length;for(let fe=0;fe<Dt;fe++)for(let Se=0;Se<Dt;Se++)fe==0&&Se==0||fe==0&&Se==Dt-1||fe==Dt-1&&Se==0||this.drawAlignmentPattern(ie[fe],ie[Se]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(ie){const Dt=this.errorCorrectionLevel.formatBits<<3|ie;let fe=Dt;for(let ee=0;ee<10;ee++)fe=fe<<1^(fe>>>9)*1335;const Se=(Dt<<10|fe)^21522;Pn(Se>>>15==0);for(let ee=0;ee<=5;ee++)this.setFunctionModule(8,ee,Qe(Se,ee));this.setFunctionModule(8,7,Qe(Se,6)),this.setFunctionModule(8,8,Qe(Se,7)),this.setFunctionModule(7,8,Qe(Se,8));for(let ee=9;ee<15;ee++)this.setFunctionModule(14-ee,8,Qe(Se,ee));for(let ee=0;ee<8;ee++)this.setFunctionModule(this.size-1-ee,8,Qe(Se,ee));for(let ee=8;ee<15;ee++)this.setFunctionModule(8,this.size-15+ee,Qe(Se,ee));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let ie=this.version;for(let fe=0;fe<12;fe++)ie=ie<<1^(ie>>>11)*7973;const Dt=this.version<<12|ie;Pn(Dt>>>18==0);for(let fe=0;fe<18;fe++){const Se=Qe(Dt,fe),ee=this.size-11+fe%3,Kt=Math.floor(fe/3);this.setFunctionModule(ee,Kt,Se),this.setFunctionModule(Kt,ee,Se)}}drawFinderPattern(ie,Dt){for(let fe=-4;fe<=4;fe++)for(let Se=-4;Se<=4;Se++){const ee=Math.max(Math.abs(Se),Math.abs(fe)),Kt=ie+Se,kt=Dt+fe;0<=Kt&&Kt<this.size&&0<=kt&&kt<this.size&&this.setFunctionModule(Kt,kt,ee!=2&&ee!=4)}}drawAlignmentPattern(ie,Dt){for(let fe=-2;fe<=2;fe++)for(let Se=-2;Se<=2;Se++)this.setFunctionModule(ie+Se,Dt+fe,Math.max(Math.abs(Se),Math.abs(fe))!=1)}setFunctionModule(ie,Dt,fe){this.modules[Dt][ie]=fe,this.isFunction[Dt][ie]=!0}addEccAndInterleave(ie){const Dt=this.version,fe=this.errorCorrectionLevel;if(ie.length!=de.getNumDataCodewords(Dt,fe))throw new RangeError("Invalid argument");const Se=de.NUM_ERROR_CORRECTION_BLOCKS[fe.ordinal][Dt],ee=de.ECC_CODEWORDS_PER_BLOCK[fe.ordinal][Dt],Kt=Math.floor(de.getNumRawDataModules(Dt)/8),kt=Se-Kt%Se,St=Math.floor(Kt/Se);let mt=[];const Lt=de.reedSolomonComputeDivisor(ee);for(let Et=0,Yt=0;Et<Se;Et++){let $e=ie.slice(Yt,Yt+St-ee+(Et<kt?0:1));Yt+=$e.length;const ln=de.reedSolomonComputeRemainder($e,Lt);Et<kt&&$e.push(0),mt.push($e.concat(ln))}let zt=[];for(let Et=0;Et<mt[0].length;Et++)mt.forEach((Yt,$e)=>{(Et!=St-ee||$e>=kt)&&zt.push(Yt[Et])});return Pn(zt.length==Kt),zt}drawCodewords(ie){if(ie.length!=Math.floor(de.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let Dt=0;for(let fe=this.size-1;fe>=1;fe-=2){fe==6&&(fe=5);for(let Se=0;Se<this.size;Se++)for(let ee=0;ee<2;ee++){const Kt=fe-ee,St=(fe+1&2)==0?this.size-1-Se:Se;!this.isFunction[St][Kt]&&Dt<ie.length*8&&(this.modules[St][Kt]=Qe(ie[Dt>>>3],7-(Dt&7)),Dt++)}}Pn(Dt==ie.length*8)}applyMask(ie){if(ie<0||ie>7)throw new RangeError("Mask value out of range");for(let Dt=0;Dt<this.size;Dt++)for(let fe=0;fe<this.size;fe++){let Se;switch(ie){case 0:Se=(fe+Dt)%2==0;break;case 1:Se=Dt%2==0;break;case 2:Se=fe%3==0;break;case 3:Se=(fe+Dt)%3==0;break;case 4:Se=(Math.floor(fe/3)+Math.floor(Dt/2))%2==0;break;case 5:Se=fe*Dt%2+fe*Dt%3==0;break;case 6:Se=(fe*Dt%2+fe*Dt%3)%2==0;break;case 7:Se=((fe+Dt)%2+fe*Dt%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[Dt][fe]&&Se&&(this.modules[Dt][fe]=!this.modules[Dt][fe])}}getPenaltyScore(){let ie=0;for(let ee=0;ee<this.size;ee++){let Kt=!1,kt=0,St=[0,0,0,0,0,0,0];for(let mt=0;mt<this.size;mt++)this.modules[ee][mt]==Kt?(kt++,kt==5?ie+=de.PENALTY_N1:kt>5&&ie++):(this.finderPenaltyAddHistory(kt,St),Kt||(ie+=this.finderPenaltyCountPatterns(St)*de.PENALTY_N3),Kt=this.modules[ee][mt],kt=1);ie+=this.finderPenaltyTerminateAndCount(Kt,kt,St)*de.PENALTY_N3}for(let ee=0;ee<this.size;ee++){let Kt=!1,kt=0,St=[0,0,0,0,0,0,0];for(let mt=0;mt<this.size;mt++)this.modules[mt][ee]==Kt?(kt++,kt==5?ie+=de.PENALTY_N1:kt>5&&ie++):(this.finderPenaltyAddHistory(kt,St),Kt||(ie+=this.finderPenaltyCountPatterns(St)*de.PENALTY_N3),Kt=this.modules[mt][ee],kt=1);ie+=this.finderPenaltyTerminateAndCount(Kt,kt,St)*de.PENALTY_N3}for(let ee=0;ee<this.size-1;ee++)for(let Kt=0;Kt<this.size-1;Kt++){const kt=this.modules[ee][Kt];kt==this.modules[ee][Kt+1]&&kt==this.modules[ee+1][Kt]&&kt==this.modules[ee+1][Kt+1]&&(ie+=de.PENALTY_N2)}let Dt=0;for(const ee of this.modules)Dt=ee.reduce((Kt,kt)=>Kt+(kt?1:0),Dt);const fe=this.size*this.size,Se=Math.ceil(Math.abs(Dt*20-fe*10)/fe)-1;return Pn(0<=Se&&Se<=9),ie+=Se*de.PENALTY_N4,Pn(0<=ie&&ie<=2568888),ie}getAlignmentPatternPositions(){if(this.version==1)return[];{const ie=Math.floor(this.version/7)+2,Dt=this.version==32?26:Math.ceil((this.version*4+4)/(ie*2-2))*2;let fe=[6];for(let Se=this.size-7;fe.length<ie;Se-=Dt)fe.splice(1,0,Se);return fe}}static getNumRawDataModules(ie){if(ie<de.MIN_VERSION||ie>de.MAX_VERSION)throw new RangeError("Version number out of range");let Dt=(16*ie+128)*ie+64;if(ie>=2){const fe=Math.floor(ie/7)+2;Dt-=(25*fe-10)*fe-55,ie>=7&&(Dt-=36)}return Pn(208<=Dt&&Dt<=29648),Dt}static getNumDataCodewords(ie,Dt){return Math.floor(de.getNumRawDataModules(ie)/8)-de.ECC_CODEWORDS_PER_BLOCK[Dt.ordinal][ie]*de.NUM_ERROR_CORRECTION_BLOCKS[Dt.ordinal][ie]}static reedSolomonComputeDivisor(ie){if(ie<1||ie>255)throw new RangeError("Degree out of range");let Dt=[];for(let Se=0;Se<ie-1;Se++)Dt.push(0);Dt.push(1);let fe=1;for(let Se=0;Se<ie;Se++){for(let ee=0;ee<Dt.length;ee++)Dt[ee]=de.reedSolomonMultiply(Dt[ee],fe),ee+1<Dt.length&&(Dt[ee]^=Dt[ee+1]);fe=de.reedSolomonMultiply(fe,2)}return Dt}static reedSolomonComputeRemainder(ie,Dt){let fe=Dt.map(Se=>0);for(const Se of ie){const ee=Se^fe.shift();fe.push(0),Dt.forEach((Kt,kt)=>fe[kt]^=de.reedSolomonMultiply(Kt,ee))}return fe}static reedSolomonMultiply(ie,Dt){if(ie>>>8||Dt>>>8)throw new RangeError("Byte out of range");let fe=0;for(let Se=7;Se>=0;Se--)fe=fe<<1^(fe>>>7)*285,fe^=(Dt>>>Se&1)*ie;return Pn(fe>>>8==0),fe}finderPenaltyCountPatterns(ie){const Dt=ie[1];Pn(Dt<=this.size*3);const fe=Dt>0&&ie[2]==Dt&&ie[3]==Dt*3&&ie[4]==Dt&&ie[5]==Dt;return(fe&&ie[0]>=Dt*4&&ie[6]>=Dt?1:0)+(fe&&ie[6]>=Dt*4&&ie[0]>=Dt?1:0)}finderPenaltyTerminateAndCount(ie,Dt,fe){return ie&&(this.finderPenaltyAddHistory(Dt,fe),Dt=0),Dt+=this.size,this.finderPenaltyAddHistory(Dt,fe),this.finderPenaltyCountPatterns(fe)}finderPenaltyAddHistory(ie,Dt){Dt[0]==0&&(ie+=this.size),Dt.pop(),Dt.unshift(ie)}};let vn=de;vn.MIN_VERSION=1,vn.MAX_VERSION=40,vn.PENALTY_N1=3,vn.PENALTY_N2=3,vn.PENALTY_N3=40,vn.PENALTY_N4=10,vn.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],vn.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],pn.QrCode=vn;function bn(ie,Dt,fe){if(Dt<0||Dt>31||ie>>>Dt)throw new RangeError("Value out of range");for(let Se=Dt-1;Se>=0;Se--)fe.push(ie>>>Se&1)}function Qe(ie,Dt){return(ie>>>Dt&1)!=0}function Pn(ie){if(!ie)throw new Error("Assertion error")}const Ne=class{constructor(ie,Dt,fe){if(this.mode=ie,this.numChars=Dt,this.bitData=fe,Dt<0)throw new RangeError("Invalid argument");this.bitData=fe.slice()}static makeBytes(ie){let Dt=[];for(const fe of ie)bn(fe,8,Dt);return new Ne(Ne.Mode.BYTE,ie.length,Dt)}static makeNumeric(ie){if(!Ne.isNumeric(ie))throw new RangeError("String contains non-numeric characters");let Dt=[];for(let fe=0;fe<ie.length;){const Se=Math.min(ie.length-fe,3);bn(parseInt(ie.substr(fe,Se),10),Se*3+1,Dt),fe+=Se}return new Ne(Ne.Mode.NUMERIC,ie.length,Dt)}static makeAlphanumeric(ie){if(!Ne.isAlphanumeric(ie))throw new RangeError("String contains unencodable characters in alphanumeric mode");let Dt=[],fe;for(fe=0;fe+2<=ie.length;fe+=2){let Se=Ne.ALPHANUMERIC_CHARSET.indexOf(ie.charAt(fe))*45;Se+=Ne.ALPHANUMERIC_CHARSET.indexOf(ie.charAt(fe+1)),bn(Se,11,Dt)}return fe<ie.length&&bn(Ne.ALPHANUMERIC_CHARSET.indexOf(ie.charAt(fe)),6,Dt),new Ne(Ne.Mode.ALPHANUMERIC,ie.length,Dt)}static makeSegments(ie){return ie==""?[]:Ne.isNumeric(ie)?[Ne.makeNumeric(ie)]:Ne.isAlphanumeric(ie)?[Ne.makeAlphanumeric(ie)]:[Ne.makeBytes(Ne.toUtf8ByteArray(ie))]}static makeEci(ie){let Dt=[];if(ie<0)throw new RangeError("ECI assignment value out of range");if(ie<128)bn(ie,8,Dt);else if(ie<16384)bn(2,2,Dt),bn(ie,14,Dt);else if(ie<1e6)bn(6,3,Dt),bn(ie,21,Dt);else throw new RangeError("ECI assignment value out of range");return new Ne(Ne.Mode.ECI,0,Dt)}static isNumeric(ie){return Ne.NUMERIC_REGEX.test(ie)}static isAlphanumeric(ie){return Ne.ALPHANUMERIC_REGEX.test(ie)}getData(){return this.bitData.slice()}static getTotalBits(ie,Dt){let fe=0;for(const Se of ie){const ee=Se.mode.numCharCountBits(Dt);if(Se.numChars>=1<<ee)return 1/0;fe+=4+ee+Se.bitData.length}return fe}static toUtf8ByteArray(ie){ie=encodeURI(ie);let Dt=[];for(let fe=0;fe<ie.length;fe++)ie.charAt(fe)!="%"?Dt.push(ie.charCodeAt(fe)):(Dt.push(parseInt(ie.substr(fe+1,2),16)),fe+=2);return Dt}};let Pe=Ne;Pe.NUMERIC_REGEX=/^[0-9]*$/,Pe.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,Pe.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",pn.QrSegment=Pe})(st||(st={})),(pn=>{let de;(vn=>{const bn=class{constructor(Pn,Ne){this.ordinal=Pn,this.formatBits=Ne}};let Qe=bn;Qe.LOW=new bn(0,1),Qe.MEDIUM=new bn(1,0),Qe.QUARTILE=new bn(2,3),Qe.HIGH=new bn(3,2),vn.Ecc=Qe})(de=pn.QrCode||(pn.QrCode={}))})(st||(st={})),(pn=>{let de;(vn=>{const bn=class{constructor(Pn,Ne){this.modeBits=Pn,this.numBitsCharCount=Ne}numCharCountBits(Pn){return this.numBitsCharCount[Math.floor((Pn+7)/17)]}};let Qe=bn;Qe.NUMERIC=new bn(1,[10,12,14]),Qe.ALPHANUMERIC=new bn(2,[9,11,13]),Qe.BYTE=new bn(4,[8,16,16]),Qe.KANJI=new bn(8,[8,10,12]),Qe.ECI=new bn(7,[0,0,0]),vn.Mode=Qe})(de=pn.QrSegment||(pn.QrSegment={}))})(st||(st={}));var gt=st;var vt={L:gt.QrCode.Ecc.LOW,M:gt.QrCode.Ecc.MEDIUM,Q:gt.QrCode.Ecc.QUARTILE,H:gt.QrCode.Ecc.HIGH},wt=128,Ft="L",It="#FFFFFF",At="#000000",Wt=!1,re=4,ne=.1;function me(pn,de=0){const vn=[];return pn.forEach(function(bn,Qe){let Pn=null;bn.forEach(function(Ne,Pe){if(!Ne&&Pn!==null){vn.push(`M${Pn+de} ${Qe+de}h${Pe-Pn}v1H${Pn+de}z`),Pn=null;return}if(Pe===bn.length-1){if(!Ne)return;Pn===null?vn.push(`M${Pe+de},${Qe+de} h1v1H${Pe+de}z`):vn.push(`M${Pn+de},${Qe+de} h${Pe+1-Pn}v1H${Pn+de}z`);return}Ne&&Pn===null&&(Pn=Pe)})}),vn.join("")}function Vt(pn,de){return pn.slice().map((vn,bn)=>bn<de.y||bn>=de.y+de.h?vn:vn.map((Qe,Pn)=>Pn<de.x||Pn>=de.x+de.w?Qe:!1))}function Le(pn,de,vn,bn){if(bn==null)return null;const Qe=vn?re:0,Pn=pn.length+Qe*2,Ne=Math.floor(de*ne),Pe=Pn/de,ie=(bn.width||Ne)*Pe,Dt=(bn.height||Ne)*Pe,fe=bn.x==null?pn.length/2-ie/2:bn.x*Pe,Se=bn.y==null?pn.length/2-Dt/2:bn.y*Pe;let ee=null;if(bn.excavate){let Kt=Math.floor(fe),kt=Math.floor(Se),St=Math.ceil(ie+fe-Kt),mt=Math.ceil(Dt+Se-kt);ee={x:Kt,y:kt,w:St,h:mt}}return{x:fe,y:Se,h:Dt,w:ie,excavation:ee}}var he=function(){try{new Path2D().addPath(new Path2D)}catch(pn){return!1}return!0}();function Ge(pn){const de=pn,{value:vn,size:bn=wt,level:Qe=Ft,bgColor:Pn=It,fgColor:Ne=At,includeMargin:Pe=Wt,style:ie,imageSettings:Dt}=de,fe=ht(de,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),Se=Dt==null?void 0:Dt.src,ee=Ot.useRef(null),Kt=Ot.useRef(null),[kt,St]=Ot.useState(!1);Ot.useEffect(()=>{if(ee.current!=null){const zt=ee.current,Et=zt.getContext("2d");if(!Et)return;let Yt=gt.QrCode.encodeText(vn,vt[Qe]).getModules();const $e=Pe?re:0,ln=Yt.length+$e*2,qe=Le(Yt,bn,Pe,Dt),Nn=Kt.current,ai=qe!=null&&Nn!==null&&Nn.complete&&Nn.naturalHeight!==0&&Nn.naturalWidth!==0;ai&&qe.excavation!=null&&(Yt=Vt(Yt,qe.excavation));const Kn=window.devicePixelRatio||1;zt.height=zt.width=bn*Kn;const ci=bn/ln*Kn;Et.scale(ci,ci),Et.fillStyle=Pn,Et.fillRect(0,0,ln,ln),Et.fillStyle=Ne,he?Et.fill(new Path2D(me(Yt,$e))):Yt.forEach(function(Ci,Wi){Ci.forEach(function(Oi,mo){Oi&&Et.fillRect(mo+$e,Wi+$e,1,1)})}),ai&&Et.drawImage(Nn,qe.x+$e,qe.y+$e,qe.w,qe.h)}}),Ot.useEffect(()=>{St(!1)},[Se]);const mt=nt({height:bn,width:bn},ie);let Lt=null;return Se!=null&&(Lt=Ot.createElement("img",{src:Se,key:Se,style:{display:"none"},onLoad:()=>{St(!0)},ref:Kt})),Ot.createElement(Ot.Fragment,null,Ot.createElement("canvas",nt({style:mt,height:bn,width:bn,ref:ee},fe)),Lt)}function Ke(pn){const de=pn,{value:vn,size:bn=wt,level:Qe=Ft,bgColor:Pn=It,fgColor:Ne=At,includeMargin:Pe=Wt,imageSettings:ie}=de,Dt=ht(de,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let fe=gt.QrCode.encodeText(vn,vt[Qe]).getModules();const Se=Pe?re:0,ee=fe.length+Se*2,Kt=Le(fe,bn,Pe,ie);let kt=null;ie!=null&&Kt!=null&&(Kt.excavation!=null&&(fe=Vt(fe,Kt.excavation)),kt=Ot.createElement("image",{xlinkHref:ie.src,height:Kt.h,width:Kt.w,x:Kt.x+Se,y:Kt.y+Se,preserveAspectRatio:"none"}));const St=me(fe,Se);return Ot.createElement("svg",nt({height:bn,width:bn,viewBox:`0 0 ${ee} ${ee}`},Dt),Ot.createElement("path",{fill:Pn,d:`M0,0 h${ee}v${ee}H0z`,shapeRendering:"crispEdges"}),Ot.createElement("path",{fill:Ne,d:St,shapeRendering:"crispEdges"}),kt)}var Ve=pn=>{const de=pn,{renderAs:vn}=de,bn=ht(de,["renderAs"]);return vn==="svg"?React.createElement(Ke,nt({},bn)):React.createElement(Ge,nt({},bn))},sn=xt(3113),Mn=xt(36355),xe=xt(9763),Ht=xt(71418),Je=xt(88088),Tn=xt(17313),An=xt(83116),ze=xt(37613);const Te=pn=>{const{componentCls:de}=pn;return{[de]:Object.assign(Object.assign({},(0,Tn.Wf)(pn)),{display:"flex",justifyContent:"center",alignItems:"center",padding:pn.paddingSM,backgroundColor:pn.colorWhite,borderRadius:pn.borderRadiusLG,border:`${pn.lineWidth}px ${pn.lineType} ${pn.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${de}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:pn.colorText,lineHeight:pn.lineHeight,background:pn.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${de}-expired`]:{color:pn.QRCodeExpiredTextColor}},"&-icon":{marginBlockEnd:pn.marginXS,fontSize:pn.controlHeight}}),[`${de}-borderless`]:{borderColor:"transparent"}}};var dn=(0,An.Z)("QRCode",pn=>Te((0,ze.TS)(pn,{QRCodeExpiredTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"}))),hn=pn=>{const[,de]=(0,Je.Z)(),{value:vn,type:bn="canvas",icon:Qe="",size:Pn=160,iconSize:Ne=40,color:Pe=de.colorText,errorLevel:ie="M",status:Dt="active",bordered:fe=!0,onRefresh:Se,style:ee,className:Kt,rootClassName:kt,prefixCls:St,bgColor:mt="transparent"}=pn,{getPrefixCls:Lt}=(0,Ot.useContext)(Mn.E_),zt=Lt("qrcode",St),[Et,Yt]=dn(zt),$e={src:Qe,x:void 0,y:void 0,height:Ne,width:Ne,excavate:!0},ln={value:vn,size:Pn-(de.paddingSM+de.lineWidth)*2,level:ie,bgColor:mt,fgColor:Pe,imageSettings:Qe?$e:void 0},[qe]=(0,xe.Z)("QRCode");if(!vn)return null;const Nn=qt()(zt,Kt,kt,Yt,{[`${zt}-borderless`]:!fe});return Et(Ot.createElement("div",{style:Object.assign(Object.assign({},ee),{width:Pn,height:Pn,backgroundColor:mt}),className:Nn},Dt!=="active"&&Ot.createElement("div",{className:`${zt}-mask`},Dt==="loading"&&Ot.createElement(Ht.Z,null),Dt==="expired"&&Ot.createElement(Ot.Fragment,null,Ot.createElement("p",{className:`${zt}-expired`},qe==null?void 0:qe.expired),Se&&Ot.createElement(sn.ZP,{type:"link",icon:Ot.createElement(Ie,null),onClick:Se},qe==null?void 0:qe.refresh))),bn==="canvas"?Ot.createElement(Ge,Object.assign({},ln)):Ot.createElement(Ke,Object.assign({},ln))))}},57809:function(En,yn,xt){"use strict";var Ot=xt(92310),jt=xt.n(Ot),Qt=xt(77861),Me=xt(2738),Ut=xt(59301),pe=xt(53487),Nt=xt(62892),Ie=xt(19080),we=xt(36355),qt=xt(1684),ce=xt(93891),Ce=xt(19716),Be=xt(32441),Tt=xt(33234),et=xt(14154),nt=xt(58582),ht=xt(84443),st=xt(66339),gt=function(At,Wt){var re={};for(var ne in At)Object.prototype.hasOwnProperty.call(At,ne)&&Wt.indexOf(ne)<0&&(re[ne]=At[ne]);if(At!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,ne=Object.getOwnPropertySymbols(At);me<ne.length;me++)Wt.indexOf(ne[me])<0&&Object.prototype.propertyIsEnumerable.call(At,ne[me])&&(re[ne[me]]=At[ne[me]]);return re};const vt="SECRET_COMBOBOX_MODE_DO_NOT_USE",wt=(At,Wt)=>{var re,{prefixCls:ne,bordered:me=!0,className:Vt,rootClassName:Le,getPopupContainer:he,popupClassName:Ge,dropdownClassName:Ke,listHeight:Ve=256,placement:sn,listItemHeight:Mn=24,size:xe,disabled:Ht,notFoundContent:Je,status:Tn,builtinPlacements:An,dropdownMatchSelectWidth:ze,popupMatchSelectWidth:Te,direction:dn,style:Hn,allowClear:hn}=At,pn=gt(At,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:de,getPrefixCls:vn,renderEmpty:bn,direction:Qe,virtual:Pn,popupMatchSelectWidth:Ne,popupOverflow:Pe,select:ie}=Ut.useContext(we.E_),Dt=vn("select",ne),fe=vn(),Se=dn!=null?dn:Qe,{compactSize:ee,compactItemClassnames:Kt}=(0,Tt.ri)(Dt,Se),[kt,St]=(0,et.Z)(Dt),mt=Ut.useMemo(()=>{const{mode:Sn}=pn;if(Sn!=="combobox")return Sn===vt?"combobox":Sn},[pn.mode]),Lt=mt==="multiple"||mt==="tags",zt=(0,ht.Z)(pn.suffixIcon,pn.showArrow),Et=(re=Te!=null?Te:ze)!==null&&re!==void 0?re:Ne,{status:Yt,hasFeedback:$e,isFormItemInput:ln,feedbackIcon:qe}=Ut.useContext(Be.aM),Nn=(0,Ie.F)(Yt,Tn);let ai;Je!==void 0?ai=Je:mt==="combobox"?ai=null:ai=(bn==null?void 0:bn("Select"))||Ut.createElement(ce.Z,{componentName:"Select"});const{suffixIcon:Kn,itemIcon:ci,removeIcon:Ci,clearIcon:Wi}=(0,st.Z)(Object.assign(Object.assign({},pn),{multiple:Lt,hasFeedback:$e,feedbackIcon:qe,showSuffixIcon:zt,prefixCls:Dt,showArrow:pn.showArrow,componentName:"Select"})),Oi=hn===!0?{clearIcon:Wi}:hn,mo=(0,Me.Z)(pn,["suffixIcon","itemIcon"]),Bo=jt()(Ge||Ke,{[`${Dt}-dropdown-${Se}`]:Se==="rtl"},Le,St),Ao=(0,Ce.Z)(Sn=>{var Ct;return(Ct=xe!=null?xe:ee)!==null&&Ct!==void 0?Ct:Sn}),oi=Ut.useContext(qt.Z),fi=Ht!=null?Ht:oi,di=jt()({[`${Dt}-lg`]:Ao==="large",[`${Dt}-sm`]:Ao==="small",[`${Dt}-rtl`]:Se==="rtl",[`${Dt}-borderless`]:!me,[`${Dt}-in-form-item`]:ln},(0,Ie.Z)(Dt,Nn,$e),Kt,ie==null?void 0:ie.className,Vt,Le,St),mi=Ut.useMemo(()=>sn!==void 0?sn:Se==="rtl"?"bottomRight":"bottomLeft",[sn,Se]),co=(0,nt.Z)(An,Pe);return kt(Ut.createElement(Qt.ZP,Object.assign({ref:Wt,virtual:Pn,showSearch:ie==null?void 0:ie.showSearch},mo,{style:Object.assign(Object.assign({},ie==null?void 0:ie.style),Hn),dropdownMatchSelectWidth:Et,builtinPlacements:co,transitionName:(0,Nt.m)(fe,"slide-up",pn.transitionName),listHeight:Ve,listItemHeight:Mn,mode:mt,prefixCls:Dt,placement:mi,direction:Se,suffixIcon:Kn,menuItemSelectedIcon:ci,removeIcon:Ci,allowClear:Oi,notFoundContent:ai,className:di,getPopupContainer:he||de,dropdownClassName:Bo,disabled:fi})))},Ft=Ut.forwardRef(wt),It=(0,pe.Z)(Ft);Ft.SECRET_COMBOBOX_MODE_DO_NOT_USE=vt,Ft.Option=Qt.Wx,Ft.OptGroup=Qt.Xo,Ft._InternalPanelDoNotUseOrYouWillBeFired=It,yn.default=Ft},14154:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ft}});var Ot=xt(17313),jt=xt(74207),Qt=xt(37613),Me=xt(83116),Ut=xt(13826),pe=xt(92899);const Nt=It=>{const{optionHeight:At,optionFontSize:Wt,optionLineHeight:re,optionPadding:ne}=It;return{position:"relative",display:"block",minHeight:At,padding:ne,color:It.colorText,fontWeight:"normal",fontSize:Wt,lineHeight:re,boxSizing:"border-box"}};var we=It=>{const{antCls:At,componentCls:Wt}=It,re=`${Wt}-item`,ne=`&${At}-slide-up-enter${At}-slide-up-enter-active`,me=`&${At}-slide-up-appear${At}-slide-up-appear-active`,Vt=`&${At}-slide-up-leave${At}-slide-up-leave-active`,Le=`${Wt}-dropdown-placement-`;return[{[`${Wt}-dropdown`]:Object.assign(Object.assign({},(0,Ot.Wf)(It)),{position:"absolute",top:-9999,zIndex:It.zIndexPopup,boxSizing:"border-box",padding:It.paddingXXS,overflow:"hidden",fontSize:It.fontSize,fontVariant:"initial",backgroundColor:It.colorBgElevated,borderRadius:It.borderRadiusLG,outline:"none",boxShadow:It.boxShadowSecondary,[`
|
|
|
${ne}${Le}bottomLeft,
|
|
|
${me}${Le}bottomLeft
|
|
|
`]:{animationName:Ut.fJ},[`
|
|
|
${ne}${Le}topLeft,
|
|
|
${me}${Le}topLeft,
|
|
|
${ne}${Le}topRight,
|
|
|
${me}${Le}topRight
|
|
|
`]:{animationName:Ut.Qt},[`${Vt}${Le}bottomLeft`]:{animationName:Ut.Uw},[`
|
|
|
${Vt}${Le}topLeft,
|
|
|
${Vt}${Le}topRight
|
|
|
`]:{animationName:Ut.ly},"&-hidden":{display:"none"},[`${re}`]:Object.assign(Object.assign({},Nt(It)),{cursor:"pointer",transition:`background ${It.motionDurationSlow} ease`,borderRadius:It.borderRadiusSM,"&-group":{color:It.colorTextDescription,fontSize:It.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Ot.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${re}-option-disabled)`]:{backgroundColor:It.optionActiveBg},[`&-selected:not(${re}-option-disabled)`]:{color:It.optionSelectedColor,fontWeight:It.optionSelectedFontWeight,backgroundColor:It.optionSelectedBg,[`${re}-option-state`]:{color:It.colorPrimary}},"&-disabled":{[`&${re}-option-selected`]:{backgroundColor:It.colorBgContainerDisabled},color:It.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:It.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Ut.oN)(It,"slide-up"),(0,Ut.oN)(It,"slide-down"),(0,pe.Fm)(It,"move-up"),(0,pe.Fm)(It,"move-down")]};const qt=2,ce=It=>{let{controlHeightSM:At,controlHeight:Wt,lineWidth:re}=It;const ne=(Wt-At)/2-re,me=Math.ceil(ne/2);return[ne,me]};function Ce(It,At){const{componentCls:Wt,iconCls:re}=It,ne=`${Wt}-selection-overflow`,me=It.multipleSelectItemHeight,[Vt]=ce(It),Le=At?`${Wt}-${At}`:"";return{[`${Wt}-multiple${Le}`]:{fontSize:It.fontSize,[ne]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Wt}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Vt-qt}px ${qt*2}px`,borderRadius:It.borderRadius,[`${Wt}-show-search&`]:{cursor:"text"},[`${Wt}-disabled&`]:{background:It.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${qt}px 0`,lineHeight:`${me}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${Wt}-show-arrow ${Wt}-selector,
|
|
|
&${Wt}-allow-clear ${Wt}-selector
|
|
|
`]:{paddingInlineEnd:It.fontSizeIcon+It.controlPaddingHorizontal},[`${Wt}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:me,marginTop:qt,marginBottom:qt,lineHeight:`${me-It.lineWidth*2}px`,background:It.multipleItemBg,border:`${It.lineWidth}px ${It.lineType} ${It.multipleItemBorderColor}`,borderRadius:It.borderRadiusSM,cursor:"default",transition:`font-size ${It.motionDurationSlow}, line-height ${It.motionDurationSlow}, height ${It.motionDurationSlow}`,userSelect:"none",marginInlineEnd:qt*2,paddingInlineStart:It.paddingXS,paddingInlineEnd:It.paddingXS/2,[`${Wt}-disabled&`]:{color:It.multipleItemColorDisabled,borderColor:It.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:It.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,Ot.Ro)()),{display:"inline-flex",alignItems:"center",color:It.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${re}`]:{verticalAlign:"-0.2em"},"&:hover":{color:It.colorIconHover}})},[`${ne}-item + ${ne}-item`]:{[`${Wt}-selection-search`]:{marginInlineStart:0}},[`${Wt}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:It.inputPaddingHorizontalBase-Vt,"\n &-input,\n &-mirror\n ":{height:me,fontFamily:It.fontFamily,lineHeight:`${me}px`,transition:`all ${It.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Wt}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:It.inputPaddingHorizontalBase,insetInlineEnd:It.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${It.motionDurationSlow}`}}}}var Tt=It=>{const{componentCls:At}=It,Wt=(0,Qt.TS)(It,{controlHeight:It.controlHeightSM,multipleSelectItemHeight:It.controlHeightXS,borderRadius:It.borderRadiusSM,borderRadiusSM:It.borderRadiusXS}),re=(0,Qt.TS)(It,{fontSize:It.fontSizeLG,controlHeight:It.controlHeightLG,multipleSelectItemHeight:It.multipleItemHeightLG,borderRadius:It.borderRadiusLG,borderRadiusSM:It.borderRadius}),[,ne]=ce(It);return[Ce(It),Ce(Wt,"sm"),{[`${At}-multiple${At}-sm`]:{[`${At}-selection-placeholder`]:{insetInline:It.controlPaddingHorizontalSM-It.lineWidth},[`${At}-selection-search`]:{marginInlineStart:ne}}},Ce(re,"lg")]};function et(It,At){const{componentCls:Wt,inputPaddingHorizontalBase:re,borderRadius:ne}=It,me=It.controlHeight-It.lineWidth*2,Vt=Math.ceil(It.fontSize*1.25),Le=At?`${Wt}-${At}`:"";return{[`${Wt}-single${Le}`]:{fontSize:It.fontSize,[`${Wt}-selector`]:Object.assign(Object.assign({},(0,Ot.Wf)(It)),{display:"flex",borderRadius:ne,[`${Wt}-selection-search`]:{position:"absolute",top:0,insetInlineStart:re,insetInlineEnd:re,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${Wt}-selection-item,
|
|
|
${Wt}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${me}px`,transition:`all ${It.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${me}px`}},[`${Wt}-selection-item`]:{position:"relative",userSelect:"none"},[`${Wt}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Wt}-selection-item:after`,`${Wt}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${Wt}-show-arrow ${Wt}-selection-item,
|
|
|
&${Wt}-show-arrow ${Wt}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Vt},[`&${Wt}-open ${Wt}-selection-item`]:{color:It.colorTextPlaceholder},[`&:not(${Wt}-customize-input)`]:{[`${Wt}-selector`]:{width:"100%",height:It.controlHeight,padding:`0 ${re}px`,[`${Wt}-selection-search-input`]:{height:me},"&:after":{lineHeight:`${me}px`}}},[`&${Wt}-customize-input`]:{[`${Wt}-selector`]:{"&:after":{display:"none"},[`${Wt}-selection-search`]:{position:"static",width:"100%"},[`${Wt}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${re}px`,"&:after":{display:"none"}}}}}}}function nt(It){const{componentCls:At}=It,Wt=It.controlPaddingHorizontalSM-It.lineWidth;return[et(It),et((0,Qt.TS)(It,{controlHeight:It.controlHeightSM,borderRadius:It.borderRadiusSM}),"sm"),{[`${At}-single${At}-sm`]:{[`&:not(${At}-customize-input)`]:{[`${At}-selection-search`]:{insetInlineStart:Wt,insetInlineEnd:Wt},[`${At}-selector`]:{padding:`0 ${Wt}px`},[`&${At}-show-arrow ${At}-selection-search`]:{insetInlineEnd:Wt+It.fontSize*1.5},[`
|
|
|
&${At}-show-arrow ${At}-selection-item,
|
|
|
&${At}-show-arrow ${At}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:It.fontSize*1.5}}}},et((0,Qt.TS)(It,{controlHeight:It.singleItemHeightLG,fontSize:It.fontSizeLG,borderRadius:It.borderRadiusLG}),"lg")]}const ht=It=>{const{componentCls:At,selectorBg:Wt}=It;return{position:"relative",backgroundColor:Wt,border:`${It.lineWidth}px ${It.lineType} ${It.colorBorder}`,transition:`all ${It.motionDurationMid} ${It.motionEaseInOut}`,input:{cursor:"pointer"},[`${At}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${At}-disabled&`]:{color:It.colorTextDisabled,background:It.colorBgContainerDisabled,cursor:"not-allowed",[`${At}-multiple&`]:{background:It.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},st=function(It,At){let Wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:re,borderHoverColor:ne,outlineColor:me,antCls:Vt}=At,Le=Wt?{[`${re}-selector`]:{borderColor:ne}}:{};return{[It]:{[`&:not(${re}-disabled):not(${re}-customize-input):not(${Vt}-pagination-size-changer)`]:Object.assign(Object.assign({},Le),{[`${re}-focused& ${re}-selector`]:{borderColor:ne,boxShadow:`0 0 0 ${At.controlOutlineWidth}px ${me}`,outline:0},[`&:hover ${re}-selector`]:{borderColor:ne}})}}},gt=It=>{const{componentCls:At}=It;return{[`${At}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},vt=It=>{const{componentCls:At,inputPaddingHorizontalBase:Wt,iconCls:re}=It;return{[At]:Object.assign(Object.assign({},(0,Ot.Wf)(It)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${At}-customize-input) ${At}-selector`]:Object.assign(Object.assign({},ht(It)),gt(It)),[`${At}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},Ot.vS),[`${At}-selection-placeholder`]:Object.assign(Object.assign({},Ot.vS),{flex:1,color:It.colorTextPlaceholder,pointerEvents:"none"}),[`${At}-arrow`]:Object.assign(Object.assign({},(0,Ot.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Wt,height:It.fontSizeIcon,marginTop:-It.fontSizeIcon/2,color:It.colorTextQuaternary,fontSize:It.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[re]:{verticalAlign:"top",transition:`transform ${It.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${At}-suffix)`]:{pointerEvents:"auto"}},[`${At}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${At}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Wt,zIndex:1,display:"inline-block",width:It.fontSizeIcon,height:It.fontSizeIcon,marginTop:-It.fontSizeIcon/2,color:It.colorTextQuaternary,fontSize:It.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:It.clearBg,cursor:"pointer",opacity:0,transition:`color ${It.motionDurationMid} ease, opacity ${It.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:It.colorTextTertiary}},"&:hover":{[`${At}-clear`]:{opacity:1}}}),[`${At}-has-feedback`]:{[`${At}-clear`]:{insetInlineEnd:Wt+It.fontSize+It.paddingXS}}}},wt=It=>{const{componentCls:At}=It;return[{[At]:{[`&-borderless ${At}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${At}-in-form-item`]:{width:"100%"}}},vt(It),nt(It),Tt(It),we(It),{[`${At}-rtl`]:{direction:"rtl"}},st(At,(0,Qt.TS)(It,{borderHoverColor:It.colorPrimaryHover,outlineColor:It.controlOutline})),st(`${At}-status-error`,(0,Qt.TS)(It,{borderHoverColor:It.colorErrorHover,outlineColor:It.colorErrorOutline}),!0),st(`${At}-status-warning`,(0,Qt.TS)(It,{borderHoverColor:It.colorWarningHover,outlineColor:It.colorWarningOutline}),!0),(0,jt.c)(It,{borderElCls:`${At}-selector`,focusElCls:`${At}-focused`})]};var Ft=(0,Me.Z)("Select",(It,At)=>{let{rootPrefixCls:Wt}=At;const re=(0,Qt.TS)(It,{rootPrefixCls:Wt,inputPaddingHorizontalBase:It.paddingSM-1,multipleSelectItemHeight:It.multipleItemHeight});return[wt(re)]},It=>{const{fontSize:At,lineHeight:Wt,controlHeight:re,controlPaddingHorizontal:ne,zIndexPopupBase:me,colorText:Vt,fontWeightStrong:Le,controlItemBgActive:he,controlItemBgHover:Ge,colorBgContainer:Ke,colorFillSecondary:Ve,controlHeightLG:sn,controlHeightSM:Mn,colorBgContainerDisabled:xe,colorTextDisabled:Ht}=It;return{zIndexPopup:me+50,optionSelectedColor:Vt,optionSelectedFontWeight:Le,optionSelectedBg:he,optionActiveBg:Ge,optionPadding:`${(re-At*Wt)/2}px ${ne}px`,optionFontSize:At,optionLineHeight:Wt,optionHeight:re,selectorBg:Ke,clearBg:Ke,singleItemHeightLG:sn,multipleItemBg:Ve,multipleItemBorderColor:"transparent",multipleItemHeight:Mn,multipleItemHeightLG:re,multipleSelectorBgDisabled:xe,multipleItemColorDisabled:Ht,multipleItemBorderColorDisabled:"transparent"}})},58582:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return jt}});const Ot=Qt=>{const Ut={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Qt==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},Ut),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Ut),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Ut),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Ut),{points:["br","tr"],offset:[0,-4]})}};function jt(Qt,Me){return Qt||Ot(Me)}},84443:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ot}});function Ot(jt,Qt){return Qt!==void 0?Qt:jt!==null}},66339:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});var Ot=xt(40001),jt=xt(19248),Qt=xt(99267),Me=xt(84105),Ut=xt(58617),pe=xt(47472),Nt=xt(59301);function Ie(we){let{suffixIcon:qt,clearIcon:ce,menuItemSelectedIcon:Ce,removeIcon:Be,loading:Tt,multiple:et,hasFeedback:nt,prefixCls:ht,showSuffixIcon:st,feedbackIcon:gt,showArrow:vt,componentName:wt}=we;const Ft=ce!=null?ce:Nt.createElement(jt.Z,null),It=ne=>qt===null&&!nt&&!vt?null:Nt.createElement(Nt.Fragment,null,st!==!1&&ne,nt&>);let At=null;if(qt!==void 0)At=It(qt);else if(Tt)At=It(Nt.createElement(Ut.Z,{spin:!0}));else{const ne=`${ht}-suffix`;At=me=>{let{open:Vt,showSearch:Le}=me;return It(Vt&&Le?Nt.createElement(pe.Z,{className:ne}):Nt.createElement(Me.Z,{className:ne}))}}let Wt=null;Ce!==void 0?Wt=Ce:et?Wt=Nt.createElement(Ot.Z,null):Wt=null;let re=null;return Be!==void 0?re=Be:re=Nt.createElement(Qt.Z,null),{clearIcon:Ft,suffixIcon:At,itemIcon:Wt,removeIcon:re}}},81327:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return ht}});var Ot=xt(59301),jt=xt(92310),Qt=xt.n(jt),Me=xt(11592),Ut=xt(36355),pe=xt(33234);const Nt=Ot.createContext({latestIndex:0}),Ie=Nt.Provider;var qt=st=>{let{className:gt,index:vt,children:wt,split:Ft,style:It}=st;const{latestIndex:At}=Ot.useContext(Nt);return wt==null?null:Ot.createElement(Ot.Fragment,null,Ot.createElement("div",{className:gt,style:It},wt),vt<At&&Ft&&Ot.createElement("span",{className:`${gt}-split`},Ft))},ce=xt(2856);function Ce(st){return["small","middle","large"].includes(st)}function Be(st){return st?typeof st=="number"&&!Number.isNaN(st):!1}var Tt=function(st,gt){var vt={};for(var wt in st)Object.prototype.hasOwnProperty.call(st,wt)&>.indexOf(wt)<0&&(vt[wt]=st[wt]);if(st!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,wt=Object.getOwnPropertySymbols(st);Ft<wt.length;Ft++)gt.indexOf(wt[Ft])<0&&Object.prototype.propertyIsEnumerable.call(st,wt[Ft])&&(vt[wt[Ft]]=st[wt[Ft]]);return vt};const nt=Ot.forwardRef((st,gt)=>{var vt,wt;const{getPrefixCls:Ft,space:It,direction:At}=Ot.useContext(Ut.E_),{size:Wt=(It==null?void 0:It.size)||"small",align:re,className:ne,rootClassName:me,children:Vt,direction:Le="horizontal",prefixCls:he,split:Ge,style:Ke,wrap:Ve=!1,classNames:sn,styles:Mn}=st,xe=Tt(st,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ht,Je]=Array.isArray(Wt)?Wt:[Wt,Wt],Tn=Ce(Je),An=Ce(Ht),ze=Be(Je),Te=Be(Ht),dn=(0,Me.Z)(Vt,{keepEmpty:!0}),Hn=re===void 0&&Le==="horizontal"?"center":re,hn=Ft("space",he),[pn,de]=(0,ce.Z)(hn),vn=Qt()(hn,It==null?void 0:It.className,de,`${hn}-${Le}`,{[`${hn}-rtl`]:At==="rtl",[`${hn}-align-${Hn}`]:Hn,[`${hn}-gap-row-${Je}`]:Tn,[`${hn}-gap-col-${Ht}`]:An},ne,me),bn=Qt()(`${hn}-item`,(vt=sn==null?void 0:sn.item)!==null&&vt!==void 0?vt:(wt=It==null?void 0:It.classNames)===null||wt===void 0?void 0:wt.item);let Qe=0;const Pn=dn.map((ie,Dt)=>{var fe,Se;ie!=null&&(Qe=Dt);const ee=ie&&ie.key||`${bn}-${Dt}`;return Ot.createElement(qt,{className:bn,key:ee,index:Dt,split:Ge,style:(fe=Mn==null?void 0:Mn.item)!==null&&fe!==void 0?fe:(Se=It==null?void 0:It.styles)===null||Se===void 0?void 0:Se.item},ie)}),Ne=Ot.useMemo(()=>({latestIndex:Qe}),[Qe]);if(dn.length===0)return null;const Pe={};return Ve&&(Pe.flexWrap="wrap"),!An&&Te&&(Pe.columnGap=Ht),!Tn&&ze&&(Pe.rowGap=Je),pn(Ot.createElement("div",Object.assign({ref:gt,className:vn,style:Object.assign(Object.assign(Object.assign({},Pe),It==null?void 0:It.style),Ke)},xe),Ot.createElement(Ie,{value:Ne},Pn)))});nt.Compact=pe.ZP;var ht=nt},15969:function(En,yn,xt){"use strict";xt.d(yn,{N:function(){return Ot}});const Ot=jt=>({color:jt.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${jt.motionDurationSlow}`,"&:focus, &:hover":{color:jt.colorLinkHover},"&:active":{color:jt.colorLinkActive}})},78673:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Le}});var Ot=xt(58617),jt=xt(92310),Qt=xt.n(jt),Me=xt(72308),Ut=xt(49618),pe=xt(52487),Nt=xt(74416),Ie=xt(59301),we=xt(18929),qt=xt(10228),ce=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ce=Ie.forwardRef(function(he,Ge){var Ke,Ve=he.prefixCls,sn=Ve===void 0?"rc-switch":Ve,Mn=he.className,xe=he.checked,Ht=he.defaultChecked,Je=he.disabled,Tn=he.loadingIcon,An=he.checkedChildren,ze=he.unCheckedChildren,Te=he.onClick,dn=he.onChange,Hn=he.onKeyDown,hn=(0,Nt.Z)(he,ce),pn=(0,we.Z)(!1,{value:xe,defaultValue:Ht}),de=(0,pe.Z)(pn,2),vn=de[0],bn=de[1];function Qe(ie,Dt){var fe=vn;return Je||(fe=ie,bn(fe),dn==null||dn(fe,Dt)),fe}function Pn(ie){ie.which===qt.Z.LEFT?Qe(!1,ie):ie.which===qt.Z.RIGHT&&Qe(!0,ie),Hn==null||Hn(ie)}function Ne(ie){var Dt=Qe(!vn,ie);Te==null||Te(Dt,ie)}var Pe=Qt()(sn,Mn,(Ke={},(0,Ut.Z)(Ke,"".concat(sn,"-checked"),vn),(0,Ut.Z)(Ke,"".concat(sn,"-disabled"),Je),Ke));return Ie.createElement("button",(0,Me.Z)({},hn,{type:"button",role:"switch","aria-checked":vn,disabled:Je,className:Pe,ref:Ge,onKeyDown:Pn,onClick:Ne}),Tn,Ie.createElement("span",{className:"".concat(sn,"-inner")},Ie.createElement("span",{className:"".concat(sn,"-inner-checked")},An),Ie.createElement("span",{className:"".concat(sn,"-inner-unchecked")},ze)))});Ce.displayName="Switch";var Be=Ce,Tt=xt(14088),et=xt(36355),nt=xt(1684),ht=xt(19716),st=xt(64993),gt=xt(17313),vt=xt(83116),wt=xt(37613);const Ft=he=>{const{componentCls:Ge,trackHeightSM:Ke,trackPadding:Ve,trackMinWidthSM:sn,innerMinMarginSM:Mn,innerMaxMarginSM:xe,handleSizeSM:Ht}=he,Je=`${Ge}-inner`;return{[Ge]:{[`&${Ge}-small`]:{minWidth:sn,height:Ke,lineHeight:`${Ke}px`,[`${Ge}-inner`]:{paddingInlineStart:xe,paddingInlineEnd:Mn,[`${Je}-checked`]:{marginInlineStart:`calc(-100% + ${Ht+Ve*2}px - ${xe*2}px)`,marginInlineEnd:`calc(100% - ${Ht+Ve*2}px + ${xe*2}px)`},[`${Je}-unchecked`]:{marginTop:-Ke,marginInlineStart:0,marginInlineEnd:0}},[`${Ge}-handle`]:{width:Ht,height:Ht},[`${Ge}-loading-icon`]:{top:(Ht-he.switchLoadingIconSize)/2,fontSize:he.switchLoadingIconSize},[`&${Ge}-checked`]:{[`${Ge}-inner`]:{paddingInlineStart:Mn,paddingInlineEnd:xe,[`${Je}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Je}-unchecked`]:{marginInlineStart:`calc(100% - ${Ht+Ve*2}px + ${xe*2}px)`,marginInlineEnd:`calc(-100% + ${Ht+Ve*2}px - ${xe*2}px)`}},[`${Ge}-handle`]:{insetInlineStart:`calc(100% - ${Ht+Ve}px)`}},[`&:not(${Ge}-disabled):active`]:{[`&:not(${Ge}-checked) ${Je}`]:{[`${Je}-unchecked`]:{marginInlineStart:he.marginXXS/2,marginInlineEnd:-he.marginXXS/2}},[`&${Ge}-checked ${Je}`]:{[`${Je}-checked`]:{marginInlineStart:-he.marginXXS/2,marginInlineEnd:he.marginXXS/2}}}}}}},It=he=>{const{componentCls:Ge,handleSize:Ke}=he;return{[Ge]:{[`${Ge}-loading-icon${he.iconCls}`]:{position:"relative",top:(Ke-he.fontSize)/2,color:he.switchLoadingIconColor,verticalAlign:"top"},[`&${Ge}-checked ${Ge}-loading-icon`]:{color:he.switchColor}}}},At=he=>{const{componentCls:Ge,motion:Ke,trackPadding:Ve,handleBg:sn,handleShadow:Mn,handleSize:xe}=he,Ht=`${Ge}-handle`;return{[Ge]:{[Ht]:{position:"absolute",top:Ve,insetInlineStart:Ve,width:xe,height:xe,transition:`all ${he.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:sn,borderRadius:xe/2,boxShadow:Mn,transition:`all ${he.switchDuration} ease-in-out`,content:'""'}},[`&${Ge}-checked ${Ht}`]:{insetInlineStart:`calc(100% - ${xe+Ve}px)`},[`&:not(${Ge}-disabled):active`]:Ke?{[`${Ht}::before`]:{insetInlineEnd:he.switchHandleActiveInset,insetInlineStart:0},[`&${Ge}-checked ${Ht}::before`]:{insetInlineEnd:0,insetInlineStart:he.switchHandleActiveInset}}:{}}}},Wt=he=>{const{componentCls:Ge,trackHeight:Ke,trackPadding:Ve,innerMinMargin:sn,innerMaxMargin:Mn,handleSize:xe}=he,Ht=`${Ge}-inner`;return{[Ge]:{[Ht]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Mn,paddingInlineEnd:sn,transition:`padding-inline-start ${he.switchDuration} ease-in-out, padding-inline-end ${he.switchDuration} ease-in-out`,[`${Ht}-checked, ${Ht}-unchecked`]:{display:"block",color:he.colorTextLightSolid,fontSize:he.fontSizeSM,transition:`margin-inline-start ${he.switchDuration} ease-in-out, margin-inline-end ${he.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ht}-checked`]:{marginInlineStart:`calc(-100% + ${xe+Ve*2}px - ${Mn*2}px)`,marginInlineEnd:`calc(100% - ${xe+Ve*2}px + ${Mn*2}px)`},[`${Ht}-unchecked`]:{marginTop:-Ke,marginInlineStart:0,marginInlineEnd:0}},[`&${Ge}-checked ${Ht}`]:{paddingInlineStart:sn,paddingInlineEnd:Mn,[`${Ht}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ht}-unchecked`]:{marginInlineStart:`calc(100% - ${xe+Ve*2}px + ${Mn*2}px)`,marginInlineEnd:`calc(-100% + ${xe+Ve*2}px - ${Mn*2}px)`}},[`&:not(${Ge}-disabled):active`]:{[`&:not(${Ge}-checked) ${Ht}`]:{[`${Ht}-unchecked`]:{marginInlineStart:Ve*2,marginInlineEnd:-Ve*2}},[`&${Ge}-checked ${Ht}`]:{[`${Ht}-checked`]:{marginInlineStart:-Ve*2,marginInlineEnd:Ve*2}}}}}},re=he=>{const{componentCls:Ge,trackHeight:Ke,trackMinWidth:Ve}=he;return{[Ge]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,gt.Wf)(he)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Ve,height:Ke,lineHeight:`${Ke}px`,verticalAlign:"middle",background:he.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${he.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ge}-disabled)`]:{background:he.colorTextTertiary}}),(0,gt.Qy)(he)),{[`&${Ge}-checked`]:{background:he.switchColor,[`&:hover:not(${Ge}-disabled)`]:{background:he.colorPrimaryHover}},[`&${Ge}-loading, &${Ge}-disabled`]:{cursor:"not-allowed",opacity:he.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ge}-rtl`]:{direction:"rtl"}})}};var ne=(0,vt.Z)("Switch",he=>{const Ge=(0,wt.TS)(he,{switchDuration:he.motionDurationMid,switchColor:he.colorPrimary,switchDisabledOpacity:he.opacityLoading,switchLoadingIconSize:he.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${he.opacityLoading})`,switchHandleActiveInset:"-30%"});return[re(Ge),Wt(Ge),At(Ge),It(Ge),Ft(Ge)]},he=>{const{fontSize:Ge,lineHeight:Ke,controlHeight:Ve,colorWhite:sn}=he,Mn=Ge*Ke,xe=Ve/2,Ht=2,Je=Mn-Ht*2,Tn=xe-Ht*2;return{trackHeight:Mn,trackHeightSM:xe,trackMinWidth:Je*2+Ht*4,trackMinWidthSM:Tn*2+Ht*2,trackPadding:Ht,handleBg:sn,handleSize:Je,handleSizeSM:Tn,handleShadow:`0 2px 4px 0 ${new st.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Je/2,innerMaxMargin:Je+Ht+Ht*2,innerMinMarginSM:Tn/2,innerMaxMarginSM:Tn+Ht+Ht*2}}),me=function(he,Ge){var Ke={};for(var Ve in he)Object.prototype.hasOwnProperty.call(he,Ve)&&Ge.indexOf(Ve)<0&&(Ke[Ve]=he[Ve]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var sn=0,Ve=Object.getOwnPropertySymbols(he);sn<Ve.length;sn++)Ge.indexOf(Ve[sn])<0&&Object.prototype.propertyIsEnumerable.call(he,Ve[sn])&&(Ke[Ve[sn]]=he[Ve[sn]]);return Ke};const Vt=Ie.forwardRef((he,Ge)=>{const{prefixCls:Ke,size:Ve,disabled:sn,loading:Mn,className:xe,rootClassName:Ht,style:Je}=he,Tn=me(he,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:An,direction:ze,switch:Te}=Ie.useContext(et.E_),dn=Ie.useContext(nt.Z),Hn=(sn!=null?sn:dn)||Mn,hn=An("switch",Ke),pn=Ie.createElement("div",{className:`${hn}-handle`},Mn&&Ie.createElement(Ot.Z,{className:`${hn}-loading-icon`})),[de,vn]=ne(hn),bn=(0,ht.Z)(Ve),Qe=Qt()(Te==null?void 0:Te.className,{[`${hn}-small`]:bn==="small",[`${hn}-loading`]:Mn,[`${hn}-rtl`]:ze==="rtl"},xe,Ht,vn),Pn=Object.assign(Object.assign({},Te==null?void 0:Te.style),Je);return de(Ie.createElement(Tt.Z,{component:"Switch"},Ie.createElement(Be,Object.assign({},Tn,{prefixCls:hn,className:Qe,style:Pn,disabled:Hn,ref:Ge,loadingIcon:pn}))))});Vt.__ANT_SWITCH=!0;var Le=Vt},1710:function(En,yn,xt){"use strict";xt.d(yn,{default:function(){return Wg}});var Ot={},jt="rc-table-internal-hook",Qt=xt(52487),Me=xt(6089),Ut=xt(34280),pe=xt(13697),Nt=xt(59301),Ie=xt(4676);function we(oe){var le=Nt.createContext(void 0),De=function(rn){var Ue=rn.value,Ln=rn.children,kn=Nt.useRef(Ue);kn.current=Ue;var wn=Nt.useState(function(){return{getValue:function(){return kn.current},listeners:new Set}}),Vn=(0,Qt.Z)(wn,1),ii=Vn[0];return(0,Ut.Z)(function(){(0,Ie.unstable_batchedUpdates)(function(){ii.listeners.forEach(function(ti){ti(Ue)})})},[Ue]),Nt.createElement(le.Provider,{value:ii},Ln)};return{Context:le,Provider:De,defaultValue:oe}}function qt(oe,le){var De=(0,Me.Z)(typeof le=="function"?le:function(ti){if(le===void 0)return ti;if(!Array.isArray(le))return ti[le];var Bi={};return le.forEach(function(Ti){Bi[Ti]=ti[Ti]}),Bi}),je=Nt.useContext(oe==null?void 0:oe.Context),rn=je||{},Ue=rn.listeners,Ln=rn.getValue,kn=Nt.useRef();kn.current=De(je?Ln():oe==null?void 0:oe.defaultValue);var wn=Nt.useState({}),Vn=(0,Qt.Z)(wn,2),ii=Vn[1];return(0,Ut.Z)(function(){if(!je)return;function ti(Bi){var Ti=De(Bi);(0,pe.Z)(kn.current,Ti,!0)||ii({})}return Ue.add(ti),function(){Ue.delete(ti)}},[je]),kn.current}var ce=xt(72308),Ce=xt(8654);function Be(){var oe=Nt.createContext(null);function le(){return Nt.useContext(oe)}function De(rn,Ue){var Ln=(0,Ce.Yr)(rn),kn=function(Vn,ii){var ti=Ln?{ref:ii}:{},Bi=Nt.useRef(0),Ti=Nt.useRef(Vn),bi=le();return bi!==null?Nt.createElement(rn,(0,ce.Z)({},Vn,ti)):((!Ue||Ue(Ti.current,Vn))&&(Bi.current+=1),Ti.current=Vn,Nt.createElement(oe.Provider,{value:Bi.current},Nt.createElement(rn,(0,ce.Z)({},Vn,ti))))};return Ln?Nt.forwardRef(kn):kn}function je(rn,Ue){var Ln=(0,Ce.Yr)(rn),kn=function(Vn,ii){var ti=Ln?{ref:ii}:{};return le(),Nt.createElement(rn,(0,ce.Z)({},Vn,ti))};return Ln?Nt.memo(Nt.forwardRef(kn),Ue):Nt.memo(kn,Ue)}return{makeImmutable:De,responseImmutable:je,useImmutableMark:le}}var Tt=Be(),et=Tt.makeImmutable,nt=Tt.responseImmutable,ht=Tt.useImmutableMark,st=Be(),gt=st.makeImmutable,vt=st.responseImmutable,wt=st.useImmutableMark,Ft=we(),It=Ft;function At(oe,le){var De=Nt.useRef(0);De.current+=1;var je=Nt.useRef(oe),rn=[];Object.keys(oe||{}).map(function(Ln){var kn;(oe==null?void 0:oe[Ln])!==((kn=je.current)===null||kn===void 0?void 0:kn[Ln])&&rn.push(Ln)}),je.current=oe;var Ue=Nt.useRef([]);return rn.length&&(Ue.current=rn),Nt.useDebugValue(De.current),Nt.useDebugValue(Ue.current.join(", ")),le&&console.log("".concat(le,":"),De.current,Ue.current),De.current}var Wt=null,re=Nt.memo(function(){var oe=At();return Nt.createElement("h1",null,"Render Times: ",oe)});re.displayName="RenderBlock";var ne=xt(62853),me=xt(77321),Vt=xt(49618),Le=xt(92310),he=xt.n(Le),Ge=xt(80547),Ke=xt(97938),Ve=xt(48736),sn=Nt.createContext({renderWithProps:!1}),Mn=sn,xe="RC_TABLE_KEY";function Ht(oe){return oe==null?[]:Array.isArray(oe)?oe:[oe]}function Je(oe){var le=[],De={};return oe.forEach(function(je){for(var rn=je||{},Ue=rn.key,Ln=rn.dataIndex,kn=Ue||Ht(Ln).join("-")||xe;De[kn];)kn="".concat(kn,"_next");De[kn]=!0,le.push(kn)}),le}function Tn(oe){return oe!=null}function An(oe){return oe&&(0,ne.Z)(oe)==="object"&&!Array.isArray(oe)&&!Nt.isValidElement(oe)}function ze(oe,le,De,je,rn,Ue){var Ln=Nt.useContext(Mn),kn=wt(),wn=(0,Ge.Z)(function(){if(Tn(je))return[je];var Vn=le==null||le===""?[]:Array.isArray(le)?le:[le],ii=(0,Ke.Z)(oe,Vn),ti=ii,Bi=void 0;if(rn){var Ti=rn(ii,oe,De);An(Ti)?(ti=Ti.children,Bi=Ti.props,Ln.renderWithProps=!0):ti=Ti}return[ti,Bi]},[kn,oe,je,le,rn,De],function(Vn,ii){if(Ue){var ti=(0,Qt.Z)(Vn,2),Bi=ti[1],Ti=(0,Qt.Z)(ii,2),bi=Ti[1];return Ue(bi,Bi)}return Ln.renderWithProps?!0:!(0,pe.Z)(Vn,ii,!0)});return wn}function Te(oe,le,De,je){var rn=oe+le-1;return oe<=je&&rn>=De}function dn(oe,le){return qt(It,function(De){var je=Te(oe,le||1,De.hoverStartRow,De.hoverEndRow);return[je,De.onHover]})}var Hn=function(le){var De=le.ellipsis,je=le.rowType,rn=le.children,Ue,Ln=De===!0?{showTitle:!0}:De;return Ln&&(Ln.showTitle||je==="header")&&(typeof rn=="string"||typeof rn=="number"?Ue=rn.toString():Nt.isValidElement(rn)&&typeof rn.props.children=="string"&&(Ue=rn.props.children)),Ue};function hn(oe){var le,De,je,rn,Ue,Ln,kn,wn,Vn=oe.component,ii=oe.children,ti=oe.ellipsis,Bi=oe.scope,Ti=oe.prefixCls,bi=oe.className,no=oe.align,Mi=oe.record,Qi=oe.render,Ui=oe.dataIndex,vo=oe.renderIndex,Do=oe.shouldCellUpdate,Jo=oe.index,ro=oe.rowType,Io=oe.colSpan,mr=oe.rowSpan,po=oe.fixLeft,To=oe.fixRight,ho=oe.firstFixLeft,Hi=oe.lastFixLeft,bo=oe.firstFixRight,Wo=oe.lastFixRight,ir=oe.appendNode,rr=oe.additionalProps,ao=rr===void 0?{}:rr,yr=oe.isSticky,br="".concat(Ti,"-cell"),na=qt(It,["supportSticky","allColumnsFixedLeft"]),Ar=na.supportSticky,Da=na.allColumnsFixedLeft,Oa=ze(Mi,Ui,vo,ii,Qi,Do),Pr=(0,Qt.Z)(Oa,2),Uo=Pr[0],_r=Pr[1],Aa={},ba=typeof po=="number"&&Ar,os=typeof To=="number"&&Ar;ba&&(Aa.position="sticky",Aa.left=po),os&&(Aa.position="sticky",Aa.right=To);var ar=(le=(De=(je=_r==null?void 0:_r.colSpan)!==null&&je!==void 0?je:ao.colSpan)!==null&&De!==void 0?De:Io)!==null&&le!==void 0?le:1,er=(rn=(Ue=(Ln=_r==null?void 0:_r.rowSpan)!==null&&Ln!==void 0?Ln:ao.rowSpan)!==null&&Ue!==void 0?Ue:mr)!==null&&rn!==void 0?rn:1,sr=dn(Jo,er),Ro=(0,Qt.Z)(sr,2),Yr=Ro[0],zo=Ro[1],vr=function(es){var ms;Mi&&zo(Jo,Jo+er-1),ao==null||(ms=ao.onMouseEnter)===null||ms===void 0||ms.call(ao,es)},Hr=function(es){var ms;Mi&&zo(-1,-1),ao==null||(ms=ao.onMouseLeave)===null||ms===void 0||ms.call(ao,es)};if(ar===0||er===0)return null;var Gr=(kn=ao.title)!==null&&kn!==void 0?kn:Hn({rowType:ro,ellipsis:ti,children:Uo}),bs=he()(br,bi,(wn={},(0,Vt.Z)(wn,"".concat(br,"-fix-left"),ba&&Ar),(0,Vt.Z)(wn,"".concat(br,"-fix-left-first"),ho&&Ar),(0,Vt.Z)(wn,"".concat(br,"-fix-left-last"),Hi&&Ar),(0,Vt.Z)(wn,"".concat(br,"-fix-left-all"),Hi&&Da&&Ar),(0,Vt.Z)(wn,"".concat(br,"-fix-right"),os&&Ar),(0,Vt.Z)(wn,"".concat(br,"-fix-right-first"),bo&&Ar),(0,Vt.Z)(wn,"".concat(br,"-fix-right-last"),Wo&&Ar),(0,Vt.Z)(wn,"".concat(br,"-ellipsis"),ti),(0,Vt.Z)(wn,"".concat(br,"-with-append"),ir),(0,Vt.Z)(wn,"".concat(br,"-fix-sticky"),(ba||os)&&yr&&Ar),(0,Vt.Z)(wn,"".concat(br,"-row-hover"),!_r&&Yr),wn),ao.className,_r==null?void 0:_r.className),us={};no&&(us.textAlign=no);var _s=(0,me.Z)((0,me.Z)((0,me.Z)((0,me.Z)({},Aa),ao.style),us),_r==null?void 0:_r.style),ia=Uo;return(0,ne.Z)(ia)==="object"&&!Array.isArray(ia)&&!Nt.isValidElement(ia)&&(ia=null),ti&&(Hi||bo)&&(ia=Nt.createElement("span",{className:"".concat(br,"-content")},ia)),Nt.createElement(Vn,(0,ce.Z)({},_r,ao,{className:bs,style:_s,title:Gr,scope:Bi,onMouseEnter:vr,onMouseLeave:Hr,colSpan:ar!==1?ar:null,rowSpan:er!==1?er:null}),ir,ia)}var pn=Nt.memo(hn);function de(oe,le,De,je,rn,Ue){var Ln=De[oe]||{},kn=De[le]||{},wn,Vn;Ln.fixed==="left"?wn=je.left[rn==="rtl"?le:oe]:kn.fixed==="right"&&(Vn=je.right[rn==="rtl"?oe:le]);var ii=!1,ti=!1,Bi=!1,Ti=!1,bi=De[le+1],no=De[oe-1],Mi=!(Ue!=null&&Ue.children);if(rn==="rtl"){if(wn!==void 0){var Qi=no&&no.fixed==="left";Ti=!Qi&&Mi}else if(Vn!==void 0){var Ui=bi&&bi.fixed==="right";Bi=!Ui&&Mi}}else if(wn!==void 0){var vo=bi&&bi.fixed==="left";ii=!vo&&Mi}else if(Vn!==void 0){var Do=no&&no.fixed==="right";ti=!Do&&Mi}return{fixLeft:wn,fixRight:Vn,lastFixLeft:ii,firstFixRight:ti,lastFixRight:Bi,firstFixLeft:Ti,isSticky:je.isSticky}}var vn=Nt.createContext({}),bn=vn;function Qe(oe){var le=oe.className,De=oe.index,je=oe.children,rn=oe.colSpan,Ue=rn===void 0?1:rn,Ln=oe.rowSpan,kn=oe.align,wn=qt(It,["prefixCls","direction"]),Vn=wn.prefixCls,ii=wn.direction,ti=Nt.useContext(bn),Bi=ti.scrollColumnIndex,Ti=ti.stickyOffsets,bi=ti.flattenColumns,no=ti.columns,Mi=De+Ue-1,Qi=Mi+1===Bi?Ue+1:Ue,Ui=de(De,De+Qi-1,bi,Ti,ii,no==null?void 0:no[De]);return Nt.createElement(pn,(0,ce.Z)({className:le,index:De,component:"td",prefixCls:Vn,record:null,dataIndex:null,align:kn,colSpan:Qi,rowSpan:Ln,render:function(){return je}},Ui))}var Pn=xt(74416),Ne=["children"];function Pe(oe){var le=oe.children,De=(0,Pn.Z)(oe,Ne);return Nt.createElement("tr",De,le)}function ie(oe){var le=oe.children;return le}ie.Row=Pe,ie.Cell=Qe;var Dt=ie;function fe(oe){var le=oe.children,De=oe.stickyOffsets,je=oe.flattenColumns,rn=oe.columns,Ue=qt(It,"prefixCls"),Ln=je.length-1,kn=je[Ln],wn=Nt.useMemo(function(){return{stickyOffsets:De,flattenColumns:je,scrollColumnIndex:kn!=null&&kn.scrollbar?Ln:null,columns:rn}},[kn,je,Ln,De,rn]);return Nt.createElement(bn.Provider,{value:wn},Nt.createElement("tfoot",{className:"".concat(Ue,"-summary")},le))}var Se=vt(fe),ee=Dt,Kt=xt(70425),kt=xt(29301),St=xt(29194),mt=xt(24514),Lt=xt(75152),zt=xt(26112);function Et(oe,le,De,je,rn,Ue,Ln){oe.push({record:le,indent:De,index:Ln});var kn=Ue(le),wn=rn==null?void 0:rn.has(kn);if(le&&Array.isArray(le[je])&&wn)for(var Vn=0;Vn<le[je].length;Vn+=1)Et(oe,le[je][Vn],De+1,je,rn,Ue,Vn)}function Yt(oe,le,De,je){var rn=Nt.useMemo(function(){if(De!=null&&De.size){for(var Ue=[],Ln=0;Ln<(oe==null?void 0:oe.length);Ln+=1){var kn=oe[Ln];Et(Ue,kn,0,le,De,je,Ln)}return Ue}return oe==null?void 0:oe.map(function(wn,Vn){return{record:wn,indent:0,index:Vn}})},[oe,le,De,je]);return rn}function $e(oe){var le=oe.prefixCls,De=oe.children,je=oe.component,rn=oe.cellComponent,Ue=oe.className,Ln=oe.expanded,kn=oe.colSpan,wn=oe.isEmpty,Vn=qt(It,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),ii=Vn.scrollbarSize,ti=Vn.fixHeader,Bi=Vn.fixColumn,Ti=Vn.componentWidth,bi=Vn.horizonScroll,no=De;return(wn?bi&&Ti:Bi)&&(no=Nt.createElement("div",{style:{width:Ti-(ti?ii:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(le,"-expanded-row-fixed")},no)),Nt.createElement(je,{className:Ue,style:{display:Ln?null:"none"}},Nt.createElement(pn,{component:rn,prefixCls:le,colSpan:kn},no))}var ln=$e;function qe(oe,le,De,je){var rn=qt(It,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Ue=rn.flattenColumns,Ln=rn.expandableType,kn=rn.expandedKeys,wn=rn.childrenColumnName,Vn=rn.onTriggerExpand,ii=rn.rowExpandable,ti=rn.onRow,Bi=rn.expandRowByClick,Ti=rn.rowClassName,bi=Ln==="nest",no=Ln==="row"&&(!ii||ii(oe)),Mi=no||bi,Qi=kn&&kn.has(le),Ui=wn&&oe&&oe[wn],vo=(0,Kt.useEvent)(Vn),Do=ti==null?void 0:ti(oe,De),Jo=Do==null?void 0:Do.onClick,ro=function(To){Bi&&Mi&&Vn(oe,To);for(var ho=arguments.length,Hi=new Array(ho>1?ho-1:0),bo=1;bo<ho;bo++)Hi[bo-1]=arguments[bo];Jo==null||Jo.apply(void 0,[To].concat(Hi))},Io;typeof Ti=="string"?Io=Ti:typeof Ti=="function"&&(Io=Ti(oe,De,je));var mr=Je(Ue);return(0,me.Z)((0,me.Z)({},rn),{},{columnsKey:mr,nestExpandable:bi,expanded:Qi,hasNestChildren:Ui,record:oe,onTriggerExpand:vo,rowSupportExpand:no,expandable:Mi,rowProps:(0,me.Z)((0,me.Z)({},Do),{},{className:he()(Io,Do==null?void 0:Do.className),onClick:ro})})}function Nn(oe,le,De,je,rn){var Ue=oe.record,Ln=oe.prefixCls,kn=oe.columnsKey,wn=oe.fixedInfoList,Vn=oe.expandIconColumnIndex,ii=oe.nestExpandable,ti=oe.indentSize,Bi=oe.expandIcon,Ti=oe.expanded,bi=oe.hasNestChildren,no=oe.onTriggerExpand,Mi=kn[De],Qi=wn[De],Ui;De===(Vn||0)&&ii&&(Ui=Nt.createElement(Nt.Fragment,null,Nt.createElement("span",{style:{paddingLeft:"".concat(ti*je,"px")},className:"".concat(Ln,"-row-indent indent-level-").concat(je)}),Bi({prefixCls:Ln,expanded:Ti,expandable:bi,record:Ue,onExpand:no})));var vo;return le.onCell&&(vo=le.onCell(Ue,rn)),{key:Mi,fixedInfo:Qi,appendCellNode:Ui,additionalCellProps:vo||{}}}function ai(oe){var le=oe.className,De=oe.style,je=oe.record,rn=oe.index,Ue=oe.renderIndex,Ln=oe.rowKey,kn=oe.indent,wn=kn===void 0?0:kn,Vn=oe.rowComponent,ii=oe.cellComponent,ti=oe.scopeCellComponent,Bi=qe(je,Ln,rn,wn),Ti=Bi.prefixCls,bi=Bi.flattenColumns,no=Bi.expandedRowClassName,Mi=Bi.expandedRowRender,Qi=Bi.rowProps,Ui=Bi.expanded,vo=Bi.rowSupportExpand,Do=Nt.useState(!1),Jo=(0,Qt.Z)(Do,2),ro=Jo[0],Io=Jo[1];Nt.useEffect(function(){Ui&&Io(!0)},[Ui]);var mr=Nt.createElement(Vn,(0,ce.Z)({},Qi,{"data-row-key":Ln,className:he()(le,"".concat(Ti,"-row"),"".concat(Ti,"-row-level-").concat(wn),Qi==null?void 0:Qi.className),style:(0,me.Z)((0,me.Z)({},De),Qi==null?void 0:Qi.style)}),bi.map(function(Hi,bo){var Wo=Hi.render,ir=Hi.dataIndex,rr=Hi.className,ao=Nn(Bi,Hi,bo,wn,rn),yr=ao.key,br=ao.fixedInfo,na=ao.appendCellNode,Ar=ao.additionalCellProps;return Nt.createElement(pn,(0,ce.Z)({className:rr,ellipsis:Hi.ellipsis,align:Hi.align,scope:Hi.rowScope,component:Hi.rowScope?ti:ii,prefixCls:Ti,key:yr,record:je,index:rn,renderIndex:Ue,dataIndex:ir,render:Wo,shouldCellUpdate:Hi.shouldCellUpdate},br,{appendNode:na,additionalProps:Ar}))})),po;if(vo&&(ro||Ui)){var To=Mi(je,rn,wn+1,Ui),ho=no&&no(je,rn,wn);po=Nt.createElement(ln,{expanded:Ui,className:he()("".concat(Ti,"-expanded-row"),"".concat(Ti,"-expanded-row-level-").concat(wn+1),ho),prefixCls:Ti,component:Vn,cellComponent:ii,colSpan:bi.length,isEmpty:!1},To)}return Nt.createElement(Nt.Fragment,null,mr,po)}ai.displayName="BodyRow";var Kn=vt(ai);function ci(oe){var le=oe.columnKey,De=oe.onColumnResize,je=Nt.useRef();return Nt.useEffect(function(){je.current&&De(le,je.current.offsetWidth)},[]),Nt.createElement(kt.Z,{data:le},Nt.createElement("td",{ref:je,style:{padding:0,border:0,height:0}},Nt.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Ci(oe){var le=oe.prefixCls,De=oe.columnsKey,je=oe.onColumnResize;return Nt.createElement("tr",{"aria-hidden":"true",className:"".concat(le,"-measure-row"),style:{height:0,fontSize:0}},Nt.createElement(kt.Z.Collection,{onBatchResize:function(Ue){Ue.forEach(function(Ln){var kn=Ln.data,wn=Ln.size;je(kn,wn.offsetWidth)})}},De.map(function(rn){return Nt.createElement(ci,{key:rn,columnKey:rn,onColumnResize:je})})))}function Wi(oe){var le=oe.data,De=oe.measureColumnWidth,je=qt(It,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),rn=je.prefixCls,Ue=je.getComponent,Ln=je.onColumnResize,kn=je.flattenColumns,wn=je.getRowKey,Vn=je.expandedKeys,ii=je.childrenColumnName,ti=je.emptyNode,Bi=Yt(le,ii,Vn,wn),Ti=Nt.useRef({renderWithProps:!1}),bi=Ue(["body","wrapper"],"tbody"),no=Ue(["body","row"],"tr"),Mi=Ue(["body","cell"],"td"),Qi=Ue(["body","cell"],"th"),Ui;le.length?Ui=Bi.map(function(Do,Jo){var ro=Do.record,Io=Do.indent,mr=Do.index,po=wn(ro,Jo);return Nt.createElement(Kn,{key:po,rowKey:po,record:ro,index:Jo,renderIndex:mr,rowComponent:no,cellComponent:Mi,scopeCellComponent:Qi,getRowKey:wn,indent:Io})}):Ui=Nt.createElement(ln,{expanded:!0,className:"".concat(rn,"-placeholder"),prefixCls:rn,component:no,cellComponent:Mi,colSpan:kn.length,isEmpty:!0},ti);var vo=Je(kn);return Nt.createElement(Mn.Provider,{value:Ti.current},Nt.createElement(bi,{className:"".concat(rn,"-tbody")},De&&Nt.createElement(Ci,{prefixCls:rn,columnsKey:vo,onColumnResize:Ln}),Ui))}Wi.displayName="Body";var Oi=vt(Wi),mo=["expandable"],Bo="RC_TABLE_INTERNAL_COL_DEFINE";function Ao(oe){var le=oe.expandable,De=(0,Pn.Z)(oe,mo),je;return"expandable"in oe?je=(0,me.Z)((0,me.Z)({},De),le):je=De,je.showExpandColumn===!1&&(je.expandIconColumnIndex=-1),je}var oi=["columnType"];function fi(oe){for(var le=oe.colWidths,De=oe.columns,je=oe.columCount,rn=[],Ue=je||De.length,Ln=!1,kn=Ue-1;kn>=0;kn-=1){var wn=le[kn],Vn=De&&De[kn],ii=Vn&&Vn[Bo];if(wn||ii||Ln){var ti=ii||{},Bi=ti.columnType,Ti=(0,Pn.Z)(ti,oi);rn.unshift(Nt.createElement("col",(0,ce.Z)({key:kn,style:{width:wn}},Ti))),Ln=!0}}return Nt.createElement("colgroup",null,rn)}var di=fi,mi=xt(80702),co=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Sn(oe,le){return(0,Nt.useMemo)(function(){for(var De=[],je=0;je<le;je+=1){var rn=oe[je];if(rn!==void 0)De[je]=rn;else return null}return De},[oe.join("_"),le])}var Ct=Nt.forwardRef(function(oe,le){var De=oe.className,je=oe.noData,rn=oe.columns,Ue=oe.flattenColumns,Ln=oe.colWidths,kn=oe.columCount,wn=oe.stickyOffsets,Vn=oe.direction,ii=oe.fixHeader,ti=oe.stickyTopOffset,Bi=oe.stickyBottomOffset,Ti=oe.stickyClassName,bi=oe.onScroll,no=oe.maxContentScroll,Mi=oe.children,Qi=(0,Pn.Z)(oe,co),Ui=qt(It,["prefixCls","scrollbarSize","isSticky"]),vo=Ui.prefixCls,Do=Ui.scrollbarSize,Jo=Ui.isSticky,ro=Jo&&!ii?0:Do,Io=Nt.useRef(null),mr=Nt.useCallback(function(rr){(0,Ce.mH)(le,rr),(0,Ce.mH)(Io,rr)},[]);Nt.useEffect(function(){var rr;function ao(yr){var br=yr,na=br.currentTarget,Ar=br.deltaX;Ar&&(bi({currentTarget:na,scrollLeft:na.scrollLeft+Ar}),yr.preventDefault())}return(rr=Io.current)===null||rr===void 0||rr.addEventListener("wheel",ao),function(){var yr;(yr=Io.current)===null||yr===void 0||yr.removeEventListener("wheel",ao)}},[]);var po=Nt.useMemo(function(){return Ue.every(function(rr){return rr.width})},[Ue]),To=Ue[Ue.length-1],ho={fixed:To?To.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(vo,"-cell-scrollbar")}}},Hi=(0,Nt.useMemo)(function(){return ro?[].concat((0,mi.Z)(rn),[ho]):rn},[ro,rn]),bo=(0,Nt.useMemo)(function(){return ro?[].concat((0,mi.Z)(Ue),[ho]):Ue},[ro,Ue]),Wo=(0,Nt.useMemo)(function(){var rr=wn.right,ao=wn.left;return(0,me.Z)((0,me.Z)({},wn),{},{left:Vn==="rtl"?[].concat((0,mi.Z)(ao.map(function(yr){return yr+ro})),[0]):ao,right:Vn==="rtl"?rr:[].concat((0,mi.Z)(rr.map(function(yr){return yr+ro})),[0]),isSticky:Jo})},[ro,wn,Jo]),ir=Sn(Ln,kn);return Nt.createElement("div",{style:(0,me.Z)({overflow:"hidden"},Jo?{top:ti,bottom:Bi}:{}),ref:mr,className:he()(De,(0,Vt.Z)({},Ti,!!Ti))},Nt.createElement("table",{style:{tableLayout:"fixed",visibility:je||ir?null:"hidden"}},(!je||!no||po)&&Nt.createElement(di,{colWidths:ir?[].concat((0,mi.Z)(ir),[ro]):[],columCount:kn+1,columns:bo}),Mi((0,me.Z)((0,me.Z)({},Qi),{},{stickyOffsets:Wo,columns:Hi,flattenColumns:bo}))))});Ct.displayName="FixedHolder";var Yn=Nt.memo(Ct);function yi(oe){var le=oe.cells,De=oe.stickyOffsets,je=oe.flattenColumns,rn=oe.rowComponent,Ue=oe.cellComponent,Ln=oe.tdCellComponent,kn=oe.onHeaderRow,wn=oe.index,Vn=qt(It,["prefixCls","direction"]),ii=Vn.prefixCls,ti=Vn.direction,Bi;kn&&(Bi=kn(le.map(function(bi){return bi.column}),wn));var Ti=Je(le.map(function(bi){return bi.column}));return Nt.createElement(rn,Bi,le.map(function(bi,no){var Mi=bi.column,Qi=de(bi.colStart,bi.colEnd,je,De,ti,Mi),Ui;return Mi&&Mi.onHeaderCell&&(Ui=bi.column.onHeaderCell(Mi)),Nt.createElement(pn,(0,ce.Z)({},bi,{scope:Mi.title?bi.colSpan>1?"colgroup":"col":null,ellipsis:Mi.ellipsis,align:Mi.align,component:Mi.title?Ue:Ln,prefixCls:ii,key:Ti[no]},Qi,{additionalProps:Ui,rowType:"header"}))}))}yi.displayName="HeaderRow";var _e=yi;function Wn(oe){var le=[];function De(Ln,kn){var wn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;le[wn]=le[wn]||[];var Vn=kn,ii=Ln.filter(Boolean).map(function(ti){var Bi={key:ti.key,className:ti.className||"",children:ti.title,column:ti,colStart:Vn},Ti=1,bi=ti.children;return bi&&bi.length>0&&(Ti=De(bi,Vn,wn+1).reduce(function(no,Mi){return no+Mi},0),Bi.hasSubColumns=!0),"colSpan"in ti&&(Ti=ti.colSpan),"rowSpan"in ti&&(Bi.rowSpan=ti.rowSpan),Bi.colSpan=Ti,Bi.colEnd=Bi.colStart+Ti-1,le[wn].push(Bi),Vn+=Ti,Ti});return ii}De(oe,0);for(var je=le.length,rn=function(kn){le[kn].forEach(function(wn){!("rowSpan"in wn)&&!wn.hasSubColumns&&(wn.rowSpan=je-kn)})},Ue=0;Ue<je;Ue+=1)rn(Ue);return le}function _n(oe){var le=oe.stickyOffsets,De=oe.columns,je=oe.flattenColumns,rn=oe.onHeaderRow,Ue=qt(It,["prefixCls","getComponent"]),Ln=Ue.prefixCls,kn=Ue.getComponent,wn=Nt.useMemo(function(){return Wn(De)},[De]),Vn=kn(["header","wrapper"],"thead"),ii=kn(["header","row"],"tr"),ti=kn(["header","cell"],"th"),Bi=kn(["header","cell"],"td");return Nt.createElement(Vn,{className:"".concat(Ln,"-thead")},wn.map(function(Ti,bi){var no=Nt.createElement(_e,{key:bi,flattenColumns:je,cells:Ti,stickyOffsets:le,rowComponent:ii,cellComponent:ti,tdCellComponent:Bi,onHeaderRow:rn,index:bi});return no}))}var si=vt(_n),ri=xt(11592);function hi(oe){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof le=="number"?le:le.endsWith("%")?oe*parseFloat(le)/100:null}function Fe(oe,le){return Nt.useMemo(function(){if(le&&le>0){var De=0,je=0;oe.forEach(function(Vn){var ii=hi(le,Vn.width);ii?De+=ii:je+=1});var rn=le-De,Ue=je,Ln=rn/je,kn=0,wn=oe.map(function(Vn){var ii=(0,me.Z)({},Vn),ti=hi(le,ii.width);if(ti)ii.width=ti;else{var Bi=Math.floor(Ln);ii.width=Ue===1?rn:Bi,rn-=Bi,Ue-=1}return kn+=ii.width,ii});return[wn,kn]}return[oe,le]},[oe,le])}var Ae=["children"],Zt=["fixed"];function He(oe){return(0,ri.Z)(oe).filter(function(le){return Nt.isValidElement(le)}).map(function(le){var De=le.key,je=le.props,rn=je.children,Ue=(0,Pn.Z)(je,Ae),Ln=(0,me.Z)({key:De},Ue);return rn&&(Ln.children=He(rn)),Ln})}function fn(oe){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return oe.filter(function(De){return De&&(0,ne.Z)(De)==="object"}).reduce(function(De,je,rn){var Ue=je.fixed,Ln=Ue===!0?"left":Ue,kn="".concat(le,"-").concat(rn),wn=je.children;return wn&&wn.length>0?[].concat((0,mi.Z)(De),(0,mi.Z)(fn(wn,kn).map(function(Vn){return(0,me.Z)({fixed:Ln},Vn)}))):[].concat((0,mi.Z)(De),[(0,me.Z)((0,me.Z)({key:kn},je),{},{fixed:Ln})])},[])}function ye(oe){for(var le=!0,De=0;De<oe.length;De+=1){var je=oe[De];if(le&&je.fixed!=="left")le=!1;else if(!le&&je.fixed==="left"){warning(!1,"Index ".concat(De-1," of `columns` missing `fixed='left'` prop."));break}}for(var rn=!0,Ue=oe.length-1;Ue>=0;Ue-=1){var Ln=oe[Ue];if(rn&&Ln.fixed!=="right")rn=!1;else if(!rn&&Ln.fixed==="right"){warning(!1,"Index ".concat(Ue+1," of `columns` missing `fixed='right'` prop."));break}}}function ae(oe){return oe.map(function(le){var De=le.fixed,je=(0,Pn.Z)(le,Zt),rn=De;return De==="left"?rn="right":De==="right"&&(rn="left"),(0,me.Z)({fixed:rn},je)})}function Ye(oe,le){var De=oe.prefixCls,je=oe.columns,rn=oe.children,Ue=oe.expandable,Ln=oe.expandedKeys,kn=oe.columnTitle,wn=oe.getRowKey,Vn=oe.onTriggerExpand,ii=oe.expandIcon,ti=oe.rowExpandable,Bi=oe.expandIconColumnIndex,Ti=oe.direction,bi=oe.expandRowByClick,no=oe.columnWidth,Mi=oe.fixed,Qi=oe.scrollWidth,Ui=Nt.useMemo(function(){return je||He(rn)},[je,rn]),vo=Nt.useMemo(function(){if(Ue){var To,ho=Ui.slice();if(!ho.includes(Ot)){var Hi=Bi||0;Hi>=0&&ho.splice(Hi,0,Ot)}var bo=ho.indexOf(Ot);ho=ho.filter(function(ao,yr){return ao!==Ot||yr===bo});var Wo=Ui[bo],ir;(Mi==="left"||Mi)&&!Bi?ir="left":(Mi==="right"||Mi)&&Bi===Ui.length?ir="right":ir=Wo?Wo.fixed:null;var rr=(To={},(0,Vt.Z)(To,Bo,{className:"".concat(De,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Vt.Z)(To,"title",kn),(0,Vt.Z)(To,"fixed",ir),(0,Vt.Z)(To,"className","".concat(De,"-row-expand-icon-cell")),(0,Vt.Z)(To,"width",no),(0,Vt.Z)(To,"render",function(yr,br,na){var Ar=wn(br,na),Da=Ln.has(Ar),Oa=ti?ti(br):!0,Pr=ii({prefixCls:De,expanded:Da,expandable:Oa,record:br,onExpand:Vn});return bi?Nt.createElement("span",{onClick:function(_r){return _r.stopPropagation()}},Pr):Pr}),To);return ho.map(function(ao){return ao===Ot?rr:ao})}return Ui.filter(function(ao){return ao!==Ot})},[Ue,Ui,wn,Ln,ii,Ti]),Do=Nt.useMemo(function(){var To=vo;return le&&(To=le(To)),To.length||(To=[{render:function(){return null}}]),To},[le,vo,Ti]),Jo=Nt.useMemo(function(){return Ti==="rtl"?ae(fn(Do)):fn(Do)},[Do,Ti,Qi]),ro=Fe(Jo,Qi),Io=(0,Qt.Z)(ro,2),mr=Io[0],po=Io[1];return[Do,mr,po]}var gn=Ye;function In(oe){var le,De=oe.prefixCls,je=oe.record,rn=oe.onExpand,Ue=oe.expanded,Ln=oe.expandable,kn="".concat(De,"-row-expand-icon");if(!Ln)return Nt.createElement("span",{className:he()(kn,"".concat(De,"-row-spaced"))});var wn=function(ii){rn(je,ii),ii.stopPropagation()};return Nt.createElement("span",{className:he()(kn,(le={},(0,Vt.Z)(le,"".concat(De,"-row-expanded"),Ue),(0,Vt.Z)(le,"".concat(De,"-row-collapsed"),!Ue),le)),onClick:wn})}function Re(oe,le,De){var je=[];function rn(Ue){(Ue||[]).forEach(function(Ln,kn){je.push(le(Ln,kn)),rn(Ln[De])})}return rn(oe),je}function _t(oe,le,De){var je=Ao(oe),rn=je.expandIcon,Ue=je.expandedRowKeys,Ln=je.defaultExpandedRowKeys,kn=je.defaultExpandAllRows,wn=je.expandedRowRender,Vn=je.onExpand,ii=je.onExpandedRowsChange,ti=je.childrenColumnName,Bi=rn||In,Ti=ti||"children",bi=Nt.useMemo(function(){return wn?"row":oe.expandable&&oe.internalHooks===jt&&oe.expandable.__PARENT_RENDER_ICON__||le.some(function(Jo){return Jo&&(0,ne.Z)(Jo)==="object"&&Jo[Ti]})?"nest":!1},[!!wn,le]),no=Nt.useState(function(){return Ln||(kn?Re(le,De,Ti):[])}),Mi=(0,Qt.Z)(no,2),Qi=Mi[0],Ui=Mi[1],vo=Nt.useMemo(function(){return new Set(Ue||Qi||[])},[Ue,Qi]),Do=Nt.useCallback(function(Jo){var ro=De(Jo,le.indexOf(Jo)),Io,mr=vo.has(ro);mr?(vo.delete(ro),Io=(0,mi.Z)(vo)):Io=[].concat((0,mi.Z)(vo),[ro]),Ui(Io),Vn&&Vn(!mr,Jo),ii&&ii(Io)},[De,vo,le,Vn,ii]);return[je,bi,vo,Bi,Ti,Do]}function nn(oe,le,De,je){var rn=oe.map(function(Ue,Ln){return de(Ln,Ln,oe,le,De,je==null?void 0:je[Ln])});return(0,Ge.Z)(function(){return rn},[rn],function(Ue,Ln){return!(0,pe.Z)(Ue,Ln)})}function cn(oe){var le=(0,Nt.useRef)(oe),De=(0,Nt.useState)({}),je=(0,Qt.Z)(De,2),rn=je[1],Ue=(0,Nt.useRef)(null),Ln=(0,Nt.useRef)([]);function kn(wn){Ln.current.push(wn);var Vn=Promise.resolve();Ue.current=Vn,Vn.then(function(){if(Ue.current===Vn){var ii=Ln.current,ti=le.current;Ln.current=[],ii.forEach(function(Bi){le.current=Bi(le.current)}),Ue.current=null,ti!==le.current&&rn({})}})}return(0,Nt.useEffect)(function(){return function(){Ue.current=null}},[]),[le.current,kn]}function Bn(oe){var le=(0,Nt.useRef)(oe||null),De=(0,Nt.useRef)();function je(){window.clearTimeout(De.current)}function rn(Ln){le.current=Ln,je(),De.current=window.setTimeout(function(){le.current=null,De.current=void 0},100)}function Ue(){return le.current}return(0,Nt.useEffect)(function(){return je},[]),[rn,Ue]}function Oe(){var oe=Nt.useState(-1),le=(0,Qt.Z)(oe,2),De=le[0],je=le[1],rn=Nt.useState(-1),Ue=(0,Qt.Z)(rn,2),Ln=Ue[0],kn=Ue[1],wn=Nt.useCallback(function(Vn,ii){je(Vn),kn(ii)},[]);return[De,Ln,wn]}var Xe=xt(47273),Gn=(0,Xe.Z)()?window:null;function Xn(oe,le){var De=(0,ne.Z)(oe)==="object"?oe:{},je=De.offsetHeader,rn=je===void 0?0:je,Ue=De.offsetSummary,Ln=Ue===void 0?0:Ue,kn=De.offsetScroll,wn=kn===void 0?0:kn,Vn=De.getContainer,ii=Vn===void 0?function(){return Gn}:Vn,ti=ii()||Gn;return Nt.useMemo(function(){var Bi=!!oe;return{isSticky:Bi,stickyClassName:Bi?"".concat(le,"-sticky-holder"):"",offsetHeader:rn,offsetSummary:Ln,offsetScroll:wn,container:ti}},[wn,rn,Ln,le,ti])}function Jn(oe,le,De){var je=(0,Nt.useMemo)(function(){for(var rn=[],Ue=[],Ln=0,kn=0,wn=0;wn<le;wn+=1)if(De==="rtl"){Ue[wn]=kn,kn+=oe[wn]||0;var Vn=le-wn-1;rn[Vn]=Ln,Ln+=oe[Vn]||0}else{rn[wn]=Ln,Ln+=oe[wn]||0;var ii=le-wn-1;Ue[ii]=kn,kn+=oe[ii]||0}return{left:rn,right:Ue}},[oe,le,De]);return je}var Rn=Jn;function ni(oe){var le=oe.className,De=oe.children;return Nt.createElement("div",{className:le},De)}var Qn=ni,qn=xt(8224),Si=xt(55468),Vi=function(le,De){var je,rn,Ue=le.scrollBodyRef,Ln=le.onScroll,kn=le.offsetScroll,wn=le.container,Vn=qt(It,"prefixCls"),ii=((je=Ue.current)===null||je===void 0?void 0:je.scrollWidth)||0,ti=((rn=Ue.current)===null||rn===void 0?void 0:rn.clientWidth)||0,Bi=ii&&ti*(ti/ii),Ti=Nt.useRef(),bi=cn({scrollLeft:0,isHiddenScrollBar:!1}),no=(0,Qt.Z)(bi,2),Mi=no[0],Qi=no[1],Ui=Nt.useRef({delta:0,x:0}),vo=Nt.useState(!1),Do=(0,Qt.Z)(vo,2),Jo=Do[0],ro=Do[1],Io=function(){ro(!1)},mr=function(bo){bo.persist(),Ui.current.delta=bo.pageX-Mi.scrollLeft,Ui.current.x=0,ro(!0),bo.preventDefault()},po=function(bo){var Wo,ir=bo||((Wo=window)===null||Wo===void 0?void 0:Wo.event),rr=ir.buttons;if(!Jo||rr===0){Jo&&ro(!1);return}var ao=Ui.current.x+bo.pageX-Ui.current.x-Ui.current.delta;ao<=0&&(ao=0),ao+Bi>=ti&&(ao=ti-Bi),Ln({scrollLeft:ao/ti*(ii+2)}),Ui.current.x=bo.pageX},To=function(){if(Ue.current){var bo=(0,Si.os)(Ue.current).top,Wo=bo+Ue.current.offsetHeight,ir=wn===window?document.documentElement.scrollTop+window.innerHeight:(0,Si.os)(wn).top+wn.clientHeight;Wo-(0,Lt.Z)()<=ir||bo>=ir-kn?Qi(function(rr){return(0,me.Z)((0,me.Z)({},rr),{},{isHiddenScrollBar:!0})}):Qi(function(rr){return(0,me.Z)((0,me.Z)({},rr),{},{isHiddenScrollBar:!1})})}},ho=function(bo){Qi(function(Wo){return(0,me.Z)((0,me.Z)({},Wo),{},{scrollLeft:bo/ii*ti||0})})};return Nt.useImperativeHandle(De,function(){return{setScrollLeft:ho}}),Nt.useEffect(function(){var Hi=(0,qn.Z)(document.body,"mouseup",Io,!1),bo=(0,qn.Z)(document.body,"mousemove",po,!1);return To(),function(){Hi.remove(),bo.remove()}},[Bi,Jo]),Nt.useEffect(function(){var Hi=(0,qn.Z)(wn,"scroll",To,!1),bo=(0,qn.Z)(window,"resize",To,!1);return function(){Hi.remove(),bo.remove()}},[wn]),Nt.useEffect(function(){Mi.isHiddenScrollBar||Qi(function(Hi){var bo=Ue.current;return bo?(0,me.Z)((0,me.Z)({},Hi),{},{scrollLeft:bo.scrollLeft/bo.scrollWidth*bo.clientWidth}):Hi})},[Mi.isHiddenScrollBar]),ii<=ti||!Bi||Mi.isHiddenScrollBar?null:Nt.createElement("div",{style:{height:(0,Lt.Z)(),width:ti,bottom:kn},className:"".concat(Vn,"-sticky-scroll")},Nt.createElement("div",{onMouseDown:mr,ref:Ti,className:he()("".concat(Vn,"-sticky-scroll-bar"),(0,Vt.Z)({},"".concat(Vn,"-sticky-scroll-bar-active"),Jo)),style:{width:"".concat(Bi,"px"),transform:"translate3d(".concat(Mi.scrollLeft,"px, 0, 0)")}}))},un=Nt.forwardRef(Vi);function lo(oe){return null}var to=lo;function Ki(oe){return null}var en=Ki,Dn="rc-table",gi=[],ki={};function Pi(){return"No Data"}function Di(oe){var le,De=(0,me.Z)({rowKey:"key",prefixCls:Dn,emptyText:Pi},oe),je=De.prefixCls,rn=De.className,Ue=De.rowClassName,Ln=De.style,kn=De.data,wn=De.rowKey,Vn=De.scroll,ii=De.tableLayout,ti=De.direction,Bi=De.title,Ti=De.footer,bi=De.summary,no=De.caption,Mi=De.id,Qi=De.showHeader,Ui=De.components,vo=De.emptyText,Do=De.onRow,Jo=De.onHeaderRow,ro=De.internalHooks,Io=De.transformColumns,mr=De.internalRefs,po=De.tailor,To=De.sticky,ho=kn||gi,Hi=!!ho.length,bo=ro===jt,Wo=Nt.useCallback(function(ra,Fa){return(0,Ke.Z)(Ui,ra)||Fa},[Ui]),ir=Nt.useMemo(function(){return typeof wn=="function"?wn:function(ra){var Fa=ra&&ra[wn];return Fa}},[wn]),rr=Wo(["body"]),ao=Oe(),yr=(0,Qt.Z)(ao,3),br=yr[0],na=yr[1],Ar=yr[2],Da=_t(De,ho,ir),Oa=(0,Qt.Z)(Da,6),Pr=Oa[0],Uo=Oa[1],_r=Oa[2],Aa=Oa[3],ba=Oa[4],os=Oa[5],ar=Vn==null?void 0:Vn.x,er=Nt.useState(0),sr=(0,Qt.Z)(er,2),Ro=sr[0],Yr=sr[1],zo=gn((0,me.Z)((0,me.Z)((0,me.Z)({},De),Pr),{},{expandable:!!Pr.expandedRowRender,columnTitle:Pr.columnTitle,expandedKeys:_r,getRowKey:ir,onTriggerExpand:os,expandIcon:Aa,expandIconColumnIndex:Pr.expandIconColumnIndex,direction:ti,scrollWidth:bo&&po&&typeof ar=="number"?ar:null}),bo?Io:null),vr=(0,Qt.Z)(zo,3),Hr=vr[0],Gr=vr[1],bs=vr[2],us=bs!=null?bs:ar,_s=Nt.useMemo(function(){return{columns:Hr,flattenColumns:Gr}},[Hr,Gr]),ia=Nt.useRef(),Es=Nt.useRef(),es=Nt.useRef(),ms=Nt.useRef(),Wu=Nt.useRef(),oa=Nt.useState(!1),ca=(0,Qt.Z)(oa,2),ma=ca[0],Ya=ca[1],vs=Nt.useState(!1),Ir=(0,Qt.Z)(vs,2),Sa=Ir[0],ys=Ir[1],vl=cn(new Map),Gl=(0,Qt.Z)(vl,2),Ll=Gl[0],ql=Gl[1],tu=Je(Gr),$l=tu.map(function(ra){return Ll.get(ra)}),la=Nt.useMemo(function(){return $l},[$l.join("_")]),Ns=Rn(la,Gr.length,ti),Wa=Vn&&Tn(Vn.y),xa=Vn&&Tn(us)||!!Pr.fixed,Zl=xa&&Gr.some(function(ra){var Fa=ra.fixed;return Fa}),oh=Nt.useRef(),eu=Xn(To,je),Mu=eu.isSticky,Ku=eu.offsetHeader,kl=eu.offsetSummary,Xr=eu.offsetScroll,Ea=eu.stickyClassName,hs=eu.container,Ma=Nt.useMemo(function(){return bi==null?void 0:bi(ho)},[bi,ho]),Kr=(Wa||Mu)&&Nt.isValidElement(Ma)&&Ma.type===Dt&&Ma.props.fixed,Ss,yl,gu;Wa&&(yl={overflowY:"scroll",maxHeight:Vn.y}),xa&&(Ss={overflowX:"auto"},Wa||(yl={overflowY:"hidden"}),gu={width:us===!0?"auto":us,minWidth:"100%"});var uf=Nt.useCallback(function(ra,Fa){(0,St.Z)(ia.current)&&ql(function(Rs){if(Rs.get(ra)!==Fa){var nu=new Map(Rs);return nu.set(ra,Fa),nu}return Rs})},[]),Ze=Bn(null),wh=(0,Qt.Z)(Ze,2),_u=wh[0],hf=wh[1];function gd(ra,Fa){Fa&&(typeof Fa=="function"?Fa(ra):Fa.scrollLeft!==ra&&(Fa.scrollLeft=ra,Fa.scrollLeft!==ra&&setTimeout(function(){Fa.scrollLeft=ra},0)))}var Yh=(0,Me.Z)(function(ra){var Fa=ra.currentTarget,Rs=ra.scrollLeft,nu=ti==="rtl",iu=typeof Rs=="number"?Rs:Fa.scrollLeft,Bc=Fa||ki;if(!hf()||hf()===Bc){var Eh;_u(Bc),gd(iu,Es.current),gd(iu,es.current),gd(iu,Wu.current),gd(iu,(Eh=oh.current)===null||Eh===void 0?void 0:Eh.setScrollLeft)}var Vd=Fa||Es.current;if(Vd){var pu=Vd.scrollWidth,rh=Vd.clientWidth;if(pu===rh){Ya(!1),ys(!1);return}nu?(Ya(-iu<pu-rh),ys(-iu>0)):(Ya(iu>0),ys(iu<pu-rh))}}),Mc=function(){xa&&es.current?Yh({currentTarget:es.current}):(Ya(!1),ys(!1))},Kg=function(Fa){var Rs=Fa.width;Rs!==Ro&&(Mc(),Yr(ia.current?ia.current.offsetWidth:Rs))},Ts=Nt.useRef(!1);Nt.useEffect(function(){Ts.current&&Mc()},[xa,kn,Hr.length]),Nt.useEffect(function(){Ts.current=!0},[]);var Kd=Nt.useState(0),Lc=(0,Qt.Z)(Kd,2),_d=Lc[0],df=Lc[1],Vf=Nt.useState(!0),cf=(0,Qt.Z)(Vf,2),kc=cf[0],Wl=cf[1];Nt.useEffect(function(){(!po||!bo)&&(es.current instanceof Element?df((0,Lt.o)(es.current).width):df((0,Lt.o)(ms.current).width)),Wl((0,mt.G)("position","sticky"))},[]),Nt.useEffect(function(){bo&&mr&&(mr.body.current=es.current)});var pd=Nt.useCallback(function(ra){return Nt.createElement(Nt.Fragment,null,Nt.createElement(si,ra),Kr==="top"&&Nt.createElement(Se,ra,Ma))},[Kr,Ma]),ff=Nt.useCallback(function(ra){return Nt.createElement(Se,ra,Ma)},[Ma]),Lu=Wo(["table"],"table"),Ch=Nt.useMemo(function(){return ii||(Zl?us==="max-content"?"auto":"fixed":Wa||Mu||Gr.some(function(ra){var Fa=ra.ellipsis;return Fa})?"fixed":"auto")},[Wa,Zl,Gr,ii,Mu]),md,Xh={colWidths:la,columCount:Gr.length,stickyOffsets:Ns,onHeaderRow:Jo,fixHeader:Wa,scroll:Vn},Sl=Nt.useMemo(function(){return Hi?null:typeof vo=="function"?vo():vo},[Hi,vo]),Nc=Nt.createElement(Oi,{data:ho,measureColumnWidth:Wa||xa||Mu}),Tc=Nt.createElement(di,{colWidths:Gr.map(function(ra){var Fa=ra.width;return Fa}),columns:Gr}),Kl=no!=null?Nt.createElement("caption",{className:"".concat(je,"-caption")},no):void 0,vd=(0,zt.Z)(De,{data:!0}),Oc=(0,zt.Z)(De,{aria:!0});if(Wa||Mu){var Fc;typeof rr=="function"?(Fc=rr(ho,{scrollbarSize:_d,ref:es,onScroll:Yh}),Xh.colWidths=Gr.map(function(ra,Fa){var Rs=ra.width,nu=Fa===Gr.length-1?Rs-_d:Rs;return typeof nu=="number"&&!Number.isNaN(nu)?nu:0})):Fc=Nt.createElement("div",{style:(0,me.Z)((0,me.Z)({},Ss),yl),onScroll:Yh,ref:es,className:he()("".concat(je,"-body"))},Nt.createElement(Lu,(0,ce.Z)({style:(0,me.Z)((0,me.Z)({},gu),{},{tableLayout:Ch})},Oc),Kl,Tc,Nc,!Kr&&Ma&&Nt.createElement(Se,{stickyOffsets:Ns,flattenColumns:Gr,columns:Hr},Ma)));var bh=(0,me.Z)((0,me.Z)((0,me.Z)({noData:!ho.length,maxContentScroll:xa&&us==="max-content"},Xh),_s),{},{direction:ti,stickyClassName:Ea,onScroll:Yh});md=Nt.createElement(Nt.Fragment,null,Qi!==!1&&Nt.createElement(Yn,(0,ce.Z)({},bh,{stickyTopOffset:Ku,className:"".concat(je,"-header"),ref:Es}),pd),Fc,Kr&&Kr!=="top"&&Nt.createElement(Yn,(0,ce.Z)({},bh,{stickyBottomOffset:kl,className:"".concat(je,"-summary"),ref:Wu}),ff),Mu&&Nt.createElement(un,{ref:oh,offsetScroll:Xr,scrollBodyRef:es,onScroll:Yh,container:hs}))}else md=Nt.createElement("div",{style:(0,me.Z)((0,me.Z)({},Ss),yl),className:he()("".concat(je,"-content")),onScroll:Yh,ref:es},Nt.createElement(Lu,(0,ce.Z)({style:(0,me.Z)((0,me.Z)({},gu),{},{tableLayout:Ch})},Oc),Kl,Tc,Qi!==!1&&Nt.createElement(si,(0,ce.Z)({},Xh,_s)),Nc,Ma&&Nt.createElement(Se,{stickyOffsets:Ns,flattenColumns:Gr,columns:Hr},Ma)));var ll=Nt.createElement("div",(0,ce.Z)({className:he()(je,rn,(le={},(0,Vt.Z)(le,"".concat(je,"-rtl"),ti==="rtl"),(0,Vt.Z)(le,"".concat(je,"-ping-left"),ma),(0,Vt.Z)(le,"".concat(je,"-ping-right"),Sa),(0,Vt.Z)(le,"".concat(je,"-layout-fixed"),ii==="fixed"),(0,Vt.Z)(le,"".concat(je,"-fixed-header"),Wa),(0,Vt.Z)(le,"".concat(je,"-fixed-column"),Zl),(0,Vt.Z)(le,"".concat(je,"-scroll-horizontal"),xa),(0,Vt.Z)(le,"".concat(je,"-has-fix-left"),Gr[0]&&Gr[0].fixed),(0,Vt.Z)(le,"".concat(je,"-has-fix-right"),Gr[Gr.length-1]&&Gr[Gr.length-1].fixed==="right"),le)),style:Ln,id:Mi,ref:ia},vd),Bi&&Nt.createElement(Qn,{className:"".concat(je,"-title")},Bi(ho)),Nt.createElement("div",{ref:ms,className:"".concat(je,"-container")},md),Ti&&Nt.createElement(Qn,{className:"".concat(je,"-footer")},Ti(ho)));xa&&(ll=Nt.createElement(kt.Z,{onResize:Kg},ll));var Ic=nn(Gr,Ns,ti,Hr),ds=Nt.useMemo(function(){return{scrollX:us,prefixCls:je,getComponent:Wo,scrollbarSize:_d,direction:ti,fixedInfoList:Ic,isSticky:Mu,supportSticky:kc,componentWidth:Ro,fixHeader:Wa,fixColumn:Zl,horizonScroll:xa,tableLayout:Ch,rowClassName:Ue,expandedRowClassName:Pr.expandedRowClassName,expandIcon:Aa,expandableType:Uo,expandRowByClick:Pr.expandRowByClick,expandedRowRender:Pr.expandedRowRender,onTriggerExpand:os,expandIconColumnIndex:Pr.expandIconColumnIndex,indentSize:Pr.indentSize,allColumnsFixedLeft:Gr.every(function(ra){return ra.fixed==="left"}),emptyNode:Sl,columns:Hr,flattenColumns:Gr,onColumnResize:uf,hoverStartRow:br,hoverEndRow:na,onHover:Ar,rowExpandable:Pr.rowExpandable,onRow:Do,getRowKey:ir,expandedKeys:_r,childrenColumnName:ba}},[us,je,Wo,_d,ti,Ic,Mu,kc,Ro,Wa,Zl,xa,Ch,Ue,Pr.expandedRowClassName,Aa,Uo,Pr.expandRowByClick,Pr.expandedRowRender,os,Pr.expandIconColumnIndex,Pr.indentSize,Sl,Hr,Gr,uf,br,na,Ar,Pr.rowExpandable,Do,ir,_r,ba]);return Nt.createElement(It.Provider,{value:ds},ll)}function Zi(oe){return gt(Di,oe)}var Ri=Zi();Ri.EXPAND_COLUMN=Ot,Ri.INTERNAL_HOOKS=jt,Ri.Column=to,Ri.ColumnGroup=en,Ri.Summary=ee;var $i=Ri,qi=xt(45680),mn=we(null),Lo=we(null);function tn(oe,le,De){var je=le||1;return De[oe+je]-(De[oe]||0)}function Gi(oe){var le=oe.rowInfo,De=oe.column,je=oe.colIndex,rn=oe.indent,Ue=oe.index,Ln=oe.renderIndex,kn=oe.record,wn=oe.style,Vn=oe.className,ii=oe.inverse,ti=oe.getHeight,Bi=De.render,Ti=De.dataIndex,bi=De.className,no=De.width,Mi=qt(Lo,["columnsOffset"]),Qi=Mi.columnsOffset,Ui=Nn(le,De,je,rn,Ue),vo=Ui.key,Do=Ui.fixedInfo,Jo=Ui.appendCellNode,ro=Ui.additionalCellProps,Io=ro.style,mr=ro.colSpan,po=mr===void 0?1:mr,To=ro.rowSpan,ho=To===void 0?1:To,Hi=je-1,bo=tn(Hi,po,Qi),Wo=po>1?no-bo:0,ir=(0,me.Z)((0,me.Z)((0,me.Z)({},Io),wn),{},{flex:"0 0 ".concat(bo,"px"),width:"".concat(bo,"px"),marginRight:Wo,pointerEvents:"auto"}),rr=Nt.useMemo(function(){return ii?ho<=1:po===0||ho===0||ho>1},[ho,po,ii]);rr?ir.visibility="hidden":ii&&(ir.height=ti==null?void 0:ti(ho));var ao=rr?function(){return null}:Bi,yr={};return(ho===0||po===0)&&(yr.rowSpan=1,yr.colSpan=1),Nt.createElement(pn,(0,ce.Z)({className:he()(bi,Vn),ellipsis:De.ellipsis,align:De.align,scope:De.rowScope,component:"div",prefixCls:le.prefixCls,key:vo,record:kn,index:Ue,renderIndex:Ln,dataIndex:Ti,render:ao,shouldCellUpdate:De.shouldCellUpdate},Do,{appendNode:Jo,additionalProps:(0,me.Z)((0,me.Z)({},ro),{},{style:ir},yr)}))}var Yi=Gi,ji=["data","index","className","rowKey","style","extra","getHeight"],No=Nt.forwardRef(function(oe,le){var De=oe.data,je=oe.index,rn=oe.className,Ue=oe.rowKey,Ln=oe.style,kn=oe.extra,wn=oe.getHeight,Vn=(0,Pn.Z)(oe,ji),ii=De.record,ti=De.indent,Bi=De.index,Ti=qt(It,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),bi=Ti.scrollX,no=Ti.flattenColumns,Mi=Ti.prefixCls,Qi=Ti.fixColumn,Ui=Ti.componentWidth,vo=qe(ii,Ue,je,ti),Do=vo.rowSupportExpand,Jo=vo.expanded,ro=vo.rowProps,Io=vo.expandedRowRender,mr=vo.expandedRowClassName,po;if(Do&&Jo){var To=Io(ii,je,ti+1,Jo),ho=mr==null?void 0:mr(ii,je,ti),Hi={};Qi&&(Hi={style:(0,Vt.Z)({},"--virtual-width","".concat(Ui,"px"))});var bo="".concat(Mi,"-expanded-row-cell");po=Nt.createElement("div",{className:he()("".concat(Mi,"-expanded-row"),"".concat(Mi,"-expanded-row-level-").concat(ti+1),ho)},Nt.createElement(pn,{component:"div",prefixCls:Mi,className:he()(bo,(0,Vt.Z)({},"".concat(bo,"-fixed"),Qi)),additionalProps:Hi},To))}var Wo=(0,me.Z)((0,me.Z)({},Ln),{},{width:bi});kn&&(Wo.position="absolute",Wo.pointerEvents="none");var ir=Nt.createElement("div",(0,ce.Z)({},ro,Vn,{ref:Do?null:le,className:he()(rn,"".concat(Mi,"-row"),ro==null?void 0:ro.className,(0,Vt.Z)({},"".concat(Mi,"-row-extra"),kn)),style:(0,me.Z)((0,me.Z)({},Wo),ro==null?void 0:ro.style)}),no.map(function(rr,ao){return Nt.createElement(Yi,{key:ao,rowInfo:vo,column:rr,colIndex:ao,indent:ti,index:je,renderIndex:Bi,record:ii,inverse:kn,getHeight:wn})}));return Do?Nt.createElement("div",{ref:le},ir,po):ir}),Mo=vt(No),Ii=Mo,Ni=Nt.forwardRef(function(oe,le){var De=oe.data,je=oe.onScroll,rn=qt(It,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Ue=rn.flattenColumns,Ln=rn.onColumnResize,kn=rn.getRowKey,wn=rn.expandedKeys,Vn=rn.prefixCls,ii=rn.childrenColumnName,ti=rn.emptyNode,Bi=rn.scrollX,Ti=qt(mn),bi=Ti.scrollY,no=Ti.listItemHeight,Mi=Nt.useRef(),Qi=Yt(De,ii,wn,kn),Ui=Nt.useMemo(function(){var po=0;return Ue.map(function(To){var ho=To.width,Hi=To.key;return po+=ho,[Hi,ho,po]})},[Ue]),vo=Nt.useMemo(function(){return Ui.map(function(po){return po[2]})},[Ui]);Nt.useEffect(function(){Ui.forEach(function(po){var To=(0,Qt.Z)(po,2),ho=To[0],Hi=To[1];Ln(ho,Hi)})},[Ui]),Nt.useImperativeHandle(le,function(){var po={};return Object.defineProperty(po,"scrollLeft",{get:function(){var ho;return((ho=Mi.current)===null||ho===void 0?void 0:ho.getScrollInfo().x)||0},set:function(ho){var Hi;(Hi=Mi.current)===null||Hi===void 0||Hi.scrollTo({left:ho})}}),po});var Do=function(To,ho){var Hi,bo=(Hi=Qi[ho])===null||Hi===void 0?void 0:Hi.record,Wo=To.onCell;if(Wo){var ir,rr=Wo(bo,ho);return(ir=rr==null?void 0:rr.rowSpan)!==null&&ir!==void 0?ir:1}return 1},Jo=function(To){var ho=To.start,Hi=To.end,bo=To.getSize,Wo=To.offsetY;if(Hi<0)return null;for(var ir=Ue.filter(function(ar){return Do(ar,ho)===0}),rr=ho,ao=function(er){if(ir=ir.filter(function(sr){return Do(sr,er)===0}),!ir.length)return rr=er,"break"},yr=ho;yr>=0;yr-=1){var br=ao(yr);if(br==="break")break}for(var na=Ue.filter(function(ar){return Do(ar,Hi)!==1}),Ar=Hi,Da=function(er){if(na=na.filter(function(sr){return Do(sr,er)!==1}),!na.length)return Ar=Math.max(er-1,Hi),"break"},Oa=Hi;Oa<Qi.length;Oa+=1){var Pr=Da(Oa);if(Pr==="break")break}for(var Uo=[],_r=function(er){var sr=Qi[er];if(!sr)return"continue";Ue.some(function(Ro){return Do(Ro,er)>1})&&Uo.push(er)},Aa=rr;Aa<=Ar;Aa+=1)var ba=_r(Aa);var os=Uo.map(function(ar){var er=Qi[ar],sr=kn(er.record,ar),Ro=function(vr){var Hr=ar+vr-1,Gr=kn(Qi[Hr].record,Hr),bs=bo(sr,Gr);return bs.bottom-bs.top},Yr=bo(sr);return Nt.createElement(Ii,{key:ar,data:er,rowKey:sr,index:ar,style:{top:-Wo+Yr.top},extra:!0,getHeight:Ro})});return os},ro=Nt.useMemo(function(){return{columnsOffset:vo}},[vo]),Io="".concat(Vn,"-tbody"),mr;return Qi.length?mr=Nt.createElement(qi.Z,{fullHeight:!1,ref:Mi,className:he()(Io,"".concat(Io,"-virtual")),height:bi,itemHeight:no||24,data:Qi,itemKey:function(To){return kn(To.record)},scrollWidth:Bi,onVirtualScroll:function(To){var ho=To.x;je({scrollLeft:ho})},extraRender:Jo},function(po,To,ho){var Hi=kn(po.record,To);return Nt.createElement(Ii,(0,ce.Z)({data:po,rowKey:Hi,index:To},ho))}):mr=Nt.createElement("div",{className:he()("".concat(Vn,"-placeholder"))},Nt.createElement(pn,{component:"div",prefixCls:Vn},ti)),Nt.createElement(Lo.Provider,{value:ro},mr)}),zi=vt(Ni),uo=zi,li=function(le,De){var je=De.ref,rn=De.onScroll;return Nt.createElement(uo,{ref:je,data:le,onScroll:rn})},$t=100;function Ho(oe){var le=oe.columns,De=oe.scroll,je=oe.prefixCls,rn=je===void 0?Dn:je,Ue=oe.className,Ln=oe.listItemHeight,kn=De||{},wn=kn.x,Vn=kn.y;typeof wn!="number"&&(wn=((le||[]).length+1)*$t),typeof Vn!="number"&&(Vn=500);var ii=Nt.useMemo(function(){return{scrollY:Vn,listItemHeight:Ln}},[Vn,Ln]);return Nt.createElement(mn.Provider,{value:ii},Nt.createElement($i,(0,ce.Z)({},oe,{className:he()(Ue,"".concat(rn,"-virtual")),scroll:(0,me.Z)((0,me.Z)({},De),{},{x:wn}),components:{body:li},columns:le,internalHooks:jt,tailor:!0})))}function or(oe){return gt(Ho,oe)}var Cr=or(),Fr=null;function cr(oe){return null}var oo=cr;function fo(oe){return null}var _o=fo,Co=xt(2738),lr=xt(68031),ha=xt(36355),So=xt(93891),Xi=xt(19716),Zn=xt(8628),Ji=xt(31724),qo=xt(58421),Or=xt(71418),ur=xt(88088);function Yo(oe){return function(De){let{prefixCls:je,onExpand:rn,record:Ue,expanded:Ln,expandable:kn}=De;const wn=`${je}-row-expand-icon`;return Nt.createElement("button",{type:"button",onClick:Vn=>{rn(Ue,Vn),Vn.stopPropagation()},className:he()(wn,{[`${wn}-spaced`]:!kn,[`${wn}-expanded`]:kn&&Ln,[`${wn}-collapsed`]:kn&&!Ln}),"aria-label":Ln?oe.collapse:oe.expand,"aria-expanded":Ln})}}var xr=Yo;function wr(oe,le){return"key"in oe&&oe.key!==void 0&&oe.key!==null?oe.key:oe.dataIndex?Array.isArray(oe.dataIndex)?oe.dataIndex.join("."):oe.dataIndex:le}function ta(oe,le){return le?`${le}-${oe}`:`${oe}`}function da(oe,le){return typeof oe=="function"?oe(le):oe}function wa(oe,le){const De=da(oe,le);return Object.prototype.toString.call(De)==="[object Object]"?"":De}var an={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"},Jr=an,Zs=xt(7657),ps=function(le,De){return Nt.createElement(Zs.Z,(0,ce.Z)({},le,{ref:De,icon:Jr}))},Ds=Nt.forwardRef(ps),$o=Ds,Ms=xt(56762);function Nr(oe){const le=Nt.useRef(oe),De=(0,Ms.Z)();return[()=>le.current,je=>{le.current=je,De()}]}var Go=xt(3113),fr=xt(24905),aa=xt(38854),xo=xt(64165),tr=xt(20834),ko=xt(40875),vi=xt(5112),Dr=xt(17574),sa=xt(47472),ts=xt(92832);function Ls(oe){let{value:le,onChange:De,filterSearch:je,tablePrefixCls:rn,locale:Ue}=oe;return je?Nt.createElement("div",{className:`${rn}-filter-dropdown-search`},Nt.createElement(ts.default,{prefix:Nt.createElement(sa.Z,null),placeholder:Ue.filterSearchPlaceholder,onChange:De,value:le,htmlSize:1,className:`${rn}-filter-dropdown-search-input`})):null}var ws=Ls,xi=xt(10228);const Qr=oe=>{const{keyCode:le}=oe;le===xi.Z.ENTER&&oe.stopPropagation()};var ss=Nt.forwardRef((oe,le)=>Nt.createElement("div",{className:oe.className,onClick:De=>De.stopPropagation(),onKeyDown:Qr,ref:le},oe.children));function Al(oe){let le=[];return(oe||[]).forEach(De=>{let{value:je,children:rn}=De;le.push(je),rn&&(le=[].concat((0,mi.Z)(le),(0,mi.Z)(Al(rn))))}),le}function Rl(oe){return oe.some(le=>{let{children:De}=le;return De})}function Zo(oe,le){return typeof le=="string"||typeof le=="number"?le==null?void 0:le.toString().toLowerCase().includes(oe.trim().toLowerCase()):!1}function ph(oe){let{filters:le,prefixCls:De,filteredKeys:je,filterMultiple:rn,searchValue:Ue,filterSearch:Ln}=oe;return le.map((kn,wn)=>{const Vn=String(kn.value);if(kn.children)return{key:Vn||wn,label:kn.text,popupClassName:`${De}-dropdown-submenu`,children:ph({filters:kn.children,prefixCls:De,filteredKeys:je,filterMultiple:rn,searchValue:Ue,filterSearch:Ln})};const ii=rn?fr.default:vi.ZP,ti={key:kn.value!==void 0?Vn:wn,label:Nt.createElement(Nt.Fragment,null,Nt.createElement(ii,{checked:je.includes(Vn)}),Nt.createElement("span",null,kn.text))};return Ue.trim()?typeof Ln=="function"?Ln(Ue,kn)?ti:null:Zo(Ue,kn.text)?ti:null:ti})}function ol(oe){var le,De;const{tablePrefixCls:je,prefixCls:rn,column:Ue,dropdownPrefixCls:Ln,columnKey:kn,filterMultiple:wn,filterMode:Vn="menu",filterSearch:ii=!1,filterState:ti,triggerFilter:Bi,locale:Ti,children:bi,getPopupContainer:no}=oe,{filterDropdownOpen:Mi,onFilterDropdownOpenChange:Qi,filterResetToDefaultFilteredValue:Ui,defaultFilteredValue:vo,filterDropdownVisible:Do,onFilterDropdownVisibleChange:Jo}=Ue,[ro,Io]=Nt.useState(!1),mr=!!(ti&&(!((le=ti.filteredKeys)===null||le===void 0)&&le.length||ti.forceFiltered)),po=zo=>{Io(zo),Qi==null||Qi(zo),Jo==null||Jo(zo)},To=(De=Mi!=null?Mi:Do)!==null&&De!==void 0?De:ro,ho=ti==null?void 0:ti.filteredKeys,[Hi,bo]=Nr(ho||[]),Wo=zo=>{let{selectedKeys:vr}=zo;bo(vr)},ir=(zo,vr)=>{let{node:Hr,checked:Gr}=vr;Wo(wn?{selectedKeys:zo}:{selectedKeys:Gr&&Hr.key?[Hr.key]:[]})};Nt.useEffect(()=>{ro&&Wo({selectedKeys:ho||[]})},[ho]);const[rr,ao]=Nt.useState([]),yr=zo=>{ao(zo)},[br,na]=Nt.useState(""),Ar=zo=>{const{value:vr}=zo.target;na(vr)};Nt.useEffect(()=>{ro||na("")},[ro]);const Da=zo=>{const vr=zo&&zo.length?zo:null;if(vr===null&&(!ti||!ti.filteredKeys)||(0,pe.Z)(vr,ti==null?void 0:ti.filteredKeys,!0))return null;Bi({column:Ue,key:kn,filteredKeys:vr})},Oa=()=>{po(!1),Da(Hi())},Pr=function(){let{confirm:zo,closeDropdown:vr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};zo&&Da([]),vr&&po(!1),na(""),bo(Ui?(vo||[]).map(Hr=>String(Hr)):[])},Uo=function(){let{closeDropdown:zo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};zo&&po(!1),Da(Hi())},_r=zo=>{zo&&ho!==void 0&&bo(ho||[]),po(zo),!zo&&!Ue.filterDropdown&&Oa()},Aa=he()({[`${Ln}-menu-without-submenu`]:!Rl(Ue.filters||[])}),ba=zo=>{if(zo.target.checked){const vr=Al(Ue==null?void 0:Ue.filters).map(Hr=>String(Hr));bo(vr)}else bo([])},os=zo=>{let{filters:vr}=zo;return(vr||[]).map((Hr,Gr)=>{const bs=String(Hr.value),us={title:Hr.text,key:Hr.value!==void 0?bs:Gr};return Hr.children&&(us.children=os({filters:Hr.children})),us})},ar=zo=>{var vr;return Object.assign(Object.assign({},zo),{text:zo.title,value:zo.key,children:((vr=zo.children)===null||vr===void 0?void 0:vr.map(Hr=>ar(Hr)))||[]})};let er;if(typeof Ue.filterDropdown=="function")er=Ue.filterDropdown({prefixCls:`${Ln}-custom`,setSelectedKeys:zo=>Wo({selectedKeys:zo}),selectedKeys:Hi(),confirm:Uo,clearFilters:Pr,filters:Ue.filters,visible:To,close:()=>{po(!1)}});else if(Ue.filterDropdown)er=Ue.filterDropdown;else{const zo=Hi()||[],vr=()=>(Ue.filters||[]).length===0?Nt.createElement(xo.Z,{image:xo.Z.PRESENTED_IMAGE_SIMPLE,description:Ti.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Vn==="tree"?Nt.createElement(Nt.Fragment,null,Nt.createElement(ws,{filterSearch:ii,value:br,onChange:Ar,tablePrefixCls:je,locale:Ti}),Nt.createElement("div",{className:`${je}-filter-dropdown-tree`},wn?Nt.createElement(fr.default,{checked:zo.length===Al(Ue.filters).length,indeterminate:zo.length>0&&zo.length<Al(Ue.filters).length,className:`${je}-filter-dropdown-checkall`,onChange:ba},Ti.filterCheckall):null,Nt.createElement(Dr.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:wn,checkStrictly:!wn,className:`${Ln}-menu`,onCheck:ir,checkedKeys:zo,selectedKeys:zo,showIcon:!1,treeData:os({filters:Ue.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:br.trim()?Gr=>typeof ii=="function"?ii(br,ar(Gr)):Zo(br,Gr.title):void 0}))):Nt.createElement(Nt.Fragment,null,Nt.createElement(ws,{filterSearch:ii,value:br,onChange:Ar,tablePrefixCls:je,locale:Ti}),Nt.createElement(tr.default,{selectable:!0,multiple:wn,prefixCls:`${Ln}-menu`,className:Aa,onSelect:Wo,onDeselect:Wo,selectedKeys:zo,getPopupContainer:no,openKeys:rr,onOpenChange:yr,items:ph({filters:Ue.filters||[],filterSearch:ii,prefixCls:rn,filteredKeys:Hi(),filterMultiple:wn,searchValue:br})})),Hr=()=>Ui?(0,pe.Z)((vo||[]).map(Gr=>String(Gr)),zo,!0):zo.length===0;er=Nt.createElement(Nt.Fragment,null,vr(),Nt.createElement("div",{className:`${rn}-dropdown-btns`},Nt.createElement(Go.ZP,{type:"link",size:"small",disabled:Hr(),onClick:()=>Pr()},Ti.filterReset),Nt.createElement(Go.ZP,{type:"primary",size:"small",onClick:Oa},Ti.filterConfirm)))}Ue.filterDropdown&&(er=Nt.createElement(ko.J,{selectable:void 0},er));const sr=()=>Nt.createElement(ss,{className:`${rn}-dropdown`},er);let Ro;typeof Ue.filterIcon=="function"?Ro=Ue.filterIcon(mr):Ue.filterIcon?Ro=Ue.filterIcon:Ro=Nt.createElement($o,null);const{direction:Yr}=Nt.useContext(ha.E_);return Nt.createElement("div",{className:`${rn}-column`},Nt.createElement("span",{className:`${je}-column-title`},bi),Nt.createElement(aa.Z,{dropdownRender:sr,trigger:["click"],open:To,onOpenChange:_r,getPopupContainer:no,placement:Yr==="rtl"?"bottomLeft":"bottomRight"},Nt.createElement("span",{role:"button",tabIndex:-1,className:he()(`${rn}-trigger`,{active:mr}),onClick:zo=>{zo.stopPropagation()}},Ro)))}var rl=ol;function As(oe,le,De){let je=[];return(oe||[]).forEach((rn,Ue)=>{var Ln;const kn=ta(Ue,De);if(rn.filters||"filterDropdown"in rn||"onFilter"in rn)if("filteredValue"in rn){let wn=rn.filteredValue;"filterDropdown"in rn||(wn=(Ln=wn==null?void 0:wn.map(String))!==null&&Ln!==void 0?Ln:wn),je.push({column:rn,key:wr(rn,kn),filteredKeys:wn,forceFiltered:rn.filtered})}else je.push({column:rn,key:wr(rn,kn),filteredKeys:le&&rn.defaultFilteredValue?rn.defaultFilteredValue:void 0,forceFiltered:rn.filtered});"children"in rn&&(je=[].concat((0,mi.Z)(je),(0,mi.Z)(As(rn.children,le,kn))))}),je}function bu(oe,le,De,je,rn,Ue,Ln,kn){return De.map((wn,Vn)=>{const ii=ta(Vn,kn),{filterMultiple:ti=!0,filterMode:Bi,filterSearch:Ti}=wn;let bi=wn;if(bi.filters||bi.filterDropdown){const no=wr(bi,ii),Mi=je.find(Qi=>{let{key:Ui}=Qi;return no===Ui});bi=Object.assign(Object.assign({},bi),{title:Qi=>Nt.createElement(rl,{tablePrefixCls:oe,prefixCls:`${oe}-filter`,dropdownPrefixCls:le,column:bi,columnKey:no,filterState:Mi,filterMultiple:ti,filterMode:Bi,filterSearch:Ti,triggerFilter:Ue,locale:rn,getPopupContainer:Ln},da(wn.title,Qi))})}return"children"in bi&&(bi=Object.assign(Object.assign({},bi),{children:bu(oe,le,bi.children,je,rn,Ue,Ln,ii)})),bi})}function Ru(oe){const le={};return oe.forEach(De=>{let{key:je,filteredKeys:rn,column:Ue}=De;const{filters:Ln,filterDropdown:kn}=Ue;if(kn)le[je]=rn||null;else if(Array.isArray(rn)){const wn=Al(Ln);le[je]=wn.filter(Vn=>rn.includes(String(Vn)))}else le[je]=null}),le}function Ws(oe,le){return le.reduce((De,je)=>{const{column:{onFilter:rn,filters:Ue},filteredKeys:Ln}=je;return rn&&Ln&&Ln.length?De.filter(kn=>Ln.some(wn=>{const Vn=Al(Ue),ii=Vn.findIndex(Bi=>String(Bi)===String(wn)),ti=ii!==-1?Vn[ii]:wn;return rn(ti,kn)})):De},oe)}const pl=oe=>oe.flatMap(le=>"children"in le?[le].concat((0,mi.Z)(pl(le.children||[]))):[le]);function Hh(oe){let{prefixCls:le,dropdownPrefixCls:De,mergedColumns:je,onFilterChange:rn,getPopupContainer:Ue,locale:Ln}=oe;const kn=Nt.useMemo(()=>pl(je||[]),[je]),[wn,Vn]=Nt.useState(()=>As(kn,!0)),ii=Nt.useMemo(()=>{const bi=As(kn,!1);if(bi.length===0)return bi;let no=!0,Mi=!0;if(bi.forEach(Qi=>{let{filteredKeys:Ui}=Qi;Ui!==void 0?no=!1:Mi=!1}),no){const Qi=(kn||[]).map((Ui,vo)=>wr(Ui,ta(vo)));return wn.filter(Ui=>{let{key:vo}=Ui;return Qi.includes(vo)}).map(Ui=>{const vo=kn[Qi.findIndex(Do=>Do===Ui.key)];return Object.assign(Object.assign({},Ui),{column:Object.assign(Object.assign({},Ui.column),vo),forceFiltered:vo.filtered})})}return bi},[kn,wn]),ti=Nt.useMemo(()=>Ru(ii),[ii]),Bi=bi=>{const no=ii.filter(Mi=>{let{key:Qi}=Mi;return Qi!==bi.key});no.push(bi),Vn(no),rn(Ru(no),no)};return[bi=>bu(le,De,bi,ii,Ln,Bi,Ue),ii,ti]}var hd=Hh;function Gh(oe,le,De){const je=Nt.useRef({});function rn(Ue){if(!je.current||je.current.data!==oe||je.current.childrenColumnName!==le||je.current.getRowKey!==De){let kn=function(wn){wn.forEach((Vn,ii)=>{const ti=De(Vn,ii);Ln.set(ti,Vn),Vn&&typeof Vn=="object"&&le in Vn&&kn(Vn[le]||[])})};const Ln=new Map;kn(oe),je.current={data:oe,childrenColumnName:le,kvMap:Ln,getRowKey:De}}return je.current.kvMap.get(Ue)}return[rn]}var $d=xt(50371),$h=function(oe,le){var De={};for(var je in oe)Object.prototype.hasOwnProperty.call(oe,je)&&le.indexOf(je)<0&&(De[je]=oe[je]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rn=0,je=Object.getOwnPropertySymbols(oe);rn<je.length;rn++)le.indexOf(je[rn])<0&&Object.prototype.propertyIsEnumerable.call(oe,je[rn])&&(De[je[rn]]=oe[je[rn]]);return De};const mh=10;function zu(oe,le){const De={current:oe.current,pageSize:oe.pageSize};return Object.keys(le&&typeof le=="object"?le:{}).forEach(rn=>{const Ue=oe[rn];typeof Ue!="function"&&(De[rn]=Ue)}),De}function zl(oe,le,De){const je=De&&typeof De=="object"?De:{},{total:rn=0}=je,Ue=$h(je,["total"]),[Ln,kn]=(0,Nt.useState)(()=>({current:"defaultCurrent"in Ue?Ue.defaultCurrent:1,pageSize:"defaultPageSize"in Ue?Ue.defaultPageSize:mh})),wn=(0,$d.Z)(Ln,Ue,{total:rn>0?rn:oe}),Vn=Math.ceil((rn||oe)/wn.pageSize);wn.current>Vn&&(wn.current=Vn||1);const ii=(Bi,Ti)=>{kn({current:Bi!=null?Bi:1,pageSize:Ti||wn.pageSize})},ti=(Bi,Ti)=>{var bi;De&&((bi=De.onChange)===null||bi===void 0||bi.call(De,Bi,Ti)),ii(Bi,Ti),le(Bi,Ti||(wn==null?void 0:wn.pageSize))};return De===!1?[{},()=>{}]:[Object.assign(Object.assign({},wn),{onChange:ti}),ii]}var dd=zl,Zh=xt(84105),vh=xt(35654),hr=xt(90782),zr=xt(71430),ks=xt(18929);const Xa={},Ga="SELECT_ALL",va="SELECT_INVERT",Ta="SELECT_NONE",Va=[],$a=(oe,le)=>{let De=[];return(le||[]).forEach(je=>{De.push(je),je&&typeof je=="object"&&oe in je&&(De=[].concat((0,mi.Z)(De),(0,mi.Z)($a(oe,je[oe]))))}),De};var jl=(oe,le)=>{const{preserveSelectedRowKeys:De,selectedRowKeys:je,defaultSelectedRowKeys:rn,getCheckboxProps:Ue,onChange:Ln,onSelect:kn,onSelectAll:wn,onSelectInvert:Vn,onSelectNone:ii,onSelectMultiple:ti,columnWidth:Bi,type:Ti,selections:bi,fixed:no,renderCell:Mi,hideSelectAll:Qi,checkStrictly:Ui=!0}=le||{},{prefixCls:vo,data:Do,pageData:Jo,getRecordByKey:ro,getRowKey:Io,expandType:mr,childrenColumnName:po,locale:To,getPopupContainer:ho}=oe,[Hi,bo]=(0,ks.Z)(je||rn||Va,{value:je}),Wo=Nt.useRef(new Map),ir=(0,Nt.useCallback)(ar=>{if(De){const er=new Map;ar.forEach(sr=>{let Ro=ro(sr);!Ro&&Wo.current.has(sr)&&(Ro=Wo.current.get(sr)),er.set(sr,Ro)}),Wo.current=er}},[ro,De]);Nt.useEffect(()=>{ir(Hi)},[Hi]);const{keyEntities:rr}=(0,Nt.useMemo)(()=>{if(Ui)return{keyEntities:null};let ar=Do;if(De){const er=new Set(Do.map((Ro,Yr)=>Io(Ro,Yr))),sr=Array.from(Wo.current).reduce((Ro,Yr)=>{let[zo,vr]=Yr;return er.has(zo)?Ro:Ro.concat(vr)},[]);ar=[].concat((0,mi.Z)(ar),(0,mi.Z)(sr))}return(0,zr.I8)(ar,{externalGetKey:Io,childrenPropName:po})},[Do,Io,Ui,po,De]),ao=(0,Nt.useMemo)(()=>$a(po,Jo),[po,Jo]),yr=(0,Nt.useMemo)(()=>{const ar=new Map;return ao.forEach((er,sr)=>{const Ro=Io(er,sr),Yr=(Ue?Ue(er):null)||{};ar.set(Ro,Yr)}),ar},[ao,Io,Ue]),br=(0,Nt.useCallback)(ar=>{var er;return!!(!((er=yr.get(Io(ar)))===null||er===void 0)&&er.disabled)},[yr,Io]),[na,Ar]=(0,Nt.useMemo)(()=>{if(Ui)return[Hi||[],[]];const{checkedKeys:ar,halfCheckedKeys:er}=(0,hr.S)(Hi,!0,rr,br);return[ar||[],er]},[Hi,Ui,rr,br]),Da=(0,Nt.useMemo)(()=>{const ar=Ti==="radio"?na.slice(0,1):na;return new Set(ar)},[na,Ti]),Oa=(0,Nt.useMemo)(()=>Ti==="radio"?new Set:new Set(Ar),[Ar,Ti]),[Pr,Uo]=(0,Nt.useState)(null);Nt.useEffect(()=>{le||bo(Va)},[!!le]);const _r=(0,Nt.useCallback)((ar,er)=>{let sr,Ro;ir(ar),De?(sr=ar,Ro=ar.map(Yr=>Wo.current.get(Yr))):(sr=[],Ro=[],ar.forEach(Yr=>{const zo=ro(Yr);zo!==void 0&&(sr.push(Yr),Ro.push(zo))})),bo(sr),Ln==null||Ln(sr,Ro,{type:er})},[bo,ro,Ln,De]),Aa=(0,Nt.useCallback)((ar,er,sr,Ro)=>{if(kn){const Yr=sr.map(zo=>ro(zo));kn(ro(ar),er,Yr,Ro)}_r(sr,"single")},[kn,ro,_r]),ba=(0,Nt.useMemo)(()=>!bi||Qi?null:(bi===!0?[Ga,va,Ta]:bi).map(er=>er===Ga?{key:"all",text:To.selectionAll,onSelect(){_r(Do.map((sr,Ro)=>Io(sr,Ro)).filter(sr=>{const Ro=yr.get(sr);return!(Ro!=null&&Ro.disabled)||Da.has(sr)}),"all")}}:er===va?{key:"invert",text:To.selectInvert,onSelect(){const sr=new Set(Da);Jo.forEach((Yr,zo)=>{const vr=Io(Yr,zo),Hr=yr.get(vr);Hr!=null&&Hr.disabled||(sr.has(vr)?sr.delete(vr):sr.add(vr))});const Ro=Array.from(sr);Vn&&Vn(Ro),_r(Ro,"invert")}}:er===Ta?{key:"none",text:To.selectNone,onSelect(){ii==null||ii(),_r(Array.from(Da).filter(sr=>{const Ro=yr.get(sr);return Ro==null?void 0:Ro.disabled}),"none")}}:er).map(er=>Object.assign(Object.assign({},er),{onSelect:function(){for(var sr,Ro,Yr=arguments.length,zo=new Array(Yr),vr=0;vr<Yr;vr++)zo[vr]=arguments[vr];(Ro=er.onSelect)===null||Ro===void 0||(sr=Ro).call.apply(sr,[er].concat(zo)),Uo(null)}})),[bi,Da,Jo,Io,Vn,_r]);return[(0,Nt.useCallback)(ar=>{var er;if(!le)return ar.filter(oa=>oa!==Xa);let sr=(0,mi.Z)(ar);const Ro=new Set(Da),Yr=ao.map(Io).filter(oa=>!yr.get(oa).disabled),zo=Yr.every(oa=>Ro.has(oa)),vr=Yr.some(oa=>Ro.has(oa)),Hr=()=>{const oa=[];zo?Yr.forEach(ma=>{Ro.delete(ma),oa.push(ma)}):Yr.forEach(ma=>{Ro.has(ma)||(Ro.add(ma),oa.push(ma))});const ca=Array.from(Ro);wn==null||wn(!zo,ca.map(ma=>ro(ma)),oa.map(ma=>ro(ma))),_r(ca,"all"),Uo(null)};let Gr;if(Ti!=="radio"){let oa;if(ba){const Ir={getPopupContainer:ho,items:ba.map((Sa,ys)=>{const{key:vl,text:Gl,onSelect:Ll}=Sa;return{key:vl!=null?vl:ys,onClick:()=>{Ll==null||Ll(Yr)},label:Gl}})};oa=Nt.createElement("div",{className:`${vo}-selection-extra`},Nt.createElement(aa.Z,{menu:Ir,getPopupContainer:ho},Nt.createElement("span",null,Nt.createElement(Zh.Z,null))))}const ca=ao.map((Ir,Sa)=>{const ys=Io(Ir,Sa),vl=yr.get(ys)||{};return Object.assign({checked:Ro.has(ys)},vl)}).filter(Ir=>{let{disabled:Sa}=Ir;return Sa}),ma=!!ca.length&&ca.length===ao.length,Ya=ma&&ca.every(Ir=>{let{checked:Sa}=Ir;return Sa}),vs=ma&&ca.some(Ir=>{let{checked:Sa}=Ir;return Sa});Gr=!Qi&&Nt.createElement("div",{className:`${vo}-selection`},Nt.createElement(fr.default,{checked:ma?Ya:!!ao.length&&zo,indeterminate:ma?!Ya&&vs:!zo&&vr,onChange:Hr,disabled:ao.length===0||ma,"aria-label":oa?"Custom selection":"Select all",skipGroup:!0}),oa)}let bs;Ti==="radio"?bs=(oa,ca,ma)=>{const Ya=Io(ca,ma),vs=Ro.has(Ya);return{node:Nt.createElement(vi.ZP,Object.assign({},yr.get(Ya),{checked:vs,onClick:Ir=>Ir.stopPropagation(),onChange:Ir=>{Ro.has(Ya)||Aa(Ya,!0,[Ya],Ir.nativeEvent)}})),checked:vs}}:bs=(oa,ca,ma)=>{var Ya;const vs=Io(ca,ma),Ir=Ro.has(vs),Sa=Oa.has(vs),ys=yr.get(vs);let vl;return mr==="nest"?vl=Sa:vl=(Ya=ys==null?void 0:ys.indeterminate)!==null&&Ya!==void 0?Ya:Sa,{node:Nt.createElement(fr.default,Object.assign({},ys,{indeterminate:vl,checked:Ir,skipGroup:!0,onClick:Gl=>Gl.stopPropagation(),onChange:Gl=>{let{nativeEvent:Ll}=Gl;const{shiftKey:ql}=Ll;let tu=-1,$l=-1;if(ql&&Ui){const la=new Set([Pr,vs]);Yr.some((Ns,Wa)=>{if(la.has(Ns))if(tu===-1)tu=Wa;else return $l=Wa,!0;return!1})}if($l!==-1&&tu!==$l&&Ui){const la=Yr.slice(tu,$l+1),Ns=[];Ir?la.forEach(xa=>{Ro.has(xa)&&(Ns.push(xa),Ro.delete(xa))}):la.forEach(xa=>{Ro.has(xa)||(Ns.push(xa),Ro.add(xa))});const Wa=Array.from(Ro);ti==null||ti(!Ir,Wa.map(xa=>ro(xa)),Ns.map(xa=>ro(xa))),_r(Wa,"multiple")}else{const la=na;if(Ui){const Ns=Ir?(0,vh._5)(la,vs):(0,vh.L0)(la,vs);Aa(vs,!Ir,Ns,Ll)}else{const Ns=(0,hr.S)([].concat((0,mi.Z)(la),[vs]),!0,rr,br),{checkedKeys:Wa,halfCheckedKeys:xa}=Ns;let Zl=Wa;if(Ir){const oh=new Set(Wa);oh.delete(vs),Zl=(0,hr.S)(Array.from(oh),{checked:!1,halfCheckedKeys:xa},rr,br).checkedKeys}Aa(vs,!Ir,Zl,Ll)}}Uo(Ir?null:vs)}})),checked:Ir}};const us=(oa,ca,ma)=>{const{node:Ya,checked:vs}=bs(oa,ca,ma);return Mi?Mi(vs,ca,ma,Ya):Ya};if(!sr.includes(Xa))if(sr.findIndex(oa=>{var ca;return((ca=oa[Bo])===null||ca===void 0?void 0:ca.columnType)==="EXPAND_COLUMN"})===0){const[oa,...ca]=sr;sr=[oa,Xa].concat((0,mi.Z)(ca))}else sr=[Xa].concat((0,mi.Z)(sr));const _s=sr.indexOf(Xa);sr=sr.filter((oa,ca)=>oa!==Xa||ca===_s);const ia=sr[_s-1],Es=sr[_s+1];let es=no;es===void 0&&((Es==null?void 0:Es.fixed)!==void 0?es=Es.fixed:(ia==null?void 0:ia.fixed)!==void 0&&(es=ia.fixed)),es&&ia&&((er=ia[Bo])===null||er===void 0?void 0:er.columnType)==="EXPAND_COLUMN"&&ia.fixed===void 0&&(ia.fixed=es);const ms=he()(`${vo}-selection-col`,{[`${vo}-selection-col-with-dropdown`]:bi&&Ti==="checkbox"}),Wu={fixed:es,width:Bi,className:`${vo}-selection-column`,title:le.columnTitle||Gr,render:us,onCell:le.onCell,[Bo]:{className:ms}};return sr.map(oa=>oa===Xa?Wu:oa)},[Io,ao,le,na,Da,Oa,Bi,ba,mr,Pr,yr,ti,Aa,br]),Da]},Ia=xt(89489),xc=xt(59477),Pc=xt(6848);const Wh="ascend",Po="descend";function cd(oe){return typeof oe.sorter=="object"&&typeof oe.sorter.multiple=="number"?oe.sorter.multiple:!1}function ke(oe){return typeof oe=="function"?oe:oe&&typeof oe=="object"&&oe.compare?oe.compare:!1}function $n(oe,le){return le?oe[oe.indexOf(le)+1]:oe[0]}function wc(oe,le,De){let je=[];function rn(Ue,Ln){je.push({column:Ue,key:wr(Ue,Ln),multiplePriority:cd(Ue),sortOrder:Ue.sortOrder})}return(oe||[]).forEach((Ue,Ln)=>{const kn=ta(Ln,De);Ue.children?("sortOrder"in Ue&&rn(Ue,kn),je=[].concat((0,mi.Z)(je),(0,mi.Z)(wc(Ue.children,le,kn)))):Ue.sorter&&("sortOrder"in Ue?rn(Ue,kn):le&&Ue.defaultSortOrder&&je.push({column:Ue,key:wr(Ue,kn),multiplePriority:cd(Ue),sortOrder:Ue.defaultSortOrder}))}),je}function rf(oe,le,De,je,rn,Ue,Ln,kn){return(le||[]).map((wn,Vn)=>{const ii=ta(Vn,kn);let ti=wn;if(ti.sorter){const Bi=ti.sortDirections||rn,Ti=ti.showSorterTooltip===void 0?Ln:ti.showSorterTooltip,bi=wr(ti,ii),no=De.find(mr=>{let{key:po}=mr;return po===bi}),Mi=no?no.sortOrder:null,Qi=$n(Bi,Mi);let Ui;if(wn.sortIcon)Ui=wn.sortIcon({sortOrder:Mi});else{const mr=Bi.includes(Wh)&&Nt.createElement(xc.Z,{className:he()(`${oe}-column-sorter-up`,{active:Mi===Wh})}),po=Bi.includes(Po)&&Nt.createElement(Ia.Z,{className:he()(`${oe}-column-sorter-down`,{active:Mi===Po})});Ui=Nt.createElement("span",{className:he()(`${oe}-column-sorter`,{[`${oe}-column-sorter-full`]:!!(mr&&po)})},Nt.createElement("span",{className:`${oe}-column-sorter-inner`,"aria-hidden":"true"},mr,po))}const{cancelSort:vo,triggerAsc:Do,triggerDesc:Jo}=Ue||{};let ro=vo;Qi===Po?ro=Jo:Qi===Wh&&(ro=Do);const Io=typeof Ti=="object"?Ti:{title:ro};ti=Object.assign(Object.assign({},ti),{className:he()(ti.className,{[`${oe}-column-sort`]:Mi}),title:mr=>{const po=Nt.createElement("div",{className:`${oe}-column-sorters`},Nt.createElement("span",{className:`${oe}-column-title`},da(wn.title,mr)),Ui);return Ti?Nt.createElement(Pc.Z,Object.assign({},Io),po):po},onHeaderCell:mr=>{const po=wn.onHeaderCell&&wn.onHeaderCell(mr)||{},To=po.onClick,ho=po.onKeyDown;po.onClick=Wo=>{je({column:wn,key:bi,sortOrder:Qi,multiplePriority:cd(wn)}),To==null||To(Wo)},po.onKeyDown=Wo=>{Wo.keyCode===xi.Z.ENTER&&(je({column:wn,key:bi,sortOrder:Qi,multiplePriority:cd(wn)}),ho==null||ho(Wo))};const Hi=wa(wn.title,{}),bo=Hi==null?void 0:Hi.toString();return Mi?po["aria-sort"]=Mi==="ascend"?"ascending":"descending":po["aria-label"]=bo||"",po.className=he()(po.className,`${oe}-column-has-sorters`),po.tabIndex=0,wn.ellipsis&&(po.title=(Hi!=null?Hi:"").toString()),po}})}return"children"in ti&&(ti=Object.assign(Object.assign({},ti),{children:rf(oe,ti.children,De,je,rn,Ue,Ln,ii)})),ti})}function Hu(oe){const{column:le,sortOrder:De}=oe;return{column:le,order:De,field:le.dataIndex,columnKey:le.key}}function Gu(oe){const le=oe.filter(De=>{let{sortOrder:je}=De;return je}).map(Hu);return le.length===0&&oe.length?Object.assign(Object.assign({},Hu(oe[oe.length-1])),{column:void 0}):le.length<=1?le[0]||{}:le}function ih(oe,le,De){const je=le.slice().sort((Ln,kn)=>kn.multiplePriority-Ln.multiplePriority),rn=oe.slice(),Ue=je.filter(Ln=>{let{column:{sorter:kn},sortOrder:wn}=Ln;return ke(kn)&&wn});return Ue.length?rn.sort((Ln,kn)=>{for(let wn=0;wn<Ue.length;wn+=1){const Vn=Ue[wn],{column:{sorter:ii},sortOrder:ti}=Vn,Bi=ke(ii);if(Bi&&ti){const Ti=Bi(Ln,kn,ti);if(Ti!==0)return ti===Wh?Ti:-Ti}}return 0}).map(Ln=>{const kn=Ln[De];return kn?Object.assign(Object.assign({},Ln),{[De]:ih(kn,le,De)}):Ln}):rn}function Cc(oe){let{prefixCls:le,mergedColumns:De,onSorterChange:je,sortDirections:rn,tableLocale:Ue,showSorterTooltip:Ln}=oe;const[kn,wn]=Nt.useState(wc(De,!0)),Vn=Nt.useMemo(()=>{let bi=!0;const no=wc(De,!1);if(!no.length)return kn;const Mi=[];function Qi(vo){bi?Mi.push(vo):Mi.push(Object.assign(Object.assign({},vo),{sortOrder:null}))}let Ui=null;return no.forEach(vo=>{Ui===null?(Qi(vo),vo.sortOrder&&(vo.multiplePriority===!1?bi=!1:Ui=!0)):(Ui&&vo.multiplePriority!==!1||(bi=!1),Qi(vo))}),Mi},[De,kn]),ii=Nt.useMemo(()=>{const bi=Vn.map(no=>{let{column:Mi,sortOrder:Qi}=no;return{column:Mi,order:Qi}});return{sortColumns:bi,sortColumn:bi[0]&&bi[0].column,sortOrder:bi[0]&&bi[0].order}},[Vn]);function ti(bi){let no;bi.multiplePriority===!1||!Vn.length||Vn[0].multiplePriority===!1?no=[bi]:no=[].concat((0,mi.Z)(Vn.filter(Mi=>{let{key:Qi}=Mi;return Qi!==bi.key})),[bi]),wn(no),je(Gu(no),no)}return[bi=>rf(le,bi,Vn,ti,rn,Ue,Ln),Vn,ii,()=>Gu(Vn)]}function fd(oe,le){return oe.map(De=>{const je=Object.assign({},De);return je.title=da(De.title,le),"children"in je&&(je.children=fd(je.children,le)),je})}function Za(oe){return[Nt.useCallback(De=>fd(De,oe),[oe])]}var Xo=Zi((oe,le)=>{const{_renderTimes:De}=oe,{_renderTimes:je}=le;return De!==je}),al=or((oe,le)=>{const{_renderTimes:De}=oe,{_renderTimes:je}=le;return De!==je}),Ks=xt(64993),Ca=xt(17313),Mr=xt(83116),ls=xt(37613),ya=oe=>{const{componentCls:le}=oe,De=`${oe.lineWidth}px ${oe.lineType} ${oe.tableBorderColor}`,je=(rn,Ue,Ln)=>({[`&${le}-${rn}`]:{[`> ${le}-container`]:{[`> ${le}-content, > ${le}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${le}-expanded-row-fixed`]:{margin:`-${Ue}px -${Ln+oe.lineWidth}px`}}}}}});return{[`${le}-wrapper`]:{[`${le}${le}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${le}-title`]:{border:De,borderBottom:0},[`> ${le}-container`]:{borderInlineStart:De,borderTop:De,[`
|
|
|
> ${le}-content,
|
|
|
> ${le}-header,
|
|
|
> ${le}-body,
|
|
|
> ${le}-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:De},"> thead":{"> tr:not(:last-child) > th":{borderBottom:De},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${le}-cell-fix-right-first::after`]:{borderInlineEnd:De}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${le}-expanded-row-fixed`]:{margin:`-${oe.tablePaddingVertical}px -${oe.tablePaddingHorizontal+oe.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:oe.lineWidth,bottom:0,borderInlineEnd:De,content:'""'}}}}}},[`&${le}-scroll-horizontal`]:{[`> ${le}-container > ${le}-body`]:{"> table > tbody":{[`
|
|
|
> tr${le}-expanded-row,
|
|
|
> tr${le}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},je("middle",oe.tablePaddingVerticalMiddle,oe.tablePaddingHorizontalMiddle)),je("small",oe.tablePaddingVerticalSmall,oe.tablePaddingHorizontalSmall)),{[`> ${le}-footer`]:{border:De,borderTop:0}}),[`${le}-cell`]:{[`${le}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${oe.lineWidth}px 0 ${oe.lineWidth}px ${oe.tableHeaderBg}`}},[`${le}-bordered ${le}-cell-scrollbar`]:{borderInlineEnd:De}}}},Cs=oe=>{const{componentCls:le}=oe;return{[`${le}-wrapper`]:{[`${le}-cell-ellipsis`]:Object.assign(Object.assign({},Ca.vS),{wordBreak:"keep-all",[`
|
|
|
&${le}-cell-fix-left-last,
|
|
|
&${le}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${le}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${le}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Zr=oe=>{const{componentCls:le}=oe;return{[`${le}-wrapper`]:{[`${le}-tbody > tr${le}-placeholder`]:{textAlign:"center",color:oe.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:oe.colorBgContainer}}}}},sl=xt(15969),pa=oe=>{const{componentCls:le,antCls:De,controlInteractiveSize:je,motionDurationSlow:rn,lineWidth:Ue,paddingXS:Ln,lineType:kn,tableBorderColor:wn,tableExpandIconBg:Vn,tableExpandColumnWidth:ii,borderRadius:ti,fontSize:Bi,fontSizeSM:Ti,lineHeight:bi,tablePaddingVertical:no,tablePaddingHorizontal:Mi,tableExpandedRowBg:Qi,paddingXXS:Ui}=oe,vo=je/2-Ue,Do=vo*2+Ue*3,Jo=`${Ue}px ${kn} ${wn}`,ro=Ui-Ue;return{[`${le}-wrapper`]:{[`${le}-expand-icon-col`]:{width:ii},[`${le}-row-expand-icon-cell`]:{textAlign:"center",[`${le}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${le}-row-indent`]:{height:1,float:"left"},[`${le}-row-expand-icon`]:Object.assign(Object.assign({},(0,sl.N)(oe)),{position:"relative",float:"left",boxSizing:"border-box",width:Do,height:Do,padding:0,color:"inherit",lineHeight:`${Do}px`,background:Vn,border:Jo,borderRadius:ti,transform:`scale(${je/Do})`,transition:`all ${rn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${rn} ease-out`,content:'""'},"&::before":{top:vo,insetInlineEnd:ro,insetInlineStart:ro,height:Ue},"&::after":{top:ro,bottom:ro,insetInlineStart:vo,width:Ue,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"}}),[`${le}-row-indent + ${le}-row-expand-icon`]:{marginTop:(Bi*bi-Ue*3)/2-Math.ceil((Ti*1.4-Ue*3)/2),marginInlineEnd:Ln},[`tr${le}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Qi}},[`${De}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${le}-expanded-row-fixed`]:{position:"relative",margin:`-${no}px -${Mi}px`,padding:`${no}px ${Mi}px`}}}},Ua=oe=>{const{componentCls:le,antCls:De,iconCls:je,tableFilterDropdownWidth:rn,tableFilterDropdownSearchWidth:Ue,paddingXXS:Ln,paddingXS:kn,colorText:wn,lineWidth:Vn,lineType:ii,tableBorderColor:ti,tableHeaderIconColor:Bi,fontSizeSM:Ti,tablePaddingHorizontal:bi,borderRadius:no,motionDurationSlow:Mi,colorTextDescription:Qi,colorPrimary:Ui,tableHeaderFilterActiveBg:vo,colorTextDisabled:Do,tableFilterDropdownBg:Jo,tableFilterDropdownHeight:ro,controlItemBgHover:Io,controlItemBgActive:mr,boxShadowSecondary:po,filterDropdownMenuBg:To}=oe,ho=`${De}-dropdown`,Hi=`${le}-filter-dropdown`,bo=`${De}-tree`,Wo=`${Vn}px ${ii} ${ti}`;return[{[`${le}-wrapper`]:{[`${le}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${le}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-Ln,marginInline:`${Ln}px ${-bi/2}px`,padding:`0 ${Ln}px`,color:Bi,fontSize:Ti,borderRadius:no,cursor:"pointer",transition:`all ${Mi}`,"&:hover":{color:Qi,background:vo},"&.active":{color:Ui}}}},{[`${De}-dropdown`]:{[Hi]:Object.assign(Object.assign({},(0,Ca.Wf)(oe)),{minWidth:rn,backgroundColor:Jo,borderRadius:no,boxShadow:po,overflow:"hidden",[`${ho}-menu`]:{maxHeight:ro,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:To,"&:empty::after":{display:"block",padding:`${kn}px 0`,color:Do,fontSize:Ti,textAlign:"center",content:'"Not Found"'}},[`${Hi}-tree`]:{paddingBlock:`${kn}px 0`,paddingInline:kn,[bo]:{padding:0},[`${bo}-treenode ${bo}-node-content-wrapper:hover`]:{backgroundColor:Io},[`${bo}-treenode-checkbox-checked ${bo}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:mr}}},[`${Hi}-search`]:{padding:kn,borderBottom:Wo,"&-input":{input:{minWidth:Ue},[je]:{color:Do}}},[`${Hi}-checkall`]:{width:"100%",marginBottom:Ln,marginInlineStart:Ln},[`${Hi}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${kn-Vn}px ${kn}px`,overflow:"hidden",borderTop:Wo}})}},{[`${De}-dropdown ${Hi}, ${Hi}-submenu`]:{[`${De}-checkbox-wrapper + span`]:{paddingInlineStart:kn,color:wn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},_h=oe=>{const{componentCls:le,lineWidth:De,colorSplit:je,motionDurationSlow:rn,zIndexTableFixed:Ue,tableBg:Ln,zIndexTableSticky:kn}=oe,wn=je;return{[`${le}-wrapper`]:{[`
|
|
|
${le}-cell-fix-left,
|
|
|
${le}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Ue,background:Ln},[`
|
|
|
${le}-cell-fix-left-first::after,
|
|
|
${le}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-De,width:30,transform:"translateX(100%)",transition:`box-shadow ${rn}`,content:'""',pointerEvents:"none"},[`${le}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${le}-cell-fix-right-first::after,
|
|
|
${le}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-De,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${rn}`,content:'""',pointerEvents:"none"},[`${le}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:kn+1,width:30,transition:`box-shadow ${rn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${le}-ping-left`]:{[`&:not(${le}-has-fix-left) ${le}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${wn}`}},[`
|
|
|
${le}-cell-fix-left-first::after,
|
|
|
${le}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${wn}`},[`${le}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${le}-ping-right`]:{[`&:not(${le}-has-fix-right) ${le}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${wn}`}},[`
|
|
|
${le}-cell-fix-right-first::after,
|
|
|
${le}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${wn}`}}}}},$f=oe=>{const{componentCls:le,antCls:De}=oe;return{[`${le}-wrapper`]:{[`${le}-pagination${De}-pagination`]:{margin:`${oe.margin}px 0`},[`${le}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:oe.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Zf=oe=>{const{componentCls:le,tableRadius:De}=oe;return{[`${le}-wrapper`]:{[le]:{[`${le}-title, ${le}-header`]:{borderRadius:`${De}px ${De}px 0 0`},[`${le}-title + ${le}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${le}-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:De,borderStartEndRadius:De,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:De},"> *:last-child":{borderStartEndRadius:De}}},"&-footer":{borderRadius:`0 0 ${De}px ${De}px`}}}}},Wd=oe=>{const{componentCls:le}=oe;return{[`${le}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${le}-pagination-left`]:{justifyContent:"flex-end"},[`${le}-pagination-right`]:{justifyContent:"flex-start"},[`${le}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${le}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${le}-row-indent`]:{float:"right"}}}}},bc=oe=>{const{componentCls:le,antCls:De,iconCls:je,fontSizeIcon:rn,padding:Ue,paddingXS:Ln,tableHeaderIconColor:kn,tableHeaderIconColorHover:wn,tableSelectionColumnWidth:Vn}=oe;return{[`${le}-wrapper`]:{[`${le}-selection-col`]:{width:Vn,[`&${le}-selection-col-with-dropdown`]:{width:Vn+rn+Ue/4}},[`${le}-bordered ${le}-selection-col`]:{width:Vn+Ln*2,[`&${le}-selection-col-with-dropdown`]:{width:Vn+rn+Ue/4+Ln*2}},[`
|
|
|
table tr th${le}-selection-column,
|
|
|
table tr td${le}-selection-column
|
|
|
`]:{paddingInlineEnd:oe.paddingXS,paddingInlineStart:oe.paddingXS,textAlign:"center",[`${De}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${le}-selection-column${le}-cell-fix-left`]:{zIndex:oe.zIndexTableFixed+1},[`table tr th${le}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${le}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${le}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${oe.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${oe.tablePaddingHorizontal/4}px`,[je]:{color:kn,fontSize:rn,verticalAlign:"baseline","&:hover":{color:wn}}}}}},Vh=oe=>{const{componentCls:le}=oe,De=(je,rn,Ue,Ln)=>({[`${le}${le}-${je}`]:{fontSize:Ln,[`
|
|
|
${le}-title,
|
|
|
${le}-footer,
|
|
|
${le}-cell,
|
|
|
${le}-thead > tr > th,
|
|
|
${le}-tbody > tr > th,
|
|
|
${le}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${rn}px ${Ue}px`},[`${le}-filter-trigger`]:{marginInlineEnd:`-${Ue/2}px`},[`${le}-expanded-row-fixed`]:{margin:`-${rn}px -${Ue}px`},[`${le}-tbody`]:{[`${le}-wrapper:only-child ${le}`]:{marginBlock:`-${rn}px`,marginInline:`${oe.tableExpandColumnWidth-Ue}px -${Ue}px`}},[`${le}-selection-column`]:{paddingInlineStart:`${Ue/4}px`}}});return{[`${le}-wrapper`]:Object.assign(Object.assign({},De("middle",oe.tablePaddingVerticalMiddle,oe.tablePaddingHorizontalMiddle,oe.tableFontSizeMiddle)),De("small",oe.tablePaddingVerticalSmall,oe.tablePaddingHorizontalSmall,oe.tableFontSizeSmall))}},$u=oe=>{const{componentCls:le,marginXXS:De,fontSizeIcon:je,tableHeaderIconColor:rn,tableHeaderIconColorHover:Ue}=oe;return{[`${le}-wrapper`]:{[`${le}-thead th${le}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${oe.motionDurationSlow}`,"&:hover":{background:oe.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:oe.colorPrimary},[`
|
|
|
&${le}-cell-fix-left:hover,
|
|
|
&${le}-cell-fix-right:hover
|
|
|
`]:{background:oe.tableFixedHeaderSortActiveBg}},[`${le}-thead th${le}-column-sort`]:{background:oe.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${le}-column-sort`]:{background:oe.tableBodySortBg},[`${le}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${le}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${le}-column-sorter`]:{marginInlineStart:De,color:rn,fontSize:0,transition:`color ${oe.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:je,"&.active":{color:oe.colorPrimary}},[`${le}-column-sorter-up + ${le}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${le}-column-sorters:hover ${le}-column-sorter`]:{color:Ue}}}},Uh=oe=>{const{componentCls:le,opacityLoading:De,tableScrollThumbBg:je,tableScrollThumbBgHover:rn,tableScrollThumbSize:Ue,tableScrollBg:Ln,zIndexTableSticky:kn,stickyScrollBarBorderRadius:wn}=oe,Vn=`${oe.lineWidth}px ${oe.lineType} ${oe.tableBorderColor}`;return{[`${le}-wrapper`]:{[`${le}-sticky`]:{"&-holder":{position:"sticky",zIndex:kn,background:oe.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Ue}px !important`,zIndex:kn,display:"flex",alignItems:"center",background:Ln,borderTop:Vn,opacity:De,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Ue,backgroundColor:je,borderRadius:wn,transition:`all ${oe.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:rn}}}}}}},Zu=oe=>{const{componentCls:le,lineWidth:De,tableBorderColor:je}=oe,rn=`${De}px ${oe.lineType} ${je}`;return{[`${le}-wrapper`]:{[`${le}-summary`]:{position:"relative",zIndex:oe.zIndexTableFixed,background:oe.tableBg,"> tr":{"> th, > td":{borderBottom:rn}}},[`div${le}-summary`]:{boxShadow:`0 -${De}px 0 ${je}`}}}},Sh=oe=>{const{componentCls:le}=oe,De=`${oe.lineWidth}px ${oe.lineType} ${oe.tableBorderColor}`,je=`${le}-expanded-row-cell`;return{[`${le}-wrapper`]:{[`${le}-tbody-virtual`]:{[`${le}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${le}-cell`]:{borderBottom:De},[`${le}-expanded-row`]:{[`${je}${je}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${oe.lineWidth}px)`,borderInlineEnd:"none"}}},[`${le}-bordered`]:{[`${le}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:De,position:"absolute"},[`${le}-cell`]:{borderInlineEnd:De,[`&${le}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-oe.lineWidth,borderInlineStart:De}}}}}}};const Eu=oe=>{const{componentCls:le,fontWeightStrong:De,tablePaddingVertical:je,tablePaddingHorizontal:rn,lineWidth:Ue,lineType:Ln,tableBorderColor:kn,tableFontSize:wn,tableBg:Vn,tableRadius:ii,tableHeaderTextColor:ti,motionDurationMid:Bi,tableHeaderBg:Ti,tableHeaderCellSplitColor:bi,tableRowHoverBg:no,tableSelectedRowBg:Mi,tableSelectedRowHoverBg:Qi,tableFooterTextColor:Ui,tableFooterBg:vo,paddingContentVerticalLG:Do}=oe,Jo=`${Ue}px ${Ln} ${kn}`;return{[`${le}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ca.dF)()),{[le]:Object.assign(Object.assign({},(0,Ca.Wf)(oe)),{fontSize:wn,background:Vn,borderRadius:`${ii}px ${ii}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${ii}px ${ii}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${le}-cell,
|
|
|
${le}-thead > tr > th,
|
|
|
${le}-tbody > tr > th,
|
|
|
${le}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${Do}px ${rn}px`,overflowWrap:"break-word"},[`${le}-title`]:{padding:`${je}px ${rn}px`},[`${le}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:ti,fontWeight:De,textAlign:"start",background:Ti,borderBottom:Jo,transition:`background ${Bi} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${le}-selection-column):not(${le}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:bi,transform:"translateY(-50%)",transition:`background-color ${Bi}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${le}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${Bi}, border-color ${Bi}`,borderBottom:Jo,[`
|
|
|
> ${le}-wrapper:only-child,
|
|
|
> ${le}-expanded-row-fixed > ${le}-wrapper:only-child
|
|
|
`]:{[le]:{marginBlock:`-${je}px`,marginInline:`${oe.tableExpandColumnWidth-rn}px -${rn}px`,[`${le}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:ti,fontWeight:De,textAlign:"start",background:Ti,borderBottom:Jo,transition:`background ${Bi} ease`},[`
|
|
|
&${le}-row:hover > th,
|
|
|
&${le}-row:hover > td,
|
|
|
> th${le}-cell-row-hover,
|
|
|
> td${le}-cell-row-hover
|
|
|
`]:{background:no},[`&${le}-row-selected`]:{"> th, > td":{background:Mi},"&:hover > th, &:hover > td":{background:Qi}}}},[`${le}-footer`]:{padding:`${je}px ${rn}px`,color:Ui,background:vo}})}};var xh=(0,Mr.Z)("Table",oe=>{const{colorTextHeading:le,colorSplit:De,colorIcon:je,colorIconHover:rn,opacityLoading:Ue,colorBgContainer:Ln,controlInteractiveSize:kn,headerBg:wn,headerColor:Vn,headerSortActiveBg:ii,headerSortHoverBg:ti,bodySortBg:Bi,rowHoverBg:Ti,rowSelectedBg:bi,rowSelectedHoverBg:no,rowExpandedBg:Mi,cellPaddingBlock:Qi,cellPaddingInline:Ui,cellPaddingBlockMD:vo,cellPaddingInlineMD:Do,cellPaddingBlockSM:Jo,cellPaddingInlineSM:ro,borderColor:Io,footerBg:mr,footerColor:po,headerBorderRadius:To,cellFontSize:ho,cellFontSizeMD:Hi,cellFontSizeSM:bo,headerSplitColor:Wo,fixedHeaderSortActiveBg:ir,headerFilterHoverBg:rr,filterDropdownBg:ao,expandIconBg:yr,selectionColumnWidth:br,stickyScrollBarBg:na}=oe,Ar=new Ks.C(je),Da=new Ks.C(rn),Oa=2,Pr=(0,ls.TS)(oe,{tableFontSize:ho,tableBg:Ln,tableRadius:To,tablePaddingVertical:Qi,tablePaddingHorizontal:Ui,tablePaddingVerticalMiddle:vo,tablePaddingHorizontalMiddle:Do,tablePaddingVerticalSmall:Jo,tablePaddingHorizontalSmall:ro,tableBorderColor:Io,tableHeaderTextColor:Vn,tableHeaderBg:wn,tableFooterTextColor:po,tableFooterBg:mr,tableHeaderCellSplitColor:Wo,tableHeaderSortBg:ii,tableHeaderSortHoverBg:ti,tableHeaderIconColor:Ar.clone().setAlpha(Ar.getAlpha()*Ue).toRgbString(),tableHeaderIconColorHover:Da.clone().setAlpha(Da.getAlpha()*Ue).toRgbString(),tableBodySortBg:Bi,tableFixedHeaderSortActiveBg:ir,tableHeaderFilterActiveBg:rr,tableFilterDropdownBg:ao,tableRowHoverBg:Ti,tableSelectedRowBg:bi,tableSelectedRowHoverBg:no,zIndexTableFixed:Oa,zIndexTableSticky:Oa+1,tableFontSizeMiddle:Hi,tableFontSizeSmall:bo,tableSelectionColumnWidth:br,tableExpandIconBg:yr,tableExpandColumnWidth:kn+2*oe.padding,tableExpandedRowBg:Mi,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:na,tableScrollThumbBgHover:le,tableScrollBg:De});return[Eu(Pr),$f(Pr),Zu(Pr),$u(Pr),Ua(Pr),ya(Pr),Zf(Pr),pa(Pr),Zu(Pr),Zr(Pr),bc(Pr),_h(Pr),Uh(Pr),Cs(Pr),Vh(Pr),Wd(Pr),Sh(Pr)]},oe=>{const{colorFillAlter:le,colorBgContainer:De,colorTextHeading:je,colorFillSecondary:rn,colorFillContent:Ue,controlItemBgActive:Ln,controlItemBgActiveHover:kn,padding:wn,paddingSM:Vn,paddingXS:ii,colorBorderSecondary:ti,borderRadiusLG:Bi,fontSize:Ti,controlHeight:bi,colorTextPlaceholder:no}=oe,Mi=new Ks.C(rn).onBackground(De).toHexShortString(),Qi=new Ks.C(Ue).onBackground(De).toHexShortString(),Ui=new Ks.C(le).onBackground(De).toHexShortString();return{headerBg:Ui,headerColor:je,headerSortActiveBg:Mi,headerSortHoverBg:Qi,bodySortBg:Ui,rowHoverBg:Ui,rowSelectedBg:Ln,rowSelectedHoverBg:kn,rowExpandedBg:le,cellPaddingBlock:wn,cellPaddingInline:wn,cellPaddingBlockMD:Vn,cellPaddingInlineMD:ii,cellPaddingBlockSM:ii,cellPaddingInlineSM:ii,borderColor:ti,headerBorderRadius:Bi,footerBg:Ui,footerColor:je,cellFontSize:Ti,cellFontSizeMD:Ti,cellFontSizeSM:Ti,headerSplitColor:ti,fixedHeaderSortActiveBg:Mi,headerFilterHoverBg:Ue,filterDropdownMenuBg:De,filterDropdownBg:De,expandIconBg:De,selectionColumnWidth:bi,stickyScrollBarBg:no,stickyScrollBarBorderRadius:100}});const Ec=[],sf=(oe,le)=>{const{prefixCls:De,className:je,rootClassName:rn,style:Ue,size:Ln,bordered:kn,dropdownPrefixCls:wn,dataSource:Vn,pagination:ii,rowSelection:ti,rowKey:Bi="key",rowClassName:Ti,columns:bi,children:no,childrenColumnName:Mi,onChange:Qi,getPopupContainer:Ui,loading:vo,expandIcon:Do,expandable:Jo,expandedRowRender:ro,expandIconColumnIndex:Io,indentSize:mr,scroll:po,sortDirections:To,locale:ho,showSorterTooltip:Hi=!0,virtual:bo}=oe,Wo=Nt.useMemo(()=>bi||He(no),[bi,no]),ir=Nt.useMemo(()=>Wo.some(Xr=>Xr.responsive),[Wo]),rr=(0,Zn.Z)(ir),ao=Nt.useMemo(()=>{const Xr=new Set(Object.keys(rr).filter(Ea=>rr[Ea]));return Wo.filter(Ea=>!Ea.responsive||Ea.responsive.some(hs=>Xr.has(hs)))},[Wo,rr]),yr=(0,Co.Z)(oe,["className","style","columns"]),{locale:br=Ji.Z,direction:na,table:Ar,renderEmpty:Da,getPrefixCls:Oa,getPopupContainer:Pr}=Nt.useContext(ha.E_),Uo=(0,Xi.Z)(Ln),_r=Object.assign(Object.assign({},br.Table),ho),Aa=Vn||Ec,ba=Oa("table",De),os=Oa("dropdown",wn),ar=Object.assign({childrenColumnName:Mi,expandIconColumnIndex:Io},Jo),{childrenColumnName:er="children"}=ar,sr=Nt.useMemo(()=>Aa.some(Xr=>Xr==null?void 0:Xr[er])?"nest":ro||Jo&&Jo.expandedRowRender?"row":null,[Aa]),Ro={body:Nt.useRef()},Yr=Nt.useMemo(()=>typeof Bi=="function"?Bi:Xr=>Xr==null?void 0:Xr[Bi],[Bi]),[zo]=Gh(Aa,er,Yr),vr={},Hr=function(Xr,Ea){let hs=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Ma,Kr,Ss;const yl=Object.assign(Object.assign({},vr),Xr);hs&&((Ma=vr.resetPagination)===null||Ma===void 0||Ma.call(vr),!((Kr=yl.pagination)===null||Kr===void 0)&&Kr.current&&(yl.pagination.current=1),ii&&ii.onChange&&ii.onChange(1,(Ss=yl.pagination)===null||Ss===void 0?void 0:Ss.pageSize)),po&&po.scrollToFirstRowOnChange!==!1&&Ro.body.current&&(0,lr.Z)(0,{getContainer:()=>Ro.body.current}),Qi==null||Qi(yl.pagination,yl.filters,yl.sorter,{currentDataSource:Ws(ih(Aa,yl.sorterStates,er),yl.filterStates),action:Ea})},Gr=(Xr,Ea)=>{Hr({sorter:Xr,sorterStates:Ea},"sort",!1)},[bs,us,_s,ia]=Cc({prefixCls:ba,mergedColumns:ao,onSorterChange:Gr,sortDirections:To||["ascend","descend"],tableLocale:_r,showSorterTooltip:Hi}),Es=Nt.useMemo(()=>ih(Aa,us,er),[Aa,us]);vr.sorter=ia(),vr.sorterStates=us;const es=(Xr,Ea)=>{Hr({filters:Xr,filterStates:Ea},"filter",!0)},[ms,Wu,oa]=hd({prefixCls:ba,locale:_r,dropdownPrefixCls:os,mergedColumns:ao,onFilterChange:es,getPopupContainer:Ui||Pr}),ca=Ws(Es,Wu);vr.filters=oa,vr.filterStates=Wu;const ma=Nt.useMemo(()=>{const Xr={};return Object.keys(oa).forEach(Ea=>{oa[Ea]!==null&&(Xr[Ea]=oa[Ea])}),Object.assign(Object.assign({},_s),{filters:Xr})},[_s,oa]),[Ya]=Za(ma),vs=(Xr,Ea)=>{Hr({pagination:Object.assign(Object.assign({},vr.pagination),{current:Xr,pageSize:Ea})},"paginate")},[Ir,Sa]=dd(ca.length,vs,ii);vr.pagination=ii===!1?{}:zu(Ir,ii),vr.resetPagination=Sa;const ys=Nt.useMemo(()=>{if(ii===!1||!Ir.pageSize)return ca;const{current:Xr=1,total:Ea,pageSize:hs=mh}=Ir;return ca.length<Ea?ca.length>hs?ca.slice((Xr-1)*hs,Xr*hs):ca:ca.slice((Xr-1)*hs,Xr*hs)},[!!ii,ca,Ir&&Ir.current,Ir&&Ir.pageSize,Ir&&Ir.total]),[vl,Gl]=jl({prefixCls:ba,data:ca,pageData:ys,getRowKey:Yr,getRecordByKey:zo,expandType:sr,childrenColumnName:er,locale:_r,getPopupContainer:Ui||Pr},ti),Ll=(Xr,Ea,hs)=>{let Ma;return typeof Ti=="function"?Ma=he()(Ti(Xr,Ea,hs)):Ma=he()(Ti),he()({[`${ba}-row-selected`]:Gl.has(Yr(Xr,Ea))},Ma)};ar.__PARENT_RENDER_ICON__=ar.expandIcon,ar.expandIcon=ar.expandIcon||Do||xr(_r),sr==="nest"&&ar.expandIconColumnIndex===void 0?ar.expandIconColumnIndex=ti?1:0:ar.expandIconColumnIndex>0&&ti&&(ar.expandIconColumnIndex-=1),typeof ar.indentSize!="number"&&(ar.indentSize=typeof mr=="number"?mr:15);const ql=Nt.useCallback(Xr=>Ya(vl(ms(bs(Xr)))),[bs,ms,vl]);let tu,$l;if(ii!==!1&&(Ir!=null&&Ir.total)){let Xr;Ir.size?Xr=Ir.size:Xr=Uo==="small"||Uo==="middle"?"small":void 0;const Ea=Kr=>Nt.createElement(qo.Z,Object.assign({},Ir,{className:he()(`${ba}-pagination ${ba}-pagination-${Kr}`,Ir.className),size:Xr})),hs=na==="rtl"?"left":"right",{position:Ma}=Ir;if(Ma!==null&&Array.isArray(Ma)){const Kr=Ma.find(gu=>gu.includes("top")),Ss=Ma.find(gu=>gu.includes("bottom")),yl=Ma.every(gu=>`${gu}`=="none");!Kr&&!Ss&&!yl&&($l=Ea(hs)),Kr&&(tu=Ea(Kr.toLowerCase().replace("top",""))),Ss&&($l=Ea(Ss.toLowerCase().replace("bottom","")))}else $l=Ea(hs)}let la;typeof vo=="boolean"?la={spinning:vo}:typeof vo=="object"&&(la=Object.assign({spinning:!0},vo));const[Ns,Wa]=xh(ba),[,xa]=(0,ur.Z)(),Zl=he()(`${ba}-wrapper`,Ar==null?void 0:Ar.className,{[`${ba}-wrapper-rtl`]:na==="rtl"},je,rn,Wa),oh=Object.assign(Object.assign({},Ar==null?void 0:Ar.style),Ue),eu=ho&&ho.emptyText||(Da==null?void 0:Da("Table"))||Nt.createElement(So.Z,{componentName:"Table"}),Mu=bo?al:Xo,Ku={},kl=Nt.useMemo(()=>{const{fontSize:Xr,lineHeight:Ea,padding:hs,paddingXS:Ma,paddingSM:Kr}=xa,Ss=Math.floor(Xr*Ea);switch(Uo){case"large":return hs*2+Ss;case"small":return Ma*2+Ss;default:return Kr*2+Ss}},[xa,Uo]);return bo&&(Ku.listItemHeight=kl),Ns(Nt.createElement("div",{ref:le,className:Zl,style:oh},Nt.createElement(Or.Z,Object.assign({spinning:!1},la),tu,Nt.createElement(Mu,Object.assign({},Ku,yr,{columns:ao,direction:na,expandable:ar,prefixCls:ba,className:he()({[`${ba}-middle`]:Uo==="middle",[`${ba}-small`]:Uo==="small",[`${ba}-bordered`]:kn,[`${ba}-empty`]:Aa.length===0}),data:ys,rowKey:Yr,rowClassName:Ll,emptyText:eu,internalHooks:jt,internalRefs:Ro,transformColumns:ql})),$l)))};var lf=Nt.forwardRef(sf);const _f=(oe,le)=>{const De=Nt.useRef(0);return De.current+=1,Nt.createElement(lf,Object.assign({},oe,{ref:le,_renderTimes:De.current}))},ml=Nt.forwardRef(_f);ml.SELECTION_COLUMN=Xa,ml.EXPAND_COLUMN=Ot,ml.SELECTION_ALL=Ga,ml.SELECTION_INVERT=va,ml.SELECTION_NONE=Ta,ml.Column=oo,ml.ColumnGroup=_o,ml.Summary=ee;var Ph=ml,Wg=Ph},98228:function(En,yn,xt){"use strict";xt.d(yn,{default:function(){return co}});var Ot=xt(92310),jt=xt.n(Ot),Qt=xt(72308),Me=xt(80702),Ut=xt(77321),pe=xt(52487),Nt=xt(74416),Ie=xt(62853),we=xt(77861),qt=xt(17115),ce=xt(90782),Ce=xt(18929),Be=xt(48736),Tt=xt(59301),et=function(Sn){var Ct=Tt.useRef({valueLabels:new Map});return Tt.useMemo(function(){var Yn=Ct.current.valueLabels,yi=new Map,_e=Sn.map(function(Wn){var _n,si=Wn.value,ri=(_n=Wn.label)!==null&&_n!==void 0?_n:Yn.get(si);return yi.set(si,ri),(0,Ut.Z)((0,Ut.Z)({},Wn),{},{label:ri})});return Ct.current.valueLabels=yi,[_e]},[Sn])},nt=function(Sn,Ct,Yn,yi){return Tt.useMemo(function(){var _e=Sn.map(function(ri){var hi=ri.value;return hi}),Wn=Ct.map(function(ri){var hi=ri.value;return hi}),_n=_e.filter(function(ri){return!yi[ri]});if(Yn){var si=(0,ce.S)(_e,!0,yi);_e=si.checkedKeys,Wn=si.halfCheckedKeys}return[Array.from(new Set([].concat((0,Me.Z)(_n),(0,Me.Z)(_e)))),Wn]},[Sn,Ct,Yn,yi])},ht=xt(71430),st=function(Sn,Ct){return Tt.useMemo(function(){var Yn=(0,ht.I8)(Sn,{fieldNames:Ct,initWrapper:function(_e){return(0,Ut.Z)((0,Ut.Z)({},_e),{},{valueEntities:new Map})},processEntity:function(_e,Wn){var _n=_e.node[Ct.value];if(0)var si;Wn.valueEntities.set(_n,_e)}});return Yn},[Sn,Ct])},gt=xt(49618),vt=xt(11592),wt=function(){return null},Ft=wt,It=["children","value"];function At(Sn){return(0,vt.Z)(Sn).map(function(Ct){if(!Tt.isValidElement(Ct)||!Ct.type)return null;var Yn=Ct,yi=Yn.key,_e=Yn.props,Wn=_e.children,_n=_e.value,si=(0,Nt.Z)(_e,It),ri=(0,Ut.Z)({key:yi,value:_n},si),hi=At(Wn);return hi.length&&(ri.children=hi),ri}).filter(function(Ct){return Ct})}function Wt(Sn){if(!Sn)return Sn;var Ct=(0,Ut.Z)({},Sn);return"props"in Ct||Object.defineProperty(Ct,"props",{get:function(){return(0,Be.ZP)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),Ct}}),Ct}function re(Sn,Ct,Yn,yi,_e,Wn){var _n=null,si=null;function ri(){function hi(Fe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",Zt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Fe.map(function(He,fn){var ye="".concat(Ae,"-").concat(fn),ae=He[Wn.value],Ye=Yn.includes(ae),gn=hi(He[Wn.children]||[],ye,Ye),In=Tt.createElement(Ft,He,gn.map(function(_t){return _t.node}));if(Ct===ae&&(_n=In),Ye){var Re={pos:ye,node:In,children:gn};return Zt||si.push(Re),Re}return null}).filter(function(He){return He})}si||(si=[],hi(yi),si.sort(function(Fe,Ae){var Zt=Fe.node.props.value,He=Ae.node.props.value,fn=Yn.indexOf(Zt),ye=Yn.indexOf(He);return fn-ye}))}Object.defineProperty(Sn,"triggerNode",{get:function(){return(0,Be.ZP)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),ri(),_n}}),Object.defineProperty(Sn,"allCheckedNodes",{get:function(){return(0,Be.ZP)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),ri(),_e?si:si.map(function(Fe){var Ae=Fe.node;return Ae})}})}var ne=function(Sn,Ct,Yn){var yi=Yn.treeNodeFilterProp,_e=Yn.filterTreeNode,Wn=Yn.fieldNames,_n=Wn.children;return Tt.useMemo(function(){if(!Ct||_e===!1)return Sn;var si;if(typeof _e=="function")si=_e;else{var ri=Ct.toUpperCase();si=function(Ae,Zt){var He=Zt[yi];return String(He).toUpperCase().includes(ri)}}function hi(Fe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Fe.reduce(function(Zt,He){var fn=He[_n],ye=Ae||si(Ct,Wt(He)),ae=hi(fn||[],ye);return(ye||ae.length)&&Zt.push((0,Ut.Z)((0,Ut.Z)({},He),{},(0,gt.Z)({isLeaf:void 0},_n,ae))),Zt},[])}return hi(Sn)},[Sn,Ct,_n,yi,_e])};function me(Sn){var Ct=Tt.useRef();Ct.current=Sn;var Yn=Tt.useCallback(function(){return Ct.current.apply(Ct,arguments)},[]);return Yn}function Vt(Sn,Ct){var Yn=Ct.id,yi=Ct.pId,_e=Ct.rootPId,Wn={},_n=[],si=Sn.map(function(ri){var hi=(0,Ut.Z)({},ri),Fe=hi[Yn];return Wn[Fe]=hi,hi.key=hi.key||Fe,hi});return si.forEach(function(ri){var hi=ri[yi],Fe=Wn[hi];Fe&&(Fe.children=Fe.children||[],Fe.children.push(ri)),(hi===_e||!Fe&&_e===null)&&_n.push(ri)}),_n}function Le(Sn,Ct,Yn){return Tt.useMemo(function(){return Sn?Yn?Vt(Sn,(0,Ut.Z)({id:"id",pId:"pId",rootPId:null},Yn!==!0?Yn:{})):Sn:At(Ct)},[Ct,Yn,Sn])}var he=Tt.createContext(null),Ge=he,Ke=xt(10228),Ve=xt(80547),sn=xt(54844),Mn=Tt.createContext(null),xe=Mn;function Ht(Sn){return Array.isArray(Sn)?Sn:Sn!==void 0?[Sn]:[]}function Je(Sn){var Ct=Sn||{},Yn=Ct.label,yi=Ct.value,_e=Ct.children,Wn=yi||"value";return{_title:Yn?[Yn]:["title","label"],value:Wn,key:Wn,children:_e||"children"}}function Tn(Sn){return!Sn||Sn.disabled||Sn.disableCheckbox||Sn.checkable===!1}function An(Sn,Ct){var Yn=[];function yi(_e){_e.forEach(function(Wn){var _n=Wn[Ct.children];_n&&(Yn.push(Wn[Ct.value]),yi(_n))})}return yi(Sn),Yn}function ze(Sn){return Sn==null}var Te={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},dn=function(Ct,Yn){var yi=(0,we.lk)(),_e=yi.prefixCls,Wn=yi.multiple,_n=yi.searchValue,si=yi.toggleOpen,ri=yi.open,hi=yi.notFoundContent,Fe=Tt.useContext(xe),Ae=Fe.virtual,Zt=Fe.listHeight,He=Fe.listItemHeight,fn=Fe.treeData,ye=Fe.fieldNames,ae=Fe.onSelect,Ye=Fe.dropdownMatchSelectWidth,gn=Fe.treeExpandAction,In=Tt.useContext(Ge),Re=In.checkable,_t=In.checkedKeys,nn=In.halfCheckedKeys,cn=In.treeExpandedKeys,Bn=In.treeDefaultExpandAll,Oe=In.treeDefaultExpandedKeys,Xe=In.onTreeExpand,Gn=In.treeIcon,Xn=In.showTreeIcon,Jn=In.switcherIcon,Rn=In.treeLine,ni=In.treeNodeFilterProp,Qn=In.loadData,qn=In.treeLoadedKeys,Si=In.treeMotion,Vi=In.onTreeLoad,un=In.keyEntities,lo=Tt.useRef(),to=(0,Ve.Z)(function(){return fn},[ri,fn],function(zi,uo){return uo[0]&&zi[1]!==uo[1]}),Ki=Tt.useState(null),en=(0,pe.Z)(Ki,2),Dn=en[0],gi=en[1],ki=un[Dn],Pi=Tt.useMemo(function(){return Re?{checked:_t,halfChecked:nn}:null},[Re,_t,nn]);Tt.useEffect(function(){if(ri&&!Wn&&_t.length){var zi;(zi=lo.current)===null||zi===void 0||zi.scrollTo({key:_t[0]}),gi(_t[0])}},[ri]);var Di=String(_n).toLowerCase(),Zi=function(uo){return Di?String(uo[ni]).toLowerCase().includes(Di):!1},Ri=Tt.useState(Oe),$i=(0,pe.Z)(Ri,2),qi=$i[0],mn=$i[1],Lo=Tt.useState(null),tn=(0,pe.Z)(Lo,2),Gi=tn[0],Yi=tn[1],ji=Tt.useMemo(function(){return cn?(0,Me.Z)(cn):_n?Gi:qi},[qi,Gi,cn,_n]);Tt.useEffect(function(){_n&&Yi(An(fn,ye))},[_n]);var No=function(uo){mn(uo),Yi(uo),Xe&&Xe(uo)},Mo=function(uo){uo.preventDefault()},Ii=function(uo,li){var $t=li.node;Re&&Tn($t)||(ae($t.key,{selected:!_t.includes($t.key)}),Wn||si(!1))};if(Tt.useImperativeHandle(Yn,function(){var zi;return{scrollTo:(zi=lo.current)===null||zi===void 0?void 0:zi.scrollTo,onKeyDown:function(li){var $t,Ho=li.which;switch(Ho){case Ke.Z.UP:case Ke.Z.DOWN:case Ke.Z.LEFT:case Ke.Z.RIGHT:($t=lo.current)===null||$t===void 0||$t.onKeyDown(li);break;case Ke.Z.ENTER:{if(ki){var or=(ki==null?void 0:ki.node)||{},Cr=or.selectable,Fr=or.value;Cr!==!1&&Ii(null,{node:{key:Dn},selected:!_t.includes(Fr)})}break}case Ke.Z.ESC:si(!1)}},onKeyUp:function(){}}}),to.length===0)return Tt.createElement("div",{role:"listbox",className:"".concat(_e,"-empty"),onMouseDown:Mo},hi);var Ni={fieldNames:ye};return qn&&(Ni.loadedKeys=qn),ji&&(Ni.expandedKeys=ji),Tt.createElement("div",{onMouseDown:Mo},ki&&ri&&Tt.createElement("span",{style:Te,"aria-live":"assertive"},ki.node.value),Tt.createElement(sn.Z,(0,Qt.Z)({ref:lo,focusable:!1,prefixCls:"".concat(_e,"-tree"),treeData:to,height:Zt,itemHeight:He,virtual:Ae!==!1&&Ye!==!1,multiple:Wn,icon:Gn,showIcon:Xn,switcherIcon:Jn,showLine:Rn,loadData:_n?null:Qn,motion:Si,activeKey:Dn,checkable:Re,checkStrictly:!0,checkedKeys:Pi,selectedKeys:Re?[]:_t,defaultExpandAll:Bn},Ni,{onActiveChange:gi,onSelect:Ii,onCheck:Ii,onExpand:No,onLoad:Vi,filterTreeNode:Zi,expandAction:gn})))},Hn=Tt.forwardRef(dn);Hn.displayName="OptionList";var hn=Hn,pn="SHOW_ALL",de="SHOW_PARENT",vn="SHOW_CHILD";function bn(Sn,Ct,Yn,yi){var _e=new Set(Sn);return Ct===vn?Sn.filter(function(Wn){var _n=Yn[Wn];return!(_n&&_n.children&&_n.children.some(function(si){var ri=si.node;return _e.has(ri[yi.value])})&&_n.children.every(function(si){var ri=si.node;return Tn(ri)||_e.has(ri[yi.value])}))}):Ct===de?Sn.filter(function(Wn){var _n=Yn[Wn],si=_n?_n.parent:null;return!(si&&!Tn(si.node)&&_e.has(si.key))}):Sn}function Qe(Sn){var Ct=Sn.searchPlaceholder,Yn=Sn.treeCheckStrictly,yi=Sn.treeCheckable,_e=Sn.labelInValue,Wn=Sn.value,_n=Sn.multiple;warning(!Ct,"`searchPlaceholder` has been removed."),Yn&&_e===!1&&warning(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(_e||Yn)&&warning(toArray(Wn).every(function(si){return si&&_typeof(si)==="object"&&"value"in si}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),Yn||_n||yi?warning(!Wn||Array.isArray(Wn),"`value` should be an array when `TreeSelect` is checkable or multiple."):warning(!Array.isArray(Wn),"`value` should not be array when `TreeSelect` is single mode.")}var Pn=null,Ne=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"];function Pe(Sn){return!Sn||(0,Ie.Z)(Sn)!=="object"}var ie=Tt.forwardRef(function(Sn,Ct){var Yn=Sn.id,yi=Sn.prefixCls,_e=yi===void 0?"rc-tree-select":yi,Wn=Sn.value,_n=Sn.defaultValue,si=Sn.onChange,ri=Sn.onSelect,hi=Sn.onDeselect,Fe=Sn.searchValue,Ae=Sn.inputValue,Zt=Sn.onSearch,He=Sn.autoClearSearchValue,fn=He===void 0?!0:He,ye=Sn.filterTreeNode,ae=Sn.treeNodeFilterProp,Ye=ae===void 0?"value":ae,gn=Sn.showCheckedStrategy,In=Sn.treeNodeLabelProp,Re=Sn.multiple,_t=Sn.treeCheckable,nn=Sn.treeCheckStrictly,cn=Sn.labelInValue,Bn=Sn.fieldNames,Oe=Sn.treeDataSimpleMode,Xe=Sn.treeData,Gn=Sn.children,Xn=Sn.loadData,Jn=Sn.treeLoadedKeys,Rn=Sn.onTreeLoad,ni=Sn.treeDefaultExpandAll,Qn=Sn.treeExpandedKeys,qn=Sn.treeDefaultExpandedKeys,Si=Sn.onTreeExpand,Vi=Sn.treeExpandAction,un=Sn.virtual,lo=Sn.listHeight,to=lo===void 0?200:lo,Ki=Sn.listItemHeight,en=Ki===void 0?20:Ki,Dn=Sn.onDropdownVisibleChange,gi=Sn.dropdownMatchSelectWidth,ki=gi===void 0?!0:gi,Pi=Sn.treeLine,Di=Sn.treeIcon,Zi=Sn.showTreeIcon,Ri=Sn.switcherIcon,$i=Sn.treeMotion,qi=(0,Nt.Z)(Sn,Ne),mn=(0,qt.ZP)(Yn),Lo=_t&&!nn,tn=_t||nn,Gi=nn||cn,Yi=tn||Re,ji=(0,Ce.Z)(_n,{value:Wn}),No=(0,pe.Z)(ji,2),Mo=No[0],Ii=No[1],Ni=Tt.useMemo(function(){return _t?gn||vn:pn},[gn,_t]),zi=Tt.useMemo(function(){return Je(Bn)},[JSON.stringify(Bn)]),uo=(0,Ce.Z)("",{value:Fe!==void 0?Fe:Ae,postState:function(Go){return Go||""}}),li=(0,pe.Z)(uo,2),$t=li[0],Ho=li[1],or=function(Go){Ho(Go),Zt==null||Zt(Go)},Cr=Le(Xe,Gn,Oe),Fr=st(Cr,zi),cr=Fr.keyEntities,oo=Fr.valueEntities,fo=Tt.useCallback(function(Nr){var Go=[],fr=[];return Nr.forEach(function(aa){oo.has(aa)?fr.push(aa):Go.push(aa)}),{missingRawValues:Go,existRawValues:fr}},[oo]),_o=ne(Cr,$t,{fieldNames:zi,treeNodeFilterProp:Ye,filterTreeNode:ye}),Co=Tt.useCallback(function(Nr){if(Nr){if(In)return Nr[In];for(var Go=zi._title,fr=0;fr<Go.length;fr+=1){var aa=Nr[Go[fr]];if(aa!==void 0)return aa}}},[zi,In]),lr=Tt.useCallback(function(Nr){var Go=Ht(Nr);return Go.map(function(fr){return Pe(fr)?{value:fr}:fr})},[]),ha=Tt.useCallback(function(Nr){var Go=lr(Nr);return Go.map(function(fr){var aa=fr.label,xo=fr.value,tr=fr.halfChecked,ko,vi=oo.get(xo);if(vi){var Dr;aa=(Dr=aa)!==null&&Dr!==void 0?Dr:Co(vi.node),ko=vi.node.disabled}else if(aa===void 0){var sa=lr(Mo).find(function(ts){return ts.value===xo});aa=sa.label}return{label:aa,value:xo,halfChecked:tr,disabled:ko}})},[oo,Co,lr,Mo]),So=Tt.useMemo(function(){return lr(Mo)},[lr,Mo]),Xi=Tt.useMemo(function(){var Nr=[],Go=[];return So.forEach(function(fr){fr.halfChecked?Go.push(fr):Nr.push(fr)}),[Nr,Go]},[So]),Zn=(0,pe.Z)(Xi,2),Ji=Zn[0],qo=Zn[1],Or=Tt.useMemo(function(){return Ji.map(function(Nr){return Nr.value})},[Ji]),ur=nt(Ji,qo,Lo,cr),Yo=(0,pe.Z)(ur,2),xr=Yo[0],wr=Yo[1],ta=Tt.useMemo(function(){var Nr=bn(xr,Ni,cr,zi),Go=Nr.map(function(tr){var ko,vi,Dr;return(ko=(vi=cr[tr])===null||vi===void 0||(Dr=vi.node)===null||Dr===void 0?void 0:Dr[zi.value])!==null&&ko!==void 0?ko:tr}),fr=Go.map(function(tr){var ko=Ji.find(function(vi){return vi.value===tr});return{value:tr,label:ko==null?void 0:ko.label}}),aa=ha(fr),xo=aa[0];return!Yi&&xo&&ze(xo.value)&&ze(xo.label)?[]:aa.map(function(tr){var ko;return(0,Ut.Z)((0,Ut.Z)({},tr),{},{label:(ko=tr.label)!==null&&ko!==void 0?ko:tr.value})})},[zi,Yi,xr,Ji,ha,Ni,cr]),da=et(ta),wa=(0,pe.Z)(da,1),an=wa[0],Jr=me(function(Nr,Go,fr){var aa=ha(Nr);if(Ii(aa),fn&&Ho(""),si){var xo=Nr;if(Lo){var tr=bn(Nr,Ni,cr,zi);xo=tr.map(function(ea){var ss=oo.get(ea);return ss?ss.node[zi.value]:ea})}var ko=Go||{triggerValue:void 0,selected:void 0},vi=ko.triggerValue,Dr=ko.selected,sa=xo;if(nn){var ts=qo.filter(function(ea){return!xo.includes(ea.value)});sa=[].concat((0,Me.Z)(sa),(0,Me.Z)(ts))}var Ls=ha(sa),ws={preValue:Ji,triggerValue:vi},xi=!0;(nn||fr==="selection"&&!Dr)&&(xi=!1),re(ws,vi,Nr,Cr,xi,zi),tn?ws.checked=Dr:ws.selected=Dr;var Qr=Gi?Ls:Ls.map(function(ea){return ea.value});si(Yi?Qr:Qr[0],Gi?null:Ls.map(function(ea){return ea.label}),ws)}}),Zs=Tt.useCallback(function(Nr,Go){var fr,aa=Go.selected,xo=Go.source,tr=cr[Nr],ko=tr==null?void 0:tr.node,vi=(fr=ko==null?void 0:ko[zi.value])!==null&&fr!==void 0?fr:Nr;if(!Yi)Jr([vi],{selected:!0,triggerValue:vi},"option");else{var Dr=aa?[].concat((0,Me.Z)(Or),[vi]):xr.filter(function(ss){return ss!==vi});if(Lo){var sa=fo(Dr),ts=sa.missingRawValues,Ls=sa.existRawValues,ws=Ls.map(function(ss){return oo.get(ss).key}),xi;if(aa){var Qr=(0,ce.S)(ws,!0,cr);xi=Qr.checkedKeys}else{var ea=(0,ce.S)(ws,{checked:!1,halfCheckedKeys:wr},cr);xi=ea.checkedKeys}Dr=[].concat((0,Me.Z)(ts),(0,Me.Z)(xi.map(function(ss){return cr[ss].node[zi.value]})))}Jr(Dr,{selected:aa,triggerValue:vi},xo||"option")}aa||!Yi?ri==null||ri(vi,Wt(ko)):hi==null||hi(vi,Wt(ko))},[fo,oo,cr,zi,Yi,Or,Jr,Lo,ri,hi,xr,wr]),ps=Tt.useCallback(function(Nr){if(Dn){var Go={};Object.defineProperty(Go,"documentClickClose",{get:function(){return(0,Be.ZP)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),Dn(Nr,Go)}},[Dn]),Ds=me(function(Nr,Go){var fr=Nr.map(function(aa){return aa.value});if(Go.type==="clear"){Jr(fr,{},"selection");return}Go.values.length&&Zs(Go.values[0].value,{selected:!1,source:"selection"})}),$o=Tt.useMemo(function(){return{virtual:un,dropdownMatchSelectWidth:ki,listHeight:to,listItemHeight:en,treeData:_o,fieldNames:zi,onSelect:Zs,treeExpandAction:Vi}},[un,ki,to,en,_o,zi,Zs,Vi]),Ms=Tt.useMemo(function(){return{checkable:tn,loadData:Xn,treeLoadedKeys:Jn,onTreeLoad:Rn,checkedKeys:xr,halfCheckedKeys:wr,treeDefaultExpandAll:ni,treeExpandedKeys:Qn,treeDefaultExpandedKeys:qn,onTreeExpand:Si,treeIcon:Di,treeMotion:$i,showTreeIcon:Zi,switcherIcon:Ri,treeLine:Pi,treeNodeFilterProp:Ye,keyEntities:cr}},[tn,Xn,Jn,Rn,xr,wr,ni,Qn,qn,Si,Di,$i,Zi,Ri,Pi,Ye,cr]);return Tt.createElement(xe.Provider,{value:$o},Tt.createElement(Ge.Provider,{value:Ms},Tt.createElement(we.Ac,(0,Qt.Z)({ref:Ct},qi,{id:mn,prefixCls:_e,mode:Yi?"multiple":void 0,displayValues:an,onDisplayValuesChange:Ds,searchValue:$t,onSearch:or,OptionList:hn,emptyOptions:!Cr.length,onDropdownVisibleChange:ps,dropdownMatchSelectWidth:ki}))))}),Dt=ie;Dt.TreeNode=Ft,Dt.SHOW_ALL=pn,Dt.SHOW_PARENT=de,Dt.SHOW_CHILD=vn;var fe=Dt,Se=fe,ee=xt(2738),Kt=xt(53487),kt=xt(62892),St=xt(19080),mt=xt(36355),Lt=xt(1684),zt=xt(93891),Et=xt(19716),Yt=xt(32441),$e=xt(14154),ln=xt(58582),qe=xt(84443),Nn=xt(66339),ai=xt(33234),Kn=xt(71997),ci=xt(98447),Ci=xt(37613),Wi=xt(83116),Oi=xt(20648);const mo=Sn=>{const{componentCls:Ct,treePrefixCls:Yn,colorBgElevated:yi}=Sn,_e=`.${Yn}`;return[{[`${Ct}-dropdown`]:[{padding:`${Sn.paddingXS}px ${Sn.paddingXS/2}px`},(0,Oi.Yk)(Yn,(0,Ci.TS)(Sn,{colorBgContainer:yi})),{[_e]:{borderRadius:0,[`${_e}-list-holder-inner`]:{alignItems:"stretch",[`${_e}-treenode`]:{[`${_e}-node-content-wrapper`]:{flex:"auto"}}}}},(0,ci.C2)(`${Yn}-checkbox`,Sn),{"&-rtl":{direction:"rtl",[`${_e}-switcher${_e}-switcher_close`]:{[`${_e}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function Bo(Sn,Ct){return(0,Wi.Z)("TreeSelect",Yn=>{const yi=(0,Ci.TS)(Yn,{treePrefixCls:Ct});return[mo(yi)]},Oi.TM)(Sn)}var Ao=function(Sn,Ct){var Yn={};for(var yi in Sn)Object.prototype.hasOwnProperty.call(Sn,yi)&&Ct.indexOf(yi)<0&&(Yn[yi]=Sn[yi]);if(Sn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,yi=Object.getOwnPropertySymbols(Sn);_e<yi.length;_e++)Ct.indexOf(yi[_e])<0&&Object.prototype.propertyIsEnumerable.call(Sn,yi[_e])&&(Yn[yi[_e]]=Sn[yi[_e]]);return Yn};const oi=(Sn,Ct)=>{var Yn,{prefixCls:yi,size:_e,disabled:Wn,bordered:_n=!0,className:si,rootClassName:ri,treeCheckable:hi,multiple:Fe,listHeight:Ae=256,listItemHeight:Zt=26,placement:He,notFoundContent:fn,switcherIcon:ye,treeLine:ae,getPopupContainer:Ye,popupClassName:gn,dropdownClassName:In,treeIcon:Re=!1,transitionName:_t,choiceTransitionName:nn="",status:cn,treeExpandAction:Bn,builtinPlacements:Oe,dropdownMatchSelectWidth:Xe,popupMatchSelectWidth:Gn,allowClear:Xn}=Sn,Jn=Ao(Sn,["prefixCls","size","disabled","bordered","className","rootClassName","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","popupClassName","dropdownClassName","treeIcon","transitionName","choiceTransitionName","status","treeExpandAction","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","allowClear"]);const{getPopupContainer:Rn,getPrefixCls:ni,renderEmpty:Qn,direction:qn,virtual:Si,popupMatchSelectWidth:Vi,popupOverflow:un}=Tt.useContext(mt.E_),lo=ni(),to=ni("select",yi),Ki=ni("select-tree",yi),en=ni("tree-select",yi),{compactSize:Dn,compactItemClassnames:gi}=(0,ai.ri)(to,qn),[ki,Pi]=(0,$e.Z)(to),[Di]=Bo(en,Ki),Zi=jt()(gn||In,`${en}-dropdown`,{[`${en}-dropdown-rtl`]:qn==="rtl"},ri,Pi),Ri=!!(hi||Fe),$i=(0,qe.Z)(Jn.suffixIcon,Jn.showArrow),qi=(Yn=Gn!=null?Gn:Xe)!==null&&Yn!==void 0?Yn:Vi,{status:mn,hasFeedback:Lo,isFormItemInput:tn,feedbackIcon:Gi}=Tt.useContext(Yt.aM),Yi=(0,St.F)(mn,cn),{suffixIcon:ji,removeIcon:No,clearIcon:Mo}=(0,Nn.Z)(Object.assign(Object.assign({},Jn),{multiple:Ri,showSuffixIcon:$i,hasFeedback:Lo,feedbackIcon:Gi,prefixCls:to,componentName:"TreeSelect"})),Ii=Xn===!0?{clearIcon:Mo}:Xn;let Ni;fn!==void 0?Ni=fn:Ni=(Qn==null?void 0:Qn("Select"))||Tt.createElement(zt.Z,{componentName:"Select"});const zi=(0,ee.Z)(Jn,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),uo=Tt.useMemo(()=>He!==void 0?He:qn==="rtl"?"bottomRight":"bottomLeft",[He,qn]),li=(0,ln.Z)(Oe,un),$t=(0,Et.Z)(oo=>{var fo;return(fo=_e!=null?_e:Dn)!==null&&fo!==void 0?fo:oo}),Ho=Tt.useContext(Lt.Z),or=Wn!=null?Wn:Ho,Cr=jt()(!yi&&en,{[`${to}-lg`]:$t==="large",[`${to}-sm`]:$t==="small",[`${to}-rtl`]:qn==="rtl",[`${to}-borderless`]:!_n,[`${to}-in-form-item`]:tn},(0,St.Z)(to,Yi,Lo),gi,si,ri,Pi),Fr=oo=>Tt.createElement(Kn.Z,{prefixCls:Ki,switcherIcon:ye,treeNodeProps:oo,showLine:ae}),cr=Tt.createElement(Se,Object.assign({virtual:Si,disabled:or},zi,{dropdownMatchSelectWidth:qi,builtinPlacements:li,ref:Ct,prefixCls:to,className:Cr,listHeight:Ae,listItemHeight:Zt,treeCheckable:hi&&Tt.createElement("span",{className:`${to}-tree-checkbox-inner`}),treeLine:!!ae,suffixIcon:ji,multiple:Ri,placement:uo,removeIcon:No,allowClear:Ii,switcherIcon:Fr,showTreeIcon:Re,notFoundContent:Ni,getPopupContainer:Ye||Rn,treeMotion:null,dropdownClassName:Zi,choiceTransitionName:(0,kt.m)(lo,"",nn),transitionName:(0,kt.m)(lo,"slide-up",_t),treeExpandAction:Bn}));return ki(Di(cr))},di=Tt.forwardRef(oi),mi=(0,Kt.Z)(di);di.TreeNode=Ft,di.SHOW_ALL=pn,di.SHOW_PARENT=de,di.SHOW_CHILD=vn,di._InternalPanelDoNotUseOrYouWillBeFired=mi;var co=di},17574:function(En,yn,xt){"use strict";xt.d(yn,{default:function(){return xe}});var Ot=xt(54844),jt=xt(80702),Qt=xt(52671),Me=xt(8657),Ut=xt(72308),pe=xt(59301),Nt={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"},Ie=Nt,we=xt(7657),qt=function(Je,Tn){return pe.createElement(we.Z,(0,Ut.Z)({},Je,{ref:Tn,icon:Ie}))},ce=pe.forwardRef(qt),Ce=ce,Be=xt(92310),Tt=xt.n(Be),et=xt(35654),nt=xt(71430),ht=xt(36355),st=xt(56082),gt=xt(62892),vt=xt(20648);const wt=4;function Ft(Ht){const{dropPosition:Je,dropLevelOffset:Tn,prefixCls:An,indent:ze,direction:Te="ltr"}=Ht,dn=Te==="ltr"?"left":"right",Hn=Te==="ltr"?"right":"left",hn={[dn]:-Tn*ze+wt,[Hn]:0};switch(Je){case-1:hn.top=-3;break;case 1:hn.bottom=-3;break;default:hn.bottom=-3,hn[dn]=ze+wt;break}return pe.createElement("div",{style:hn,className:`${An}-drop-indicator`})}var It=xt(71997),Wt=pe.forwardRef((Ht,Je)=>{const{getPrefixCls:Tn,direction:An,virtual:ze,tree:Te}=pe.useContext(ht.E_),{prefixCls:dn,className:Hn,showIcon:hn=!1,showLine:pn,switcherIcon:de,blockNode:vn=!1,children:bn,checkable:Qe=!1,selectable:Pn=!0,draggable:Ne,motion:Pe,style:ie}=Ht,Dt=Tn("tree",dn),fe=Tn(),Se=Pe!=null?Pe:Object.assign(Object.assign({},(0,gt.Z)(fe)),{motionAppear:!1}),ee=Object.assign(Object.assign({},Ht),{checkable:Qe,selectable:Pn,showIcon:hn,motion:Se,blockNode:vn,showLine:!!pn,dropIndicatorRender:Ft}),[Kt,kt]=(0,vt.ZP)(Dt),St=pe.useMemo(()=>{if(!Ne)return!1;let Lt={};switch(typeof Ne){case"function":Lt.nodeDraggable=Ne;break;case"object":Lt=Object.assign({},Ne);break;default:break}return Lt.icon!==!1&&(Lt.icon=Lt.icon||pe.createElement(st.Z,null)),Lt},[Ne]),mt=Lt=>pe.createElement(It.Z,{prefixCls:Dt,switcherIcon:de,treeNodeProps:Lt,showLine:pn});return Kt(pe.createElement(Ot.Z,Object.assign({itemHeight:20,ref:Je,virtual:ze},ee,{style:Object.assign(Object.assign({},Te==null?void 0:Te.style),ie),prefixCls:Dt,className:Tt()({[`${Dt}-icon-hide`]:!hn,[`${Dt}-block-node`]:vn,[`${Dt}-unselectable`]:!Pn,[`${Dt}-rtl`]:An==="rtl"},Te==null?void 0:Te.className,Hn,kt),direction:An,checkable:Qe&&pe.createElement("span",{className:`${Dt}-checkbox-inner`}),selectable:Pn,switcherIcon:mt,draggable:St}),bn))}),re;(function(Ht){Ht[Ht.None=0]="None",Ht[Ht.Start=1]="Start",Ht[Ht.End=2]="End"})(re||(re={}));function ne(Ht,Je){function Tn(An){const{key:ze,children:Te}=An;Je(ze,An)!==!1&&ne(Te||[],Je)}Ht.forEach(Tn)}function me(Ht){let{treeData:Je,expandedKeys:Tn,startKey:An,endKey:ze}=Ht;const Te=[];let dn=re.None;if(An&&An===ze)return[An];if(!An||!ze)return[];function Hn(hn){return hn===An||hn===ze}return ne(Je,hn=>{if(dn===re.End)return!1;if(Hn(hn)){if(Te.push(hn),dn===re.None)dn=re.Start;else if(dn===re.Start)return dn=re.End,!1}else dn===re.Start&&Te.push(hn);return Tn.includes(hn)}),Te}function Vt(Ht,Je){const Tn=(0,jt.Z)(Je),An=[];return ne(Ht,(ze,Te)=>{const dn=Tn.indexOf(ze);return dn!==-1&&(An.push(Te),Tn.splice(dn,1)),!!Tn.length}),An}var Le=function(Ht,Je){var Tn={};for(var An in Ht)Object.prototype.hasOwnProperty.call(Ht,An)&&Je.indexOf(An)<0&&(Tn[An]=Ht[An]);if(Ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,An=Object.getOwnPropertySymbols(Ht);ze<An.length;ze++)Je.indexOf(An[ze])<0&&Object.prototype.propertyIsEnumerable.call(Ht,An[ze])&&(Tn[An[ze]]=Ht[An[ze]]);return Tn};function he(Ht){const{isLeaf:Je,expanded:Tn}=Ht;return Je?pe.createElement(Qt.Z,null):Tn?pe.createElement(Me.Z,null):pe.createElement(Ce,null)}function Ge(Ht){let{treeData:Je,children:Tn}=Ht;return Je||(0,nt.zn)(Tn)}const Ke=(Ht,Je)=>{var{defaultExpandAll:Tn,defaultExpandParent:An,defaultExpandedKeys:ze}=Ht,Te=Le(Ht,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const dn=pe.useRef(),Hn=pe.useRef(),hn=()=>{const{keyEntities:St}=(0,nt.I8)(Ge(Te));let mt;return Tn?mt=Object.keys(St):An?mt=(0,et.r7)(Te.expandedKeys||ze||[],St):mt=Te.expandedKeys||ze,mt},[pn,de]=pe.useState(Te.selectedKeys||Te.defaultSelectedKeys||[]),[vn,bn]=pe.useState(()=>hn());pe.useEffect(()=>{"selectedKeys"in Te&&de(Te.selectedKeys)},[Te.selectedKeys]),pe.useEffect(()=>{"expandedKeys"in Te&&bn(Te.expandedKeys)},[Te.expandedKeys]);const Qe=(St,mt)=>{var Lt;return"expandedKeys"in Te||bn(St),(Lt=Te.onExpand)===null||Lt===void 0?void 0:Lt.call(Te,St,mt)},Pn=(St,mt)=>{var Lt;const{multiple:zt}=Te,{node:Et,nativeEvent:Yt}=mt,{key:$e=""}=Et,ln=Ge(Te),qe=Object.assign(Object.assign({},mt),{selected:!0}),Nn=(Yt==null?void 0:Yt.ctrlKey)||(Yt==null?void 0:Yt.metaKey),ai=Yt==null?void 0:Yt.shiftKey;let Kn;zt&&Nn?(Kn=St,dn.current=$e,Hn.current=Kn,qe.selectedNodes=Vt(ln,Kn)):zt&&ai?(Kn=Array.from(new Set([].concat((0,jt.Z)(Hn.current||[]),(0,jt.Z)(me({treeData:ln,expandedKeys:vn,startKey:$e,endKey:dn.current}))))),qe.selectedNodes=Vt(ln,Kn)):(Kn=[$e],dn.current=$e,Hn.current=Kn,qe.selectedNodes=Vt(ln,Kn)),(Lt=Te.onSelect)===null||Lt===void 0||Lt.call(Te,Kn,qe),"selectedKeys"in Te||de(Kn)},{getPrefixCls:Ne,direction:Pe}=pe.useContext(ht.E_),{prefixCls:ie,className:Dt,showIcon:fe=!0,expandAction:Se="click"}=Te,ee=Le(Te,["prefixCls","className","showIcon","expandAction"]),Kt=Ne("tree",ie),kt=Tt()(`${Kt}-directory`,{[`${Kt}-directory-rtl`]:Pe==="rtl"},Dt);return pe.createElement(Wt,Object.assign({icon:he,ref:Je,blockNode:!0},ee,{showIcon:fe,expandAction:Se,prefixCls:Kt,className:kt,expandedKeys:vn,selectedKeys:pn,onSelect:Pn,onExpand:Qe}))};var sn=pe.forwardRef(Ke);const Mn=Wt;Mn.DirectoryTree=sn,Mn.TreeNode=Ot.O;var xe=Mn},20648:function(En,yn,xt){"use strict";xt.d(yn,{TM:function(){return Be},Yk:function(){return Ce}});var Ot=xt(93083),jt=xt(98447),Qt=xt(17313),Me=xt(8378),Ut=xt(37613),pe=xt(83116);const Nt=new Ot.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Ie=(Tt,et)=>({[`.${Tt}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${et.motionDurationSlow}`}}}),we=(Tt,et)=>({[`.${Tt}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:et.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${et.lineWidthBold}px solid ${et.colorPrimary}`,borderRadius:"50%",content:'""'}}}),qt=(Tt,et)=>{const{treeCls:nt,treeNodeCls:ht,treeNodePadding:st,titleHeight:gt,nodeSelectedBg:vt,nodeHoverBg:wt}=et,Ft=et.paddingXS;return{[nt]:Object.assign(Object.assign({},(0,Qt.Wf)(et)),{background:et.colorBgContainer,borderRadius:et.borderRadius,transition:`background-color ${et.motionDurationSlow}`,[`&${nt}-rtl`]:{[`${nt}-switcher`]:{"&_close":{[`${nt}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${nt}-active-focused)`]:Object.assign({},(0,Qt.oN)(et)),[`${nt}-list-holder-inner`]:{alignItems:"flex-start"},[`&${nt}-block-node`]:{[`${nt}-list-holder-inner`]:{alignItems:"stretch",[`${nt}-node-content-wrapper`]:{flex:"auto"},[`${ht}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:st,insetInlineStart:0,border:`1px solid ${et.colorPrimary}`,opacity:0,animationName:Nt,animationDuration:et.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${ht}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${st}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${nt}-node-content-wrapper`]:{color:et.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${nt}-node-content-wrapper`]:Object.assign({},(0,Qt.oN)(et)),[`&:not(${ht}-disabled).filter-node ${nt}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${nt}-draggable-icon`]:{flexShrink:0,width:gt,lineHeight:`${gt}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${et.motionDurationSlow}`,[`${ht}:hover &`]:{opacity:.45}},[`&${ht}-disabled`]:{[`${nt}-draggable-icon`]:{visibility:"hidden"}}}},[`${nt}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:gt}},[`${nt}-draggable-icon`]:{visibility:"hidden"},[`${nt}-switcher`]:Object.assign(Object.assign({},Ie(Tt,et)),{position:"relative",flex:"none",alignSelf:"stretch",width:gt,margin:0,lineHeight:`${gt}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${nt}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:et.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:gt/2,bottom:-st,marginInlineStart:-1,borderInlineEnd:`1px solid ${et.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:gt/2*.8,height:gt/2,borderBottom:`1px solid ${et.colorBorder}`,content:'""'}}}),[`${nt}-checkbox`]:{top:"initial",marginInlineEnd:Ft},[`${nt}-node-content-wrapper, ${nt}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:gt,margin:0,padding:`0 ${et.paddingXS/2}px`,color:"inherit",lineHeight:`${gt}px`,background:"transparent",borderRadius:et.borderRadius,cursor:"pointer",transition:`all ${et.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:wt},[`&${nt}-node-selected`]:{backgroundColor:vt},[`${nt}-iconEle`]:{display:"inline-block",width:gt,height:gt,lineHeight:`${gt}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${nt}-unselectable ${nt}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${nt}-node-content-wrapper`]:Object.assign({lineHeight:`${gt}px`,userSelect:"none"},we(Tt,et)),[`${ht}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${et.colorPrimary}`}},"&-show-line":{[`${nt}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:gt/2,bottom:-st,borderInlineEnd:`1px solid ${et.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${nt}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${ht}-leaf-last`]:{[`${nt}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${gt/2}px !important`}}}}})}},ce=Tt=>{const{treeCls:et,treeNodeCls:nt,treeNodePadding:ht,directoryNodeSelectedBg:st,directoryNodeSelectedColor:gt}=Tt;return{[`${et}${et}-directory`]:{[nt]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:ht,insetInlineStart:0,transition:`background-color ${Tt.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Tt.controlItemBgHover}},"> *":{zIndex:1},[`${et}-switcher`]:{transition:`color ${Tt.motionDurationMid}`},[`${et}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${et}-node-selected`]:{color:gt,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:st},[`${et}-switcher`]:{color:gt},[`${et}-node-content-wrapper`]:{color:gt,background:"transparent"}}}}}},Ce=(Tt,et)=>{const nt=`.${Tt}`,ht=`${nt}-treenode`,st=et.paddingXS/2,gt=(0,Ut.TS)(et,{treeCls:nt,treeNodeCls:ht,treeNodePadding:st});return[qt(Tt,gt),ce(gt)]},Be=Tt=>{const{controlHeightSM:et}=Tt;return{titleHeight:et,nodeHoverBg:Tt.controlItemBgHover,nodeSelectedBg:Tt.controlItemBgActive}};yn.ZP=(0,pe.Z)("Tree",(Tt,et)=>{let{prefixCls:nt}=et;return[{[Tt.componentCls]:(0,jt.C2)(`${nt}-checkbox`,Tt)},Ce(nt,Tt),(0,Me.Z)(Tt)]},Tt=>{const{colorTextLightSolid:et,colorPrimary:nt}=Tt;return Object.assign(Object.assign({},Be(Tt)),{directoryNodeSelectedColor:et,directoryNodeSelectedBg:nt})})},71997:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return ht}});var Ot=xt(72308),jt=xt(59301),Qt={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"},Me=Qt,Ut=xt(7657),pe=function(gt,vt){return jt.createElement(Ut.Z,(0,Ot.Z)({},gt,{ref:vt,icon:Me}))},Nt=jt.forwardRef(pe),Ie=Nt,we=xt(52671),qt=xt(58617),ce=xt(15075),Ce=xt(43531),Be=xt(92310),Tt=xt.n(Be),et=xt(92343),ht=st=>{const{prefixCls:gt,switcherIcon:vt,treeNodeProps:wt,showLine:Ft}=st,{isLeaf:It,expanded:At,loading:Wt}=wt;if(Wt)return jt.createElement(qt.Z,{className:`${gt}-switcher-loading-icon`});let re;if(Ft&&typeof Ft=="object"&&(re=Ft.showLeafIcon),It){if(!Ft)return null;if(typeof re!="boolean"&&re){const Vt=typeof re=="function"?re(wt):re,Le=`${gt}-switcher-line-custom-icon`;return(0,et.l$)(Vt)?(0,et.Tm)(Vt,{className:Tt()(Vt.props.className||"",Le)}):Vt}return re?jt.createElement(we.Z,{className:`${gt}-switcher-line-icon`}):jt.createElement("span",{className:`${gt}-switcher-leaf-line`})}const ne=`${gt}-switcher-icon`,me=typeof vt=="function"?vt(wt):vt;return(0,et.l$)(me)?(0,et.Tm)(me,{className:Tt()(me.props.className||"",ne)}):me!==void 0?me:Ft?At?jt.createElement(ce.Z,{className:`${gt}-switcher-line-icon`}):jt.createElement(Ce.Z,{className:`${gt}-switcher-line-icon`}):jt.createElement(Ie,{className:ne})}},99498:function(En,yn,xt){(function(Ot){Ot(xt(89780))})(function(Ot){Ot.defineOption("placeholder","",function(Ie,we,qt){var ce=qt&&qt!=Ot.Init;if(we&&!ce)Ie.on("blur",Ut),Ie.on("change",pe),Ie.on("swapDoc",pe),Ot.on(Ie.getInputField(),"compositionupdate",Ie.state.placeholderCompose=function(){Me(Ie)}),pe(Ie);else if(!we&&ce){Ie.off("blur",Ut),Ie.off("change",pe),Ie.off("swapDoc",pe),Ot.off(Ie.getInputField(),"compositionupdate",Ie.state.placeholderCompose),jt(Ie);var Ce=Ie.getWrapperElement();Ce.className=Ce.className.replace(" CodeMirror-empty","")}we&&!Ie.hasFocus()&&Ut(Ie)});function jt(Ie){Ie.state.placeholder&&(Ie.state.placeholder.parentNode.removeChild(Ie.state.placeholder),Ie.state.placeholder=null)}function Qt(Ie){jt(Ie);var we=Ie.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=Ie.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var qt=Ie.getOption("placeholder");typeof qt=="string"&&(qt=document.createTextNode(qt)),we.appendChild(qt),Ie.display.lineSpace.insertBefore(we,Ie.display.lineSpace.firstChild)}function Me(Ie){setTimeout(function(){var we=!1,qt=Ie.getInputField();qt.nodeName=="TEXTAREA"?we=!qt.value:Ie.lineCount()==1&&(we=!/[^\u200b]/.test(qt.querySelector(".CodeMirror-line").textContent)),we?Qt(Ie):jt(Ie)},20)}function Ut(Ie){Nt(Ie)&&Qt(Ie)}function pe(Ie){var we=Ie.getWrapperElement(),qt=Nt(Ie);we.className=we.className.replace(" CodeMirror-empty","")+(qt?" CodeMirror-empty":""),qt?Qt(Ie):jt(Ie)}function Nt(Ie){return Ie.lineCount()===1&&Ie.getLine(0)===""}})},25717:function(En,yn,xt){(function(Ot){Ot(xt(89780))})(function(Ot){var jt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Qt=Ot.Pos;Ot.defineOption("autoCloseBrackets",!1,function(et,nt,ht){ht&&ht!=Ot.Init&&(et.removeKeyMap(Ut),et.state.closeBrackets=null),nt&&(pe(Me(nt,"pairs")),et.state.closeBrackets=nt,et.addKeyMap(Ut))});function Me(et,nt){return nt=="pairs"&&typeof et=="string"?et:typeof et=="object"&&et[nt]!=null?et[nt]:jt[nt]}var Ut={Backspace:we,Enter:qt};function pe(et){for(var nt=0;nt<et.length;nt++){var ht=et.charAt(nt),st="'"+ht+"'";Ut[st]||(Ut[st]=Nt(ht))}}pe(jt.pairs+"`");function Nt(et){return function(nt){return Ce(nt,et)}}function Ie(et){var nt=et.state.closeBrackets;if(!nt||nt.override)return nt;var ht=et.getModeAt(et.getCursor());return ht.closeBrackets||nt}function we(et){var nt=Ie(et);if(!nt||et.getOption("disableInput"))return Ot.Pass;for(var ht=Me(nt,"pairs"),st=et.listSelections(),gt=0;gt<st.length;gt++){if(!st[gt].empty())return Ot.Pass;var vt=Be(et,st[gt].head);if(!vt||ht.indexOf(vt)%2!=0)return Ot.Pass}for(var gt=st.length-1;gt>=0;gt--){var wt=st[gt].head;et.replaceRange("",Qt(wt.line,wt.ch-1),Qt(wt.line,wt.ch+1),"+delete")}}function qt(et){var nt=Ie(et),ht=nt&&Me(nt,"explode");if(!ht||et.getOption("disableInput"))return Ot.Pass;for(var st=et.listSelections(),gt=0;gt<st.length;gt++){if(!st[gt].empty())return Ot.Pass;var vt=Be(et,st[gt].head);if(!vt||ht.indexOf(vt)%2!=0)return Ot.Pass}et.operation(function(){var wt=et.lineSeparator()||`
|
|
|
`;et.replaceSelection(wt+wt,null),et.execCommand("goCharLeft"),st=et.listSelections();for(var Ft=0;Ft<st.length;Ft++){var It=st[Ft].head.line;et.indentLine(It,null,!0),et.indentLine(It+1,null,!0)}})}function ce(et){var nt=Ot.cmpPos(et.anchor,et.head)>0;return{anchor:new Qt(et.anchor.line,et.anchor.ch+(nt?-1:1)),head:new Qt(et.head.line,et.head.ch+(nt?1:-1))}}function Ce(et,nt){var ht=Ie(et);if(!ht||et.getOption("disableInput"))return Ot.Pass;var st=Me(ht,"pairs"),gt=st.indexOf(nt);if(gt==-1)return Ot.Pass;for(var vt=Me(ht,"closeBefore"),wt=Me(ht,"triples"),Ft=st.charAt(gt+1)==nt,It=et.listSelections(),At=gt%2==0,Wt,re=0;re<It.length;re++){var ne=It[re],me=ne.head,Vt,Le=et.getRange(me,Qt(me.line,me.ch+1));if(At&&!ne.empty())Vt="surround";else if((Ft||!At)&&Le==nt)Ft&&Tt(et,me)?Vt="both":wt.indexOf(nt)>=0&&et.getRange(me,Qt(me.line,me.ch+3))==nt+nt+nt?Vt="skipThree":Vt="skip";else if(Ft&&me.ch>1&&wt.indexOf(nt)>=0&&et.getRange(Qt(me.line,me.ch-2),me)==nt+nt){if(me.ch>2&&/\bstring/.test(et.getTokenTypeAt(Qt(me.line,me.ch-2))))return Ot.Pass;Vt="addFour"}else if(Ft){var he=me.ch==0?" ":et.getRange(Qt(me.line,me.ch-1),me);if(!Ot.isWordChar(Le)&&he!=nt&&!Ot.isWordChar(he))Vt="both";else return Ot.Pass}else if(At&&(Le.length===0||/\s/.test(Le)||vt.indexOf(Le)>-1))Vt="both";else return Ot.Pass;if(!Wt)Wt=Vt;else if(Wt!=Vt)return Ot.Pass}var Ge=gt%2?st.charAt(gt-1):nt,Ke=gt%2?nt:st.charAt(gt+1);et.operation(function(){if(Wt=="skip")et.execCommand("goCharRight");else if(Wt=="skipThree")for(var Ve=0;Ve<3;Ve++)et.execCommand("goCharRight");else if(Wt=="surround"){for(var sn=et.getSelections(),Ve=0;Ve<sn.length;Ve++)sn[Ve]=Ge+sn[Ve]+Ke;et.replaceSelections(sn,"around"),sn=et.listSelections().slice();for(var Ve=0;Ve<sn.length;Ve++)sn[Ve]=ce(sn[Ve]);et.setSelections(sn)}else Wt=="both"?(et.replaceSelection(Ge+Ke,null),et.triggerElectric(Ge+Ke),et.execCommand("goCharLeft")):Wt=="addFour"&&(et.replaceSelection(Ge+Ge+Ge+Ge,"before"),et.execCommand("goCharRight"))})}function Be(et,nt){var ht=et.getRange(Qt(nt.line,nt.ch-1),Qt(nt.line,nt.ch+1));return ht.length==2?ht:null}function Tt(et,nt){var ht=et.getTokenAt(Qt(nt.line,nt.ch+1));return/\bstring/.test(ht.type)&&ht.start==nt.ch&&(nt.ch==0||!/\bstring/.test(et.getTokenTypeAt(nt)))}})},6313:function(En,yn,xt){(function(Ot){Ot(xt(89780),xt(32855))})(function(Ot){Ot.defineOption("autoCloseTags",!1,function(we,qt,ce){if(ce!=Ot.Init&&ce&&we.removeKeyMap("autoCloseTags"),!!qt){var Ce={name:"autoCloseTags"};(typeof qt!="object"||qt.whenClosing!==!1)&&(Ce["'/'"]=function(Be){return pe(Be)}),(typeof qt!="object"||qt.whenOpening!==!1)&&(Ce["'>'"]=function(Be){return Me(Be)}),we.addKeyMap(Ce)}});var jt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Qt=["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 Me(we){if(we.getOption("disableInput"))return Ot.Pass;for(var qt=we.listSelections(),ce=[],Ce=we.getOption("autoCloseTags"),Be=0;Be<qt.length;Be++){if(!qt[Be].empty())return Ot.Pass;var Tt=qt[Be].head,et=we.getTokenAt(Tt),nt=Ot.innerMode(we.getMode(),et.state),ht=nt.state,st=nt.mode.xmlCurrentTag&&nt.mode.xmlCurrentTag(ht),gt=st&&st.name;if(!gt)return Ot.Pass;var vt=nt.mode.configuration=="html",wt=typeof Ce=="object"&&Ce.dontCloseTags||vt&&jt,Ft=typeof Ce=="object"&&Ce.indentTags||vt&&Qt;et.end>Tt.ch&&(gt=gt.slice(0,gt.length-et.end+Tt.ch));var It=gt.toLowerCase();if(!gt||et.type=="string"&&(et.end!=Tt.ch||!/[\"\']/.test(et.string.charAt(et.string.length-1))||et.string.length==1)||et.type=="tag"&&st.close||et.string.indexOf("/")==Tt.ch-et.start-1||wt&&Nt(wt,It)>-1||Ie(we,nt.mode.xmlCurrentContext&&nt.mode.xmlCurrentContext(ht)||[],gt,Tt,!0))return Ot.Pass;var At=typeof Ce=="object"&&Ce.emptyTags;if(At&&Nt(At,gt)>-1){ce[Be]={text:"/>",newPos:Ot.Pos(Tt.line,Tt.ch+2)};continue}var Wt=Ft&&Nt(Ft,It)>-1;ce[Be]={indent:Wt,text:">"+(Wt?`
|
|
|
|
|
|
`:"")+"</"+gt+">",newPos:Wt?Ot.Pos(Tt.line+1,0):Ot.Pos(Tt.line,Tt.ch+1)}}for(var re=typeof Ce=="object"&&Ce.dontIndentOnAutoClose,Be=qt.length-1;Be>=0;Be--){var ne=ce[Be];we.replaceRange(ne.text,qt[Be].head,qt[Be].anchor,"+insert");var me=we.listSelections().slice(0);me[Be]={head:ne.newPos,anchor:ne.newPos},we.setSelections(me),!re&&ne.indent&&(we.indentLine(ne.newPos.line,null,!0),we.indentLine(ne.newPos.line+1,null,!0))}}function Ut(we,qt){for(var ce=we.listSelections(),Ce=[],Be=qt?"/":"</",Tt=we.getOption("autoCloseTags"),et=typeof Tt=="object"&&Tt.dontIndentOnSlash,nt=0;nt<ce.length;nt++){if(!ce[nt].empty())return Ot.Pass;var ht=ce[nt].head,st=we.getTokenAt(ht),gt=Ot.innerMode(we.getMode(),st.state),vt=gt.state;if(qt&&(st.type=="string"||st.string.charAt(0)!="<"||st.start!=ht.ch-1))return Ot.Pass;var wt,Ft=gt.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(Ft&>.mode.name=="javascript")wt=Be+"script";else if(Ft&>.mode.name=="css")wt=Be+"style";else{var It=gt.mode.xmlCurrentContext&>.mode.xmlCurrentContext(vt);if(!It||It.length&&Ie(we,It,It[It.length-1],ht))return Ot.Pass;wt=Be+It[It.length-1]}we.getLine(ht.line).charAt(st.end)!=">"&&(wt+=">"),Ce[nt]=wt}if(we.replaceSelections(Ce),ce=we.listSelections(),!et)for(var nt=0;nt<ce.length;nt++)(nt==ce.length-1||ce[nt].head.line<ce[nt+1].head.line)&&we.indentLine(ce[nt].head.line)}function pe(we){return we.getOption("disableInput")?Ot.Pass:Ut(we,!0)}Ot.commands.closeTag=function(we){return Ut(we)};function Nt(we,qt){if(we.indexOf)return we.indexOf(qt);for(var ce=0,Ce=we.length;ce<Ce;++ce)if(we[ce]==qt)return ce;return-1}function Ie(we,qt,ce,Ce,Be){if(!Ot.scanForClosingTag)return!1;var Tt=Math.min(we.lastLine()+1,Ce.line+500),et=Ot.scanForClosingTag(we,Ce,null,Tt);if(!et||et.tag!=ce)return!1;for(var nt=Be?1:0,ht=qt.length-1;ht>=0&&qt[ht]==ce;ht--)++nt;Ce=et.to;for(var ht=1;ht<nt;ht++){var st=Ot.scanForClosingTag(we,Ce,null,Tt);if(!st||st.tag!=ce)return!1;Ce=st.to}return!0}})},32855:function(En,yn,xt){(function(Ot){Ot(xt(89780))})(function(Ot){"use strict";var jt=Ot.Pos;function Qt(ht,st){return ht.line-st.line||ht.ch-st.ch}var Me="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",Ut=Me+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",pe=new RegExp("<(/?)(["+Me+"]["+Ut+"]*)","g");function Nt(ht,st,gt,vt){this.line=st,this.ch=gt,this.cm=ht,this.text=ht.getLine(st),this.min=vt?Math.max(vt.from,ht.firstLine()):ht.firstLine(),this.max=vt?Math.min(vt.to-1,ht.lastLine()):ht.lastLine()}function Ie(ht,st){var gt=ht.cm.getTokenTypeAt(jt(ht.line,st));return gt&&/\btag\b/.test(gt)}function we(ht){if(!(ht.line>=ht.max))return ht.ch=0,ht.text=ht.cm.getLine(++ht.line),!0}function qt(ht){if(!(ht.line<=ht.min))return ht.text=ht.cm.getLine(--ht.line),ht.ch=ht.text.length,!0}function ce(ht){for(;;){var st=ht.text.indexOf(">",ht.ch);if(st==-1){if(we(ht))continue;return}if(!Ie(ht,st+1)){ht.ch=st+1;continue}var gt=ht.text.lastIndexOf("/",st),vt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,st));return ht.ch=st+1,vt?"selfClose":"regular"}}function Ce(ht){for(;;){var st=ht.ch?ht.text.lastIndexOf("<",ht.ch-1):-1;if(st==-1){if(qt(ht))continue;return}if(!Ie(ht,st+1)){ht.ch=st;continue}pe.lastIndex=st,ht.ch=st;var gt=pe.exec(ht.text);if(gt&>.index==st)return gt}}function Be(ht){for(;;){pe.lastIndex=ht.ch;var st=pe.exec(ht.text);if(!st){if(we(ht))continue;return}if(!Ie(ht,st.index+1)){ht.ch=st.index+1;continue}return ht.ch=st.index+st[0].length,st}}function Tt(ht){for(;;){var st=ht.ch?ht.text.lastIndexOf(">",ht.ch-1):-1;if(st==-1){if(qt(ht))continue;return}if(!Ie(ht,st+1)){ht.ch=st;continue}var gt=ht.text.lastIndexOf("/",st),vt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,st));return ht.ch=st+1,vt?"selfClose":"regular"}}function et(ht,st){for(var gt=[];;){var vt=Be(ht),wt,Ft=ht.line,It=ht.ch-(vt?vt[0].length:0);if(!vt||!(wt=ce(ht)))return;if(wt!="selfClose")if(vt[1]){for(var At=gt.length-1;At>=0;--At)if(gt[At]==vt[2]){gt.length=At;break}if(At<0&&(!st||st==vt[2]))return{tag:vt[2],from:jt(Ft,It),to:jt(ht.line,ht.ch)}}else gt.push(vt[2])}}function nt(ht,st){for(var gt=[];;){var vt=Tt(ht);if(!vt)return;if(vt=="selfClose"){Ce(ht);continue}var wt=ht.line,Ft=ht.ch,It=Ce(ht);if(!It)return;if(It[1])gt.push(It[2]);else{for(var At=gt.length-1;At>=0;--At)if(gt[At]==It[2]){gt.length=At;break}if(At<0&&(!st||st==It[2]))return{tag:It[2],from:jt(ht.line,ht.ch),to:jt(wt,Ft)}}}}Ot.registerHelper("fold","xml",function(ht,st){for(var gt=new Nt(ht,st.line,0);;){var vt=Be(gt);if(!vt||gt.line!=st.line)return;var wt=ce(gt);if(!wt)return;if(!vt[1]&&wt!="selfClose"){var Ft=jt(gt.line,gt.ch),It=et(gt,vt[2]);return It&&Qt(It.from,Ft)>0?{from:Ft,to:It.from}:null}}}),Ot.findMatchingTag=function(ht,st,gt){var vt=new Nt(ht,st.line,st.ch,gt);if(!(vt.text.indexOf(">")==-1&&vt.text.indexOf("<")==-1)){var wt=ce(vt),Ft=wt&&jt(vt.line,vt.ch),It=wt&&Ce(vt);if(!(!wt||!It||Qt(vt,st)>0)){var At={from:jt(vt.line,vt.ch),to:Ft,tag:It[2]};return wt=="selfClose"?{open:At,close:null,at:"open"}:It[1]?{open:nt(vt,It[2]),close:At,at:"close"}:(vt=new Nt(ht,Ft.line,Ft.ch,gt),{open:At,close:et(vt,It[2]),at:"open"})}}},Ot.findEnclosingTag=function(ht,st,gt,vt){for(var wt=new Nt(ht,st.line,st.ch,gt);;){var Ft=nt(wt,vt);if(!Ft)break;var It=new Nt(ht,st.line,st.ch,gt),At=et(It,Ft.tag);if(At)return{open:Ft,close:At}}},Ot.scanForClosingTag=function(ht,st,gt,vt){var wt=new Nt(ht,st.line,st.ch,vt?{from:0,to:vt}:null);return et(wt,gt)}})},89780:function(En){(function(yn,xt){En.exports=xt()})(this,function(){"use strict";var yn=navigator.userAgent,xt=navigator.platform,Ot=/gecko\/\d/i.test(yn),jt=/MSIE \d/.test(yn),Qt=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(yn),Me=/Edge\/(\d+)/.exec(yn),Ut=jt||Qt||Me,pe=Ut&&(jt?document.documentMode||6:+(Me||Qt)[1]),Nt=!Me&&/WebKit\//.test(yn),Ie=Nt&&/Qt\/\d+\.\d+/.test(yn),we=!Me&&/Chrome\//.test(yn),qt=/Opera\//.test(yn),ce=/Apple Computer/.test(navigator.vendor),Ce=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(yn),Be=/PhantomJS/.test(yn),Tt=!Me&&/AppleWebKit/.test(yn)&&/Mobile\/\w+/.test(yn),et=/Android/.test(yn),nt=Tt||et||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(yn),ht=Tt||/Mac/.test(xt),st=/\bCrOS\b/.test(yn),gt=/win/i.test(xt),vt=qt&&yn.match(/Version\/(\d*\.\d*)/);vt&&(vt=Number(vt[1])),vt&&vt>=15&&(qt=!1,Nt=!0);var wt=ht&&(Ie||qt&&(vt==null||vt<12.11)),Ft=Ot||Ut&&pe>=9;function It(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var At=function(it,at){var ct=it.className,dt=It(at).exec(ct);if(dt){var pt=ct.slice(dt.index+dt[0].length);it.className=ct.slice(0,dt.index)+(pt?dt[1]+pt:"")}};function Wt(it){for(var at=it.childNodes.length;at>0;--at)it.removeChild(it.firstChild);return it}function re(it,at){return Wt(it).appendChild(at)}function ne(it,at,ct,dt){var pt=document.createElement(it);if(ct&&(pt.className=ct),dt&&(pt.style.cssText=dt),typeof at=="string")pt.appendChild(document.createTextNode(at));else if(at)for(var Mt=0;Mt<at.length;++Mt)pt.appendChild(at[Mt]);return pt}function me(it,at,ct,dt){var pt=ne(it,at,ct,dt);return pt.setAttribute("role","presentation"),pt}var Vt;document.createRange?Vt=function(it,at,ct,dt){var pt=document.createRange();return pt.setEnd(dt||it,ct),pt.setStart(it,at),pt}:Vt=function(it,at,ct){var dt=document.body.createTextRange();try{dt.moveToElementText(it.parentNode)}catch(pt){return dt}return dt.collapse(!0),dt.moveEnd("character",ct),dt.moveStart("character",at),dt};function Le(it,at){if(at.nodeType==3&&(at=at.parentNode),it.contains)return it.contains(at);do if(at.nodeType==11&&(at=at.host),at==it)return!0;while(at=at.parentNode)}function he(){var it;try{it=document.activeElement}catch(at){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function Ge(it,at){var ct=it.className;It(at).test(ct)||(it.className+=(ct?" ":"")+at)}function Ke(it,at){for(var ct=it.split(" "),dt=0;dt<ct.length;dt++)ct[dt]&&!It(ct[dt]).test(at)&&(at+=" "+ct[dt]);return at}var Ve=function(it){it.select()};Tt?Ve=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:Ut&&(Ve=function(it){try{it.select()}catch(at){}});function sn(it){var at=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,at)}}function Mn(it,at,ct){at||(at={});for(var dt in it)it.hasOwnProperty(dt)&&(ct!==!1||!at.hasOwnProperty(dt))&&(at[dt]=it[dt]);return at}function xe(it,at,ct,dt,pt){at==null&&(at=it.search(/[^\s\u00a0]/),at==-1&&(at=it.length));for(var Mt=dt||0,Rt=pt||0;;){var te=it.indexOf(" ",Mt);if(te<0||te>=at)return Rt+(at-Mt);Rt+=te-Mt,Rt+=ct-Rt%ct,Mt=te+1}}var Ht=function(){this.id=null,this.f=null,this.time=0,this.handler=sn(this.onTimeout,this)};Ht.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Ht.prototype.set=function(it,at){this.f=at;var ct=+new Date+it;(!this.id||ct<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=ct)};function Je(it,at){for(var ct=0;ct<it.length;++ct)if(it[ct]==at)return ct;return-1}var Tn=50,An={toString:function(){return"CodeMirror.Pass"}},ze={scroll:!1},Te={origin:"*mouse"},dn={origin:"+move"};function Hn(it,at,ct){for(var dt=0,pt=0;;){var Mt=it.indexOf(" ",dt);Mt==-1&&(Mt=it.length);var Rt=Mt-dt;if(Mt==it.length||pt+Rt>=at)return dt+Math.min(Rt,at-pt);if(pt+=Mt-dt,pt+=ct-pt%ct,dt=Mt+1,pt>=at)return dt}}var hn=[""];function pn(it){for(;hn.length<=it;)hn.push(de(hn)+" ");return hn[it]}function de(it){return it[it.length-1]}function vn(it,at){for(var ct=[],dt=0;dt<it.length;dt++)ct[dt]=at(it[dt],dt);return ct}function bn(it,at,ct){for(var dt=0,pt=ct(at);dt<it.length&&ct(it[dt])<=pt;)dt++;it.splice(dt,0,at)}function Qe(){}function Pn(it,at){var ct;return Object.create?ct=Object.create(it):(Qe.prototype=it,ct=new Qe),at&&Mn(at,ct),ct}var Ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Pe(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||Ne.test(it))}function ie(it,at){return at?at.source.indexOf("\\w")>-1&&Pe(it)?!0:at.test(it):Pe(it)}function Dt(it){for(var at in it)if(it.hasOwnProperty(at)&&it[at])return!1;return!0}var fe=/[\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 Se(it){return it.charCodeAt(0)>=768&&fe.test(it)}function ee(it,at,ct){for(;(ct<0?at>0:at<it.length)&&Se(it.charAt(at));)at+=ct;return at}function Kt(it,at,ct){for(var dt=at>ct?-1:1;;){if(at==ct)return at;var pt=(at+ct)/2,Mt=dt<0?Math.ceil(pt):Math.floor(pt);if(Mt==at)return it(Mt)?at:ct;it(Mt)?ct=Mt:at=Mt+dt}}function kt(it,at,ct,dt){if(!it)return dt(at,ct,"ltr",0);for(var pt=!1,Mt=0;Mt<it.length;++Mt){var Rt=it[Mt];(Rt.from<ct&&Rt.to>at||at==ct&&Rt.to==at)&&(dt(Math.max(Rt.from,at),Math.min(Rt.to,ct),Rt.level==1?"rtl":"ltr",Mt),pt=!0)}pt||dt(at,ct,"ltr")}var St=null;function mt(it,at,ct){var dt;St=null;for(var pt=0;pt<it.length;++pt){var Mt=it[pt];if(Mt.from<at&&Mt.to>at)return pt;Mt.to==at&&(Mt.from!=Mt.to&&ct=="before"?dt=pt:St=pt),Mt.from==at&&(Mt.from!=Mt.to&&ct!="before"?dt=pt:St=pt)}return dt!=null?dt:St}var Lt=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",at="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ct(ve){return ve<=247?it.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?at.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var dt=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,pt=/[stwN]/,Mt=/[LRr]/,Rt=/[Lb1n]/,te=/[1n]/;function Xt(ve,on,Ee){this.level=ve,this.from=on,this.to=Ee}return function(ve,on){var Ee=on=="ltr"?"L":"R";if(ve.length==0||on=="ltr"&&!dt.test(ve))return!1;for(var On=ve.length,Cn=[],wi=0;wi<On;++wi)Cn.push(ct(ve.charCodeAt(wi)));for(var Li=0,Ai=Ee;Li<On;++Li){var so=Cn[Li];so=="m"?Cn[Li]=Ai:Ai=so}for(var Fo=0,Eo=Ee;Fo<On;++Fo){var Ko=Cn[Fo];Ko=="1"&&Eo=="r"?Cn[Fo]="n":Mt.test(Ko)&&(Eo=Ko,Ko=="r"&&(Cn[Fo]="R"))}for(var Sr=1,wo=Cn[0];Sr<On-1;++Sr){var Br=Cn[Sr];Br=="+"&&wo=="1"&&Cn[Sr+1]=="1"?Cn[Sr]="1":Br==","&&wo==Cn[Sr+1]&&(wo=="1"||wo=="n")&&(Cn[Sr]=wo),wo=Br}for(var Ja=0;Ja<On;++Ja){var js=Cn[Ja];if(js==",")Cn[Ja]="N";else if(js=="%"){var rs=void 0;for(rs=Ja+1;rs<On&&Cn[rs]=="%";++rs);for(var Vl=Ja&&Cn[Ja-1]=="!"||rs<On&&Cn[rs]=="1"?"1":"N",xl=Ja;xl<rs;++xl)Cn[xl]=Vl;Ja=rs-1}}for(var Fs=0,ou=Ee;Fs<On;++Fs){var ul=Cn[Fs];ou=="L"&&ul=="1"?Cn[Fs]="L":Mt.test(ul)&&(ou=ul)}for(var Is=0;Is<On;++Is)if(pt.test(Cn[Is])){var fa=void 0;for(fa=Is+1;fa<On&&pt.test(Cn[fa]);++fa);for(var cs=(Is?Cn[Is-1]:Ee)=="L",Vs=(fa<On?Cn[fa]:Ee)=="L",hl=cs==Vs?cs?"L":"R":Ee,Vu=Is;Vu<fa;++Vu)Cn[Vu]=hl;Is=fa-1}for(var as=[],ku,xs=0;xs<On;)if(Rt.test(Cn[xs])){var Sf=xs;for(++xs;xs<On&&Rt.test(Cn[xs]);++xs);as.push(new Xt(0,Sf,xs))}else{var mu=xs,ru=as.length,Ul=on=="rtl"?1:0;for(++xs;xs<On&&Cn[xs]!="L";++xs);for(var za=mu;za<xs;)if(te.test(Cn[za])){mu<za&&(as.splice(ru,0,new Xt(1,mu,za)),ru+=Ul);var Us=za;for(++za;za<xs&&te.test(Cn[za]);++za);as.splice(ru,0,new Xt(2,Us,za)),ru+=Ul,mu=za}else++za;mu<xs&&as.splice(ru,0,new Xt(1,mu,xs))}return on=="ltr"&&(as[0].level==1&&(ku=ve.match(/^\s+/))&&(as[0].from=ku[0].length,as.unshift(new Xt(0,0,ku[0].length))),de(as).level==1&&(ku=ve.match(/\s+$/))&&(de(as).to-=ku[0].length,as.push(new Xt(0,On-ku[0].length,On)))),on=="rtl"?as.reverse():as}}();function zt(it,at){var ct=it.order;return ct==null&&(ct=it.order=Lt(it.text,at)),ct}var Et=[],Yt=function(it,at,ct){if(it.addEventListener)it.addEventListener(at,ct,!1);else if(it.attachEvent)it.attachEvent("on"+at,ct);else{var dt=it._handlers||(it._handlers={});dt[at]=(dt[at]||Et).concat(ct)}};function $e(it,at){return it._handlers&&it._handlers[at]||Et}function ln(it,at,ct){if(it.removeEventListener)it.removeEventListener(at,ct,!1);else if(it.detachEvent)it.detachEvent("on"+at,ct);else{var dt=it._handlers,pt=dt&&dt[at];if(pt){var Mt=Je(pt,ct);Mt>-1&&(dt[at]=pt.slice(0,Mt).concat(pt.slice(Mt+1)))}}}function qe(it,at){var ct=$e(it,at);if(ct.length)for(var dt=Array.prototype.slice.call(arguments,2),pt=0;pt<ct.length;++pt)ct[pt].apply(null,dt)}function Nn(it,at,ct){return typeof at=="string"&&(at={type:at,preventDefault:function(){this.defaultPrevented=!0}}),qe(it,ct||at.type,it,at),Oi(at)||at.codemirrorIgnore}function ai(it){var at=it._handlers&&it._handlers.cursorActivity;if(at)for(var ct=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),dt=0;dt<at.length;++dt)Je(ct,at[dt])==-1&&ct.push(at[dt])}function Kn(it,at){return $e(it,at).length>0}function ci(it){it.prototype.on=function(at,ct){Yt(this,at,ct)},it.prototype.off=function(at,ct){ln(this,at,ct)}}function Ci(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function Wi(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function Oi(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function mo(it){Ci(it),Wi(it)}function Bo(it){return it.target||it.srcElement}function Ao(it){var at=it.which;return at==null&&(it.button&1?at=1:it.button&2?at=3:it.button&4&&(at=2)),ht&&it.ctrlKey&&at==1&&(at=3),at}var oi=function(){if(Ut&&pe<9)return!1;var it=ne("div");return"draggable"in it||"dragDrop"in it}(),fi;function di(it){if(fi==null){var at=ne("span","\u200B");re(it,ne("span",[at,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(fi=at.offsetWidth<=1&&at.offsetHeight>2&&!(Ut&&pe<8))}var ct=fi?ne("span","\u200B"):ne("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ct.setAttribute("cm-text",""),ct}var mi;function co(it){if(mi!=null)return mi;var at=re(it,document.createTextNode("A\u062EA")),ct=Vt(at,0,1).getBoundingClientRect(),dt=Vt(at,1,2).getBoundingClientRect();return Wt(it),!ct||ct.left==ct.right?!1:mi=dt.right-ct.right<3}var Sn=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(it){for(var at=0,ct=[],dt=it.length;at<=dt;){var pt=it.indexOf(`
|
|
|
`,at);pt==-1&&(pt=it.length);var Mt=it.slice(at,it.charAt(pt-1)=="\r"?pt-1:pt),Rt=Mt.indexOf("\r");Rt!=-1?(ct.push(Mt.slice(0,Rt)),at+=Rt+1):(ct.push(Mt),at=pt+1)}return ct}:function(it){return it.split(/\r\n?|\n/)},Ct=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(at){return!1}}:function(it){var at;try{at=it.ownerDocument.selection.createRange()}catch(ct){}return!at||at.parentElement()!=it?!1:at.compareEndPoints("StartToEnd",at)!=0},Yn=function(){var it=ne("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),yi=null;function _e(it){if(yi!=null)return yi;var at=re(it,ne("span","x")),ct=at.getBoundingClientRect(),dt=Vt(at,0,1).getBoundingClientRect();return yi=Math.abs(ct.left-dt.left)>1}var Wn={},_n={};function si(it,at){arguments.length>2&&(at.dependencies=Array.prototype.slice.call(arguments,2)),Wn[it]=at}function ri(it,at){_n[it]=at}function hi(it){if(typeof it=="string"&&_n.hasOwnProperty(it))it=_n[it];else if(it&&typeof it.name=="string"&&_n.hasOwnProperty(it.name)){var at=_n[it.name];typeof at=="string"&&(at={name:at}),it=Pn(at,it),it.name=at.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return hi("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return hi("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function Fe(it,at){at=hi(at);var ct=Wn[at.name];if(!ct)return Fe(it,"text/plain");var dt=ct(it,at);if(Ae.hasOwnProperty(at.name)){var pt=Ae[at.name];for(var Mt in pt)pt.hasOwnProperty(Mt)&&(dt.hasOwnProperty(Mt)&&(dt["_"+Mt]=dt[Mt]),dt[Mt]=pt[Mt])}if(dt.name=at.name,at.helperType&&(dt.helperType=at.helperType),at.modeProps)for(var Rt in at.modeProps)dt[Rt]=at.modeProps[Rt];return dt}var Ae={};function Zt(it,at){var ct=Ae.hasOwnProperty(it)?Ae[it]:Ae[it]={};Mn(at,ct)}function He(it,at){if(at===!0)return at;if(it.copyState)return it.copyState(at);var ct={};for(var dt in at){var pt=at[dt];pt instanceof Array&&(pt=pt.concat([])),ct[dt]=pt}return ct}function fn(it,at){for(var ct;it.innerMode&&(ct=it.innerMode(at),!(!ct||ct.mode==it));)at=ct.state,it=ct.mode;return ct||{mode:it,state:at}}function ye(it,at,ct){return it.startState?it.startState(at,ct):!0}var ae=function(it,at,ct){this.pos=this.start=0,this.string=it,this.tabSize=at||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ct};ae.prototype.eol=function(){return this.pos>=this.string.length},ae.prototype.sol=function(){return this.pos==this.lineStart},ae.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ae.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ae.prototype.eat=function(it){var at=this.string.charAt(this.pos),ct;if(typeof it=="string"?ct=at==it:ct=at&&(it.test?it.test(at):it(at)),ct)return++this.pos,at},ae.prototype.eatWhile=function(it){for(var at=this.pos;this.eat(it););return this.pos>at},ae.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},ae.prototype.skipToEnd=function(){this.pos=this.string.length},ae.prototype.skipTo=function(it){var at=this.string.indexOf(it,this.pos);if(at>-1)return this.pos=at,!0},ae.prototype.backUp=function(it){this.pos-=it},ae.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=xe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?xe(this.string,this.lineStart,this.tabSize):0)},ae.prototype.indentation=function(){return xe(this.string,null,this.tabSize)-(this.lineStart?xe(this.string,this.lineStart,this.tabSize):0)},ae.prototype.match=function(it,at,ct){if(typeof it=="string"){var dt=function(Rt){return ct?Rt.toLowerCase():Rt},pt=this.string.substr(this.pos,it.length);if(dt(pt)==dt(it))return at!==!1&&(this.pos+=it.length),!0}else{var Mt=this.string.slice(this.pos).match(it);return Mt&&Mt.index>0?null:(Mt&&at!==!1&&(this.pos+=Mt[0].length),Mt)}},ae.prototype.current=function(){return this.string.slice(this.start,this.pos)},ae.prototype.hideFirstChars=function(it,at){this.lineStart+=it;try{return at()}finally{this.lineStart-=it}},ae.prototype.lookAhead=function(it){var at=this.lineOracle;return at&&at.lookAhead(it)},ae.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Ye(it,at){if(at-=it.first,at<0||at>=it.size)throw new Error("There is no line "+(at+it.first)+" in the document.");for(var ct=it;!ct.lines;)for(var dt=0;;++dt){var pt=ct.children[dt],Mt=pt.chunkSize();if(at<Mt){ct=pt;break}at-=Mt}return ct.lines[at]}function gn(it,at,ct){var dt=[],pt=at.line;return it.iter(at.line,ct.line+1,function(Mt){var Rt=Mt.text;pt==ct.line&&(Rt=Rt.slice(0,ct.ch)),pt==at.line&&(Rt=Rt.slice(at.ch)),dt.push(Rt),++pt}),dt}function In(it,at,ct){var dt=[];return it.iter(at,ct,function(pt){dt.push(pt.text)}),dt}function Re(it,at){var ct=at-it.height;if(ct)for(var dt=it;dt;dt=dt.parent)dt.height+=ct}function _t(it){if(it.parent==null)return null;for(var at=it.parent,ct=Je(at.lines,it),dt=at.parent;dt;at=dt,dt=dt.parent)for(var pt=0;dt.children[pt]!=at;++pt)ct+=dt.children[pt].chunkSize();return ct+at.first}function nn(it,at){var ct=it.first;t:do{for(var dt=0;dt<it.children.length;++dt){var pt=it.children[dt],Mt=pt.height;if(at<Mt){it=pt;continue t}at-=Mt,ct+=pt.chunkSize()}return ct}while(!it.lines);for(var Rt=0;Rt<it.lines.length;++Rt){var te=it.lines[Rt],Xt=te.height;if(at<Xt)break;at-=Xt}return ct+Rt}function cn(it,at){return at>=it.first&&at<it.first+it.size}function Bn(it,at){return String(it.lineNumberFormatter(at+it.firstLineNumber))}function Oe(it,at,ct){if(ct===void 0&&(ct=null),!(this instanceof Oe))return new Oe(it,at,ct);this.line=it,this.ch=at,this.sticky=ct}function Xe(it,at){return it.line-at.line||it.ch-at.ch}function Gn(it,at){return it.sticky==at.sticky&&Xe(it,at)==0}function Xn(it){return Oe(it.line,it.ch)}function Jn(it,at){return Xe(it,at)<0?at:it}function Rn(it,at){return Xe(it,at)<0?it:at}function ni(it,at){return Math.max(it.first,Math.min(at,it.first+it.size-1))}function Qn(it,at){if(at.line<it.first)return Oe(it.first,0);var ct=it.first+it.size-1;return at.line>ct?Oe(ct,Ye(it,ct).text.length):qn(at,Ye(it,at.line).text.length)}function qn(it,at){var ct=it.ch;return ct==null||ct>at?Oe(it.line,at):ct<0?Oe(it.line,0):it}function Si(it,at){for(var ct=[],dt=0;dt<at.length;dt++)ct[dt]=Qn(it,at[dt]);return ct}var Vi=function(it,at){this.state=it,this.lookAhead=at},un=function(it,at,ct,dt){this.state=at,this.doc=it,this.line=ct,this.maxLookAhead=dt||0,this.baseTokens=null,this.baseTokenPos=1};un.prototype.lookAhead=function(it){var at=this.doc.getLine(this.line+it);return at!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),at},un.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var at=this.baseTokens[this.baseTokenPos+1];return{type:at&&at.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},un.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},un.fromSaved=function(it,at,ct){return at instanceof Vi?new un(it,He(it.mode,at.state),ct,at.lookAhead):new un(it,He(it.mode,at),ct)},un.prototype.save=function(it){var at=it!==!1?He(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Vi(at,this.maxLookAhead):at};function lo(it,at,ct,dt){var pt=[it.state.modeGen],Mt={};Zi(it,at.text,it.doc.mode,ct,function(ve,on){return pt.push(ve,on)},Mt,dt);for(var Rt=ct.state,te=function(ve){ct.baseTokens=pt;var on=it.state.overlays[ve],Ee=1,On=0;ct.state=!0,Zi(it,at.text,on.mode,ct,function(Cn,wi){for(var Li=Ee;On<Cn;){var Ai=pt[Ee];Ai>Cn&&pt.splice(Ee,1,Cn,pt[Ee+1],Ai),Ee+=2,On=Math.min(Cn,Ai)}if(wi)if(on.opaque)pt.splice(Li,Ee-Li,Cn,"overlay "+wi),Ee=Li+2;else for(;Li<Ee;Li+=2){var so=pt[Li+1];pt[Li+1]=(so?so+" ":"")+"overlay "+wi}},Mt),ct.state=Rt,ct.baseTokens=null,ct.baseTokenPos=1},Xt=0;Xt<it.state.overlays.length;++Xt)te(Xt);return{styles:pt,classes:Mt.bgClass||Mt.textClass?Mt:null}}function to(it,at,ct){if(!at.styles||at.styles[0]!=it.state.modeGen){var dt=Ki(it,_t(at)),pt=at.text.length>it.options.maxHighlightLength&&He(it.doc.mode,dt.state),Mt=lo(it,at,dt);pt&&(dt.state=pt),at.stateAfter=dt.save(!pt),at.styles=Mt.styles,Mt.classes?at.styleClasses=Mt.classes:at.styleClasses&&(at.styleClasses=null),ct===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return at.styles}function Ki(it,at,ct){var dt=it.doc,pt=it.display;if(!dt.mode.startState)return new un(dt,!0,at);var Mt=Ri(it,at,ct),Rt=Mt>dt.first&&Ye(dt,Mt-1).stateAfter,te=Rt?un.fromSaved(dt,Rt,Mt):new un(dt,ye(dt.mode),Mt);return dt.iter(Mt,at,function(Xt){en(it,Xt.text,te);var ve=te.line;Xt.stateAfter=ve==at-1||ve%5==0||ve>=pt.viewFrom&&ve<pt.viewTo?te.save():null,te.nextLine()}),ct&&(dt.modeFrontier=te.line),te}function en(it,at,ct,dt){var pt=it.doc.mode,Mt=new ae(at,it.options.tabSize,ct);for(Mt.start=Mt.pos=dt||0,at==""&&Dn(pt,ct.state);!Mt.eol();)gi(pt,Mt,ct.state),Mt.start=Mt.pos}function Dn(it,at){if(it.blankLine)return it.blankLine(at);if(it.innerMode){var ct=fn(it,at);if(ct.mode.blankLine)return ct.mode.blankLine(ct.state)}}function gi(it,at,ct,dt){for(var pt=0;pt<10;pt++){dt&&(dt[0]=fn(it,ct).mode);var Mt=it.token(at,ct);if(at.pos>at.start)return Mt}throw new Error("Mode "+it.name+" failed to advance stream.")}var ki=function(it,at,ct){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=at||null,this.state=ct};function Pi(it,at,ct,dt){var pt=it.doc,Mt=pt.mode,Rt;at=Qn(pt,at);var te=Ye(pt,at.line),Xt=Ki(it,at.line,ct),ve=new ae(te.text,it.options.tabSize,Xt),on;for(dt&&(on=[]);(dt||ve.pos<at.ch)&&!ve.eol();)ve.start=ve.pos,Rt=gi(Mt,ve,Xt.state),dt&&on.push(new ki(ve,Rt,He(pt.mode,Xt.state)));return dt?on:new ki(ve,Rt,Xt.state)}function Di(it,at){if(it)for(;;){var ct=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ct)break;it=it.slice(0,ct.index)+it.slice(ct.index+ct[0].length);var dt=ct[1]?"bgClass":"textClass";at[dt]==null?at[dt]=ct[2]:new RegExp("(?:^|\\s)"+ct[2]+"(?:$|\\s)").test(at[dt])||(at[dt]+=" "+ct[2])}return it}function Zi(it,at,ct,dt,pt,Mt,Rt){var te=ct.flattenSpans;te==null&&(te=it.options.flattenSpans);var Xt=0,ve=null,on=new ae(at,it.options.tabSize,dt),Ee,On=it.options.addModeClass&&[null];for(at==""&&Di(Dn(ct,dt.state),Mt);!on.eol();){if(on.pos>it.options.maxHighlightLength?(te=!1,Rt&&en(it,at,dt,on.pos),on.pos=at.length,Ee=null):Ee=Di(gi(ct,on,dt.state,On),Mt),On){var Cn=On[0].name;Cn&&(Ee="m-"+(Ee?Cn+" "+Ee:Cn))}if(!te||ve!=Ee){for(;Xt<on.start;)Xt=Math.min(on.start,Xt+5e3),pt(Xt,ve);ve=Ee}on.start=on.pos}for(;Xt<on.pos;){var wi=Math.min(on.pos,Xt+5e3);pt(wi,ve),Xt=wi}}function Ri(it,at,ct){for(var dt,pt,Mt=it.doc,Rt=ct?-1:at-(it.doc.mode.innerMode?1e3:100),te=at;te>Rt;--te){if(te<=Mt.first)return Mt.first;var Xt=Ye(Mt,te-1),ve=Xt.stateAfter;if(ve&&(!ct||te+(ve instanceof Vi?ve.lookAhead:0)<=Mt.modeFrontier))return te;var on=xe(Xt.text,null,it.options.tabSize);(pt==null||dt>on)&&(pt=te-1,dt=on)}return pt}function $i(it,at){if(it.modeFrontier=Math.min(it.modeFrontier,at),!(it.highlightFrontier<at-10)){for(var ct=it.first,dt=at-1;dt>ct;dt--){var pt=Ye(it,dt).stateAfter;if(pt&&(!(pt instanceof Vi)||dt+pt.lookAhead<at)){ct=dt+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,ct)}}var qi=!1,mn=!1;function Lo(){qi=!0}function tn(){mn=!0}function Gi(it,at,ct){this.marker=it,this.from=at,this.to=ct}function Yi(it,at){if(it)for(var ct=0;ct<it.length;++ct){var dt=it[ct];if(dt.marker==at)return dt}}function ji(it,at){for(var ct,dt=0;dt<it.length;++dt)it[dt]!=at&&(ct||(ct=[])).push(it[dt]);return ct}function No(it,at){it.markedSpans=it.markedSpans?it.markedSpans.concat([at]):[at],at.marker.attachLine(it)}function Mo(it,at,ct){var dt;if(it)for(var pt=0;pt<it.length;++pt){var Mt=it[pt],Rt=Mt.marker,te=Mt.from==null||(Rt.inclusiveLeft?Mt.from<=at:Mt.from<at);if(te||Mt.from==at&&Rt.type=="bookmark"&&(!ct||!Mt.marker.insertLeft)){var Xt=Mt.to==null||(Rt.inclusiveRight?Mt.to>=at:Mt.to>at);(dt||(dt=[])).push(new Gi(Rt,Mt.from,Xt?null:Mt.to))}}return dt}function Ii(it,at,ct){var dt;if(it)for(var pt=0;pt<it.length;++pt){var Mt=it[pt],Rt=Mt.marker,te=Mt.to==null||(Rt.inclusiveRight?Mt.to>=at:Mt.to>at);if(te||Mt.from==at&&Rt.type=="bookmark"&&(!ct||Mt.marker.insertLeft)){var Xt=Mt.from==null||(Rt.inclusiveLeft?Mt.from<=at:Mt.from<at);(dt||(dt=[])).push(new Gi(Rt,Xt?null:Mt.from-at,Mt.to==null?null:Mt.to-at))}}return dt}function Ni(it,at){if(at.full)return null;var ct=cn(it,at.from.line)&&Ye(it,at.from.line).markedSpans,dt=cn(it,at.to.line)&&Ye(it,at.to.line).markedSpans;if(!ct&&!dt)return null;var pt=at.from.ch,Mt=at.to.ch,Rt=Xe(at.from,at.to)==0,te=Mo(ct,pt,Rt),Xt=Ii(dt,Mt,Rt),ve=at.text.length==1,on=de(at.text).length+(ve?pt:0);if(te)for(var Ee=0;Ee<te.length;++Ee){var On=te[Ee];if(On.to==null){var Cn=Yi(Xt,On.marker);Cn?ve&&(On.to=Cn.to==null?null:Cn.to+on):On.to=pt}}if(Xt)for(var wi=0;wi<Xt.length;++wi){var Li=Xt[wi];if(Li.to!=null&&(Li.to+=on),Li.from==null){var Ai=Yi(te,Li.marker);Ai||(Li.from=on,ve&&(te||(te=[])).push(Li))}else Li.from+=on,ve&&(te||(te=[])).push(Li)}te&&(te=zi(te)),Xt&&Xt!=te&&(Xt=zi(Xt));var so=[te];if(!ve){var Fo=at.text.length-2,Eo;if(Fo>0&&te)for(var Ko=0;Ko<te.length;++Ko)te[Ko].to==null&&(Eo||(Eo=[])).push(new Gi(te[Ko].marker,null,null));for(var Sr=0;Sr<Fo;++Sr)so.push(Eo);so.push(Xt)}return so}function zi(it){for(var at=0;at<it.length;++at){var ct=it[at];ct.from!=null&&ct.from==ct.to&&ct.marker.clearWhenEmpty!==!1&&it.splice(at--,1)}return it.length?it:null}function uo(it,at,ct){var dt=null;if(it.iter(at.line,ct.line+1,function(Cn){if(Cn.markedSpans)for(var wi=0;wi<Cn.markedSpans.length;++wi){var Li=Cn.markedSpans[wi].marker;Li.readOnly&&(!dt||Je(dt,Li)==-1)&&(dt||(dt=[])).push(Li)}}),!dt)return null;for(var pt=[{from:at,to:ct}],Mt=0;Mt<dt.length;++Mt)for(var Rt=dt[Mt],te=Rt.find(0),Xt=0;Xt<pt.length;++Xt){var ve=pt[Xt];if(!(Xe(ve.to,te.from)<0||Xe(ve.from,te.to)>0)){var on=[Xt,1],Ee=Xe(ve.from,te.from),On=Xe(ve.to,te.to);(Ee<0||!Rt.inclusiveLeft&&!Ee)&&on.push({from:ve.from,to:te.from}),(On>0||!Rt.inclusiveRight&&!On)&&on.push({from:te.to,to:ve.to}),pt.splice.apply(pt,on),Xt+=on.length-3}}return pt}function li(it){var at=it.markedSpans;if(at){for(var ct=0;ct<at.length;++ct)at[ct].marker.detachLine(it);it.markedSpans=null}}function $t(it,at){if(at){for(var ct=0;ct<at.length;++ct)at[ct].marker.attachLine(it);it.markedSpans=at}}function Ho(it){return it.inclusiveLeft?-1:0}function or(it){return it.inclusiveRight?1:0}function Cr(it,at){var ct=it.lines.length-at.lines.length;if(ct!=0)return ct;var dt=it.find(),pt=at.find(),Mt=Xe(dt.from,pt.from)||Ho(it)-Ho(at);if(Mt)return-Mt;var Rt=Xe(dt.to,pt.to)||or(it)-or(at);return Rt||at.id-it.id}function Fr(it,at){var ct=mn&&it.markedSpans,dt;if(ct)for(var pt=void 0,Mt=0;Mt<ct.length;++Mt)pt=ct[Mt],pt.marker.collapsed&&(at?pt.from:pt.to)==null&&(!dt||Cr(dt,pt.marker)<0)&&(dt=pt.marker);return dt}function cr(it){return Fr(it,!0)}function oo(it){return Fr(it,!1)}function fo(it,at){var ct=mn&&it.markedSpans,dt;if(ct)for(var pt=0;pt<ct.length;++pt){var Mt=ct[pt];Mt.marker.collapsed&&(Mt.from==null||Mt.from<at)&&(Mt.to==null||Mt.to>at)&&(!dt||Cr(dt,Mt.marker)<0)&&(dt=Mt.marker)}return dt}function _o(it,at,ct,dt,pt){var Mt=Ye(it,at),Rt=mn&&Mt.markedSpans;if(Rt)for(var te=0;te<Rt.length;++te){var Xt=Rt[te];if(Xt.marker.collapsed){var ve=Xt.marker.find(0),on=Xe(ve.from,ct)||Ho(Xt.marker)-Ho(pt),Ee=Xe(ve.to,dt)||or(Xt.marker)-or(pt);if(!(on>=0&&Ee<=0||on<=0&&Ee>=0)&&(on<=0&&(Xt.marker.inclusiveRight&&pt.inclusiveLeft?Xe(ve.to,ct)>=0:Xe(ve.to,ct)>0)||on>=0&&(Xt.marker.inclusiveRight&&pt.inclusiveLeft?Xe(ve.from,dt)<=0:Xe(ve.from,dt)<0)))return!0}}}function Co(it){for(var at;at=cr(it);)it=at.find(-1,!0).line;return it}function lr(it){for(var at;at=oo(it);)it=at.find(1,!0).line;return it}function ha(it){for(var at,ct;at=oo(it);)it=at.find(1,!0).line,(ct||(ct=[])).push(it);return ct}function So(it,at){var ct=Ye(it,at),dt=Co(ct);return ct==dt?at:_t(dt)}function Xi(it,at){if(at>it.lastLine())return at;var ct=Ye(it,at),dt;if(!Zn(it,ct))return at;for(;dt=oo(ct);)ct=dt.find(1,!0).line;return _t(ct)+1}function Zn(it,at){var ct=mn&&at.markedSpans;if(ct){for(var dt=void 0,pt=0;pt<ct.length;++pt)if(dt=ct[pt],!!dt.marker.collapsed){if(dt.from==null)return!0;if(!dt.marker.widgetNode&&dt.from==0&&dt.marker.inclusiveLeft&&Ji(it,at,dt))return!0}}}function Ji(it,at,ct){if(ct.to==null){var dt=ct.marker.find(1,!0);return Ji(it,dt.line,Yi(dt.line.markedSpans,ct.marker))}if(ct.marker.inclusiveRight&&ct.to==at.text.length)return!0;for(var pt=void 0,Mt=0;Mt<at.markedSpans.length;++Mt)if(pt=at.markedSpans[Mt],pt.marker.collapsed&&!pt.marker.widgetNode&&pt.from==ct.to&&(pt.to==null||pt.to!=ct.from)&&(pt.marker.inclusiveLeft||ct.marker.inclusiveRight)&&Ji(it,at,pt))return!0}function qo(it){it=Co(it);for(var at=0,ct=it.parent,dt=0;dt<ct.lines.length;++dt){var pt=ct.lines[dt];if(pt==it)break;at+=pt.height}for(var Mt=ct.parent;Mt;ct=Mt,Mt=ct.parent)for(var Rt=0;Rt<Mt.children.length;++Rt){var te=Mt.children[Rt];if(te==ct)break;at+=te.height}return at}function Or(it){if(it.height==0)return 0;for(var at=it.text.length,ct,dt=it;ct=cr(dt);){var pt=ct.find(0,!0);dt=pt.from.line,at+=pt.from.ch-pt.to.ch}for(dt=it;ct=oo(dt);){var Mt=ct.find(0,!0);at-=dt.text.length-Mt.from.ch,dt=Mt.to.line,at+=dt.text.length-Mt.to.ch}return at}function ur(it){var at=it.display,ct=it.doc;at.maxLine=Ye(ct,ct.first),at.maxLineLength=Or(at.maxLine),at.maxLineChanged=!0,ct.iter(function(dt){var pt=Or(dt);pt>at.maxLineLength&&(at.maxLineLength=pt,at.maxLine=dt)})}var Yo=function(it,at,ct){this.text=it,$t(this,at),this.height=ct?ct(this):1};Yo.prototype.lineNo=function(){return _t(this)},ci(Yo);function xr(it,at,ct,dt){it.text=at,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),li(it),$t(it,ct);var pt=dt?dt(it):1;pt!=it.height&&Re(it,pt)}function wr(it){it.parent=null,li(it)}var ta={},da={};function wa(it,at){if(!it||/^\s*$/.test(it))return null;var ct=at.addModeClass?da:ta;return ct[it]||(ct[it]=it.replace(/\S+/g,"cm-$&"))}function an(it,at){var ct=me("span",null,null,Nt?"padding-right: .1px":null),dt={pre:me("pre",[ct],"CodeMirror-line"),content:ct,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};at.measure={};for(var pt=0;pt<=(at.rest?at.rest.length:0);pt++){var Mt=pt?at.rest[pt-1]:at.line,Rt=void 0;dt.pos=0,dt.addToken=Zs,co(it.display.measure)&&(Rt=zt(Mt,it.doc.direction))&&(dt.addToken=Ds(dt.addToken,Rt)),dt.map=[];var te=at!=it.display.externalMeasured&&_t(Mt);Ms(Mt,dt,to(it,Mt,te)),Mt.styleClasses&&(Mt.styleClasses.bgClass&&(dt.bgClass=Ke(Mt.styleClasses.bgClass,dt.bgClass||"")),Mt.styleClasses.textClass&&(dt.textClass=Ke(Mt.styleClasses.textClass,dt.textClass||""))),dt.map.length==0&&dt.map.push(0,0,dt.content.appendChild(di(it.display.measure))),pt==0?(at.measure.map=dt.map,at.measure.cache={}):((at.measure.maps||(at.measure.maps=[])).push(dt.map),(at.measure.caches||(at.measure.caches=[])).push({}))}if(Nt){var Xt=dt.content.lastChild;(/\bcm-tab\b/.test(Xt.className)||Xt.querySelector&&Xt.querySelector(".cm-tab"))&&(dt.content.className="cm-tab-wrap-hack")}return qe(it,"renderLine",it,at.line,dt.pre),dt.pre.className&&(dt.textClass=Ke(dt.pre.className,dt.textClass||"")),dt}function Jr(it){var at=ne("span","\u2022","cm-invalidchar");return at.title="\\u"+it.charCodeAt(0).toString(16),at.setAttribute("aria-label",at.title),at}function Zs(it,at,ct,dt,pt,Mt,Rt){if(at){var te=it.splitSpaces?ps(at,it.trailingSpace):at,Xt=it.cm.state.specialChars,ve=!1,on;if(!Xt.test(at))it.col+=at.length,on=document.createTextNode(te),it.map.push(it.pos,it.pos+at.length,on),Ut&&pe<9&&(ve=!0),it.pos+=at.length;else{on=document.createDocumentFragment();for(var Ee=0;;){Xt.lastIndex=Ee;var On=Xt.exec(at),Cn=On?On.index-Ee:at.length-Ee;if(Cn){var wi=document.createTextNode(te.slice(Ee,Ee+Cn));Ut&&pe<9?on.appendChild(ne("span",[wi])):on.appendChild(wi),it.map.push(it.pos,it.pos+Cn,wi),it.col+=Cn,it.pos+=Cn}if(!On)break;Ee+=Cn+1;var Li=void 0;if(On[0]==" "){var Ai=it.cm.options.tabSize,so=Ai-it.col%Ai;Li=on.appendChild(ne("span",pn(so),"cm-tab")),Li.setAttribute("role","presentation"),Li.setAttribute("cm-text"," "),it.col+=so}else On[0]=="\r"||On[0]==`
|
|
|
`?(Li=on.appendChild(ne("span",On[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Li.setAttribute("cm-text",On[0]),it.col+=1):(Li=it.cm.options.specialCharPlaceholder(On[0]),Li.setAttribute("cm-text",On[0]),Ut&&pe<9?on.appendChild(ne("span",[Li])):on.appendChild(Li),it.col+=1);it.map.push(it.pos,it.pos+1,Li),it.pos++}}if(it.trailingSpace=te.charCodeAt(at.length-1)==32,ct||dt||pt||ve||Mt||Rt){var Fo=ct||"";dt&&(Fo+=dt),pt&&(Fo+=pt);var Eo=ne("span",[on],Fo,Mt);if(Rt)for(var Ko in Rt)Rt.hasOwnProperty(Ko)&&Ko!="style"&&Ko!="class"&&Eo.setAttribute(Ko,Rt[Ko]);return it.content.appendChild(Eo)}it.content.appendChild(on)}}function ps(it,at){if(it.length>1&&!/ /.test(it))return it;for(var ct=at,dt="",pt=0;pt<it.length;pt++){var Mt=it.charAt(pt);Mt==" "&&ct&&(pt==it.length-1||it.charCodeAt(pt+1)==32)&&(Mt="\xA0"),dt+=Mt,ct=Mt==" "}return dt}function Ds(it,at){return function(ct,dt,pt,Mt,Rt,te,Xt){pt=pt?pt+" cm-force-border":"cm-force-border";for(var ve=ct.pos,on=ve+dt.length;;){for(var Ee=void 0,On=0;On<at.length&&(Ee=at[On],!(Ee.to>ve&&Ee.from<=ve));On++);if(Ee.to>=on)return it(ct,dt,pt,Mt,Rt,te,Xt);it(ct,dt.slice(0,Ee.to-ve),pt,Mt,null,te,Xt),Mt=null,dt=dt.slice(Ee.to-ve),ve=Ee.to}}}function $o(it,at,ct,dt){var pt=!dt&&ct.widgetNode;pt&&it.map.push(it.pos,it.pos+at,pt),!dt&&it.cm.display.input.needsContentAttribute&&(pt||(pt=it.content.appendChild(document.createElement("span"))),pt.setAttribute("cm-marker",ct.id)),pt&&(it.cm.display.input.setUneditable(pt),it.content.appendChild(pt)),it.pos+=at,it.trailingSpace=!1}function Ms(it,at,ct){var dt=it.markedSpans,pt=it.text,Mt=0;if(!dt){for(var Rt=1;Rt<ct.length;Rt+=2)at.addToken(at,pt.slice(Mt,Mt=ct[Rt]),wa(ct[Rt+1],at.cm.options));return}for(var te=pt.length,Xt=0,ve=1,on="",Ee,On,Cn=0,wi,Li,Ai,so,Fo;;){if(Cn==Xt){wi=Li=Ai=On="",Fo=null,so=null,Cn=1/0;for(var Eo=[],Ko=void 0,Sr=0;Sr<dt.length;++Sr){var wo=dt[Sr],Br=wo.marker;if(Br.type=="bookmark"&&wo.from==Xt&&Br.widgetNode)Eo.push(Br);else if(wo.from<=Xt&&(wo.to==null||wo.to>Xt||Br.collapsed&&wo.to==Xt&&wo.from==Xt)){if(wo.to!=null&&wo.to!=Xt&&Cn>wo.to&&(Cn=wo.to,Li=""),Br.className&&(wi+=" "+Br.className),Br.css&&(On=(On?On+";":"")+Br.css),Br.startStyle&&wo.from==Xt&&(Ai+=" "+Br.startStyle),Br.endStyle&&wo.to==Cn&&(Ko||(Ko=[])).push(Br.endStyle,wo.to),Br.title&&((Fo||(Fo={})).title=Br.title),Br.attributes)for(var Ja in Br.attributes)(Fo||(Fo={}))[Ja]=Br.attributes[Ja];Br.collapsed&&(!so||Cr(so.marker,Br)<0)&&(so=wo)}else wo.from>Xt&&Cn>wo.from&&(Cn=wo.from)}if(Ko)for(var js=0;js<Ko.length;js+=2)Ko[js+1]==Cn&&(Li+=" "+Ko[js]);if(!so||so.from==Xt)for(var rs=0;rs<Eo.length;++rs)$o(at,0,Eo[rs]);if(so&&(so.from||0)==Xt){if($o(at,(so.to==null?te+1:so.to)-Xt,so.marker,so.from==null),so.to==null)return;so.to==Xt&&(so=!1)}}if(Xt>=te)break;for(var Vl=Math.min(te,Cn);;){if(on){var xl=Xt+on.length;if(!so){var Fs=xl>Vl?on.slice(0,Vl-Xt):on;at.addToken(at,Fs,Ee?Ee+wi:wi,Ai,Xt+Fs.length==Cn?Li:"",On,Fo)}if(xl>=Vl){on=on.slice(Vl-Xt),Xt=Vl;break}Xt=xl,Ai=""}on=pt.slice(Mt,Mt=ct[ve++]),Ee=wa(ct[ve++],at.cm.options)}}}function Nr(it,at,ct){this.line=at,this.rest=ha(at),this.size=this.rest?_t(de(this.rest))-ct+1:1,this.node=this.text=null,this.hidden=Zn(it,at)}function Go(it,at,ct){for(var dt=[],pt,Mt=at;Mt<ct;Mt=pt){var Rt=new Nr(it.doc,Ye(it.doc,Mt),Mt);pt=Mt+Rt.size,dt.push(Rt)}return dt}var fr=null;function aa(it){fr?fr.ops.push(it):it.ownsGroup=fr={ops:[it],delayedCallbacks:[]}}function xo(it){var at=it.delayedCallbacks,ct=0;do{for(;ct<at.length;ct++)at[ct].call(null);for(var dt=0;dt<it.ops.length;dt++){var pt=it.ops[dt];if(pt.cursorActivityHandlers)for(;pt.cursorActivityCalled<pt.cursorActivityHandlers.length;)pt.cursorActivityHandlers[pt.cursorActivityCalled++].call(null,pt.cm)}}while(ct<at.length)}function tr(it,at){var ct=it.ownsGroup;if(ct)try{xo(ct)}finally{fr=null,at(ct)}}var ko=null;function vi(it,at){var ct=$e(it,at);if(ct.length){var dt=Array.prototype.slice.call(arguments,2),pt;fr?pt=fr.delayedCallbacks:ko?pt=ko:(pt=ko=[],setTimeout(Dr,0));for(var Mt=function(te){pt.push(function(){return ct[te].apply(null,dt)})},Rt=0;Rt<ct.length;++Rt)Mt(Rt)}}function Dr(){var it=ko;ko=null;for(var at=0;at<it.length;++at)it[at]()}function sa(it,at,ct,dt){for(var pt=0;pt<at.changes.length;pt++){var Mt=at.changes[pt];Mt=="text"?xi(it,at):Mt=="gutter"?ea(it,at,ct,dt):Mt=="class"?Qr(it,at):Mt=="widget"&&ss(it,at,dt)}at.changes=null}function ts(it){return it.node==it.text&&(it.node=ne("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),Ut&&pe<8&&(it.node.style.zIndex=2)),it.node}function Ls(it,at){var ct=at.bgClass?at.bgClass+" "+(at.line.bgClass||""):at.line.bgClass;if(ct&&(ct+=" CodeMirror-linebackground"),at.background)ct?at.background.className=ct:(at.background.parentNode.removeChild(at.background),at.background=null);else if(ct){var dt=ts(at);at.background=dt.insertBefore(ne("div",null,ct),dt.firstChild),it.display.input.setUneditable(at.background)}}function ws(it,at){var ct=it.display.externalMeasured;return ct&&ct.line==at.line?(it.display.externalMeasured=null,at.measure=ct.measure,ct.built):an(it,at)}function xi(it,at){var ct=at.text.className,dt=ws(it,at);at.text==at.node&&(at.node=dt.pre),at.text.parentNode.replaceChild(dt.pre,at.text),at.text=dt.pre,dt.bgClass!=at.bgClass||dt.textClass!=at.textClass?(at.bgClass=dt.bgClass,at.textClass=dt.textClass,Qr(it,at)):ct&&(at.text.className=ct)}function Qr(it,at){Ls(it,at),at.line.wrapClass?ts(at).className=at.line.wrapClass:at.node!=at.text&&(at.node.className="");var ct=at.textClass?at.textClass+" "+(at.line.textClass||""):at.line.textClass;at.text.className=ct||""}function ea(it,at,ct,dt){if(at.gutter&&(at.node.removeChild(at.gutter),at.gutter=null),at.gutterBackground&&(at.node.removeChild(at.gutterBackground),at.gutterBackground=null),at.line.gutterClass){var pt=ts(at);at.gutterBackground=ne("div",null,"CodeMirror-gutter-background "+at.line.gutterClass,"left: "+(it.options.fixedGutter?dt.fixedPos:-dt.gutterTotalWidth)+"px; width: "+dt.gutterTotalWidth+"px"),it.display.input.setUneditable(at.gutterBackground),pt.insertBefore(at.gutterBackground,at.text)}var Mt=at.line.gutterMarkers;if(it.options.lineNumbers||Mt){var Rt=ts(at),te=at.gutter=ne("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?dt.fixedPos:-dt.gutterTotalWidth)+"px");if(it.display.input.setUneditable(te),Rt.insertBefore(te,at.text),at.line.gutterClass&&(te.className+=" "+at.line.gutterClass),it.options.lineNumbers&&(!Mt||!Mt["CodeMirror-linenumbers"])&&(at.lineNumber=te.appendChild(ne("div",Bn(it.options,ct),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+dt.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Mt)for(var Xt=0;Xt<it.display.gutterSpecs.length;++Xt){var ve=it.display.gutterSpecs[Xt].className,on=Mt.hasOwnProperty(ve)&&Mt[ve];on&&te.appendChild(ne("div",[on],"CodeMirror-gutter-elt","left: "+dt.gutterLeft[ve]+"px; width: "+dt.gutterWidth[ve]+"px"))}}}function ss(it,at,ct){at.alignable&&(at.alignable=null);for(var dt=It("CodeMirror-linewidget"),pt=at.node.firstChild,Mt=void 0;pt;pt=Mt)Mt=pt.nextSibling,dt.test(pt.className)&&at.node.removeChild(pt);Rl(it,at,ct)}function Al(it,at,ct,dt){var pt=ws(it,at);return at.text=at.node=pt.pre,pt.bgClass&&(at.bgClass=pt.bgClass),pt.textClass&&(at.textClass=pt.textClass),Qr(it,at),ea(it,at,ct,dt),Rl(it,at,dt),at.node}function Rl(it,at,ct){if(Zo(it,at.line,at,ct,!0),at.rest)for(var dt=0;dt<at.rest.length;dt++)Zo(it,at.rest[dt],at,ct,!1)}function Zo(it,at,ct,dt,pt){if(at.widgets)for(var Mt=ts(ct),Rt=0,te=at.widgets;Rt<te.length;++Rt){var Xt=te[Rt],ve=ne("div",[Xt.node],"CodeMirror-linewidget"+(Xt.className?" "+Xt.className:""));Xt.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),ph(Xt,ve,ct,dt),it.display.input.setUneditable(ve),pt&&Xt.above?Mt.insertBefore(ve,ct.gutter||ct.text):Mt.appendChild(ve),vi(Xt,"redraw")}}function ph(it,at,ct,dt){if(it.noHScroll){(ct.alignable||(ct.alignable=[])).push(at);var pt=dt.wrapperWidth;at.style.left=dt.fixedPos+"px",it.coverGutter||(pt-=dt.gutterTotalWidth,at.style.paddingLeft=dt.gutterTotalWidth+"px"),at.style.width=pt+"px"}it.coverGutter&&(at.style.zIndex=5,at.style.position="relative",it.noHScroll||(at.style.marginLeft=-dt.gutterTotalWidth+"px"))}function ol(it){if(it.height!=null)return it.height;var at=it.doc.cm;if(!at)return 0;if(!Le(document.body,it.node)){var ct="position: relative;";it.coverGutter&&(ct+="margin-left: -"+at.display.gutters.offsetWidth+"px;"),it.noHScroll&&(ct+="width: "+at.display.wrapper.clientWidth+"px;"),re(at.display.measure,ne("div",[it.node],null,ct))}return it.height=it.node.parentNode.offsetHeight}function rl(it,at){for(var ct=Bo(at);ct!=it.wrapper;ct=ct.parentNode)if(!ct||ct.nodeType==1&&ct.getAttribute("cm-ignore-events")=="true"||ct.parentNode==it.sizer&&ct!=it.mover)return!0}function As(it){return it.lineSpace.offsetTop}function bu(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function Ru(it){if(it.cachedPaddingH)return it.cachedPaddingH;var at=re(it.measure,ne("pre","x","CodeMirror-line-like")),ct=window.getComputedStyle?window.getComputedStyle(at):at.currentStyle,dt={left:parseInt(ct.paddingLeft),right:parseInt(ct.paddingRight)};return!isNaN(dt.left)&&!isNaN(dt.right)&&(it.cachedPaddingH=dt),dt}function Ws(it){return Tn-it.display.nativeBarWidth}function pl(it){return it.display.scroller.clientWidth-Ws(it)-it.display.barWidth}function Hh(it){return it.display.scroller.clientHeight-Ws(it)-it.display.barHeight}function hd(it,at,ct){var dt=it.options.lineWrapping,pt=dt&&pl(it);if(!at.measure.heights||dt&&at.measure.width!=pt){var Mt=at.measure.heights=[];if(dt){at.measure.width=pt;for(var Rt=at.text.firstChild.getClientRects(),te=0;te<Rt.length-1;te++){var Xt=Rt[te],ve=Rt[te+1];Math.abs(Xt.bottom-ve.bottom)>2&&Mt.push((Xt.bottom+ve.top)/2-ct.top)}}Mt.push(ct.bottom-ct.top)}}function Gh(it,at,ct){if(it.line==at)return{map:it.measure.map,cache:it.measure.cache};for(var dt=0;dt<it.rest.length;dt++)if(it.rest[dt]==at)return{map:it.measure.maps[dt],cache:it.measure.caches[dt]};for(var pt=0;pt<it.rest.length;pt++)if(_t(it.rest[pt])>ct)return{map:it.measure.maps[pt],cache:it.measure.caches[pt],before:!0}}function $d(it,at){at=Co(at);var ct=_t(at),dt=it.display.externalMeasured=new Nr(it.doc,at,ct);dt.lineN=ct;var pt=dt.built=an(it,dt);return dt.text=pt.pre,re(it.display.lineMeasure,pt.pre),dt}function $h(it,at,ct,dt){return zl(it,zu(it,at),ct,dt)}function mh(it,at){if(at>=it.display.viewFrom&&at<it.display.viewTo)return it.display.view[Ks(it,at)];var ct=it.display.externalMeasured;if(ct&&at>=ct.lineN&&at<ct.lineN+ct.size)return ct}function zu(it,at){var ct=_t(at),dt=mh(it,ct);dt&&!dt.text?dt=null:dt&&dt.changes&&(sa(it,dt,ct,Cc(it)),it.curOp.forceUpdate=!0),dt||(dt=$d(it,at));var pt=Gh(dt,at,ct);return{line:at,view:dt,rect:null,map:pt.map,cache:pt.cache,before:pt.before,hasHeights:!1}}function zl(it,at,ct,dt,pt){at.before&&(ct=-1);var Mt=ct+(dt||""),Rt;return at.cache.hasOwnProperty(Mt)?Rt=at.cache[Mt]:(at.rect||(at.rect=at.view.text.getBoundingClientRect()),at.hasHeights||(hd(it,at.view,at.rect),at.hasHeights=!0),Rt=hr(it,at,ct,dt),Rt.bogus||(at.cache[Mt]=Rt)),{left:Rt.left,right:Rt.right,top:pt?Rt.rtop:Rt.top,bottom:pt?Rt.rbottom:Rt.bottom}}var dd={left:0,right:0,top:0,bottom:0};function Zh(it,at,ct){for(var dt,pt,Mt,Rt,te,Xt,ve=0;ve<it.length;ve+=3)if(te=it[ve],Xt=it[ve+1],at<te?(pt=0,Mt=1,Rt="left"):at<Xt?(pt=at-te,Mt=pt+1):(ve==it.length-3||at==Xt&&it[ve+3]>at)&&(Mt=Xt-te,pt=Mt-1,at>=Xt&&(Rt="right")),pt!=null){if(dt=it[ve+2],te==Xt&&ct==(dt.insertLeft?"left":"right")&&(Rt=ct),ct=="left"&&pt==0)for(;ve&&it[ve-2]==it[ve-3]&&it[ve-1].insertLeft;)dt=it[(ve-=3)+2],Rt="left";if(ct=="right"&&pt==Xt-te)for(;ve<it.length-3&&it[ve+3]==it[ve+4]&&!it[ve+5].insertLeft;)dt=it[(ve+=3)+2],Rt="right";break}return{node:dt,start:pt,end:Mt,collapse:Rt,coverStart:te,coverEnd:Xt}}function vh(it,at){var ct=dd;if(at=="left")for(var dt=0;dt<it.length&&(ct=it[dt]).left==ct.right;dt++);else for(var pt=it.length-1;pt>=0&&(ct=it[pt]).left==ct.right;pt--);return ct}function hr(it,at,ct,dt){var pt=Zh(at.map,ct,dt),Mt=pt.node,Rt=pt.start,te=pt.end,Xt=pt.collapse,ve;if(Mt.nodeType==3){for(var on=0;on<4;on++){for(;Rt&&Se(at.line.text.charAt(pt.coverStart+Rt));)--Rt;for(;pt.coverStart+te<pt.coverEnd&&Se(at.line.text.charAt(pt.coverStart+te));)++te;if(Ut&&pe<9&&Rt==0&&te==pt.coverEnd-pt.coverStart?ve=Mt.parentNode.getBoundingClientRect():ve=vh(Vt(Mt,Rt,te).getClientRects(),dt),ve.left||ve.right||Rt==0)break;te=Rt,Rt=Rt-1,Xt="right"}Ut&&pe<11&&(ve=zr(it.display.measure,ve))}else{Rt>0&&(Xt=dt="right");var Ee;it.options.lineWrapping&&(Ee=Mt.getClientRects()).length>1?ve=Ee[dt=="right"?Ee.length-1:0]:ve=Mt.getBoundingClientRect()}if(Ut&&pe<9&&!Rt&&(!ve||!ve.left&&!ve.right)){var On=Mt.parentNode.getClientRects()[0];On?ve={left:On.left,right:On.left+ih(it.display),top:On.top,bottom:On.bottom}:ve=dd}for(var Cn=ve.top-at.rect.top,wi=ve.bottom-at.rect.top,Li=(Cn+wi)/2,Ai=at.view.measure.heights,so=0;so<Ai.length-1&&!(Li<Ai[so]);so++);var Fo=so?Ai[so-1]:0,Eo=Ai[so],Ko={left:(Xt=="right"?ve.right:ve.left)-at.rect.left,right:(Xt=="left"?ve.left:ve.right)-at.rect.left,top:Fo,bottom:Eo};return!ve.left&&!ve.right&&(Ko.bogus=!0),it.options.singleCursorHeightPerLine||(Ko.rtop=Cn,Ko.rbottom=wi),Ko}function zr(it,at){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!_e(it))return at;var ct=screen.logicalXDPI/screen.deviceXDPI,dt=screen.logicalYDPI/screen.deviceYDPI;return{left:at.left*ct,right:at.right*ct,top:at.top*dt,bottom:at.bottom*dt}}function ks(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var at=0;at<it.rest.length;at++)it.measure.caches[at]={}}function Xa(it){it.display.externalMeasure=null,Wt(it.display.lineMeasure);for(var at=0;at<it.display.view.length;at++)ks(it.display.view[at])}function Ga(it){Xa(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function va(){return we&&et?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ta(){return we&&et?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Va(it){var at=0;if(it.widgets)for(var ct=0;ct<it.widgets.length;++ct)it.widgets[ct].above&&(at+=ol(it.widgets[ct]));return at}function $a(it,at,ct,dt,pt){if(!pt){var Mt=Va(at);ct.top+=Mt,ct.bottom+=Mt}if(dt=="line")return ct;dt||(dt="local");var Rt=qo(at);if(dt=="local"?Rt+=As(it.display):Rt-=it.display.viewOffset,dt=="page"||dt=="window"){var te=it.display.lineSpace.getBoundingClientRect();Rt+=te.top+(dt=="window"?0:Ta());var Xt=te.left+(dt=="window"?0:va());ct.left+=Xt,ct.right+=Xt}return ct.top+=Rt,ct.bottom+=Rt,ct}function ju(it,at,ct){if(ct=="div")return at;var dt=at.left,pt=at.top;if(ct=="page")dt-=va(),pt-=Ta();else if(ct=="local"||!ct){var Mt=it.display.sizer.getBoundingClientRect();dt+=Mt.left,pt+=Mt.top}var Rt=it.display.lineSpace.getBoundingClientRect();return{left:dt-Rt.left,top:pt-Rt.top}}function jl(it,at,ct,dt,pt){return dt||(dt=Ye(it.doc,at.line)),$a(it,dt,$h(it,dt,at.ch,pt),ct)}function Ia(it,at,ct,dt,pt,Mt){dt=dt||Ye(it.doc,at.line),pt||(pt=zu(it,dt));function Rt(wi,Li){var Ai=zl(it,pt,wi,Li?"right":"left",Mt);return Li?Ai.left=Ai.right:Ai.right=Ai.left,$a(it,dt,Ai,ct)}var te=zt(dt,it.doc.direction),Xt=at.ch,ve=at.sticky;if(Xt>=dt.text.length?(Xt=dt.text.length,ve="before"):Xt<=0&&(Xt=0,ve="after"),!te)return Rt(ve=="before"?Xt-1:Xt,ve=="before");function on(wi,Li,Ai){var so=te[Li],Fo=so.level==1;return Rt(Ai?wi-1:wi,Fo!=Ai)}var Ee=mt(te,Xt,ve),On=St,Cn=on(Xt,Ee,ve=="before");return On!=null&&(Cn.other=on(Xt,On,ve!="before")),Cn}function xc(it,at){var ct=0;at=Qn(it.doc,at),it.options.lineWrapping||(ct=ih(it.display)*at.ch);var dt=Ye(it.doc,at.line),pt=qo(dt)+As(it.display);return{left:ct,right:ct,top:pt,bottom:pt+dt.height}}function Pc(it,at,ct,dt,pt){var Mt=Oe(it,at,ct);return Mt.xRel=pt,dt&&(Mt.outside=dt),Mt}function Wh(it,at,ct){var dt=it.doc;if(ct+=it.display.viewOffset,ct<0)return Pc(dt.first,0,null,-1,-1);var pt=nn(dt,ct),Mt=dt.first+dt.size-1;if(pt>Mt)return Pc(dt.first+dt.size-1,Ye(dt,Mt).text.length,null,1,1);at<0&&(at=0);for(var Rt=Ye(dt,pt);;){var te=$n(it,Rt,pt,at,ct),Xt=fo(Rt,te.ch+(te.xRel>0||te.outside>0?1:0));if(!Xt)return te;var ve=Xt.find(1);if(ve.line==pt)return ve;Rt=Ye(dt,pt=ve.line)}}function Po(it,at,ct,dt){dt-=Va(at);var pt=at.text.length,Mt=Kt(function(Rt){return zl(it,ct,Rt-1).bottom<=dt},pt,0);return pt=Kt(function(Rt){return zl(it,ct,Rt).top>dt},Mt,pt),{begin:Mt,end:pt}}function cd(it,at,ct,dt){ct||(ct=zu(it,at));var pt=$a(it,at,zl(it,ct,dt),"line").top;return Po(it,at,ct,pt)}function ke(it,at,ct,dt){return it.bottom<=ct?!1:it.top>ct?!0:(dt?it.left:it.right)>at}function $n(it,at,ct,dt,pt){pt-=qo(at);var Mt=zu(it,at),Rt=Va(at),te=0,Xt=at.text.length,ve=!0,on=zt(at,it.doc.direction);if(on){var Ee=(it.options.lineWrapping?rf:wc)(it,at,ct,Mt,on,dt,pt);ve=Ee.level!=1,te=ve?Ee.from:Ee.to-1,Xt=ve?Ee.to:Ee.from-1}var On=null,Cn=null,wi=Kt(function(Sr){var wo=zl(it,Mt,Sr);return wo.top+=Rt,wo.bottom+=Rt,ke(wo,dt,pt,!1)?(wo.top<=pt&&wo.left<=dt&&(On=Sr,Cn=wo),!0):!1},te,Xt),Li,Ai,so=!1;if(Cn){var Fo=dt-Cn.left<Cn.right-dt,Eo=Fo==ve;wi=On+(Eo?0:1),Ai=Eo?"after":"before",Li=Fo?Cn.left:Cn.right}else{!ve&&(wi==Xt||wi==te)&&wi++,Ai=wi==0?"after":wi==at.text.length?"before":zl(it,Mt,wi-(ve?1:0)).bottom+Rt<=pt==ve?"after":"before";var Ko=Ia(it,Oe(ct,wi,Ai),"line",at,Mt);Li=Ko.left,so=pt<Ko.top?-1:pt>=Ko.bottom?1:0}return wi=ee(at.text,wi,1),Pc(ct,wi,Ai,so,dt-Li)}function wc(it,at,ct,dt,pt,Mt,Rt){var te=Kt(function(Ee){var On=pt[Ee],Cn=On.level!=1;return ke(Ia(it,Oe(ct,Cn?On.to:On.from,Cn?"before":"after"),"line",at,dt),Mt,Rt,!0)},0,pt.length-1),Xt=pt[te];if(te>0){var ve=Xt.level!=1,on=Ia(it,Oe(ct,ve?Xt.from:Xt.to,ve?"after":"before"),"line",at,dt);ke(on,Mt,Rt,!0)&&on.top>Rt&&(Xt=pt[te-1])}return Xt}function rf(it,at,ct,dt,pt,Mt,Rt){var te=Po(it,at,dt,Rt),Xt=te.begin,ve=te.end;/\s/.test(at.text.charAt(ve-1))&&ve--;for(var on=null,Ee=null,On=0;On<pt.length;On++){var Cn=pt[On];if(!(Cn.from>=ve||Cn.to<=Xt)){var wi=Cn.level!=1,Li=zl(it,dt,wi?Math.min(ve,Cn.to)-1:Math.max(Xt,Cn.from)).right,Ai=Li<Mt?Mt-Li+1e9:Li-Mt;(!on||Ee>Ai)&&(on=Cn,Ee=Ai)}}return on||(on=pt[pt.length-1]),on.from<Xt&&(on={from:Xt,to:on.to,level:on.level}),on.to>ve&&(on={from:on.from,to:ve,level:on.level}),on}var Hu;function Gu(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(Hu==null){Hu=ne("pre",null,"CodeMirror-line-like");for(var at=0;at<49;++at)Hu.appendChild(document.createTextNode("x")),Hu.appendChild(ne("br"));Hu.appendChild(document.createTextNode("x"))}re(it.measure,Hu);var ct=Hu.offsetHeight/50;return ct>3&&(it.cachedTextHeight=ct),Wt(it.measure),ct||1}function ih(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var at=ne("span","xxxxxxxxxx"),ct=ne("pre",[at],"CodeMirror-line-like");re(it.measure,ct);var dt=at.getBoundingClientRect(),pt=(dt.right-dt.left)/10;return pt>2&&(it.cachedCharWidth=pt),pt||10}function Cc(it){for(var at=it.display,ct={},dt={},pt=at.gutters.clientLeft,Mt=at.gutters.firstChild,Rt=0;Mt;Mt=Mt.nextSibling,++Rt){var te=it.display.gutterSpecs[Rt].className;ct[te]=Mt.offsetLeft+Mt.clientLeft+pt,dt[te]=Mt.clientWidth}return{fixedPos:fd(at),gutterTotalWidth:at.gutters.offsetWidth,gutterLeft:ct,gutterWidth:dt,wrapperWidth:at.wrapper.clientWidth}}function fd(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function Za(it){var at=Gu(it.display),ct=it.options.lineWrapping,dt=ct&&Math.max(5,it.display.scroller.clientWidth/ih(it.display)-3);return function(pt){if(Zn(it.doc,pt))return 0;var Mt=0;if(pt.widgets)for(var Rt=0;Rt<pt.widgets.length;Rt++)pt.widgets[Rt].height&&(Mt+=pt.widgets[Rt].height);return ct?Mt+(Math.ceil(pt.text.length/dt)||1)*at:Mt+at}}function Xo(it){var at=it.doc,ct=Za(it);at.iter(function(dt){var pt=ct(dt);pt!=dt.height&&Re(dt,pt)})}function al(it,at,ct,dt){var pt=it.display;if(!ct&&Bo(at).getAttribute("cm-not-content")=="true")return null;var Mt,Rt,te=pt.lineSpace.getBoundingClientRect();try{Mt=at.clientX-te.left,Rt=at.clientY-te.top}catch(Ee){return null}var Xt=Wh(it,Mt,Rt),ve;if(dt&&Xt.xRel>0&&(ve=Ye(it.doc,Xt.line).text).length==Xt.ch){var on=xe(ve,ve.length,it.options.tabSize)-ve.length;Xt=Oe(Xt.line,Math.max(0,Math.round((Mt-Ru(it.display).left)/ih(it.display))-on))}return Xt}function Ks(it,at){if(at>=it.display.viewTo||(at-=it.display.viewFrom,at<0))return null;for(var ct=it.display.view,dt=0;dt<ct.length;dt++)if(at-=ct[dt].size,at<0)return dt}function Ca(it,at,ct,dt){at==null&&(at=it.doc.first),ct==null&&(ct=it.doc.first+it.doc.size),dt||(dt=0);var pt=it.display;if(dt&&ct<pt.viewTo&&(pt.updateLineNumbers==null||pt.updateLineNumbers>at)&&(pt.updateLineNumbers=at),it.curOp.viewChanged=!0,at>=pt.viewTo)mn&&So(it.doc,at)<pt.viewTo&&ls(it);else if(ct<=pt.viewFrom)mn&&Xi(it.doc,ct+dt)>pt.viewFrom?ls(it):(pt.viewFrom+=dt,pt.viewTo+=dt);else if(at<=pt.viewFrom&&ct>=pt.viewTo)ls(it);else if(at<=pt.viewFrom){var Mt=Ml(it,ct,ct+dt,1);Mt?(pt.view=pt.view.slice(Mt.index),pt.viewFrom=Mt.lineN,pt.viewTo+=dt):ls(it)}else if(ct>=pt.viewTo){var Rt=Ml(it,at,at,-1);Rt?(pt.view=pt.view.slice(0,Rt.index),pt.viewTo=Rt.lineN):ls(it)}else{var te=Ml(it,at,at,-1),Xt=Ml(it,ct,ct+dt,1);te&&Xt?(pt.view=pt.view.slice(0,te.index).concat(Go(it,te.lineN,Xt.lineN)).concat(pt.view.slice(Xt.index)),pt.viewTo+=dt):ls(it)}var ve=pt.externalMeasured;ve&&(ct<ve.lineN?ve.lineN+=dt:at<ve.lineN+ve.size&&(pt.externalMeasured=null))}function Mr(it,at,ct){it.curOp.viewChanged=!0;var dt=it.display,pt=it.display.externalMeasured;if(pt&&at>=pt.lineN&&at<pt.lineN+pt.size&&(dt.externalMeasured=null),!(at<dt.viewFrom||at>=dt.viewTo)){var Mt=dt.view[Ks(it,at)];if(Mt.node!=null){var Rt=Mt.changes||(Mt.changes=[]);Je(Rt,ct)==-1&&Rt.push(ct)}}}function ls(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Ml(it,at,ct,dt){var pt=Ks(it,at),Mt,Rt=it.display.view;if(!mn||ct==it.doc.first+it.doc.size)return{index:pt,lineN:ct};for(var te=it.display.viewFrom,Xt=0;Xt<pt;Xt++)te+=Rt[Xt].size;if(te!=at){if(dt>0){if(pt==Rt.length-1)return null;Mt=te+Rt[pt].size-at,pt++}else Mt=te-at;at+=Mt,ct+=Mt}for(;So(it.doc,ct)!=ct;){if(pt==(dt<0?0:Rt.length-1))return null;ct+=dt*Rt[pt-(dt<0?1:0)].size,pt+=dt}return{index:pt,lineN:ct}}function ya(it,at,ct){var dt=it.display,pt=dt.view;pt.length==0||at>=dt.viewTo||ct<=dt.viewFrom?(dt.view=Go(it,at,ct),dt.viewFrom=at):(dt.viewFrom>at?dt.view=Go(it,at,dt.viewFrom).concat(dt.view):dt.viewFrom<at&&(dt.view=dt.view.slice(Ks(it,at))),dt.viewFrom=at,dt.viewTo<ct?dt.view=dt.view.concat(Go(it,dt.viewTo,ct)):dt.viewTo>ct&&(dt.view=dt.view.slice(0,Ks(it,ct)))),dt.viewTo=ct}function Hl(it){for(var at=it.display.view,ct=0,dt=0;dt<at.length;dt++){var pt=at[dt];!pt.hidden&&(!pt.node||pt.changes)&&++ct}return ct}function Cs(it){it.display.input.showSelection(it.display.input.prepareSelection())}function Kh(it,at){at===void 0&&(at=!0);for(var ct=it.doc,dt={},pt=dt.cursors=document.createDocumentFragment(),Mt=dt.selection=document.createDocumentFragment(),Rt=0;Rt<ct.sel.ranges.length;Rt++)if(!(!at&&Rt==ct.sel.primIndex)){var te=ct.sel.ranges[Rt];if(!(te.from().line>=it.display.viewTo||te.to().line<it.display.viewFrom)){var Xt=te.empty();(Xt||it.options.showCursorWhenSelecting)&&Zr(it,te.head,pt),Xt||Wr(it,te,Mt)}}return dt}function Zr(it,at,ct){var dt=Ia(it,at,"div",null,null,!it.options.singleCursorHeightPerLine),pt=ct.appendChild(ne("div","\xA0","CodeMirror-cursor"));if(pt.style.left=dt.left+"px",pt.style.top=dt.top+"px",pt.style.height=Math.max(0,dt.bottom-dt.top)*it.options.cursorHeight+"px",dt.other){var Mt=ct.appendChild(ne("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Mt.style.display="",Mt.style.left=dt.other.left+"px",Mt.style.top=dt.other.top+"px",Mt.style.height=(dt.other.bottom-dt.other.top)*.85+"px"}}function sl(it,at){return it.top-at.top||it.left-at.left}function Wr(it,at,ct){var dt=it.display,pt=it.doc,Mt=document.createDocumentFragment(),Rt=Ru(it.display),te=Rt.left,Xt=Math.max(dt.sizerWidth,pl(it)-dt.sizer.offsetLeft)-Rt.right,ve=pt.direction=="ltr";function on(Eo,Ko,Sr,wo){Ko<0&&(Ko=0),Ko=Math.round(Ko),wo=Math.round(wo),Mt.appendChild(ne("div",null,"CodeMirror-selected","position: absolute; left: "+Eo+`px;
|
|
|
top: `+Ko+"px; width: "+(Sr==null?Xt-Eo:Sr)+`px;
|
|
|
height: `+(wo-Ko)+"px"))}function Ee(Eo,Ko,Sr){var wo=Ye(pt,Eo),Br=wo.text.length,Ja,js;function rs(Fs,ou){return jl(it,Oe(Eo,Fs),"div",wo,ou)}function Vl(Fs,ou,ul){var Is=cd(it,wo,null,Fs),fa=ou=="ltr"==(ul=="after")?"left":"right",cs=ul=="after"?Is.begin:Is.end-(/\s/.test(wo.text.charAt(Is.end-1))?2:1);return rs(cs,fa)[fa]}var xl=zt(wo,pt.direction);return kt(xl,Ko||0,Sr==null?Br:Sr,function(Fs,ou,ul,Is){var fa=ul=="ltr",cs=rs(Fs,fa?"left":"right"),Vs=rs(ou-1,fa?"right":"left"),hl=Ko==null&&Fs==0,Vu=Sr==null&&ou==Br,as=Is==0,ku=!xl||Is==xl.length-1;if(Vs.top-cs.top<=3){var xs=(ve?hl:Vu)&&as,Sf=(ve?Vu:hl)&&ku,mu=xs?te:(fa?cs:Vs).left,ru=Sf?Xt:(fa?Vs:cs).right;on(mu,cs.top,ru-mu,cs.bottom)}else{var Ul,za,Us,Mh;fa?(Ul=ve&&hl&&as?te:cs.left,za=ve?Xt:Vl(Fs,ul,"before"),Us=ve?te:Vl(ou,ul,"after"),Mh=ve&&Vu&&ku?Xt:Vs.right):(Ul=ve?Vl(Fs,ul,"before"):te,za=!ve&&hl&&as?Xt:cs.right,Us=!ve&&Vu&&ku?te:Vs.left,Mh=ve?Vl(ou,ul,"after"):Xt),on(Ul,cs.top,za-Ul,cs.bottom),cs.bottom<Vs.top&&on(te,cs.bottom,null,Vs.top),on(Us,Vs.top,Mh-Us,Vs.bottom)}(!Ja||sl(cs,Ja)<0)&&(Ja=cs),sl(Vs,Ja)<0&&(Ja=Vs),(!js||sl(cs,js)<0)&&(js=cs),sl(Vs,js)<0&&(js=Vs)}),{start:Ja,end:js}}var On=at.from(),Cn=at.to();if(On.line==Cn.line)Ee(On.line,On.ch,Cn.ch);else{var wi=Ye(pt,On.line),Li=Ye(pt,Cn.line),Ai=Co(wi)==Co(Li),so=Ee(On.line,On.ch,Ai?wi.text.length+1:null).end,Fo=Ee(Cn.line,Ai?0:null,Cn.ch).start;Ai&&(so.top<Fo.top-2?(on(so.right,so.top,null,so.bottom),on(te,Fo.top,Fo.left,Fo.bottom)):on(so.right,so.top,Fo.left-so.right,so.bottom)),so.bottom<Fo.top&&on(te,so.bottom,null,Fo.top)}ct.appendChild(Mt)}function pa(it){if(it.state.focused){var at=it.display;clearInterval(at.blinker);var ct=!0;at.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?at.blinker=setInterval(function(){it.hasFocus()||_h(it),at.cursorDiv.style.visibility=(ct=!ct)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(at.cursorDiv.style.visibility="hidden")}}function Ba(it){it.state.focused||(it.display.input.focus(),Vr(it))}function Ua(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,_h(it))},100)}function Vr(it,at){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(qe(it,"focus",it,at),it.state.focused=!0,Ge(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),Nt&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),pa(it))}function _h(it,at){it.state.delayingBlurEvent||(it.state.focused&&(qe(it,"blur",it,at),it.state.focused=!1,At(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function Vo(it){for(var at=it.display,ct=at.lineDiv.offsetTop,dt=0;dt<at.view.length;dt++){var pt=at.view[dt],Mt=it.options.lineWrapping,Rt=void 0,te=0;if(!pt.hidden){if(Ut&&pe<8){var Xt=pt.node.offsetTop+pt.node.offsetHeight;Rt=Xt-ct,ct=Xt}else{var ve=pt.node.getBoundingClientRect();Rt=ve.bottom-ve.top,!Mt&&pt.text.firstChild&&(te=pt.text.firstChild.getBoundingClientRect().right-ve.left-1)}var on=pt.line.height-Rt;if((on>.005||on<-.005)&&(Re(pt.line,Rt),$f(pt.line),pt.rest))for(var Ee=0;Ee<pt.rest.length;Ee++)$f(pt.rest[Ee]);if(te>it.display.sizerWidth){var On=Math.ceil(te/ih(it.display));On>it.display.maxLineLength&&(it.display.maxLineLength=On,it.display.maxLine=pt.line,it.display.maxLineChanged=!0)}}}}function $f(it){if(it.widgets)for(var at=0;at<it.widgets.length;++at){var ct=it.widgets[at],dt=ct.node.parentNode;dt&&(ct.height=dt.offsetHeight)}}function jr(it,at,ct){var dt=ct&&ct.top!=null?Math.max(0,ct.top):it.scroller.scrollTop;dt=Math.floor(dt-As(it));var pt=ct&&ct.bottom!=null?ct.bottom:dt+it.wrapper.clientHeight,Mt=nn(at,dt),Rt=nn(at,pt);if(ct&&ct.ensure){var te=ct.ensure.from.line,Xt=ct.ensure.to.line;te<Mt?(Mt=te,Rt=nn(at,qo(Ye(at,te))+it.wrapper.clientHeight)):Math.min(Xt,at.lastLine())>=Rt&&(Mt=nn(at,qo(Ye(at,Xt))-it.wrapper.clientHeight),Rt=Xt)}return{from:Mt,to:Math.max(Rt,Mt+1)}}function Zf(it,at){if(!Nn(it,"scrollCursorIntoView")){var ct=it.display,dt=ct.sizer.getBoundingClientRect(),pt=null;if(at.top+dt.top<0?pt=!0:at.bottom+dt.top>(window.innerHeight||document.documentElement.clientHeight)&&(pt=!1),pt!=null&&!Be){var Mt=ne("div","\u200B",null,`position: absolute;
|
|
|
top: `+(at.top-ct.viewOffset-As(it.display))+`px;
|
|
|
height: `+(at.bottom-at.top+Ws(it)+ct.barHeight)+`px;
|
|
|
left: `+at.left+"px; width: "+Math.max(2,at.right-at.left)+"px;");it.display.lineSpace.appendChild(Mt),Mt.scrollIntoView(pt),it.display.lineSpace.removeChild(Mt)}}}function Zd(it,at,ct,dt){dt==null&&(dt=0);var pt;!it.options.lineWrapping&&at==ct&&(at=at.ch?Oe(at.line,at.sticky=="before"?at.ch-1:at.ch,"after"):at,ct=at.sticky=="before"?Oe(at.line,at.ch+1,"before"):at);for(var Mt=0;Mt<5;Mt++){var Rt=!1,te=Ia(it,at),Xt=!ct||ct==at?te:Ia(it,ct);pt={left:Math.min(te.left,Xt.left),top:Math.min(te.top,Xt.top)-dt,right:Math.max(te.left,Xt.left),bottom:Math.max(te.bottom,Xt.bottom)+dt};var ve=Wf(it,pt),on=it.doc.scrollTop,Ee=it.doc.scrollLeft;if(ve.scrollTop!=null&&(Uh(it,ve.scrollTop),Math.abs(it.doc.scrollTop-on)>1&&(Rt=!0)),ve.scrollLeft!=null&&(Zu(it,ve.scrollLeft),Math.abs(it.doc.scrollLeft-Ee)>1&&(Rt=!0)),!Rt)break}return pt}function Wd(it,at){var ct=Wf(it,at);ct.scrollTop!=null&&Uh(it,ct.scrollTop),ct.scrollLeft!=null&&Zu(it,ct.scrollLeft)}function Wf(it,at){var ct=it.display,dt=Gu(it.display);at.top<0&&(at.top=0);var pt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ct.scroller.scrollTop,Mt=Hh(it),Rt={};at.bottom-at.top>Mt&&(at.bottom=at.top+Mt);var te=it.doc.height+bu(ct),Xt=at.top<dt,ve=at.bottom>te-dt;if(at.top<pt)Rt.scrollTop=Xt?0:at.top;else if(at.bottom>pt+Mt){var on=Math.min(at.top,(ve?te:at.bottom)-Mt);on!=pt&&(Rt.scrollTop=on)}var Ee=it.options.fixedGutter?0:ct.gutters.offsetWidth,On=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ct.scroller.scrollLeft-Ee,Cn=pl(it)-ct.gutters.offsetWidth,wi=at.right-at.left>Cn;return wi&&(at.right=at.left+Cn),at.left<10?Rt.scrollLeft=0:at.left<On?Rt.scrollLeft=Math.max(0,at.left+Ee-(wi?0:10)):at.right>Cn+On-3&&(Rt.scrollLeft=at.right+(wi?0:10)-Cn),Rt}function bc(it,at){at!=null&&($u(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+at)}function yh(it){$u(it);var at=it.getCursor();it.curOp.scrollToPos={from:at,to:at,margin:it.options.cursorScrollMargin}}function Vh(it,at,ct){(at!=null||ct!=null)&&$u(it),at!=null&&(it.curOp.scrollLeft=at),ct!=null&&(it.curOp.scrollTop=ct)}function Ur(it,at){$u(it),it.curOp.scrollToPos=at}function $u(it){var at=it.curOp.scrollToPos;if(at){it.curOp.scrollToPos=null;var ct=xc(it,at.from),dt=xc(it,at.to);af(it,ct,dt,at.margin)}}function af(it,at,ct,dt){var pt=Wf(it,{left:Math.min(at.left,ct.left),top:Math.min(at.top,ct.top)-dt,right:Math.max(at.right,ct.right),bottom:Math.max(at.bottom,ct.bottom)+dt});Vh(it,pt.scrollLeft,pt.scrollTop)}function Uh(it,at){Math.abs(it.doc.scrollTop-at)<2||(Ot||Qi(it,{top:at}),Kf(it,at,!0),Ot&&Qi(it),Vn(it,100))}function Kf(it,at,ct){at=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,at)),!(it.display.scroller.scrollTop==at&&!ct)&&(it.doc.scrollTop=at,it.display.scrollbars.setScrollTop(at),it.display.scroller.scrollTop!=at&&(it.display.scroller.scrollTop=at))}function Zu(it,at,ct,dt){at=Math.max(0,Math.min(at,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((ct?at==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-at)<2)&&!dt)&&(it.doc.scrollLeft=at,Jo(it),it.display.scroller.scrollLeft!=at&&(it.display.scroller.scrollLeft=at),it.display.scrollbars.setScrollLeft(at))}function fu(it){var at=it.display,ct=at.gutters.offsetWidth,dt=Math.round(it.doc.height+bu(it.display));return{clientHeight:at.scroller.clientHeight,viewHeight:at.wrapper.clientHeight,scrollWidth:at.scroller.scrollWidth,clientWidth:at.scroller.clientWidth,viewWidth:at.wrapper.clientWidth,barLeft:it.options.fixedGutter?ct:0,docHeight:dt,scrollHeight:dt+Ws(it)+at.barHeight,nativeBarWidth:at.nativeBarWidth,gutterWidth:ct}}var Sh=function(it,at,ct){this.cm=ct;var dt=this.vert=ne("div",[ne("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pt=this.horiz=ne("div",[ne("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");dt.tabIndex=pt.tabIndex=-1,it(dt),it(pt),Yt(dt,"scroll",function(){dt.clientHeight&&at(dt.scrollTop,"vertical")}),Yt(pt,"scroll",function(){pt.clientWidth&&at(pt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ut&&pe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Sh.prototype.update=function(it){var at=it.scrollWidth>it.clientWidth+1,ct=it.scrollHeight>it.clientHeight+1,dt=it.nativeBarWidth;if(ct){this.vert.style.display="block",this.vert.style.bottom=at?dt+"px":"0";var pt=it.viewHeight-(at?dt:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+pt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(at){this.horiz.style.display="block",this.horiz.style.right=ct?dt+"px":"0",this.horiz.style.left=it.barLeft+"px";var Mt=it.viewWidth-it.barLeft-(ct?dt:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Mt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(dt==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ct?dt:0,bottom:at?dt:0}},Sh.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Sh.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Sh.prototype.zeroWidthHack=function(){var it=ht&&!Ce?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ht,this.disableVert=new Ht},Sh.prototype.enableZeroWidthBar=function(it,at,ct){it.style.pointerEvents="auto";function dt(){var pt=it.getBoundingClientRect(),Mt=ct=="vert"?document.elementFromPoint(pt.right-1,(pt.top+pt.bottom)/2):document.elementFromPoint((pt.right+pt.left)/2,pt.bottom-1);Mt!=it?it.style.pointerEvents="none":at.set(1e3,dt)}at.set(1e3,dt)},Sh.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var Eu=function(){};Eu.prototype.update=function(){return{bottom:0,right:0}},Eu.prototype.setScrollLeft=function(){},Eu.prototype.setScrollTop=function(){},Eu.prototype.clear=function(){};function xh(it,at){at||(at=fu(it));var ct=it.display.barWidth,dt=it.display.barHeight;Ec(it,at);for(var pt=0;pt<4&&ct!=it.display.barWidth||dt!=it.display.barHeight;pt++)ct!=it.display.barWidth&&it.options.lineWrapping&&Vo(it),Ec(it,fu(it)),ct=it.display.barWidth,dt=it.display.barHeight}function Ec(it,at){var ct=it.display,dt=ct.scrollbars.update(at);ct.sizer.style.paddingRight=(ct.barWidth=dt.right)+"px",ct.sizer.style.paddingBottom=(ct.barHeight=dt.bottom)+"px",ct.heightForcer.style.borderBottom=dt.bottom+"px solid transparent",dt.right&&dt.bottom?(ct.scrollbarFiller.style.display="block",ct.scrollbarFiller.style.height=dt.bottom+"px",ct.scrollbarFiller.style.width=dt.right+"px"):ct.scrollbarFiller.style.display="",dt.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(ct.gutterFiller.style.display="block",ct.gutterFiller.style.height=dt.bottom+"px",ct.gutterFiller.style.width=at.gutterWidth+"px"):ct.gutterFiller.style.display=""}var sf={native:Sh,null:Eu};function lf(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&At(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new sf[it.options.scrollbarStyle](function(at){it.display.wrapper.insertBefore(at,it.display.scrollbarFiller),Yt(at,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),at.setAttribute("cm-not-content","true")},function(at,ct){ct=="horizontal"?Zu(it,at):Uh(it,at)},it),it.display.scrollbars.addClass&&Ge(it.display.wrapper,it.display.scrollbars.addClass)}var _f=0;function ml(it){it.curOp={cm:it,viewChanged:!1,startHeight:it.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++_f},aa(it.curOp)}function Ph(it){var at=it.curOp;at&&tr(at,function(ct){for(var dt=0;dt<ct.ops.length;dt++)ct.ops[dt].cm.curOp=null;Wg(ct)})}function Wg(it){for(var at=it.ops,ct=0;ct<at.length;ct++)oe(at[ct]);for(var dt=0;dt<at.length;dt++)le(at[dt]);for(var pt=0;pt<at.length;pt++)De(at[pt]);for(var Mt=0;Mt<at.length;Mt++)je(at[Mt]);for(var Rt=0;Rt<at.length;Rt++)rn(at[Rt])}function oe(it){var at=it.cm,ct=at.display;Bi(at),it.updateMaxLine&&ur(at),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<ct.viewFrom||it.scrollToPos.to.line>=ct.viewTo)||ct.maxLineChanged&&at.options.lineWrapping,it.update=it.mustUpdate&&new ti(at,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function le(it){it.updatedDisplay=it.mustUpdate&&no(it.cm,it.update)}function De(it){var at=it.cm,ct=at.display;it.updatedDisplay&&Vo(at),it.barMeasure=fu(at),ct.maxLineChanged&&!at.options.lineWrapping&&(it.adjustWidthTo=$h(at,ct.maxLine,ct.maxLine.text.length).left+3,at.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(ct.scroller.clientWidth,ct.sizer.offsetLeft+it.adjustWidthTo+Ws(at)+at.display.barWidth),it.maxScrollLeft=Math.max(0,ct.sizer.offsetLeft+it.adjustWidthTo-pl(at))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=ct.input.prepareSelection())}function je(it){var at=it.cm;it.adjustWidthTo!=null&&(at.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<at.doc.scrollLeft&&Zu(at,Math.min(at.display.scroller.scrollLeft,it.maxScrollLeft),!0),at.display.maxLineChanged=!1);var ct=it.focus&&it.focus==he();it.preparedSelection&&at.display.input.showSelection(it.preparedSelection,ct),(it.updatedDisplay||it.startHeight!=at.doc.height)&&xh(at,it.barMeasure),it.updatedDisplay&&Do(at,it.barMeasure),it.selectionChanged&&pa(at),at.state.focused&&it.updateInput&&at.display.input.reset(it.typing),ct&&Ba(it.cm)}function rn(it){var at=it.cm,ct=at.display,dt=at.doc;if(it.updatedDisplay&&Mi(at,it.update),ct.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(ct.wheelStartX=ct.wheelStartY=null),it.scrollTop!=null&&Kf(at,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&Zu(at,it.scrollLeft,!0,!0),it.scrollToPos){var pt=Zd(at,Qn(dt,it.scrollToPos.from),Qn(dt,it.scrollToPos.to),it.scrollToPos.margin);Zf(at,pt)}var Mt=it.maybeHiddenMarkers,Rt=it.maybeUnhiddenMarkers;if(Mt)for(var te=0;te<Mt.length;++te)Mt[te].lines.length||qe(Mt[te],"hide");if(Rt)for(var Xt=0;Xt<Rt.length;++Xt)Rt[Xt].lines.length&&qe(Rt[Xt],"unhide");ct.wrapper.offsetHeight&&(dt.scrollTop=at.display.scroller.scrollTop),it.changeObjs&&qe(at,"changes",at,it.changeObjs),it.update&&it.update.finish()}function Ue(it,at){if(it.curOp)return at();ml(it);try{return at()}finally{Ph(it)}}function Ln(it,at){return function(){if(it.curOp)return at.apply(it,arguments);ml(it);try{return at.apply(it,arguments)}finally{Ph(it)}}}function kn(it){return function(){if(this.curOp)return it.apply(this,arguments);ml(this);try{return it.apply(this,arguments)}finally{Ph(this)}}}function wn(it){return function(){var at=this.cm;if(!at||at.curOp)return it.apply(this,arguments);ml(at);try{return it.apply(this,arguments)}finally{Ph(at)}}}function Vn(it,at){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(at,sn(ii,it))}function ii(it){var at=it.doc;if(!(at.highlightFrontier>=it.display.viewTo)){var ct=+new Date+it.options.workTime,dt=Ki(it,at.highlightFrontier),pt=[];at.iter(dt.line,Math.min(at.first+at.size,it.display.viewTo+500),function(Mt){if(dt.line>=it.display.viewFrom){var Rt=Mt.styles,te=Mt.text.length>it.options.maxHighlightLength?He(at.mode,dt.state):null,Xt=lo(it,Mt,dt,!0);te&&(dt.state=te),Mt.styles=Xt.styles;var ve=Mt.styleClasses,on=Xt.classes;on?Mt.styleClasses=on:ve&&(Mt.styleClasses=null);for(var Ee=!Rt||Rt.length!=Mt.styles.length||ve!=on&&(!ve||!on||ve.bgClass!=on.bgClass||ve.textClass!=on.textClass),On=0;!Ee&&On<Rt.length;++On)Ee=Rt[On]!=Mt.styles[On];Ee&&pt.push(dt.line),Mt.stateAfter=dt.save(),dt.nextLine()}else Mt.text.length<=it.options.maxHighlightLength&&en(it,Mt.text,dt),Mt.stateAfter=dt.line%5==0?dt.save():null,dt.nextLine();if(+new Date>ct)return Vn(it,it.options.workDelay),!0}),at.highlightFrontier=dt.line,at.modeFrontier=Math.max(at.modeFrontier,dt.line),pt.length&&Ue(it,function(){for(var Mt=0;Mt<pt.length;Mt++)Mr(it,pt[Mt],"text")})}}var ti=function(it,at,ct){var dt=it.display;this.viewport=at,this.visible=jr(dt,it.doc,at),this.editorIsHidden=!dt.wrapper.offsetWidth,this.wrapperHeight=dt.wrapper.clientHeight,this.wrapperWidth=dt.wrapper.clientWidth,this.oldDisplayWidth=pl(it),this.force=ct,this.dims=Cc(it),this.events=[]};ti.prototype.signal=function(it,at){Kn(it,at)&&this.events.push(arguments)},ti.prototype.finish=function(){for(var it=0;it<this.events.length;it++)qe.apply(null,this.events[it])};function Bi(it){var at=it.display;!at.scrollbarsClipped&&at.scroller.offsetWidth&&(at.nativeBarWidth=at.scroller.offsetWidth-at.scroller.clientWidth,at.heightForcer.style.height=Ws(it)+"px",at.sizer.style.marginBottom=-at.nativeBarWidth+"px",at.sizer.style.borderRightWidth=Ws(it)+"px",at.scrollbarsClipped=!0)}function Ti(it){if(it.hasFocus())return null;var at=he();if(!at||!Le(it.display.lineDiv,at))return null;var ct={activeElt:at};if(window.getSelection){var dt=window.getSelection();dt.anchorNode&&dt.extend&&Le(it.display.lineDiv,dt.anchorNode)&&(ct.anchorNode=dt.anchorNode,ct.anchorOffset=dt.anchorOffset,ct.focusNode=dt.focusNode,ct.focusOffset=dt.focusOffset)}return ct}function bi(it){if(!(!it||!it.activeElt||it.activeElt==he())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Le(document.body,it.anchorNode)&&Le(document.body,it.focusNode))){var at=window.getSelection(),ct=document.createRange();ct.setEnd(it.anchorNode,it.anchorOffset),ct.collapse(!1),at.removeAllRanges(),at.addRange(ct),at.extend(it.focusNode,it.focusOffset)}}function no(it,at){var ct=it.display,dt=it.doc;if(at.editorIsHidden)return ls(it),!1;if(!at.force&&at.visible.from>=ct.viewFrom&&at.visible.to<=ct.viewTo&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo)&&ct.renderedView==ct.view&&Hl(it)==0)return!1;ro(it)&&(ls(it),at.dims=Cc(it));var pt=dt.first+dt.size,Mt=Math.max(at.visible.from-it.options.viewportMargin,dt.first),Rt=Math.min(pt,at.visible.to+it.options.viewportMargin);ct.viewFrom<Mt&&Mt-ct.viewFrom<20&&(Mt=Math.max(dt.first,ct.viewFrom)),ct.viewTo>Rt&&ct.viewTo-Rt<20&&(Rt=Math.min(pt,ct.viewTo)),mn&&(Mt=So(it.doc,Mt),Rt=Xi(it.doc,Rt));var te=Mt!=ct.viewFrom||Rt!=ct.viewTo||ct.lastWrapHeight!=at.wrapperHeight||ct.lastWrapWidth!=at.wrapperWidth;ya(it,Mt,Rt),ct.viewOffset=qo(Ye(it.doc,ct.viewFrom)),it.display.mover.style.top=ct.viewOffset+"px";var Xt=Hl(it);if(!te&&Xt==0&&!at.force&&ct.renderedView==ct.view&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo))return!1;var ve=Ti(it);return Xt>4&&(ct.lineDiv.style.display="none"),Ui(it,ct.updateLineNumbers,at.dims),Xt>4&&(ct.lineDiv.style.display=""),ct.renderedView=ct.view,bi(ve),Wt(ct.cursorDiv),Wt(ct.selectionDiv),ct.gutters.style.height=ct.sizer.style.minHeight=0,te&&(ct.lastWrapHeight=at.wrapperHeight,ct.lastWrapWidth=at.wrapperWidth,Vn(it,400)),ct.updateLineNumbers=null,!0}function Mi(it,at){for(var ct=at.viewport,dt=!0;;dt=!1){if(!dt||!it.options.lineWrapping||at.oldDisplayWidth==pl(it)){if(ct&&ct.top!=null&&(ct={top:Math.min(it.doc.height+bu(it.display)-Hh(it),ct.top)}),at.visible=jr(it.display,it.doc,ct),at.visible.from>=it.display.viewFrom&&at.visible.to<=it.display.viewTo)break}else dt&&(at.visible=jr(it.display,it.doc,ct));if(!no(it,at))break;Vo(it);var pt=fu(it);Cs(it),xh(it,pt),Do(it,pt),at.force=!1}at.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(at.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function Qi(it,at){var ct=new ti(it,at);if(no(it,ct)){Vo(it),Mi(it,ct);var dt=fu(it);Cs(it),xh(it,dt),Do(it,dt),ct.finish()}}function Ui(it,at,ct){var dt=it.display,pt=it.options.lineNumbers,Mt=dt.lineDiv,Rt=Mt.firstChild;function te(wi){var Li=wi.nextSibling;return Nt&&ht&&it.display.currentWheelTarget==wi?wi.style.display="none":wi.parentNode.removeChild(wi),Li}for(var Xt=dt.view,ve=dt.viewFrom,on=0;on<Xt.length;on++){var Ee=Xt[on];if(!Ee.hidden)if(!Ee.node||Ee.node.parentNode!=Mt){var On=Al(it,Ee,ve,ct);Mt.insertBefore(On,Rt)}else{for(;Rt!=Ee.node;)Rt=te(Rt);var Cn=pt&&at!=null&&at<=ve&&Ee.lineNumber;Ee.changes&&(Je(Ee.changes,"gutter")>-1&&(Cn=!1),sa(it,Ee,ve,ct)),Cn&&(Wt(Ee.lineNumber),Ee.lineNumber.appendChild(document.createTextNode(Bn(it.options,ve)))),Rt=Ee.node.nextSibling}ve+=Ee.size}for(;Rt;)Rt=te(Rt)}function vo(it){var at=it.gutters.offsetWidth;it.sizer.style.marginLeft=at+"px"}function Do(it,at){it.display.sizer.style.minHeight=at.docHeight+"px",it.display.heightForcer.style.top=at.docHeight+"px",it.display.gutters.style.height=at.docHeight+it.display.barHeight+Ws(it)+"px"}function Jo(it){var at=it.display,ct=at.view;if(!(!at.alignWidgets&&(!at.gutters.firstChild||!it.options.fixedGutter))){for(var dt=fd(at)-at.scroller.scrollLeft+it.doc.scrollLeft,pt=at.gutters.offsetWidth,Mt=dt+"px",Rt=0;Rt<ct.length;Rt++)if(!ct[Rt].hidden){it.options.fixedGutter&&(ct[Rt].gutter&&(ct[Rt].gutter.style.left=Mt),ct[Rt].gutterBackground&&(ct[Rt].gutterBackground.style.left=Mt));var te=ct[Rt].alignable;if(te)for(var Xt=0;Xt<te.length;Xt++)te[Xt].style.left=Mt}it.options.fixedGutter&&(at.gutters.style.left=dt+pt+"px")}}function ro(it){if(!it.options.lineNumbers)return!1;var at=it.doc,ct=Bn(it.options,at.first+at.size-1),dt=it.display;if(ct.length!=dt.lineNumChars){var pt=dt.measure.appendChild(ne("div",[ne("div",ct)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Mt=pt.firstChild.offsetWidth,Rt=pt.offsetWidth-Mt;return dt.lineGutter.style.width="",dt.lineNumInnerWidth=Math.max(Mt,dt.lineGutter.offsetWidth-Rt)+1,dt.lineNumWidth=dt.lineNumInnerWidth+Rt,dt.lineNumChars=dt.lineNumInnerWidth?ct.length:-1,dt.lineGutter.style.width=dt.lineNumWidth+"px",vo(it.display),!0}return!1}function Io(it,at){for(var ct=[],dt=!1,pt=0;pt<it.length;pt++){var Mt=it[pt],Rt=null;if(typeof Mt!="string"&&(Rt=Mt.style,Mt=Mt.className),Mt=="CodeMirror-linenumbers")if(at)dt=!0;else continue;ct.push({className:Mt,style:Rt})}return at&&!dt&&ct.push({className:"CodeMirror-linenumbers",style:null}),ct}function mr(it){var at=it.gutters,ct=it.gutterSpecs;Wt(at),it.lineGutter=null;for(var dt=0;dt<ct.length;++dt){var pt=ct[dt],Mt=pt.className,Rt=pt.style,te=at.appendChild(ne("div",null,"CodeMirror-gutter "+Mt));Rt&&(te.style.cssText=Rt),Mt=="CodeMirror-linenumbers"&&(it.lineGutter=te,te.style.width=(it.lineNumWidth||1)+"px")}at.style.display=ct.length?"":"none",vo(it)}function po(it){mr(it.display),Ca(it),Jo(it)}function To(it,at,ct,dt){var pt=this;this.input=ct,pt.scrollbarFiller=ne("div",null,"CodeMirror-scrollbar-filler"),pt.scrollbarFiller.setAttribute("cm-not-content","true"),pt.gutterFiller=ne("div",null,"CodeMirror-gutter-filler"),pt.gutterFiller.setAttribute("cm-not-content","true"),pt.lineDiv=me("div",null,"CodeMirror-code"),pt.selectionDiv=ne("div",null,null,"position: relative; z-index: 1"),pt.cursorDiv=ne("div",null,"CodeMirror-cursors"),pt.measure=ne("div",null,"CodeMirror-measure"),pt.lineMeasure=ne("div",null,"CodeMirror-measure"),pt.lineSpace=me("div",[pt.measure,pt.lineMeasure,pt.selectionDiv,pt.cursorDiv,pt.lineDiv],null,"position: relative; outline: none");var Mt=me("div",[pt.lineSpace],"CodeMirror-lines");pt.mover=ne("div",[Mt],null,"position: relative"),pt.sizer=ne("div",[pt.mover],"CodeMirror-sizer"),pt.sizerWidth=null,pt.heightForcer=ne("div",null,null,"position: absolute; height: "+Tn+"px; width: 1px;"),pt.gutters=ne("div",null,"CodeMirror-gutters"),pt.lineGutter=null,pt.scroller=ne("div",[pt.sizer,pt.heightForcer,pt.gutters],"CodeMirror-scroll"),pt.scroller.setAttribute("tabIndex","-1"),pt.wrapper=ne("div",[pt.scrollbarFiller,pt.gutterFiller,pt.scroller],"CodeMirror"),Ut&&pe<8&&(pt.gutters.style.zIndex=-1,pt.scroller.style.paddingRight=0),!Nt&&!(Ot&&nt)&&(pt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(pt.wrapper):it(pt.wrapper)),pt.viewFrom=pt.viewTo=at.first,pt.reportedViewFrom=pt.reportedViewTo=at.first,pt.view=[],pt.renderedView=null,pt.externalMeasured=null,pt.viewOffset=0,pt.lastWrapHeight=pt.lastWrapWidth=0,pt.updateLineNumbers=null,pt.nativeBarWidth=pt.barHeight=pt.barWidth=0,pt.scrollbarsClipped=!1,pt.lineNumWidth=pt.lineNumInnerWidth=pt.lineNumChars=null,pt.alignWidgets=!1,pt.cachedCharWidth=pt.cachedTextHeight=pt.cachedPaddingH=null,pt.maxLine=null,pt.maxLineLength=0,pt.maxLineChanged=!1,pt.wheelDX=pt.wheelDY=pt.wheelStartX=pt.wheelStartY=null,pt.shift=!1,pt.selForContextMenu=null,pt.activeTouch=null,pt.gutterSpecs=Io(dt.gutters,dt.lineNumbers),mr(pt),ct.init(pt)}var ho=0,Hi=null;Ut?Hi=-.53:Ot?Hi=15:we?Hi=-.7:ce&&(Hi=-1/3);function bo(it){var at=it.wheelDeltaX,ct=it.wheelDeltaY;return at==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(at=it.detail),ct==null&&it.detail&&it.axis==it.VERTICAL_AXIS?ct=it.detail:ct==null&&(ct=it.wheelDelta),{x:at,y:ct}}function Wo(it){var at=bo(it);return at.x*=Hi,at.y*=Hi,at}function ir(it,at){var ct=bo(at),dt=ct.x,pt=ct.y,Mt=it.display,Rt=Mt.scroller,te=Rt.scrollWidth>Rt.clientWidth,Xt=Rt.scrollHeight>Rt.clientHeight;if(dt&&te||pt&&Xt){if(pt&&ht&&Nt){t:for(var ve=at.target,on=Mt.view;ve!=Rt;ve=ve.parentNode)for(var Ee=0;Ee<on.length;Ee++)if(on[Ee].node==ve){it.display.currentWheelTarget=ve;break t}}if(dt&&!Ot&&!qt&&Hi!=null){pt&&Xt&&Uh(it,Math.max(0,Rt.scrollTop+pt*Hi)),Zu(it,Math.max(0,Rt.scrollLeft+dt*Hi)),(!pt||pt&&Xt)&&Ci(at),Mt.wheelStartX=null;return}if(pt&&Hi!=null){var On=pt*Hi,Cn=it.doc.scrollTop,wi=Cn+Mt.wrapper.clientHeight;On<0?Cn=Math.max(0,Cn+On-50):wi=Math.min(it.doc.height,wi+On+50),Qi(it,{top:Cn,bottom:wi})}ho<20&&(Mt.wheelStartX==null?(Mt.wheelStartX=Rt.scrollLeft,Mt.wheelStartY=Rt.scrollTop,Mt.wheelDX=dt,Mt.wheelDY=pt,setTimeout(function(){if(Mt.wheelStartX!=null){var Li=Rt.scrollLeft-Mt.wheelStartX,Ai=Rt.scrollTop-Mt.wheelStartY,so=Ai&&Mt.wheelDY&&Ai/Mt.wheelDY||Li&&Mt.wheelDX&&Li/Mt.wheelDX;Mt.wheelStartX=Mt.wheelStartY=null,so&&(Hi=(Hi*ho+so)/(ho+1),++ho)}},200)):(Mt.wheelDX+=dt,Mt.wheelDY+=pt))}}var rr=function(it,at){this.ranges=it,this.primIndex=at};rr.prototype.primary=function(){return this.ranges[this.primIndex]},rr.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var at=0;at<this.ranges.length;at++){var ct=this.ranges[at],dt=it.ranges[at];if(!Gn(ct.anchor,dt.anchor)||!Gn(ct.head,dt.head))return!1}return!0},rr.prototype.deepCopy=function(){for(var it=[],at=0;at<this.ranges.length;at++)it[at]=new ao(Xn(this.ranges[at].anchor),Xn(this.ranges[at].head));return new rr(it,this.primIndex)},rr.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},rr.prototype.contains=function(it,at){at||(at=it);for(var ct=0;ct<this.ranges.length;ct++){var dt=this.ranges[ct];if(Xe(at,dt.from())>=0&&Xe(it,dt.to())<=0)return ct}return-1};var ao=function(it,at){this.anchor=it,this.head=at};ao.prototype.from=function(){return Rn(this.anchor,this.head)},ao.prototype.to=function(){return Jn(this.anchor,this.head)},ao.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function yr(it,at,ct){var dt=it&&it.options.selectionsMayTouch,pt=at[ct];at.sort(function(On,Cn){return Xe(On.from(),Cn.from())}),ct=Je(at,pt);for(var Mt=1;Mt<at.length;Mt++){var Rt=at[Mt],te=at[Mt-1],Xt=Xe(te.to(),Rt.from());if(dt&&!Rt.empty()?Xt>0:Xt>=0){var ve=Rn(te.from(),Rt.from()),on=Jn(te.to(),Rt.to()),Ee=te.empty()?Rt.from()==Rt.head:te.from()==te.head;Mt<=ct&&--ct,at.splice(--Mt,2,new ao(Ee?on:ve,Ee?ve:on))}}return new rr(at,ct)}function br(it,at){return new rr([new ao(it,at||it)],0)}function na(it){return it.text?Oe(it.from.line+it.text.length-1,de(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function Ar(it,at){if(Xe(it,at.from)<0)return it;if(Xe(it,at.to)<=0)return na(at);var ct=it.line+at.text.length-(at.to.line-at.from.line)-1,dt=it.ch;return it.line==at.to.line&&(dt+=na(at).ch-at.to.ch),Oe(ct,dt)}function Da(it,at){for(var ct=[],dt=0;dt<it.sel.ranges.length;dt++){var pt=it.sel.ranges[dt];ct.push(new ao(Ar(pt.anchor,at),Ar(pt.head,at)))}return yr(it.cm,ct,it.sel.primIndex)}function Oa(it,at,ct){return it.line==at.line?Oe(ct.line,it.ch-at.ch+ct.ch):Oe(ct.line+(it.line-at.line),it.ch)}function Pr(it,at,ct){for(var dt=[],pt=Oe(it.first,0),Mt=pt,Rt=0;Rt<at.length;Rt++){var te=at[Rt],Xt=Oa(te.from,pt,Mt),ve=Oa(na(te),pt,Mt);if(pt=te.to,Mt=ve,ct=="around"){var on=it.sel.ranges[Rt],Ee=Xe(on.head,on.anchor)<0;dt[Rt]=new ao(Ee?ve:Xt,Ee?Xt:ve)}else dt[Rt]=new ao(Xt,Xt)}return new rr(dt,it.sel.primIndex)}function Uo(it){it.doc.mode=Fe(it.options,it.doc.modeOption),_r(it)}function _r(it){it.doc.iter(function(at){at.stateAfter&&(at.stateAfter=null),at.styles&&(at.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,Vn(it,100),it.state.modeGen++,it.curOp&&Ca(it)}function Aa(it,at){return at.from.ch==0&&at.to.ch==0&&de(at.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function ba(it,at,ct,dt){function pt(Fo){return ct?ct[Fo]:null}function Mt(Fo,Eo,Ko){xr(Fo,Eo,Ko,dt),vi(Fo,"change",Fo,at)}function Rt(Fo,Eo){for(var Ko=[],Sr=Fo;Sr<Eo;++Sr)Ko.push(new Yo(ve[Sr],pt(Sr),dt));return Ko}var te=at.from,Xt=at.to,ve=at.text,on=Ye(it,te.line),Ee=Ye(it,Xt.line),On=de(ve),Cn=pt(ve.length-1),wi=Xt.line-te.line;if(at.full)it.insert(0,Rt(0,ve.length)),it.remove(ve.length,it.size-ve.length);else if(Aa(it,at)){var Li=Rt(0,ve.length-1);Mt(Ee,Ee.text,Cn),wi&&it.remove(te.line,wi),Li.length&&it.insert(te.line,Li)}else if(on==Ee)if(ve.length==1)Mt(on,on.text.slice(0,te.ch)+On+on.text.slice(Xt.ch),Cn);else{var Ai=Rt(1,ve.length-1);Ai.push(new Yo(On+on.text.slice(Xt.ch),Cn,dt)),Mt(on,on.text.slice(0,te.ch)+ve[0],pt(0)),it.insert(te.line+1,Ai)}else if(ve.length==1)Mt(on,on.text.slice(0,te.ch)+ve[0]+Ee.text.slice(Xt.ch),pt(0)),it.remove(te.line+1,wi);else{Mt(on,on.text.slice(0,te.ch)+ve[0],pt(0)),Mt(Ee,On+Ee.text.slice(Xt.ch),Cn);var so=Rt(1,ve.length-1);wi>1&&it.remove(te.line+1,wi-1),it.insert(te.line+1,so)}vi(it,"change",it,at)}function os(it,at,ct){function dt(pt,Mt,Rt){if(pt.linked)for(var te=0;te<pt.linked.length;++te){var Xt=pt.linked[te];if(Xt.doc!=Mt){var ve=Rt&&Xt.sharedHist;ct&&!ve||(at(Xt.doc,ve),dt(Xt.doc,pt,ve))}}}dt(it,null,!0)}function ar(it,at){if(at.cm)throw new Error("This document is already in use.");it.doc=at,at.cm=it,Xo(it),Uo(it),er(it),it.options.lineWrapping||ur(it),it.options.mode=at.modeOption,Ca(it)}function er(it){(it.doc.direction=="rtl"?Ge:At)(it.display.lineDiv,"CodeMirror-rtl")}function sr(it){Ue(it,function(){er(it),Ca(it)})}function Ro(it){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=it||1}function Yr(it,at){var ct={from:Xn(at.from),to:na(at),text:gn(it,at.from,at.to)};return _s(it,ct,at.from.line,at.to.line+1),os(it,function(dt){return _s(dt,ct,at.from.line,at.to.line+1)},!0),ct}function zo(it){for(;it.length;){var at=de(it);if(at.ranges)it.pop();else break}}function vr(it,at){if(at)return zo(it.done),de(it.done);if(it.done.length&&!de(it.done).ranges)return de(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),de(it.done)}function Hr(it,at,ct,dt){var pt=it.history;pt.undone.length=0;var Mt=+new Date,Rt,te;if((pt.lastOp==dt||pt.lastOrigin==at.origin&&at.origin&&(at.origin.charAt(0)=="+"&&pt.lastModTime>Mt-(it.cm?it.cm.options.historyEventDelay:500)||at.origin.charAt(0)=="*"))&&(Rt=vr(pt,pt.lastOp==dt)))te=de(Rt.changes),Xe(at.from,at.to)==0&&Xe(at.from,te.to)==0?te.to=na(at):Rt.changes.push(Yr(it,at));else{var Xt=de(pt.done);for((!Xt||!Xt.ranges)&&us(it.sel,pt.done),Rt={changes:[Yr(it,at)],generation:pt.generation},pt.done.push(Rt);pt.done.length>pt.undoDepth;)pt.done.shift(),pt.done[0].ranges||pt.done.shift()}pt.done.push(ct),pt.generation=++pt.maxGeneration,pt.lastModTime=pt.lastSelTime=Mt,pt.lastOp=pt.lastSelOp=dt,pt.lastOrigin=pt.lastSelOrigin=at.origin,te||qe(it,"historyAdded")}function Gr(it,at,ct,dt){var pt=at.charAt(0);return pt=="*"||pt=="+"&&ct.ranges.length==dt.ranges.length&&ct.somethingSelected()==dt.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function bs(it,at,ct,dt){var pt=it.history,Mt=dt&&dt.origin;ct==pt.lastSelOp||Mt&&pt.lastSelOrigin==Mt&&(pt.lastModTime==pt.lastSelTime&&pt.lastOrigin==Mt||Gr(it,Mt,de(pt.done),at))?pt.done[pt.done.length-1]=at:us(at,pt.done),pt.lastSelTime=+new Date,pt.lastSelOrigin=Mt,pt.lastSelOp=ct,dt&&dt.clearRedo!==!1&&zo(pt.undone)}function us(it,at){var ct=de(at);ct&&ct.ranges&&ct.equals(it)||at.push(it)}function _s(it,at,ct,dt){var pt=at["spans_"+it.id],Mt=0;it.iter(Math.max(it.first,ct),Math.min(it.first+it.size,dt),function(Rt){Rt.markedSpans&&((pt||(pt=at["spans_"+it.id]={}))[Mt]=Rt.markedSpans),++Mt})}function ia(it){if(!it)return null;for(var at,ct=0;ct<it.length;++ct)it[ct].marker.explicitlyCleared?at||(at=it.slice(0,ct)):at&&at.push(it[ct]);return at?at.length?at:null:it}function Es(it,at){var ct=at["spans_"+it.id];if(!ct)return null;for(var dt=[],pt=0;pt<at.text.length;++pt)dt.push(ia(ct[pt]));return dt}function es(it,at){var ct=Es(it,at),dt=Ni(it,at);if(!ct)return dt;if(!dt)return ct;for(var pt=0;pt<ct.length;++pt){var Mt=ct[pt],Rt=dt[pt];if(Mt&&Rt)t:for(var te=0;te<Rt.length;++te){for(var Xt=Rt[te],ve=0;ve<Mt.length;++ve)if(Mt[ve].marker==Xt.marker)continue t;Mt.push(Xt)}else Rt&&(ct[pt]=Rt)}return ct}function ms(it,at,ct){for(var dt=[],pt=0;pt<it.length;++pt){var Mt=it[pt];if(Mt.ranges){dt.push(ct?rr.prototype.deepCopy.call(Mt):Mt);continue}var Rt=Mt.changes,te=[];dt.push({changes:te});for(var Xt=0;Xt<Rt.length;++Xt){var ve=Rt[Xt],on=void 0;if(te.push({from:ve.from,to:ve.to,text:ve.text}),at)for(var Ee in ve)(on=Ee.match(/^spans_(\d+)$/))&&Je(at,Number(on[1]))>-1&&(de(te)[Ee]=ve[Ee],delete ve[Ee])}}return dt}function Wu(it,at,ct,dt){if(dt){var pt=it.anchor;if(ct){var Mt=Xe(at,pt)<0;Mt!=Xe(ct,pt)<0?(pt=at,at=ct):Mt!=Xe(at,ct)<0&&(at=ct)}return new ao(pt,at)}else return new ao(ct||at,at)}function oa(it,at,ct,dt,pt){pt==null&&(pt=it.cm&&(it.cm.display.shift||it.extend)),Sa(it,new rr([Wu(it.sel.primary(),at,ct,pt)],0),dt)}function ca(it,at,ct){for(var dt=[],pt=it.cm&&(it.cm.display.shift||it.extend),Mt=0;Mt<it.sel.ranges.length;Mt++)dt[Mt]=Wu(it.sel.ranges[Mt],at[Mt],null,pt);var Rt=yr(it.cm,dt,it.sel.primIndex);Sa(it,Rt,ct)}function ma(it,at,ct,dt){var pt=it.sel.ranges.slice(0);pt[at]=ct,Sa(it,yr(it.cm,pt,it.sel.primIndex),dt)}function Ya(it,at,ct,dt){Sa(it,br(at,ct),dt)}function vs(it,at,ct){var dt={ranges:at.ranges,update:function(pt){this.ranges=[];for(var Mt=0;Mt<pt.length;Mt++)this.ranges[Mt]=new ao(Qn(it,pt[Mt].anchor),Qn(it,pt[Mt].head))},origin:ct&&ct.origin};return qe(it,"beforeSelectionChange",it,dt),it.cm&&qe(it.cm,"beforeSelectionChange",it.cm,dt),dt.ranges!=at.ranges?yr(it.cm,dt.ranges,dt.ranges.length-1):at}function Ir(it,at,ct){var dt=it.history.done,pt=de(dt);pt&&pt.ranges?(dt[dt.length-1]=at,ys(it,at,ct)):Sa(it,at,ct)}function Sa(it,at,ct){ys(it,at,ct),bs(it,it.sel,it.cm?it.cm.curOp.id:NaN,ct)}function ys(it,at,ct){(Kn(it,"beforeSelectionChange")||it.cm&&Kn(it.cm,"beforeSelectionChange"))&&(at=vs(it,at,ct));var dt=ct&&ct.bias||(Xe(at.primary().head,it.sel.primary().head)<0?-1:1);vl(it,Ll(it,at,dt,!0)),!(ct&&ct.scroll===!1)&&it.cm&&yh(it.cm)}function vl(it,at){at.equals(it.sel)||(it.sel=at,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,ai(it.cm)),vi(it,"cursorActivity",it))}function Gl(it){vl(it,Ll(it,it.sel,null,!1))}function Ll(it,at,ct,dt){for(var pt,Mt=0;Mt<at.ranges.length;Mt++){var Rt=at.ranges[Mt],te=at.ranges.length==it.sel.ranges.length&&it.sel.ranges[Mt],Xt=tu(it,Rt.anchor,te&&te.anchor,ct,dt),ve=tu(it,Rt.head,te&&te.head,ct,dt);(pt||Xt!=Rt.anchor||ve!=Rt.head)&&(pt||(pt=at.ranges.slice(0,Mt)),pt[Mt]=new ao(Xt,ve))}return pt?yr(it.cm,pt,at.primIndex):at}function ql(it,at,ct,dt,pt){var Mt=Ye(it,at.line);if(Mt.markedSpans)for(var Rt=0;Rt<Mt.markedSpans.length;++Rt){var te=Mt.markedSpans[Rt],Xt=te.marker,ve="selectLeft"in Xt?!Xt.selectLeft:Xt.inclusiveLeft,on="selectRight"in Xt?!Xt.selectRight:Xt.inclusiveRight;if((te.from==null||(ve?te.from<=at.ch:te.from<at.ch))&&(te.to==null||(on?te.to>=at.ch:te.to>at.ch))){if(pt&&(qe(Xt,"beforeCursorEnter"),Xt.explicitlyCleared))if(Mt.markedSpans){--Rt;continue}else break;if(!Xt.atomic)continue;if(ct){var Ee=Xt.find(dt<0?1:-1),On=void 0;if((dt<0?on:ve)&&(Ee=$l(it,Ee,-dt,Ee&&Ee.line==at.line?Mt:null)),Ee&&Ee.line==at.line&&(On=Xe(Ee,ct))&&(dt<0?On<0:On>0))return ql(it,Ee,at,dt,pt)}var Cn=Xt.find(dt<0?-1:1);return(dt<0?ve:on)&&(Cn=$l(it,Cn,dt,Cn.line==at.line?Mt:null)),Cn?ql(it,Cn,at,dt,pt):null}}return at}function tu(it,at,ct,dt,pt){var Mt=dt||1,Rt=ql(it,at,ct,Mt,pt)||!pt&&ql(it,at,ct,Mt,!0)||ql(it,at,ct,-Mt,pt)||!pt&&ql(it,at,ct,-Mt,!0);return Rt||(it.cantEdit=!0,Oe(it.first,0))}function $l(it,at,ct,dt){return ct<0&&at.ch==0?at.line>it.first?Qn(it,Oe(at.line-1)):null:ct>0&&at.ch==(dt||Ye(it,at.line)).text.length?at.line<it.first+it.size-1?Oe(at.line+1,0):null:new Oe(at.line,at.ch+ct)}function la(it){it.setSelection(Oe(it.firstLine(),0),Oe(it.lastLine()),ze)}function Ns(it,at,ct){var dt={canceled:!1,from:at.from,to:at.to,text:at.text,origin:at.origin,cancel:function(){return dt.canceled=!0}};return ct&&(dt.update=function(pt,Mt,Rt,te){pt&&(dt.from=Qn(it,pt)),Mt&&(dt.to=Qn(it,Mt)),Rt&&(dt.text=Rt),te!==void 0&&(dt.origin=te)}),qe(it,"beforeChange",it,dt),it.cm&&qe(it.cm,"beforeChange",it.cm,dt),dt.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:dt.from,to:dt.to,text:dt.text,origin:dt.origin}}function Wa(it,at,ct){if(it.cm){if(!it.cm.curOp)return Ln(it.cm,Wa)(it,at,ct);if(it.cm.state.suppressEdits)return}if(!((Kn(it,"beforeChange")||it.cm&&Kn(it.cm,"beforeChange"))&&(at=Ns(it,at,!0),!at))){var dt=qi&&!ct&&uo(it,at.from,at.to);if(dt)for(var pt=dt.length-1;pt>=0;--pt)xa(it,{from:dt[pt].from,to:dt[pt].to,text:pt?[""]:at.text,origin:at.origin});else xa(it,at)}}function xa(it,at){if(!(at.text.length==1&&at.text[0]==""&&Xe(at.from,at.to)==0)){var ct=Da(it,at);Hr(it,at,ct,it.cm?it.cm.curOp.id:NaN),eu(it,at,ct,Ni(it,at));var dt=[];os(it,function(pt,Mt){!Mt&&Je(dt,pt.history)==-1&&(Ea(pt.history,at),dt.push(pt.history)),eu(pt,at,null,Ni(pt,at))})}}function Zl(it,at,ct){var dt=it.cm&&it.cm.state.suppressEdits;if(!(dt&&!ct)){for(var pt=it.history,Mt,Rt=it.sel,te=at=="undo"?pt.done:pt.undone,Xt=at=="undo"?pt.undone:pt.done,ve=0;ve<te.length&&(Mt=te[ve],!(ct?Mt.ranges&&!Mt.equals(it.sel):!Mt.ranges));ve++);if(ve!=te.length){for(pt.lastOrigin=pt.lastSelOrigin=null;;)if(Mt=te.pop(),Mt.ranges){if(us(Mt,Xt),ct&&!Mt.equals(it.sel)){Sa(it,Mt,{clearRedo:!1});return}Rt=Mt}else if(dt){te.push(Mt);return}else break;var on=[];us(Rt,Xt),Xt.push({changes:on,generation:pt.generation}),pt.generation=Mt.generation||++pt.maxGeneration;for(var Ee=Kn(it,"beforeChange")||it.cm&&Kn(it.cm,"beforeChange"),On=function(Li){var Ai=Mt.changes[Li];if(Ai.origin=at,Ee&&!Ns(it,Ai,!1))return te.length=0,{};on.push(Yr(it,Ai));var so=Li?Da(it,Ai):de(te);eu(it,Ai,so,es(it,Ai)),!Li&&it.cm&&it.cm.scrollIntoView({from:Ai.from,to:na(Ai)});var Fo=[];os(it,function(Eo,Ko){!Ko&&Je(Fo,Eo.history)==-1&&(Ea(Eo.history,Ai),Fo.push(Eo.history)),eu(Eo,Ai,null,es(Eo,Ai))})},Cn=Mt.changes.length-1;Cn>=0;--Cn){var wi=On(Cn);if(wi)return wi.v}}}}function oh(it,at){if(at!=0&&(it.first+=at,it.sel=new rr(vn(it.sel.ranges,function(pt){return new ao(Oe(pt.anchor.line+at,pt.anchor.ch),Oe(pt.head.line+at,pt.head.ch))}),it.sel.primIndex),it.cm)){Ca(it.cm,it.first,it.first-at,at);for(var ct=it.cm.display,dt=ct.viewFrom;dt<ct.viewTo;dt++)Mr(it.cm,dt,"gutter")}}function eu(it,at,ct,dt){if(it.cm&&!it.cm.curOp)return Ln(it.cm,eu)(it,at,ct,dt);if(at.to.line<it.first){oh(it,at.text.length-1-(at.to.line-at.from.line));return}if(!(at.from.line>it.lastLine())){if(at.from.line<it.first){var pt=at.text.length-1-(it.first-at.from.line);oh(it,pt),at={from:Oe(it.first,0),to:Oe(at.to.line+pt,at.to.ch),text:[de(at.text)],origin:at.origin}}var Mt=it.lastLine();at.to.line>Mt&&(at={from:at.from,to:Oe(Mt,Ye(it,Mt).text.length),text:[at.text[0]],origin:at.origin}),at.removed=gn(it,at.from,at.to),ct||(ct=Da(it,at)),it.cm?Mu(it.cm,at,dt):ba(it,at,dt),ys(it,ct,ze),it.cantEdit&&tu(it,Oe(it.firstLine(),0))&&(it.cantEdit=!1)}}function Mu(it,at,ct){var dt=it.doc,pt=it.display,Mt=at.from,Rt=at.to,te=!1,Xt=Mt.line;it.options.lineWrapping||(Xt=_t(Co(Ye(dt,Mt.line))),dt.iter(Xt,Rt.line+1,function(Cn){if(Cn==pt.maxLine)return te=!0,!0})),dt.sel.contains(at.from,at.to)>-1&&ai(it),ba(dt,at,ct,Za(it)),it.options.lineWrapping||(dt.iter(Xt,Mt.line+at.text.length,function(Cn){var wi=Or(Cn);wi>pt.maxLineLength&&(pt.maxLine=Cn,pt.maxLineLength=wi,pt.maxLineChanged=!0,te=!1)}),te&&(it.curOp.updateMaxLine=!0)),$i(dt,Mt.line),Vn(it,400);var ve=at.text.length-(Rt.line-Mt.line)-1;at.full?Ca(it):Mt.line==Rt.line&&at.text.length==1&&!Aa(it.doc,at)?Mr(it,Mt.line,"text"):Ca(it,Mt.line,Rt.line+1,ve);var on=Kn(it,"changes"),Ee=Kn(it,"change");if(Ee||on){var On={from:Mt,to:Rt,text:at.text,removed:at.removed,origin:at.origin};Ee&&vi(it,"change",it,On),on&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(On)}it.display.selForContextMenu=null}function Ku(it,at,ct,dt,pt){var Mt;dt||(dt=ct),Xe(dt,ct)<0&&(Mt=[dt,ct],ct=Mt[0],dt=Mt[1]),typeof at=="string"&&(at=it.splitLines(at)),Wa(it,{from:ct,to:dt,text:at,origin:pt})}function kl(it,at,ct,dt){ct<it.line?it.line+=dt:at<it.line&&(it.line=at,it.ch=0)}function Xr(it,at,ct,dt){for(var pt=0;pt<it.length;++pt){var Mt=it[pt],Rt=!0;if(Mt.ranges){Mt.copied||(Mt=it[pt]=Mt.deepCopy(),Mt.copied=!0);for(var te=0;te<Mt.ranges.length;te++)kl(Mt.ranges[te].anchor,at,ct,dt),kl(Mt.ranges[te].head,at,ct,dt);continue}for(var Xt=0;Xt<Mt.changes.length;++Xt){var ve=Mt.changes[Xt];if(ct<ve.from.line)ve.from=Oe(ve.from.line+dt,ve.from.ch),ve.to=Oe(ve.to.line+dt,ve.to.ch);else if(at<=ve.to.line){Rt=!1;break}}Rt||(it.splice(0,pt+1),pt=0)}}function Ea(it,at){var ct=at.from.line,dt=at.to.line,pt=at.text.length-(dt-ct)-1;Xr(it.done,ct,dt,pt),Xr(it.undone,ct,dt,pt)}function hs(it,at,ct,dt){var pt=at,Mt=at;return typeof at=="number"?Mt=Ye(it,ni(it,at)):pt=_t(at),pt==null?null:(dt(Mt,pt)&&it.cm&&Mr(it.cm,pt,ct),Mt)}function Ma(it){this.lines=it,this.parent=null;for(var at=0,ct=0;ct<it.length;++ct)it[ct].parent=this,at+=it[ct].height;this.height=at}Ma.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,at){for(var ct=it,dt=it+at;ct<dt;++ct){var pt=this.lines[ct];this.height-=pt.height,wr(pt),vi(pt,"delete")}this.lines.splice(it,at)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,at,ct){this.height+=ct,this.lines=this.lines.slice(0,it).concat(at).concat(this.lines.slice(it));for(var dt=0;dt<at.length;++dt)at[dt].parent=this},iterN:function(it,at,ct){for(var dt=it+at;it<dt;++it)if(ct(this.lines[it]))return!0}};function Kr(it){this.children=it;for(var at=0,ct=0,dt=0;dt<it.length;++dt){var pt=it[dt];at+=pt.chunkSize(),ct+=pt.height,pt.parent=this}this.size=at,this.height=ct,this.parent=null}Kr.prototype={chunkSize:function(){return this.size},removeInner:function(it,at){this.size-=at;for(var ct=0;ct<this.children.length;++ct){var dt=this.children[ct],pt=dt.chunkSize();if(it<pt){var Mt=Math.min(at,pt-it),Rt=dt.height;if(dt.removeInner(it,Mt),this.height-=Rt-dt.height,pt==Mt&&(this.children.splice(ct--,1),dt.parent=null),(at-=Mt)==0)break;it=0}else it-=pt}if(this.size-at<25&&(this.children.length>1||!(this.children[0]instanceof Ma))){var te=[];this.collapse(te),this.children=[new Ma(te)],this.children[0].parent=this}},collapse:function(it){for(var at=0;at<this.children.length;++at)this.children[at].collapse(it)},insertInner:function(it,at,ct){this.size+=at.length,this.height+=ct;for(var dt=0;dt<this.children.length;++dt){var pt=this.children[dt],Mt=pt.chunkSize();if(it<=Mt){if(pt.insertInner(it,at,ct),pt.lines&&pt.lines.length>50){for(var Rt=pt.lines.length%25+25,te=Rt;te<pt.lines.length;){var Xt=new Ma(pt.lines.slice(te,te+=25));pt.height-=Xt.height,this.children.splice(++dt,0,Xt),Xt.parent=this}pt.lines=pt.lines.slice(0,Rt),this.maybeSpill()}break}it-=Mt}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var at=it.children.splice(it.children.length-5,5),ct=new Kr(at);if(it.parent){it.size-=ct.size,it.height-=ct.height;var pt=Je(it.parent.children,it);it.parent.children.splice(pt+1,0,ct)}else{var dt=new Kr(it.children);dt.parent=it,it.children=[dt,ct],it=dt}ct.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,at,ct){for(var dt=0;dt<this.children.length;++dt){var pt=this.children[dt],Mt=pt.chunkSize();if(it<Mt){var Rt=Math.min(at,Mt-it);if(pt.iterN(it,Rt,ct))return!0;if((at-=Rt)==0)break;it=0}else it-=Mt}}};var Ss=function(it,at,ct){if(ct)for(var dt in ct)ct.hasOwnProperty(dt)&&(this[dt]=ct[dt]);this.doc=it,this.node=at};Ss.prototype.clear=function(){var it=this.doc.cm,at=this.line.widgets,ct=this.line,dt=_t(ct);if(!(dt==null||!at)){for(var pt=0;pt<at.length;++pt)at[pt]==this&&at.splice(pt--,1);at.length||(ct.widgets=null);var Mt=ol(this);Re(ct,Math.max(0,ct.height-Mt)),it&&(Ue(it,function(){yl(it,ct,-Mt),Mr(it,dt,"widget")}),vi(it,"lineWidgetCleared",it,this,dt))}},Ss.prototype.changed=function(){var it=this,at=this.height,ct=this.doc.cm,dt=this.line;this.height=null;var pt=ol(this)-at;pt&&(Zn(this.doc,dt)||Re(dt,dt.height+pt),ct&&Ue(ct,function(){ct.curOp.forceUpdate=!0,yl(ct,dt,pt),vi(ct,"lineWidgetChanged",ct,it,_t(dt))}))},ci(Ss);function yl(it,at,ct){qo(at)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&bc(it,ct)}function gu(it,at,ct,dt){var pt=new Ss(it,ct,dt),Mt=it.cm;return Mt&&pt.noHScroll&&(Mt.display.alignWidgets=!0),hs(it,at,"widget",function(Rt){var te=Rt.widgets||(Rt.widgets=[]);if(pt.insertAt==null?te.push(pt):te.splice(Math.min(te.length-1,Math.max(0,pt.insertAt)),0,pt),pt.line=Rt,Mt&&!Zn(it,Rt)){var Xt=qo(Rt)<it.scrollTop;Re(Rt,Rt.height+ol(pt)),Xt&&bc(Mt,pt.height),Mt.curOp.forceUpdate=!0}return!0}),Mt&&vi(Mt,"lineWidgetAdded",Mt,pt,typeof at=="number"?at:_t(at)),pt}var uf=0,Ze=function(it,at){this.lines=[],this.type=at,this.doc=it,this.id=++uf};Ze.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,at=it&&!it.curOp;if(at&&ml(it),Kn(this,"clear")){var ct=this.find();ct&&vi(this,"clear",ct.from,ct.to)}for(var dt=null,pt=null,Mt=0;Mt<this.lines.length;++Mt){var Rt=this.lines[Mt],te=Yi(Rt.markedSpans,this);it&&!this.collapsed?Mr(it,_t(Rt),"text"):it&&(te.to!=null&&(pt=_t(Rt)),te.from!=null&&(dt=_t(Rt))),Rt.markedSpans=ji(Rt.markedSpans,te),te.from==null&&this.collapsed&&!Zn(this.doc,Rt)&&it&&Re(Rt,Gu(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Xt=0;Xt<this.lines.length;++Xt){var ve=Co(this.lines[Xt]),on=Or(ve);on>it.display.maxLineLength&&(it.display.maxLine=ve,it.display.maxLineLength=on,it.display.maxLineChanged=!0)}dt!=null&&it&&this.collapsed&&Ca(it,dt,pt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&Gl(it.doc)),it&&vi(it,"markerCleared",it,this,dt,pt),at&&Ph(it),this.parent&&this.parent.clear()}},Ze.prototype.find=function(it,at){it==null&&this.type=="bookmark"&&(it=1);for(var ct,dt,pt=0;pt<this.lines.length;++pt){var Mt=this.lines[pt],Rt=Yi(Mt.markedSpans,this);if(Rt.from!=null&&(ct=Oe(at?Mt:_t(Mt),Rt.from),it==-1))return ct;if(Rt.to!=null&&(dt=Oe(at?Mt:_t(Mt),Rt.to),it==1))return dt}return ct&&{from:ct,to:dt}},Ze.prototype.changed=function(){var it=this,at=this.find(-1,!0),ct=this,dt=this.doc.cm;!at||!dt||Ue(dt,function(){var pt=at.line,Mt=_t(at.line),Rt=mh(dt,Mt);if(Rt&&(ks(Rt),dt.curOp.selectionChanged=dt.curOp.forceUpdate=!0),dt.curOp.updateMaxLine=!0,!Zn(ct.doc,pt)&&ct.height!=null){var te=ct.height;ct.height=null;var Xt=ol(ct)-te;Xt&&Re(pt,pt.height+Xt)}vi(dt,"markerChanged",dt,it)})},Ze.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var at=this.doc.cm.curOp;(!at.maybeHiddenMarkers||Je(at.maybeHiddenMarkers,this)==-1)&&(at.maybeUnhiddenMarkers||(at.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},Ze.prototype.detachLine=function(it){if(this.lines.splice(Je(this.lines,it),1),!this.lines.length&&this.doc.cm){var at=this.doc.cm.curOp;(at.maybeHiddenMarkers||(at.maybeHiddenMarkers=[])).push(this)}},ci(Ze);function wh(it,at,ct,dt,pt){if(dt&&dt.shared)return hf(it,at,ct,dt,pt);if(it.cm&&!it.cm.curOp)return Ln(it.cm,wh)(it,at,ct,dt,pt);var Mt=new Ze(it,pt),Rt=Xe(at,ct);if(dt&&Mn(dt,Mt,!1),Rt>0||Rt==0&&Mt.clearWhenEmpty!==!1)return Mt;if(Mt.replacedWith&&(Mt.collapsed=!0,Mt.widgetNode=me("span",[Mt.replacedWith],"CodeMirror-widget"),dt.handleMouseEvents||Mt.widgetNode.setAttribute("cm-ignore-events","true"),dt.insertLeft&&(Mt.widgetNode.insertLeft=!0)),Mt.collapsed){if(_o(it,at.line,at,ct,Mt)||at.line!=ct.line&&_o(it,ct.line,at,ct,Mt))throw new Error("Inserting collapsed marker partially overlapping an existing one");tn()}Mt.addToHistory&&Hr(it,{from:at,to:ct,origin:"markText"},it.sel,NaN);var te=at.line,Xt=it.cm,ve;if(it.iter(te,ct.line+1,function(Ee){Xt&&Mt.collapsed&&!Xt.options.lineWrapping&&Co(Ee)==Xt.display.maxLine&&(ve=!0),Mt.collapsed&&te!=at.line&&Re(Ee,0),No(Ee,new Gi(Mt,te==at.line?at.ch:null,te==ct.line?ct.ch:null)),++te}),Mt.collapsed&&it.iter(at.line,ct.line+1,function(Ee){Zn(it,Ee)&&Re(Ee,0)}),Mt.clearOnEnter&&Yt(Mt,"beforeCursorEnter",function(){return Mt.clear()}),Mt.readOnly&&(Lo(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Mt.collapsed&&(Mt.id=++uf,Mt.atomic=!0),Xt){if(ve&&(Xt.curOp.updateMaxLine=!0),Mt.collapsed)Ca(Xt,at.line,ct.line+1);else if(Mt.className||Mt.startStyle||Mt.endStyle||Mt.css||Mt.attributes||Mt.title)for(var on=at.line;on<=ct.line;on++)Mr(Xt,on,"text");Mt.atomic&&Gl(Xt.doc),vi(Xt,"markerAdded",Xt,Mt)}return Mt}var _u=function(it,at){this.markers=it,this.primary=at;for(var ct=0;ct<it.length;++ct)it[ct].parent=this};_u.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();vi(this,"clear")}},_u.prototype.find=function(it,at){return this.primary.find(it,at)},ci(_u);function hf(it,at,ct,dt,pt){dt=Mn(dt),dt.shared=!1;var Mt=[wh(it,at,ct,dt,pt)],Rt=Mt[0],te=dt.widgetNode;return os(it,function(Xt){te&&(dt.widgetNode=te.cloneNode(!0)),Mt.push(wh(Xt,Qn(Xt,at),Qn(Xt,ct),dt,pt));for(var ve=0;ve<Xt.linked.length;++ve)if(Xt.linked[ve].isParent)return;Rt=de(Mt)}),new _u(Mt,Rt)}function gd(it){return it.findMarks(Oe(it.first,0),it.clipPos(Oe(it.lastLine())),function(at){return at.parent})}function Yh(it,at){for(var ct=0;ct<at.length;ct++){var dt=at[ct],pt=dt.find(),Mt=it.clipPos(pt.from),Rt=it.clipPos(pt.to);if(Xe(Mt,Rt)){var te=wh(it,Mt,Rt,dt.primary,dt.primary.type);dt.markers.push(te),te.parent=dt}}}function Mc(it){for(var at=function(dt){var pt=it[dt],Mt=[pt.primary.doc];os(pt.primary.doc,function(Xt){return Mt.push(Xt)});for(var Rt=0;Rt<pt.markers.length;Rt++){var te=pt.markers[Rt];Je(Mt,te.doc)==-1&&(te.parent=null,pt.markers.splice(Rt--,1))}},ct=0;ct<it.length;ct++)at(ct)}var Kg=0,Ts=function(it,at,ct,dt,pt){if(!(this instanceof Ts))return new Ts(it,at,ct,dt,pt);ct==null&&(ct=0),Kr.call(this,[new Ma([new Yo("",null)])]),this.first=ct,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ct;var Mt=Oe(ct,0);this.sel=br(Mt),this.history=new Ro(null),this.id=++Kg,this.modeOption=at,this.lineSep=dt,this.direction=pt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),ba(this,{from:Mt,to:Mt,text:it}),Sa(this,br(Mt),ze)};Ts.prototype=Pn(Kr.prototype,{constructor:Ts,iter:function(it,at,ct){ct?this.iterN(it-this.first,at-it,ct):this.iterN(this.first,this.first+this.size,it)},insert:function(it,at){for(var ct=0,dt=0;dt<at.length;++dt)ct+=at[dt].height;this.insertInner(it-this.first,at,ct)},remove:function(it,at){this.removeInner(it-this.first,at)},getValue:function(it){var at=In(this,this.first,this.first+this.size);return it===!1?at:at.join(it||this.lineSeparator())},setValue:wn(function(it){var at=Oe(this.first,0),ct=this.first+this.size-1;Wa(this,{from:at,to:Oe(ct,Ye(this,ct).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&Vh(this.cm,0,0),Sa(this,br(at),ze)}),replaceRange:function(it,at,ct,dt){at=Qn(this,at),ct=ct?Qn(this,ct):at,Ku(this,it,at,ct,dt)},getRange:function(it,at,ct){var dt=gn(this,Qn(this,it),Qn(this,at));return ct===!1?dt:dt.join(ct||this.lineSeparator())},getLine:function(it){var at=this.getLineHandle(it);return at&&at.text},getLineHandle:function(it){if(cn(this,it))return Ye(this,it)},getLineNumber:function(it){return _t(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Ye(this,it)),Co(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return Qn(this,it)},getCursor:function(it){var at=this.sel.primary(),ct;return it==null||it=="head"?ct=at.head:it=="anchor"?ct=at.anchor:it=="end"||it=="to"||it===!1?ct=at.to():ct=at.from(),ct},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:wn(function(it,at,ct){Ya(this,Qn(this,typeof it=="number"?Oe(it,at||0):it),null,ct)}),setSelection:wn(function(it,at,ct){Ya(this,Qn(this,it),Qn(this,at||it),ct)}),extendSelection:wn(function(it,at,ct){oa(this,Qn(this,it),at&&Qn(this,at),ct)}),extendSelections:wn(function(it,at){ca(this,Si(this,it),at)}),extendSelectionsBy:wn(function(it,at){var ct=vn(this.sel.ranges,it);ca(this,Si(this,ct),at)}),setSelections:wn(function(it,at,ct){if(it.length){for(var dt=[],pt=0;pt<it.length;pt++)dt[pt]=new ao(Qn(this,it[pt].anchor),Qn(this,it[pt].head));at==null&&(at=Math.min(it.length-1,this.sel.primIndex)),Sa(this,yr(this.cm,dt,at),ct)}}),addSelection:wn(function(it,at,ct){var dt=this.sel.ranges.slice(0);dt.push(new ao(Qn(this,it),Qn(this,at||it))),Sa(this,yr(this.cm,dt,dt.length-1),ct)}),getSelection:function(it){for(var at=this.sel.ranges,ct,dt=0;dt<at.length;dt++){var pt=gn(this,at[dt].from(),at[dt].to());ct=ct?ct.concat(pt):pt}return it===!1?ct:ct.join(it||this.lineSeparator())},getSelections:function(it){for(var at=[],ct=this.sel.ranges,dt=0;dt<ct.length;dt++){var pt=gn(this,ct[dt].from(),ct[dt].to());it!==!1&&(pt=pt.join(it||this.lineSeparator())),at[dt]=pt}return at},replaceSelection:function(it,at,ct){for(var dt=[],pt=0;pt<this.sel.ranges.length;pt++)dt[pt]=it;this.replaceSelections(dt,at,ct||"+input")},replaceSelections:wn(function(it,at,ct){for(var dt=[],pt=this.sel,Mt=0;Mt<pt.ranges.length;Mt++){var Rt=pt.ranges[Mt];dt[Mt]={from:Rt.from(),to:Rt.to(),text:this.splitLines(it[Mt]),origin:ct}}for(var te=at&&at!="end"&&Pr(this,dt,at),Xt=dt.length-1;Xt>=0;Xt--)Wa(this,dt[Xt]);te?Ir(this,te):this.cm&&yh(this.cm)}),undo:wn(function(){Zl(this,"undo")}),redo:wn(function(){Zl(this,"redo")}),undoSelection:wn(function(){Zl(this,"undo",!0)}),redoSelection:wn(function(){Zl(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,at=0,ct=0,dt=0;dt<it.done.length;dt++)it.done[dt].ranges||++at;for(var pt=0;pt<it.undone.length;pt++)it.undone[pt].ranges||++ct;return{undo:at,redo:ct}},clearHistory:function(){var it=this;this.history=new Ro(this.history.maxGeneration),os(this,function(at){return at.history=it.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(it){return it&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(it){return this.history.generation==(it||this.cleanGeneration)},getHistory:function(){return{done:ms(this.history.done),undone:ms(this.history.undone)}},setHistory:function(it){var at=this.history=new Ro(this.history.maxGeneration);at.done=ms(it.done.slice(0),null,!0),at.undone=ms(it.undone.slice(0),null,!0)},setGutterMarker:wn(function(it,at,ct){return hs(this,it,"gutter",function(dt){var pt=dt.gutterMarkers||(dt.gutterMarkers={});return pt[at]=ct,!ct&&Dt(pt)&&(dt.gutterMarkers=null),!0})}),clearGutter:wn(function(it){var at=this;this.iter(function(ct){ct.gutterMarkers&&ct.gutterMarkers[it]&&hs(at,ct,"gutter",function(){return ct.gutterMarkers[it]=null,Dt(ct.gutterMarkers)&&(ct.gutterMarkers=null),!0})})}),lineInfo:function(it){var at;if(typeof it=="number"){if(!cn(this,it)||(at=it,it=Ye(this,it),!it))return null}else if(at=_t(it),at==null)return null;return{line:at,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:wn(function(it,at,ct){return hs(this,it,at=="gutter"?"gutter":"class",function(dt){var pt=at=="text"?"textClass":at=="background"?"bgClass":at=="gutter"?"gutterClass":"wrapClass";if(!dt[pt])dt[pt]=ct;else{if(It(ct).test(dt[pt]))return!1;dt[pt]+=" "+ct}return!0})}),removeLineClass:wn(function(it,at,ct){return hs(this,it,at=="gutter"?"gutter":"class",function(dt){var pt=at=="text"?"textClass":at=="background"?"bgClass":at=="gutter"?"gutterClass":"wrapClass",Mt=dt[pt];if(Mt)if(ct==null)dt[pt]=null;else{var Rt=Mt.match(It(ct));if(!Rt)return!1;var te=Rt.index+Rt[0].length;dt[pt]=Mt.slice(0,Rt.index)+(!Rt.index||te==Mt.length?"":" ")+Mt.slice(te)||null}else return!1;return!0})}),addLineWidget:wn(function(it,at,ct){return gu(this,it,at,ct)}),removeLineWidget:function(it){it.clear()},markText:function(it,at,ct){return wh(this,Qn(this,it),Qn(this,at),ct,ct&&ct.type||"range")},setBookmark:function(it,at){var ct={replacedWith:at&&(at.nodeType==null?at.widget:at),insertLeft:at&&at.insertLeft,clearWhenEmpty:!1,shared:at&&at.shared,handleMouseEvents:at&&at.handleMouseEvents};return it=Qn(this,it),wh(this,it,it,ct,"bookmark")},findMarksAt:function(it){it=Qn(this,it);var at=[],ct=Ye(this,it.line).markedSpans;if(ct)for(var dt=0;dt<ct.length;++dt){var pt=ct[dt];(pt.from==null||pt.from<=it.ch)&&(pt.to==null||pt.to>=it.ch)&&at.push(pt.marker.parent||pt.marker)}return at},findMarks:function(it,at,ct){it=Qn(this,it),at=Qn(this,at);var dt=[],pt=it.line;return this.iter(it.line,at.line+1,function(Mt){var Rt=Mt.markedSpans;if(Rt)for(var te=0;te<Rt.length;te++){var Xt=Rt[te];!(Xt.to!=null&&pt==it.line&&it.ch>=Xt.to||Xt.from==null&&pt!=it.line||Xt.from!=null&&pt==at.line&&Xt.from>=at.ch)&&(!ct||ct(Xt.marker))&&dt.push(Xt.marker.parent||Xt.marker)}++pt}),dt},getAllMarks:function(){var it=[];return this.iter(function(at){var ct=at.markedSpans;if(ct)for(var dt=0;dt<ct.length;++dt)ct[dt].from!=null&&it.push(ct[dt].marker)}),it},posFromIndex:function(it){var at,ct=this.first,dt=this.lineSeparator().length;return this.iter(function(pt){var Mt=pt.text.length+dt;if(Mt>it)return at=it,!0;it-=Mt,++ct}),Qn(this,Oe(ct,at))},indexFromPos:function(it){it=Qn(this,it);var at=it.ch;if(it.line<this.first||it.ch<0)return 0;var ct=this.lineSeparator().length;return this.iter(this.first,it.line,function(dt){at+=dt.text.length+ct}),at},copy:function(it){var at=new Ts(In(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return at.scrollTop=this.scrollTop,at.scrollLeft=this.scrollLeft,at.sel=this.sel,at.extend=!1,it&&(at.history.undoDepth=this.history.undoDepth,at.setHistory(this.getHistory())),at},linkedDoc:function(it){it||(it={});var at=this.first,ct=this.first+this.size;it.from!=null&&it.from>at&&(at=it.from),it.to!=null&&it.to<ct&&(ct=it.to);var dt=new Ts(In(this,at,ct),it.mode||this.modeOption,at,this.lineSep,this.direction);return it.sharedHist&&(dt.history=this.history),(this.linked||(this.linked=[])).push({doc:dt,sharedHist:it.sharedHist}),dt.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],Yh(dt,gd(this)),dt},unlinkDoc:function(it){if(it instanceof ua&&(it=it.doc),this.linked)for(var at=0;at<this.linked.length;++at){var ct=this.linked[at];if(ct.doc==it){this.linked.splice(at,1),it.unlinkDoc(this),Mc(gd(this));break}}if(it.history==this.history){var dt=[it.id];os(it,function(pt){return dt.push(pt.id)},!0),it.history=new Ro(null),it.history.done=ms(this.history.done,dt),it.history.undone=ms(this.history.undone,dt)}},iterLinkedDocs:function(it){os(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):Sn(it)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:wn(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(at){return at.order=null}),this.cm&&sr(this.cm))})}),Ts.prototype.eachLine=Ts.prototype.iter;var Kd=0;function Lc(it){var at=this;if(Vf(at),!(Nn(at,it)||rl(at.display,it))){Ci(it),Ut&&(Kd=+new Date);var ct=al(at,it,!0),dt=it.dataTransfer.files;if(!(!ct||at.isReadOnly()))if(dt&&dt.length&&window.FileReader&&window.File)for(var pt=dt.length,Mt=Array(pt),Rt=0,te=function(){++Rt==pt&&Ln(at,function(){ct=Qn(at.doc,ct);var Cn={from:ct,to:ct,text:at.doc.splitLines(Mt.filter(function(wi){return wi!=null}).join(at.doc.lineSeparator())),origin:"paste"};Wa(at.doc,Cn),Ir(at.doc,br(Qn(at.doc,ct),Qn(at.doc,na(Cn))))})()},Xt=function(Cn,wi){if(at.options.allowDropFileTypes&&Je(at.options.allowDropFileTypes,Cn.type)==-1){te();return}var Li=new FileReader;Li.onerror=function(){return te()},Li.onload=function(){var Ai=Li.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ai)){te();return}Mt[wi]=Ai,te()},Li.readAsText(Cn)},ve=0;ve<dt.length;ve++)Xt(dt[ve],ve);else{if(at.state.draggingText&&at.doc.sel.contains(ct)>-1){at.state.draggingText(it),setTimeout(function(){return at.display.input.focus()},20);return}try{var on=it.dataTransfer.getData("Text");if(on){var Ee;if(at.state.draggingText&&!at.state.draggingText.copy&&(Ee=at.listSelections()),ys(at.doc,br(ct,ct)),Ee)for(var On=0;On<Ee.length;++On)Ku(at.doc,"",Ee[On].anchor,Ee[On].head,"drag");at.replaceSelection(on,"around","paste"),at.display.input.focus()}}catch(Cn){}}}}function _d(it,at){if(Ut&&(!it.state.draggingText||+new Date-Kd<100)){mo(at);return}if(!(Nn(it,at)||rl(it.display,at))&&(at.dataTransfer.setData("Text",it.getSelection()),at.dataTransfer.effectAllowed="copyMove",at.dataTransfer.setDragImage&&!ce)){var ct=ne("img",null,null,"position: fixed; left: 0; top: 0;");ct.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",qt&&(ct.width=ct.height=1,it.display.wrapper.appendChild(ct),ct._top=ct.offsetTop),at.dataTransfer.setDragImage(ct,0,0),qt&&ct.parentNode.removeChild(ct)}}function df(it,at){var ct=al(it,at);if(ct){var dt=document.createDocumentFragment();Zr(it,ct,dt),it.display.dragCursor||(it.display.dragCursor=ne("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),re(it.display.dragCursor,dt)}}function Vf(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function cf(it){if(document.getElementsByClassName){for(var at=document.getElementsByClassName("CodeMirror"),ct=[],dt=0;dt<at.length;dt++){var pt=at[dt].CodeMirror;pt&&ct.push(pt)}ct.length&&ct[0].operation(function(){for(var Mt=0;Mt<ct.length;Mt++)it(ct[Mt])})}}var kc=!1;function Wl(){kc||(pd(),kc=!0)}function pd(){var it;Yt(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,cf(ff)},100))}),Yt(window,"blur",function(){return cf(_h)})}function ff(it){var at=it.display;at.cachedCharWidth=at.cachedTextHeight=at.cachedPaddingH=null,at.scrollbarsClipped=!1,it.setSize()}for(var Lu={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"},Ch=0;Ch<10;Ch++)Lu[Ch+48]=Lu[Ch+96]=String(Ch);for(var md=65;md<=90;md++)Lu[md]=String.fromCharCode(md);for(var Xh=1;Xh<=12;Xh++)Lu[Xh+111]=Lu[Xh+63235]="F"+Xh;var Sl={};Sl.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"},Sl.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"},Sl.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"},Sl.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"]},Sl.default=ht?Sl.macDefault:Sl.pcDefault;function Nc(it){var at=it.split(/-(?!$)/);it=at[at.length-1];for(var ct,dt,pt,Mt,Rt=0;Rt<at.length-1;Rt++){var te=at[Rt];if(/^(cmd|meta|m)$/i.test(te))Mt=!0;else if(/^a(lt)?$/i.test(te))ct=!0;else if(/^(c|ctrl|control)$/i.test(te))dt=!0;else if(/^s(hift)?$/i.test(te))pt=!0;else throw new Error("Unrecognized modifier name: "+te)}return ct&&(it="Alt-"+it),dt&&(it="Ctrl-"+it),Mt&&(it="Cmd-"+it),pt&&(it="Shift-"+it),it}function Tc(it){var at={};for(var ct in it)if(it.hasOwnProperty(ct)){var dt=it[ct];if(/^(name|fallthrough|(de|at)tach)$/.test(ct))continue;if(dt=="..."){delete it[ct];continue}for(var pt=vn(ct.split(" "),Nc),Mt=0;Mt<pt.length;Mt++){var Rt=void 0,te=void 0;Mt==pt.length-1?(te=pt.join(" "),Rt=dt):(te=pt.slice(0,Mt+1).join(" "),Rt="...");var Xt=at[te];if(!Xt)at[te]=Rt;else if(Xt!=Rt)throw new Error("Inconsistent bindings for "+te)}delete it[ct]}for(var ve in at)it[ve]=at[ve];return it}function Kl(it,at,ct,dt){at=bh(at);var pt=at.call?at.call(it,dt):at[it];if(pt===!1)return"nothing";if(pt==="...")return"multi";if(pt!=null&&ct(pt))return"handled";if(at.fallthrough){if(Object.prototype.toString.call(at.fallthrough)!="[object Array]")return Kl(it,at.fallthrough,ct,dt);for(var Mt=0;Mt<at.fallthrough.length;Mt++){var Rt=Kl(it,at.fallthrough[Mt],ct,dt);if(Rt)return Rt}}}function vd(it){var at=typeof it=="string"?it:Lu[it.keyCode];return at=="Ctrl"||at=="Alt"||at=="Shift"||at=="Mod"}function Oc(it,at,ct){var dt=it;return at.altKey&&dt!="Alt"&&(it="Alt-"+it),(wt?at.metaKey:at.ctrlKey)&&dt!="Ctrl"&&(it="Ctrl-"+it),(wt?at.ctrlKey:at.metaKey)&&dt!="Mod"&&(it="Cmd-"+it),!ct&&at.shiftKey&&dt!="Shift"&&(it="Shift-"+it),it}function Fc(it,at){if(qt&&it.keyCode==34&&it.char)return!1;var ct=Lu[it.keyCode];return ct==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(ct=it.code),Oc(ct,it,at))}function bh(it){return typeof it=="string"?Sl[it]:it}function ll(it,at){for(var ct=it.doc.sel.ranges,dt=[],pt=0;pt<ct.length;pt++){for(var Mt=at(ct[pt]);dt.length&&Xe(Mt.from,de(dt).to)<=0;){var Rt=dt.pop();if(Xe(Rt.from,Mt.from)<0){Mt.from=Rt.from;break}}dt.push(Mt)}Ue(it,function(){for(var te=dt.length-1;te>=0;te--)Ku(it.doc,"",dt[te].from,dt[te].to,"+delete");yh(it)})}function Ic(it,at,ct){var dt=ee(it.text,at+ct,ct);return dt<0||dt>it.text.length?null:dt}function ds(it,at,ct){var dt=Ic(it,at.ch,ct);return dt==null?null:new Oe(at.line,dt,ct<0?"after":"before")}function ra(it,at,ct,dt,pt){if(it){at.doc.direction=="rtl"&&(pt=-pt);var Mt=zt(ct,at.doc.direction);if(Mt){var Rt=pt<0?de(Mt):Mt[0],te=pt<0==(Rt.level==1),Xt=te?"after":"before",ve;if(Rt.level>0||at.doc.direction=="rtl"){var on=zu(at,ct);ve=pt<0?ct.text.length-1:0;var Ee=zl(at,on,ve).top;ve=Kt(function(On){return zl(at,on,On).top==Ee},pt<0==(Rt.level==1)?Rt.from:Rt.to-1,ve),Xt=="before"&&(ve=Ic(ct,ve,1))}else ve=pt<0?Rt.to:Rt.from;return new Oe(dt,ve,Xt)}}return new Oe(dt,pt<0?ct.text.length:0,pt<0?"before":"after")}function Fa(it,at,ct,dt){var pt=zt(at,it.doc.direction);if(!pt)return ds(at,ct,dt);ct.ch>=at.text.length?(ct.ch=at.text.length,ct.sticky="before"):ct.ch<=0&&(ct.ch=0,ct.sticky="after");var Mt=mt(pt,ct.ch,ct.sticky),Rt=pt[Mt];if(it.doc.direction=="ltr"&&Rt.level%2==0&&(dt>0?Rt.to>ct.ch:Rt.from<ct.ch))return ds(at,ct,dt);var te=function(so,Fo){return Ic(at,so instanceof Oe?so.ch:so,Fo)},Xt,ve=function(so){return it.options.lineWrapping?(Xt=Xt||zu(it,at),cd(it,at,Xt,so)):{begin:0,end:at.text.length}},on=ve(ct.sticky=="before"?te(ct,-1):ct.ch);if(it.doc.direction=="rtl"||Rt.level==1){var Ee=Rt.level==1==dt<0,On=te(ct,Ee?1:-1);if(On!=null&&(Ee?On<=Rt.to&&On<=on.end:On>=Rt.from&&On>=on.begin)){var Cn=Ee?"before":"after";return new Oe(ct.line,On,Cn)}}var wi=function(so,Fo,Eo){for(var Ko=function(Ja,js){return js?new Oe(ct.line,te(Ja,1),"before"):new Oe(ct.line,Ja,"after")};so>=0&&so<pt.length;so+=Fo){var Sr=pt[so],wo=Fo>0==(Sr.level!=1),Br=wo?Eo.begin:te(Eo.end,-1);if(Sr.from<=Br&&Br<Sr.to||(Br=wo?Sr.from:te(Sr.to,-1),Eo.begin<=Br&&Br<Eo.end))return Ko(Br,wo)}},Li=wi(Mt+dt,dt,on);if(Li)return Li;var Ai=dt>0?on.end:te(on.begin,-1);return Ai!=null&&!(dt>0&&Ai==at.text.length)&&(Li=wi(dt>0?0:pt.length-1,dt,ve(Ai)),Li)?Li:null}var Rs={selectAll:la,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),ze)},killLine:function(it){return ll(it,function(at){if(at.empty()){var ct=Ye(it.doc,at.head.line).text.length;return at.head.ch==ct&&at.head.line<it.lastLine()?{from:at.head,to:Oe(at.head.line+1,0)}:{from:at.head,to:Oe(at.head.line,ct)}}else return{from:at.from(),to:at.to()}})},deleteLine:function(it){return ll(it,function(at){return{from:Oe(at.from().line,0),to:Qn(it.doc,Oe(at.to().line+1,0))}})},delLineLeft:function(it){return ll(it,function(at){return{from:Oe(at.from().line,0),to:at.from()}})},delWrappedLineLeft:function(it){return ll(it,function(at){var ct=it.charCoords(at.head,"div").top+5,dt=it.coordsChar({left:0,top:ct},"div");return{from:dt,to:at.from()}})},delWrappedLineRight:function(it){return ll(it,function(at){var ct=it.charCoords(at.head,"div").top+5,dt=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div");return{from:at.from(),to:dt}})},undo:function(it){return it.undo()},redo:function(it){return it.redo()},undoSelection:function(it){return it.undoSelection()},redoSelection:function(it){return it.redoSelection()},goDocStart:function(it){return it.extendSelection(Oe(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(Oe(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(at){return nu(it,at.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(at){return Bc(it,at.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(at){return iu(it,at.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(at){var ct=it.cursorCoords(at.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div")},dn)},goLineLeft:function(it){return it.extendSelectionsBy(function(at){var ct=it.cursorCoords(at.head,"div").top+5;return it.coordsChar({left:0,top:ct},"div")},dn)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(at){var ct=it.cursorCoords(at.head,"div").top+5,dt=it.coordsChar({left:0,top:ct},"div");return dt.ch<it.getLine(dt.line).search(/\S/)?Bc(it,at.head):dt},dn)},goLineUp:function(it){return it.moveV(-1,"line")},goLineDown:function(it){return it.moveV(1,"line")},goPageUp:function(it){return it.moveV(-1,"page")},goPageDown:function(it){return it.moveV(1,"page")},goCharLeft:function(it){return it.moveH(-1,"char")},goCharRight:function(it){return it.moveH(1,"char")},goColumnLeft:function(it){return it.moveH(-1,"column")},goColumnRight:function(it){return it.moveH(1,"column")},goWordLeft:function(it){return it.moveH(-1,"word")},goGroupRight:function(it){return it.moveH(1,"group")},goGroupLeft:function(it){return it.moveH(-1,"group")},goWordRight:function(it){return it.moveH(1,"word")},delCharBefore:function(it){return it.deleteH(-1,"codepoint")},delCharAfter:function(it){return it.deleteH(1,"char")},delWordBefore:function(it){return it.deleteH(-1,"word")},delWordAfter:function(it){return it.deleteH(1,"word")},delGroupBefore:function(it){return it.deleteH(-1,"group")},delGroupAfter:function(it){return it.deleteH(1,"group")},indentAuto:function(it){return it.indentSelection("smart")},indentMore:function(it){return it.indentSelection("add")},indentLess:function(it){return it.indentSelection("subtract")},insertTab:function(it){return it.replaceSelection(" ")},insertSoftTab:function(it){for(var at=[],ct=it.listSelections(),dt=it.options.tabSize,pt=0;pt<ct.length;pt++){var Mt=ct[pt].from(),Rt=xe(it.getLine(Mt.line),Mt.ch,dt);at.push(pn(dt-Rt%dt))}it.replaceSelections(at)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return Ue(it,function(){for(var at=it.listSelections(),ct=[],dt=0;dt<at.length;dt++)if(at[dt].empty()){var pt=at[dt].head,Mt=Ye(it.doc,pt.line).text;if(Mt){if(pt.ch==Mt.length&&(pt=new Oe(pt.line,pt.ch-1)),pt.ch>0)pt=new Oe(pt.line,pt.ch+1),it.replaceRange(Mt.charAt(pt.ch-1)+Mt.charAt(pt.ch-2),Oe(pt.line,pt.ch-2),pt,"+transpose");else if(pt.line>it.doc.first){var Rt=Ye(it.doc,pt.line-1).text;Rt&&(pt=new Oe(pt.line,1),it.replaceRange(Mt.charAt(0)+it.doc.lineSeparator()+Rt.charAt(Rt.length-1),Oe(pt.line-1,Rt.length-1),pt,"+transpose"))}}ct.push(new ao(pt,pt))}it.setSelections(ct)})},newlineAndIndent:function(it){return Ue(it,function(){for(var at=it.listSelections(),ct=at.length-1;ct>=0;ct--)it.replaceRange(it.doc.lineSeparator(),at[ct].anchor,at[ct].head,"+input");at=it.listSelections();for(var dt=0;dt<at.length;dt++)it.indentLine(at[dt].from().line,null,!0);yh(it)})},openLine:function(it){return it.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function nu(it,at){var ct=Ye(it.doc,at),dt=Co(ct);return dt!=ct&&(at=_t(dt)),ra(!0,it,dt,at,1)}function iu(it,at){var ct=Ye(it.doc,at),dt=lr(ct);return dt!=ct&&(at=_t(dt)),ra(!0,it,ct,at,-1)}function Bc(it,at){var ct=nu(it,at.line),dt=Ye(it.doc,ct.line),pt=zt(dt,it.doc.direction);if(!pt||pt[0].level==0){var Mt=Math.max(ct.ch,dt.text.search(/\S/)),Rt=at.line==ct.line&&at.ch<=Mt&&at.ch;return Oe(ct.line,Rt?0:Mt,ct.sticky)}return ct}function Eh(it,at,ct){if(typeof at=="string"&&(at=Rs[at],!at))return!1;it.display.input.ensurePolled();var dt=it.display.shift,pt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),ct&&(it.display.shift=!1),pt=at(it)!=An}finally{it.display.shift=dt,it.state.suppressEdits=!1}return pt}function Vd(it,at,ct){for(var dt=0;dt<it.state.keyMaps.length;dt++){var pt=Kl(at,it.state.keyMaps[dt],ct,it);if(pt)return pt}return it.options.extraKeys&&Kl(at,it.options.extraKeys,ct,it)||Kl(at,it.options.keyMap,ct,it)}var pu=new Ht;function rh(it,at,ct,dt){var pt=it.state.keySeq;if(pt){if(vd(at))return"handled";if(/\'$/.test(at)?it.state.keySeq=null:pu.set(50,function(){it.state.keySeq==pt&&(it.state.keySeq=null,it.display.input.reset())}),Uf(it,pt+" "+at,ct,dt))return!0}return Uf(it,at,ct,dt)}function Uf(it,at,ct,dt){var pt=Vd(it,at,dt);return pt=="multi"&&(it.state.keySeq=at),pt=="handled"&&vi(it,"keyHandled",it,at,ct),(pt=="handled"||pt=="multi")&&(Ci(ct),pa(it)),!!pt}function Yf(it,at){var ct=Fc(at,!0);return ct?at.shiftKey&&!it.state.keySeq?rh(it,"Shift-"+ct,at,function(dt){return Eh(it,dt,!0)})||rh(it,ct,at,function(dt){if(typeof dt=="string"?/^go[A-Z]/.test(dt):dt.motion)return Eh(it,dt)}):rh(it,ct,at,function(dt){return Eh(it,dt)}):!1}function Xf(it,at,ct){return rh(it,"'"+ct+"'",at,function(dt){return Eh(it,dt,!0)})}var Ud=null;function _g(it){var at=this;if(!(it.target&&it.target!=at.display.input.getField())&&(at.curOp.focus=he(),!Nn(at,it))){Ut&&pe<11&&it.keyCode==27&&(it.returnValue=!1);var ct=it.keyCode;at.display.shift=ct==16||it.shiftKey;var dt=Yf(at,it);qt&&(Ud=dt?ct:null,!dt&&ct==88&&!Yn&&(ht?it.metaKey:it.ctrlKey)&&at.replaceSelection("",null,"cut")),Ot&&!ht&&!dt&&ct==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),ct==18&&!/\bCodeMirror-crosshair\b/.test(at.display.lineDiv.className)&&Vg(at)}}function Vg(it){var at=it.display.lineDiv;Ge(at,"CodeMirror-crosshair");function ct(dt){(dt.keyCode==18||!dt.altKey)&&(At(at,"CodeMirror-crosshair"),ln(document,"keyup",ct),ln(document,"mouseover",ct))}Yt(document,"keyup",ct),Yt(document,"mouseover",ct)}function Ug(it){it.keyCode==16&&(this.doc.sel.shift=!1),Nn(this,it)}function ah(it){var at=this;if(!(it.target&&it.target!=at.display.input.getField())&&!(rl(at.display,it)||Nn(at,it)||it.ctrlKey&&!it.altKey||ht&&it.metaKey)){var ct=it.keyCode,dt=it.charCode;if(qt&&ct==Ud){Ud=null,Ci(it);return}if(!(qt&&(!it.which||it.which<10)&&Yf(at,it))){var pt=String.fromCharCode(dt==null?ct:dt);pt!="\b"&&(Xf(at,it,pt)||at.display.input.onKeyPress(it))}}}var om=400,Yg=function(it,at,ct){this.time=it,this.pos=at,this.button=ct};Yg.prototype.compare=function(it,at,ct){return this.time+om>it&&Xe(at,this.pos)==0&&ct==this.button};var Dc,Yd;function Xg(it,at){var ct=+new Date;return Yd&&Yd.compare(ct,it,at)?(Dc=Yd=null,"triple"):Dc&&Dc.compare(ct,it,at)?(Yd=new Yg(ct,it,at),Dc=null,"double"):(Dc=new Yg(ct,it,at),Yd=null,"single")}function sh(it){var at=this,ct=at.display;if(!(Nn(at,it)||ct.activeTouch&&ct.input.supportsTouch())){if(ct.input.ensurePolled(),ct.shift=it.shiftKey,rl(ct,it)){Nt||(ct.scroller.draggable=!1,setTimeout(function(){return ct.scroller.draggable=!0},100));return}if(!qf(at,it)){var dt=al(at,it),pt=Ao(it),Mt=dt?Xg(dt,pt):"single";window.focus(),pt==1&&at.state.selectingText&&at.state.selectingText(it),!(dt&&Jg(at,pt,dt,Mt,it))&&(pt==1?dt?rm(at,dt,Mt,it):Bo(it)==ct.scroller&&Ci(it):pt==2?(dt&&oa(at.doc,dt),setTimeout(function(){return ct.input.focus()},20)):pt==3&&(Ft?at.display.input.onContextMenu(it):Ua(at)))}}}function Jg(it,at,ct,dt,pt){var Mt="Click";return dt=="double"?Mt="Double"+Mt:dt=="triple"&&(Mt="Triple"+Mt),Mt=(at==1?"Left":at==2?"Middle":"Right")+Mt,rh(it,Oc(Mt,pt),pt,function(Rt){if(typeof Rt=="string"&&(Rt=Rs[Rt]),!Rt)return!1;var te=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),te=Rt(it,ct)!=An}finally{it.state.suppressEdits=!1}return te})}function Jf(it,at,ct){var dt=it.getOption("configureMouse"),pt=dt?dt(it,at,ct):{};if(pt.unit==null){var Mt=st?ct.shiftKey&&ct.metaKey:ct.altKey;pt.unit=Mt?"rectangle":at=="single"?"char":at=="double"?"word":"line"}return(pt.extend==null||it.doc.extend)&&(pt.extend=it.doc.extend||ct.shiftKey),pt.addNew==null&&(pt.addNew=ht?ct.metaKey:ct.ctrlKey),pt.moveOnDrag==null&&(pt.moveOnDrag=!(ht?ct.altKey:ct.ctrlKey)),pt}function rm(it,at,ct,dt){Ut?setTimeout(sn(Ba,it),0):it.curOp.focus=he();var pt=Jf(it,ct,dt),Mt=it.doc.sel,Rt;it.options.dragDrop&&oi&&!it.isReadOnly()&&ct=="single"&&(Rt=Mt.contains(at))>-1&&(Xe((Rt=Mt.ranges[Rt]).from(),at)<0||at.xRel>0)&&(Xe(Rt.to(),at)>0||at.xRel<0)?Qg(it,dt,at,pt):ev(it,dt,at,pt)}function Qg(it,at,ct,dt){var pt=it.display,Mt=!1,Rt=Ln(it,function(ve){Nt&&(pt.scroller.draggable=!1),it.state.draggingText=!1,ln(pt.wrapper.ownerDocument,"mouseup",Rt),ln(pt.wrapper.ownerDocument,"mousemove",te),ln(pt.scroller,"dragstart",Xt),ln(pt.scroller,"drop",Rt),Mt||(Ci(ve),dt.addNew||oa(it.doc,ct,null,null,dt.extend),Nt&&!ce||Ut&&pe==9?setTimeout(function(){pt.wrapper.ownerDocument.body.focus({preventScroll:!0}),pt.input.focus()},20):pt.input.focus())}),te=function(ve){Mt=Mt||Math.abs(at.clientX-ve.clientX)+Math.abs(at.clientY-ve.clientY)>=10},Xt=function(){return Mt=!0};Nt&&(pt.scroller.draggable=!0),it.state.draggingText=Rt,Rt.copy=!dt.moveOnDrag,pt.scroller.dragDrop&&pt.scroller.dragDrop(),Yt(pt.wrapper.ownerDocument,"mouseup",Rt),Yt(pt.wrapper.ownerDocument,"mousemove",te),Yt(pt.scroller,"dragstart",Xt),Yt(pt.scroller,"drop",Rt),Ua(it),setTimeout(function(){return pt.input.focus()},20)}function qg(it,at,ct){if(ct=="char")return new ao(at,at);if(ct=="word")return it.findWordAt(at);if(ct=="line")return new ao(Oe(at.line,0),Qn(it.doc,Oe(at.line+1,0)));var dt=ct(it,at);return new ao(dt.from,dt.to)}function ev(it,at,ct,dt){var pt=it.display,Mt=it.doc;Ci(at);var Rt,te,Xt=Mt.sel,ve=Xt.ranges;if(dt.addNew&&!dt.extend?(te=Mt.sel.contains(ct),te>-1?Rt=ve[te]:Rt=new ao(ct,ct)):(Rt=Mt.sel.primary(),te=Mt.sel.primIndex),dt.unit=="rectangle")dt.addNew||(Rt=new ao(ct,ct)),ct=al(it,at,!0,!0),te=-1;else{var on=qg(it,ct,dt.unit);dt.extend?Rt=Wu(Rt,on.anchor,on.head,dt.extend):Rt=on}dt.addNew?te==-1?(te=ve.length,Sa(Mt,yr(it,ve.concat([Rt]),te),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[te].empty()&&dt.unit=="char"&&!dt.extend?(Sa(Mt,yr(it,ve.slice(0,te).concat(ve.slice(te+1)),0),{scroll:!1,origin:"*mouse"}),Xt=Mt.sel):ma(Mt,te,Rt,Te):(te=0,Sa(Mt,new rr([Rt],0),Te),Xt=Mt.sel);var Ee=ct;function On(Eo){if(Xe(Ee,Eo)!=0)if(Ee=Eo,dt.unit=="rectangle"){for(var Ko=[],Sr=it.options.tabSize,wo=xe(Ye(Mt,ct.line).text,ct.ch,Sr),Br=xe(Ye(Mt,Eo.line).text,Eo.ch,Sr),Ja=Math.min(wo,Br),js=Math.max(wo,Br),rs=Math.min(ct.line,Eo.line),Vl=Math.min(it.lastLine(),Math.max(ct.line,Eo.line));rs<=Vl;rs++){var xl=Ye(Mt,rs).text,Fs=Hn(xl,Ja,Sr);Ja==js?Ko.push(new ao(Oe(rs,Fs),Oe(rs,Fs))):xl.length>Fs&&Ko.push(new ao(Oe(rs,Fs),Oe(rs,Hn(xl,js,Sr))))}Ko.length||Ko.push(new ao(ct,ct)),Sa(Mt,yr(it,Xt.ranges.slice(0,te).concat(Ko),te),{origin:"*mouse",scroll:!1}),it.scrollIntoView(Eo)}else{var ou=Rt,ul=qg(it,Eo,dt.unit),Is=ou.anchor,fa;Xe(ul.anchor,Is)>0?(fa=ul.head,Is=Rn(ou.from(),ul.anchor)):(fa=ul.anchor,Is=Jn(ou.to(),ul.head));var cs=Xt.ranges.slice(0);cs[te]=am(it,new ao(Qn(Mt,Is),fa)),Sa(Mt,yr(it,cs,te),Te)}}var Cn=pt.wrapper.getBoundingClientRect(),wi=0;function Li(Eo){var Ko=++wi,Sr=al(it,Eo,!0,dt.unit=="rectangle");if(Sr)if(Xe(Sr,Ee)!=0){it.curOp.focus=he(),On(Sr);var wo=jr(pt,Mt);(Sr.line>=wo.to||Sr.line<wo.from)&&setTimeout(Ln(it,function(){wi==Ko&&Li(Eo)}),150)}else{var Br=Eo.clientY<Cn.top?-20:Eo.clientY>Cn.bottom?20:0;Br&&setTimeout(Ln(it,function(){wi==Ko&&(pt.scroller.scrollTop+=Br,Li(Eo))}),50)}}function Ai(Eo){it.state.selectingText=!1,wi=1/0,Eo&&(Ci(Eo),pt.input.focus()),ln(pt.wrapper.ownerDocument,"mousemove",so),ln(pt.wrapper.ownerDocument,"mouseup",Fo),Mt.history.lastSelOrigin=null}var so=Ln(it,function(Eo){Eo.buttons===0||!Ao(Eo)?Ai(Eo):Li(Eo)}),Fo=Ln(it,Ai);it.state.selectingText=Fo,Yt(pt.wrapper.ownerDocument,"mousemove",so),Yt(pt.wrapper.ownerDocument,"mouseup",Fo)}function am(it,at){var ct=at.anchor,dt=at.head,pt=Ye(it.doc,ct.line);if(Xe(ct,dt)==0&&ct.sticky==dt.sticky)return at;var Mt=zt(pt);if(!Mt)return at;var Rt=mt(Mt,ct.ch,ct.sticky),te=Mt[Rt];if(te.from!=ct.ch&&te.to!=ct.ch)return at;var Xt=Rt+(te.from==ct.ch==(te.level!=1)?0:1);if(Xt==0||Xt==Mt.length)return at;var ve;if(dt.line!=ct.line)ve=(dt.line-ct.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var on=mt(Mt,dt.ch,dt.sticky),Ee=on-Rt||(dt.ch-ct.ch)*(te.level==1?-1:1);on==Xt-1||on==Xt?ve=Ee<0:ve=Ee>0}var On=Mt[Xt+(ve?-1:0)],Cn=ve==(On.level==1),wi=Cn?On.from:On.to,Li=Cn?"after":"before";return ct.ch==wi&&ct.sticky==Li?at:new ao(new Oe(ct.line,wi,Li),dt)}function Qf(it,at,ct,dt){var pt,Mt;if(at.touches)pt=at.touches[0].clientX,Mt=at.touches[0].clientY;else try{pt=at.clientX,Mt=at.clientY}catch(On){return!1}if(pt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;dt&&Ci(at);var Rt=it.display,te=Rt.lineDiv.getBoundingClientRect();if(Mt>te.bottom||!Kn(it,ct))return Oi(at);Mt-=te.top-Rt.viewOffset;for(var Xt=0;Xt<it.display.gutterSpecs.length;++Xt){var ve=Rt.gutters.childNodes[Xt];if(ve&&ve.getBoundingClientRect().right>=pt){var on=nn(it.doc,Mt),Ee=it.display.gutterSpecs[Xt];return qe(it,ct,it,on,Ee.className,at),Oi(at)}}}function qf(it,at){return Qf(it,at,"gutterClick",!0)}function tg(it,at){rl(it.display,at)||sm(it,at)||Nn(it,at,"contextmenu")||Ft||it.display.input.onContextMenu(at)}function sm(it,at){return Kn(it,"gutterContextMenu")?Qf(it,at,"gutterContextMenu",!1):!1}function eg(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ga(it)}var yd={toString:function(){return"CodeMirror.Init"}},tp={},gf={};function lm(it){var at=it.optionHandlers;function ct(dt,pt,Mt,Rt){it.defaults[dt]=pt,Mt&&(at[dt]=Rt?function(te,Xt,ve){ve!=yd&&Mt(te,Xt,ve)}:Mt)}it.defineOption=ct,it.Init=yd,ct("value","",function(dt,pt){return dt.setValue(pt)},!0),ct("mode",null,function(dt,pt){dt.doc.modeOption=pt,Uo(dt)},!0),ct("indentUnit",2,Uo,!0),ct("indentWithTabs",!1),ct("smartIndent",!0),ct("tabSize",4,function(dt){_r(dt),Ga(dt),Ca(dt)},!0),ct("lineSeparator",null,function(dt,pt){if(dt.doc.lineSep=pt,!!pt){var Mt=[],Rt=dt.doc.first;dt.doc.iter(function(Xt){for(var ve=0;;){var on=Xt.text.indexOf(pt,ve);if(on==-1)break;ve=on+pt.length,Mt.push(Oe(Rt,on))}Rt++});for(var te=Mt.length-1;te>=0;te--)Ku(dt.doc,pt,Mt[te],Oe(Mt[te].line,Mt[te].ch+pt.length))}}),ct("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(dt,pt,Mt){dt.state.specialChars=new RegExp(pt.source+(pt.test(" ")?"":"| "),"g"),Mt!=yd&&dt.refresh()}),ct("specialCharPlaceholder",Jr,function(dt){return dt.refresh()},!0),ct("electricChars",!0),ct("inputStyle",nt?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ct("spellcheck",!1,function(dt,pt){return dt.getInputField().spellcheck=pt},!0),ct("autocorrect",!1,function(dt,pt){return dt.getInputField().autocorrect=pt},!0),ct("autocapitalize",!1,function(dt,pt){return dt.getInputField().autocapitalize=pt},!0),ct("rtlMoveVisually",!gt),ct("wholeLineUpdateBefore",!0),ct("theme","default",function(dt){eg(dt),po(dt)},!0),ct("keyMap","default",function(dt,pt,Mt){var Rt=bh(pt),te=Mt!=yd&&bh(Mt);te&&te.detach&&te.detach(dt,Rt),Rt.attach&&Rt.attach(dt,te||null)}),ct("extraKeys",null),ct("configureMouse",null),ct("lineWrapping",!1,um,!0),ct("gutters",[],function(dt,pt){dt.display.gutterSpecs=Io(pt,dt.options.lineNumbers),po(dt)},!0),ct("fixedGutter",!0,function(dt,pt){dt.display.gutters.style.left=pt?fd(dt.display)+"px":"0",dt.refresh()},!0),ct("coverGutterNextToScrollbar",!1,function(dt){return xh(dt)},!0),ct("scrollbarStyle","native",function(dt){lf(dt),xh(dt),dt.display.scrollbars.setScrollTop(dt.doc.scrollTop),dt.display.scrollbars.setScrollLeft(dt.doc.scrollLeft)},!0),ct("lineNumbers",!1,function(dt,pt){dt.display.gutterSpecs=Io(dt.options.gutters,pt),po(dt)},!0),ct("firstLineNumber",1,po,!0),ct("lineNumberFormatter",function(dt){return dt},po,!0),ct("showCursorWhenSelecting",!1,Cs,!0),ct("resetSelectionOnContextMenu",!0),ct("lineWiseCopyCut",!0),ct("pasteLinesPerSelection",!0),ct("selectionsMayTouch",!1),ct("readOnly",!1,function(dt,pt){pt=="nocursor"&&(_h(dt),dt.display.input.blur()),dt.display.input.readOnlyChanged(pt)}),ct("screenReaderLabel",null,function(dt,pt){pt=pt===""?null:pt,dt.display.input.screenReaderLabelChanged(pt)}),ct("disableInput",!1,function(dt,pt){pt||dt.display.input.reset()},!0),ct("dragDrop",!0,ng),ct("allowDropFileTypes",null),ct("cursorBlinkRate",530),ct("cursorScrollMargin",0),ct("cursorHeight",1,Cs,!0),ct("singleCursorHeightPerLine",!0,Cs,!0),ct("workTime",100),ct("workDelay",100),ct("flattenSpans",!0,_r,!0),ct("addModeClass",!1,_r,!0),ct("pollInterval",100),ct("undoDepth",200,function(dt,pt){return dt.doc.history.undoDepth=pt}),ct("historyEventDelay",1250),ct("viewportMargin",10,function(dt){return dt.refresh()},!0),ct("maxHighlightLength",1e4,_r,!0),ct("moveInputWithCursor",!0,function(dt,pt){pt||dt.display.input.resetPosition()}),ct("tabindex",null,function(dt,pt){return dt.display.input.getField().tabIndex=pt||""}),ct("autofocus",null),ct("direction","ltr",function(dt,pt){return dt.doc.setDirection(pt)},!0),ct("phrases",null)}function ng(it,at,ct){var dt=ct&&ct!=yd;if(!at!=!dt){var pt=it.display.dragFunctions,Mt=at?Yt:ln;Mt(it.display.scroller,"dragstart",pt.start),Mt(it.display.scroller,"dragenter",pt.enter),Mt(it.display.scroller,"dragover",pt.over),Mt(it.display.scroller,"dragleave",pt.leave),Mt(it.display.scroller,"drop",pt.drop)}}function um(it){it.options.lineWrapping?(Ge(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(At(it.display.wrapper,"CodeMirror-wrap"),ur(it)),Xo(it),Ca(it),Ga(it),setTimeout(function(){return xh(it)},100)}function ua(it,at){var ct=this;if(!(this instanceof ua))return new ua(it,at);this.options=at=at?Mn(at):{},Mn(tp,at,!1);var dt=at.value;typeof dt=="string"?dt=new Ts(dt,at.mode,null,at.lineSeparator,at.direction):at.mode&&(dt.modeOption=at.mode),this.doc=dt;var pt=new ua.inputStyles[at.inputStyle](this),Mt=this.display=new To(it,dt,pt,at);Mt.wrapper.CodeMirror=this,eg(this),at.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),lf(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Ht,keySeq:null,specialChars:null},at.autofocus&&!nt&&Mt.input.focus(),Ut&&pe<11&&setTimeout(function(){return ct.display.input.reset(!0)},20),Ac(this),Wl(),ml(this),this.curOp.forceUpdate=!0,ar(this,dt),at.autofocus&&!nt||this.hasFocus()?setTimeout(function(){ct.hasFocus()&&!ct.state.focused&&Vr(ct)},20):_h(this);for(var Rt in gf)gf.hasOwnProperty(Rt)&&gf[Rt](this,at[Rt],yd);ro(this),at.finishInit&&at.finishInit(this);for(var te=0;te<Xd.length;++te)Xd[te](this);Ph(this),Nt&&at.lineWrapping&&getComputedStyle(Mt.lineDiv).textRendering=="optimizelegibility"&&(Mt.lineDiv.style.textRendering="auto")}ua.defaults=tp,ua.optionHandlers=gf;function Ac(it){var at=it.display;Yt(at.scroller,"mousedown",Ln(it,sh)),Ut&&pe<11?Yt(at.scroller,"dblclick",Ln(it,function(Xt){if(!Nn(it,Xt)){var ve=al(it,Xt);if(!(!ve||qf(it,Xt)||rl(it.display,Xt))){Ci(Xt);var on=it.findWordAt(ve);oa(it.doc,on.anchor,on.head)}}})):Yt(at.scroller,"dblclick",function(Xt){return Nn(it,Xt)||Ci(Xt)}),Yt(at.scroller,"contextmenu",function(Xt){return tg(it,Xt)}),Yt(at.input.getField(),"contextmenu",function(Xt){at.scroller.contains(Xt.target)||tg(it,Xt)});var ct,dt={end:0};function pt(){at.activeTouch&&(ct=setTimeout(function(){return at.activeTouch=null},1e3),dt=at.activeTouch,dt.end=+new Date)}function Mt(Xt){if(Xt.touches.length!=1)return!1;var ve=Xt.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function Rt(Xt,ve){if(ve.left==null)return!0;var on=ve.left-Xt.left,Ee=ve.top-Xt.top;return on*on+Ee*Ee>20*20}Yt(at.scroller,"touchstart",function(Xt){if(!Nn(it,Xt)&&!Mt(Xt)&&!qf(it,Xt)){at.input.ensurePolled(),clearTimeout(ct);var ve=+new Date;at.activeTouch={start:ve,moved:!1,prev:ve-dt.end<=300?dt:null},Xt.touches.length==1&&(at.activeTouch.left=Xt.touches[0].pageX,at.activeTouch.top=Xt.touches[0].pageY)}}),Yt(at.scroller,"touchmove",function(){at.activeTouch&&(at.activeTouch.moved=!0)}),Yt(at.scroller,"touchend",function(Xt){var ve=at.activeTouch;if(ve&&!rl(at,Xt)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var on=it.coordsChar(at.activeTouch,"page"),Ee;!ve.prev||Rt(ve,ve.prev)?Ee=new ao(on,on):!ve.prev.prev||Rt(ve,ve.prev.prev)?Ee=it.findWordAt(on):Ee=new ao(Oe(on.line,0),Qn(it.doc,Oe(on.line+1,0))),it.setSelection(Ee.anchor,Ee.head),it.focus(),Ci(Xt)}pt()}),Yt(at.scroller,"touchcancel",pt),Yt(at.scroller,"scroll",function(){at.scroller.clientHeight&&(Uh(it,at.scroller.scrollTop),Zu(it,at.scroller.scrollLeft,!0),qe(it,"scroll",it))}),Yt(at.scroller,"mousewheel",function(Xt){return ir(it,Xt)}),Yt(at.scroller,"DOMMouseScroll",function(Xt){return ir(it,Xt)}),Yt(at.wrapper,"scroll",function(){return at.wrapper.scrollTop=at.wrapper.scrollLeft=0}),at.dragFunctions={enter:function(Xt){Nn(it,Xt)||mo(Xt)},over:function(Xt){Nn(it,Xt)||(df(it,Xt),mo(Xt))},start:function(Xt){return _d(it,Xt)},drop:Ln(it,Lc),leave:function(Xt){Nn(it,Xt)||Vf(it)}};var te=at.input.getField();Yt(te,"keyup",function(Xt){return Ug.call(it,Xt)}),Yt(te,"keydown",Ln(it,_g)),Yt(te,"keypress",Ln(it,ah)),Yt(te,"focus",function(Xt){return Vr(it,Xt)}),Yt(te,"blur",function(Xt){return _h(it,Xt)})}var Xd=[];ua.defineInitHook=function(it){return Xd.push(it)};function zs(it,at,ct,dt){var pt=it.doc,Mt;ct==null&&(ct="add"),ct=="smart"&&(pt.mode.indent?Mt=Ki(it,at).state:ct="prev");var Rt=it.options.tabSize,te=Ye(pt,at),Xt=xe(te.text,null,Rt);te.stateAfter&&(te.stateAfter=null);var ve=te.text.match(/^\s*/)[0],on;if(!dt&&!/\S/.test(te.text))on=0,ct="not";else if(ct=="smart"&&(on=pt.mode.indent(Mt,te.text.slice(ve.length),te.text),on==An||on>150)){if(!dt)return;ct="prev"}ct=="prev"?at>pt.first?on=xe(Ye(pt,at-1).text,null,Rt):on=0:ct=="add"?on=Xt+it.options.indentUnit:ct=="subtract"?on=Xt-it.options.indentUnit:typeof ct=="number"&&(on=Xt+ct),on=Math.max(0,on);var Ee="",On=0;if(it.options.indentWithTabs)for(var Cn=Math.floor(on/Rt);Cn;--Cn)On+=Rt,Ee+=" ";if(On<on&&(Ee+=pn(on-On)),Ee!=ve)return Ku(pt,Ee,Oe(at,0),Oe(at,ve.length),"+input"),te.stateAfter=null,!0;for(var wi=0;wi<pt.sel.ranges.length;wi++){var Li=pt.sel.ranges[wi];if(Li.head.line==at&&Li.head.ch<ve.length){var Ai=Oe(at,ve.length);ma(pt,wi,new ao(Ai,Ai));break}}}var _l=null;function Jd(it){_l=it}function pf(it,at,ct,dt,pt){var Mt=it.doc;it.display.shift=!1,dt||(dt=Mt.sel);var Rt=+new Date-200,te=pt=="paste"||it.state.pasteIncoming>Rt,Xt=Sn(at),ve=null;if(te&&dt.ranges.length>1)if(_l&&_l.text.join(`
|
|
|
`)==at){if(dt.ranges.length%_l.text.length==0){ve=[];for(var on=0;on<_l.text.length;on++)ve.push(Mt.splitLines(_l.text[on]))}}else Xt.length==dt.ranges.length&&it.options.pasteLinesPerSelection&&(ve=vn(Xt,function(so){return[so]}));for(var Ee=it.curOp.updateInput,On=dt.ranges.length-1;On>=0;On--){var Cn=dt.ranges[On],wi=Cn.from(),Li=Cn.to();Cn.empty()&&(ct&&ct>0?wi=Oe(wi.line,wi.ch-ct):it.state.overwrite&&!te?Li=Oe(Li.line,Math.min(Ye(Mt,Li.line).text.length,Li.ch+de(Xt).length)):te&&_l&&_l.lineWise&&_l.text.join(`
|
|
|
`)==Xt.join(`
|
|
|
`)&&(wi=Li=Oe(wi.line,0)));var Ai={from:wi,to:Li,text:ve?ve[On%ve.length]:Xt,origin:pt||(te?"paste":it.state.cutIncoming>Rt?"cut":"+input")};Wa(it.doc,Ai),vi(it,"inputRead",it,Ai)}at&&!te&&np(it,at),yh(it),it.curOp.updateInput<2&&(it.curOp.updateInput=Ee),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function ep(it,at){var ct=it.clipboardData&&it.clipboardData.getData("Text");if(ct)return it.preventDefault(),!at.isReadOnly()&&!at.options.disableInput&&Ue(at,function(){return pf(at,ct,0,null,"paste")}),!0}function np(it,at){if(!(!it.options.electricChars||!it.options.smartIndent))for(var ct=it.doc.sel,dt=ct.ranges.length-1;dt>=0;dt--){var pt=ct.ranges[dt];if(!(pt.head.ch>100||dt&&ct.ranges[dt-1].head.line==pt.head.line)){var Mt=it.getModeAt(pt.head),Rt=!1;if(Mt.electricChars){for(var te=0;te<Mt.electricChars.length;te++)if(at.indexOf(Mt.electricChars.charAt(te))>-1){Rt=zs(it,pt.head.line,"smart");break}}else Mt.electricInput&&Mt.electricInput.test(Ye(it.doc,pt.head.line).text.slice(0,pt.head.ch))&&(Rt=zs(it,pt.head.line,"smart"));Rt&&vi(it,"electricInput",it,pt.head.line)}}}function ip(it){for(var at=[],ct=[],dt=0;dt<it.doc.sel.ranges.length;dt++){var pt=it.doc.sel.ranges[dt].head.line,Mt={anchor:Oe(pt,0),head:Oe(pt+1,0)};ct.push(Mt),at.push(it.getRange(Mt.anchor,Mt.head))}return{text:at,ranges:ct}}function op(it,at,ct,dt){it.setAttribute("autocorrect",ct?"":"off"),it.setAttribute("autocapitalize",dt?"":"off"),it.setAttribute("spellcheck",!!at)}function rp(){var it=ne("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),at=ne("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Nt?it.style.width="1000px":it.setAttribute("wrap","off"),Tt&&(it.style.border="1px solid black"),op(it),at}function Sd(it){var at=it.optionHandlers,ct=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(dt,pt){var Mt=this.options,Rt=Mt[dt];Mt[dt]==pt&&dt!="mode"||(Mt[dt]=pt,at.hasOwnProperty(dt)&&Ln(this,at[dt])(this,pt,Rt),qe(this,"optionChange",this,dt))},getOption:function(dt){return this.options[dt]},getDoc:function(){return this.doc},addKeyMap:function(dt,pt){this.state.keyMaps[pt?"push":"unshift"](bh(dt))},removeKeyMap:function(dt){for(var pt=this.state.keyMaps,Mt=0;Mt<pt.length;++Mt)if(pt[Mt]==dt||pt[Mt].name==dt)return pt.splice(Mt,1),!0},addOverlay:kn(function(dt,pt){var Mt=dt.token?dt:it.getMode(this.options,dt);if(Mt.startState)throw new Error("Overlays may not be stateful.");bn(this.state.overlays,{mode:Mt,modeSpec:dt,opaque:pt&&pt.opaque,priority:pt&&pt.priority||0},function(Rt){return Rt.priority}),this.state.modeGen++,Ca(this)}),removeOverlay:kn(function(dt){for(var pt=this.state.overlays,Mt=0;Mt<pt.length;++Mt){var Rt=pt[Mt].modeSpec;if(Rt==dt||typeof dt=="string"&&Rt.name==dt){pt.splice(Mt,1),this.state.modeGen++,Ca(this);return}}}),indentLine:kn(function(dt,pt,Mt){typeof pt!="string"&&typeof pt!="number"&&(pt==null?pt=this.options.smartIndent?"smart":"prev":pt=pt?"add":"subtract"),cn(this.doc,dt)&&zs(this,dt,pt,Mt)}),indentSelection:kn(function(dt){for(var pt=this.doc.sel.ranges,Mt=-1,Rt=0;Rt<pt.length;Rt++){var te=pt[Rt];if(te.empty())te.head.line>Mt&&(zs(this,te.head.line,dt,!0),Mt=te.head.line,Rt==this.doc.sel.primIndex&&yh(this));else{var Xt=te.from(),ve=te.to(),on=Math.max(Mt,Xt.line);Mt=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var Ee=on;Ee<Mt;++Ee)zs(this,Ee,dt);var On=this.doc.sel.ranges;Xt.ch==0&&pt.length==On.length&&On[Rt].from().ch>0&&ma(this.doc,Rt,new ao(Xt,On[Rt].to()),ze)}}}),getTokenAt:function(dt,pt){return Pi(this,dt,pt)},getLineTokens:function(dt,pt){return Pi(this,Oe(dt),pt,!0)},getTokenTypeAt:function(dt){dt=Qn(this.doc,dt);var pt=to(this,Ye(this.doc,dt.line)),Mt=0,Rt=(pt.length-1)/2,te=dt.ch,Xt;if(te==0)Xt=pt[2];else for(;;){var ve=Mt+Rt>>1;if((ve?pt[ve*2-1]:0)>=te)Rt=ve;else if(pt[ve*2+1]<te)Mt=ve+1;else{Xt=pt[ve*2+2];break}}var on=Xt?Xt.indexOf("overlay "):-1;return on<0?Xt:on==0?null:Xt.slice(0,on-1)},getModeAt:function(dt){var pt=this.doc.mode;return pt.innerMode?it.innerMode(pt,this.getTokenAt(dt).state).mode:pt},getHelper:function(dt,pt){return this.getHelpers(dt,pt)[0]},getHelpers:function(dt,pt){var Mt=[];if(!ct.hasOwnProperty(pt))return Mt;var Rt=ct[pt],te=this.getModeAt(dt);if(typeof te[pt]=="string")Rt[te[pt]]&&Mt.push(Rt[te[pt]]);else if(te[pt])for(var Xt=0;Xt<te[pt].length;Xt++){var ve=Rt[te[pt][Xt]];ve&&Mt.push(ve)}else te.helperType&&Rt[te.helperType]?Mt.push(Rt[te.helperType]):Rt[te.name]&&Mt.push(Rt[te.name]);for(var on=0;on<Rt._global.length;on++){var Ee=Rt._global[on];Ee.pred(te,this)&&Je(Mt,Ee.val)==-1&&Mt.push(Ee.val)}return Mt},getStateAfter:function(dt,pt){var Mt=this.doc;return dt=ni(Mt,dt==null?Mt.first+Mt.size-1:dt),Ki(this,dt+1,pt).state},cursorCoords:function(dt,pt){var Mt,Rt=this.doc.sel.primary();return dt==null?Mt=Rt.head:typeof dt=="object"?Mt=Qn(this.doc,dt):Mt=dt?Rt.from():Rt.to(),Ia(this,Mt,pt||"page")},charCoords:function(dt,pt){return jl(this,Qn(this.doc,dt),pt||"page")},coordsChar:function(dt,pt){return dt=ju(this,dt,pt||"page"),Wh(this,dt.left,dt.top)},lineAtHeight:function(dt,pt){return dt=ju(this,{top:dt,left:0},pt||"page").top,nn(this.doc,dt+this.display.viewOffset)},heightAtLine:function(dt,pt,Mt){var Rt=!1,te;if(typeof dt=="number"){var Xt=this.doc.first+this.doc.size-1;dt<this.doc.first?dt=this.doc.first:dt>Xt&&(dt=Xt,Rt=!0),te=Ye(this.doc,dt)}else te=dt;return $a(this,te,{top:0,left:0},pt||"page",Mt||Rt).top+(Rt?this.doc.height-qo(te):0)},defaultTextHeight:function(){return Gu(this.display)},defaultCharWidth:function(){return ih(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(dt,pt,Mt,Rt,te){var Xt=this.display;dt=Ia(this,Qn(this.doc,dt));var ve=dt.bottom,on=dt.left;if(pt.style.position="absolute",pt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pt),Xt.sizer.appendChild(pt),Rt=="over")ve=dt.top;else if(Rt=="above"||Rt=="near"){var Ee=Math.max(Xt.wrapper.clientHeight,this.doc.height),On=Math.max(Xt.sizer.clientWidth,Xt.lineSpace.clientWidth);(Rt=="above"||dt.bottom+pt.offsetHeight>Ee)&&dt.top>pt.offsetHeight?ve=dt.top-pt.offsetHeight:dt.bottom+pt.offsetHeight<=Ee&&(ve=dt.bottom),on+pt.offsetWidth>On&&(on=On-pt.offsetWidth)}pt.style.top=ve+"px",pt.style.left=pt.style.right="",te=="right"?(on=Xt.sizer.clientWidth-pt.offsetWidth,pt.style.right="0px"):(te=="left"?on=0:te=="middle"&&(on=(Xt.sizer.clientWidth-pt.offsetWidth)/2),pt.style.left=on+"px"),Mt&&Wd(this,{left:on,top:ve,right:on+pt.offsetWidth,bottom:ve+pt.offsetHeight})},triggerOnKeyDown:kn(_g),triggerOnKeyPress:kn(ah),triggerOnKeyUp:Ug,triggerOnMouseDown:kn(sh),execCommand:function(dt){if(Rs.hasOwnProperty(dt))return Rs[dt].call(null,this)},triggerElectric:kn(function(dt){np(this,dt)}),findPosH:function(dt,pt,Mt,Rt){var te=1;pt<0&&(te=-1,pt=-pt);for(var Xt=Qn(this.doc,dt),ve=0;ve<pt&&(Xt=mf(this.doc,Xt,te,Mt,Rt),!Xt.hitSide);++ve);return Xt},moveH:kn(function(dt,pt){var Mt=this;this.extendSelectionsBy(function(Rt){return Mt.display.shift||Mt.doc.extend||Rt.empty()?mf(Mt.doc,Rt.head,dt,pt,Mt.options.rtlMoveVisually):dt<0?Rt.from():Rt.to()},dn)}),deleteH:kn(function(dt,pt){var Mt=this.doc.sel,Rt=this.doc;Mt.somethingSelected()?Rt.replaceSelection("",null,"+delete"):ll(this,function(te){var Xt=mf(Rt,te.head,dt,pt,!1);return dt<0?{from:Xt,to:te.head}:{from:te.head,to:Xt}})}),findPosV:function(dt,pt,Mt,Rt){var te=1,Xt=Rt;pt<0&&(te=-1,pt=-pt);for(var ve=Qn(this.doc,dt),on=0;on<pt;++on){var Ee=Ia(this,ve,"div");if(Xt==null?Xt=Ee.left:Ee.left=Xt,ve=xd(this,Ee,te,Mt),ve.hitSide)break}return ve},moveV:kn(function(dt,pt){var Mt=this,Rt=this.doc,te=[],Xt=!this.display.shift&&!Rt.extend&&Rt.sel.somethingSelected();if(Rt.extendSelectionsBy(function(on){if(Xt)return dt<0?on.from():on.to();var Ee=Ia(Mt,on.head,"div");on.goalColumn!=null&&(Ee.left=on.goalColumn),te.push(Ee.left);var On=xd(Mt,Ee,dt,pt);return pt=="page"&&on==Rt.sel.primary()&&bc(Mt,jl(Mt,On,"div").top-Ee.top),On},dn),te.length)for(var ve=0;ve<Rt.sel.ranges.length;ve++)Rt.sel.ranges[ve].goalColumn=te[ve]}),findWordAt:function(dt){var pt=this.doc,Mt=Ye(pt,dt.line).text,Rt=dt.ch,te=dt.ch;if(Mt){var Xt=this.getHelper(dt,"wordChars");(dt.sticky=="before"||te==Mt.length)&&Rt?--Rt:++te;for(var ve=Mt.charAt(Rt),on=ie(ve,Xt)?function(Ee){return ie(Ee,Xt)}:/\s/.test(ve)?function(Ee){return/\s/.test(Ee)}:function(Ee){return!/\s/.test(Ee)&&!ie(Ee)};Rt>0&&on(Mt.charAt(Rt-1));)--Rt;for(;te<Mt.length&&on(Mt.charAt(te));)++te}return new ao(Oe(dt.line,Rt),Oe(dt.line,te))},toggleOverwrite:function(dt){dt!=null&&dt==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ge(this.display.cursorDiv,"CodeMirror-overwrite"):At(this.display.cursorDiv,"CodeMirror-overwrite"),qe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==he()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:kn(function(dt,pt){Vh(this,dt,pt)}),getScrollInfo:function(){var dt=this.display.scroller;return{left:dt.scrollLeft,top:dt.scrollTop,height:dt.scrollHeight-Ws(this)-this.display.barHeight,width:dt.scrollWidth-Ws(this)-this.display.barWidth,clientHeight:Hh(this),clientWidth:pl(this)}},scrollIntoView:kn(function(dt,pt){dt==null?(dt={from:this.doc.sel.primary().head,to:null},pt==null&&(pt=this.options.cursorScrollMargin)):typeof dt=="number"?dt={from:Oe(dt,0),to:null}:dt.from==null&&(dt={from:dt,to:null}),dt.to||(dt.to=dt.from),dt.margin=pt||0,dt.from.line!=null?Ur(this,dt):af(this,dt.from,dt.to,dt.margin)}),setSize:kn(function(dt,pt){var Mt=this,Rt=function(Xt){return typeof Xt=="number"||/^\d+$/.test(String(Xt))?Xt+"px":Xt};dt!=null&&(this.display.wrapper.style.width=Rt(dt)),pt!=null&&(this.display.wrapper.style.height=Rt(pt)),this.options.lineWrapping&&Xa(this);var te=this.display.viewFrom;this.doc.iter(te,this.display.viewTo,function(Xt){if(Xt.widgets){for(var ve=0;ve<Xt.widgets.length;ve++)if(Xt.widgets[ve].noHScroll){Mr(Mt,te,"widget");break}}++te}),this.curOp.forceUpdate=!0,qe(this,"refresh",this)}),operation:function(dt){return Ue(this,dt)},startOperation:function(){return ml(this)},endOperation:function(){return Ph(this)},refresh:kn(function(){var dt=this.display.cachedTextHeight;Ca(this),this.curOp.forceUpdate=!0,Ga(this),Vh(this,this.doc.scrollLeft,this.doc.scrollTop),vo(this.display),(dt==null||Math.abs(dt-Gu(this.display))>.5||this.options.lineWrapping)&&Xo(this),qe(this,"refresh",this)}),swapDoc:kn(function(dt){var pt=this.doc;return pt.cm=null,this.state.selectingText&&this.state.selectingText(),ar(this,dt),Ga(this),this.display.input.reset(),Vh(this,dt.scrollLeft,dt.scrollTop),this.curOp.forceScroll=!0,vi(this,"swapDoc",this,pt),pt}),phrase:function(dt){var pt=this.options.phrases;return pt&&Object.prototype.hasOwnProperty.call(pt,dt)?pt[dt]:dt},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ci(it),it.registerHelper=function(dt,pt,Mt){ct.hasOwnProperty(dt)||(ct[dt]=it[dt]={_global:[]}),ct[dt][pt]=Mt},it.registerGlobalHelper=function(dt,pt,Mt,Rt){it.registerHelper(dt,pt,Rt),ct[dt]._global.push({pred:Mt,val:Rt})}}function mf(it,at,ct,dt,pt){var Mt=at,Rt=ct,te=Ye(it,at.line),Xt=pt&&it.direction=="rtl"?-ct:ct;function ve(){var Fo=at.line+Xt;return Fo<it.first||Fo>=it.first+it.size?!1:(at=new Oe(Fo,at.ch,at.sticky),te=Ye(it,Fo))}function on(Fo){var Eo;if(dt=="codepoint"){var Ko=te.text.charCodeAt(at.ch+(dt>0?0:-1));isNaN(Ko)?Eo=null:Eo=new Oe(at.line,Math.max(0,Math.min(te.text.length,at.ch+ct*(Ko>=55296&&Ko<56320?2:1))),-ct)}else pt?Eo=Fa(it.cm,te,at,ct):Eo=ds(te,at,ct);if(Eo==null)if(!Fo&&ve())at=ra(pt,it.cm,te,at.line,Xt);else return!1;else at=Eo;return!0}if(dt=="char"||dt=="codepoint")on();else if(dt=="column")on(!0);else if(dt=="word"||dt=="group")for(var Ee=null,On=dt=="group",Cn=it.cm&&it.cm.getHelper(at,"wordChars"),wi=!0;!(ct<0&&!on(!wi));wi=!1){var Li=te.text.charAt(at.ch)||`
|
|
|
`,Ai=ie(Li,Cn)?"w":On&&Li==`
|
|
|
`?"n":!On||/\s/.test(Li)?null:"p";if(On&&!wi&&!Ai&&(Ai="s"),Ee&&Ee!=Ai){ct<0&&(ct=1,on(),at.sticky="after");break}if(Ai&&(Ee=Ai),ct>0&&!on(!wi))break}var so=tu(it,at,Mt,Rt,!0);return Gn(Mt,so)&&(so.hitSide=!0),so}function xd(it,at,ct,dt){var pt=it.doc,Mt=at.left,Rt;if(dt=="page"){var te=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Xt=Math.max(te-.5*Gu(it.display),3);Rt=(ct>0?at.bottom:at.top)+ct*Xt}else dt=="line"&&(Rt=ct>0?at.bottom+3:at.top-3);for(var ve;ve=Wh(it,Mt,Rt),!!ve.outside;){if(ct<0?Rt<=0:Rt>=pt.height){ve.hitSide=!0;break}Rt+=ct*5}return ve}var Ra=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ht,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ra.prototype.init=function(it){var at=this,ct=this,dt=ct.cm,pt=ct.div=it.lineDiv;op(pt,dt.options.spellcheck,dt.options.autocorrect,dt.options.autocapitalize);function Mt(te){for(var Xt=te.target;Xt;Xt=Xt.parentNode){if(Xt==pt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Xt.className))break}return!1}Yt(pt,"paste",function(te){!Mt(te)||Nn(dt,te)||ep(te,dt)||pe<=11&&setTimeout(Ln(dt,function(){return at.updateFromDOM()}),20)}),Yt(pt,"compositionstart",function(te){at.composing={data:te.data,done:!1}}),Yt(pt,"compositionupdate",function(te){at.composing||(at.composing={data:te.data,done:!1})}),Yt(pt,"compositionend",function(te){at.composing&&(te.data!=at.composing.data&&at.readFromDOMSoon(),at.composing.done=!0)}),Yt(pt,"touchstart",function(){return ct.forceCompositionEnd()}),Yt(pt,"input",function(){at.composing||at.readFromDOMSoon()});function Rt(te){if(!(!Mt(te)||Nn(dt,te))){if(dt.somethingSelected())Jd({lineWise:!1,text:dt.getSelections()}),te.type=="cut"&&dt.replaceSelection("",null,"cut");else if(dt.options.lineWiseCopyCut){var Xt=ip(dt);Jd({lineWise:!0,text:Xt.text}),te.type=="cut"&&dt.operation(function(){dt.setSelections(Xt.ranges,0,ze),dt.replaceSelection("",null,"cut")})}else return;if(te.clipboardData){te.clipboardData.clearData();var ve=_l.text.join(`
|
|
|
`);if(te.clipboardData.setData("Text",ve),te.clipboardData.getData("Text")==ve){te.preventDefault();return}}var on=rp(),Ee=on.firstChild;dt.display.lineSpace.insertBefore(on,dt.display.lineSpace.firstChild),Ee.value=_l.text.join(`
|
|
|
`);var On=document.activeElement;Ve(Ee),setTimeout(function(){dt.display.lineSpace.removeChild(on),On.focus(),On==pt&&ct.showPrimarySelection()},50)}}Yt(pt,"copy",Rt),Yt(pt,"cut",Rt)},Ra.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Ra.prototype.prepareSelection=function(){var it=Kh(this.cm,!1);return it.focus=document.activeElement==this.div,it},Ra.prototype.showSelection=function(it,at){!it||!this.cm.display.view.length||((it.focus||at)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Ra.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ra.prototype.showPrimarySelection=function(){var it=this.getSelection(),at=this.cm,ct=at.doc.sel.primary(),dt=ct.from(),pt=ct.to();if(at.display.viewTo==at.display.viewFrom||dt.line>=at.display.viewTo||pt.line<at.display.viewFrom){it.removeAllRanges();return}var Mt=vf(at,it.anchorNode,it.anchorOffset),Rt=vf(at,it.focusNode,it.focusOffset);if(!(Mt&&!Mt.bad&&Rt&&!Rt.bad&&Xe(Rn(Mt,Rt),dt)==0&&Xe(Jn(Mt,Rt),pt)==0)){var te=at.display.view,Xt=dt.line>=at.display.viewFrom&&ig(at,dt)||{node:te[0].measure.map[2],offset:0},ve=pt.line<at.display.viewTo&&ig(at,pt);if(!ve){var on=te[te.length-1].measure,Ee=on.maps?on.maps[on.maps.length-1]:on.map;ve={node:Ee[Ee.length-1],offset:Ee[Ee.length-2]-Ee[Ee.length-3]}}if(!Xt||!ve){it.removeAllRanges();return}var On=it.rangeCount&&it.getRangeAt(0),Cn;try{Cn=Vt(Xt.node,Xt.offset,ve.offset,ve.node)}catch(wi){}Cn&&(!Ot&&at.state.focused?(it.collapse(Xt.node,Xt.offset),Cn.collapsed||(it.removeAllRanges(),it.addRange(Cn))):(it.removeAllRanges(),it.addRange(Cn)),On&&it.anchorNode==null?it.addRange(On):Ot&&this.startGracePeriod()),this.rememberSelection()}},Ra.prototype.startGracePeriod=function(){var it=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){it.gracePeriod=!1,it.selectionChanged()&&it.cm.operation(function(){return it.cm.curOp.selectionChanged=!0})},20)},Ra.prototype.showMultipleSelections=function(it){re(this.cm.display.cursorDiv,it.cursors),re(this.cm.display.selectionDiv,it.selection)},Ra.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Ra.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var at=it.getRangeAt(0).commonAncestorContainer;return Le(this.div,at)},Ra.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ra.prototype.blur=function(){this.div.blur()},Ra.prototype.getField=function(){return this.div},Ra.prototype.supportsTouch=function(){return!0},Ra.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():Ue(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function at(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,at))}this.polling.set(this.cm.options.pollInterval,at)},Ra.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Ra.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),at=this.cm;if(et&&we&&this.cm.display.gutterSpecs.length&&ap(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ct=vf(at,it.anchorNode,it.anchorOffset),dt=vf(at,it.focusNode,it.focusOffset);ct&&dt&&Ue(at,function(){Sa(at.doc,br(ct,dt),ze),(ct.bad||dt.bad)&&(at.curOp.selectionChanged=!0)})}}},Ra.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,at=it.display,ct=it.doc.sel.primary(),dt=ct.from(),pt=ct.to();if(dt.ch==0&&dt.line>it.firstLine()&&(dt=Oe(dt.line-1,Ye(it.doc,dt.line-1).length)),pt.ch==Ye(it.doc,pt.line).text.length&&pt.line<it.lastLine()&&(pt=Oe(pt.line+1,0)),dt.line<at.viewFrom||pt.line>at.viewTo-1)return!1;var Mt,Rt,te;dt.line==at.viewFrom||(Mt=Ks(it,dt.line))==0?(Rt=_t(at.view[0].line),te=at.view[0].node):(Rt=_t(at.view[Mt].line),te=at.view[Mt-1].node.nextSibling);var Xt=Ks(it,pt.line),ve,on;if(Xt==at.view.length-1?(ve=at.viewTo-1,on=at.lineDiv.lastChild):(ve=_t(at.view[Xt+1].line)-1,on=at.view[Xt+1].node.previousSibling),!te)return!1;for(var Ee=it.doc.splitLines(zc(it,te,on,Rt,ve)),On=gn(it.doc,Oe(Rt,0),Oe(ve,Ye(it.doc,ve).text.length));Ee.length>1&&On.length>1;)if(de(Ee)==de(On))Ee.pop(),On.pop(),ve--;else if(Ee[0]==On[0])Ee.shift(),On.shift(),Rt++;else break;for(var Cn=0,wi=0,Li=Ee[0],Ai=On[0],so=Math.min(Li.length,Ai.length);Cn<so&&Li.charCodeAt(Cn)==Ai.charCodeAt(Cn);)++Cn;for(var Fo=de(Ee),Eo=de(On),Ko=Math.min(Fo.length-(Ee.length==1?Cn:0),Eo.length-(On.length==1?Cn:0));wi<Ko&&Fo.charCodeAt(Fo.length-wi-1)==Eo.charCodeAt(Eo.length-wi-1);)++wi;if(Ee.length==1&&On.length==1&&Rt==dt.line)for(;Cn&&Cn>dt.ch&&Fo.charCodeAt(Fo.length-wi-1)==Eo.charCodeAt(Eo.length-wi-1);)Cn--,wi++;Ee[Ee.length-1]=Fo.slice(0,Fo.length-wi).replace(/^\u200b+/,""),Ee[0]=Ee[0].slice(Cn).replace(/\u200b+$/,"");var Sr=Oe(Rt,Cn),wo=Oe(ve,On.length?de(On).length-wi:0);if(Ee.length>1||Ee[0]||Xe(Sr,wo))return Ku(it.doc,Ee,Sr,wo,"+input"),!0},Ra.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ra.prototype.reset=function(){this.forceCompositionEnd()},Ra.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ra.prototype.readFromDOMSoon=function(){var it=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(it.readDOMTimeout=null,it.composing)if(it.composing.done)it.composing=null;else return;it.updateFromDOM()},80))},Ra.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&Ue(this.cm,function(){return Ca(it.cm)})},Ra.prototype.setUneditable=function(it){it.contentEditable="false"},Ra.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||Ln(this.cm,pf)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Ra.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Ra.prototype.onContextMenu=function(){},Ra.prototype.resetPosition=function(){},Ra.prototype.needsContentAttribute=!0;function ig(it,at){var ct=mh(it,at.line);if(!ct||ct.hidden)return null;var dt=Ye(it.doc,at.line),pt=Gh(ct,dt,at.line),Mt=zt(dt,it.doc.direction),Rt="left";if(Mt){var te=mt(Mt,at.ch);Rt=te%2?"right":"left"}var Xt=Zh(pt.map,at.ch,Rt);return Xt.offset=Xt.collapse=="right"?Xt.end:Xt.start,Xt}function ap(it){for(var at=it;at;at=at.parentNode)if(/CodeMirror-gutter-wrapper/.test(at.className))return!0;return!1}function Rc(it,at){return at&&(it.bad=!0),it}function zc(it,at,ct,dt,pt){var Mt="",Rt=!1,te=it.doc.lineSeparator(),Xt=!1;function ve(Cn){return function(wi){return wi.id==Cn}}function on(){Rt&&(Mt+=te,Xt&&(Mt+=te),Rt=Xt=!1)}function Ee(Cn){Cn&&(on(),Mt+=Cn)}function On(Cn){if(Cn.nodeType==1){var wi=Cn.getAttribute("cm-text");if(wi){Ee(wi);return}var Li=Cn.getAttribute("cm-marker"),Ai;if(Li){var so=it.findMarks(Oe(dt,0),Oe(pt+1,0),ve(+Li));so.length&&(Ai=so[0].find(0))&&Ee(gn(it.doc,Ai.from,Ai.to).join(te));return}if(Cn.getAttribute("contenteditable")=="false")return;var Fo=/^(pre|div|p|li|table|br)$/i.test(Cn.nodeName);if(!/^br$/i.test(Cn.nodeName)&&Cn.textContent.length==0)return;Fo&&on();for(var Eo=0;Eo<Cn.childNodes.length;Eo++)On(Cn.childNodes[Eo]);/^(pre|p)$/i.test(Cn.nodeName)&&(Xt=!0),Fo&&(Rt=!0)}else Cn.nodeType==3&&Ee(Cn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;On(at),at!=ct;)at=at.nextSibling,Xt=!1;return Mt}function vf(it,at,ct){var dt;if(at==it.display.lineDiv){if(dt=it.display.lineDiv.childNodes[ct],!dt)return Rc(it.clipPos(Oe(it.display.viewTo-1)),!0);at=null,ct=0}else for(dt=at;;dt=dt.parentNode){if(!dt||dt==it.display.lineDiv)return null;if(dt.parentNode&&dt.parentNode==it.display.lineDiv)break}for(var pt=0;pt<it.display.view.length;pt++){var Mt=it.display.view[pt];if(Mt.node==dt)return hm(Mt,at,ct)}}function hm(it,at,ct){var dt=it.text.firstChild,pt=!1;if(!at||!Le(dt,at))return Rc(Oe(_t(it.line),0),!0);if(at==dt&&(pt=!0,at=dt.childNodes[ct],ct=0,!at)){var Mt=it.rest?de(it.rest):it.line;return Rc(Oe(_t(Mt),Mt.text.length),pt)}var Rt=at.nodeType==3?at:null,te=at;for(!Rt&&at.childNodes.length==1&&at.firstChild.nodeType==3&&(Rt=at.firstChild,ct&&(ct=Rt.nodeValue.length));te.parentNode!=dt;)te=te.parentNode;var Xt=it.measure,ve=Xt.maps;function on(Ai,so,Fo){for(var Eo=-1;Eo<(ve?ve.length:0);Eo++)for(var Ko=Eo<0?Xt.map:ve[Eo],Sr=0;Sr<Ko.length;Sr+=3){var wo=Ko[Sr+2];if(wo==Ai||wo==so){var Br=_t(Eo<0?it.line:it.rest[Eo]),Ja=Ko[Sr]+Fo;return(Fo<0||wo!=Ai)&&(Ja=Ko[Sr+(Fo?1:0)]),Oe(Br,Ja)}}}var Ee=on(Rt,te,ct);if(Ee)return Rc(Ee,pt);for(var On=te.nextSibling,Cn=Rt?Rt.nodeValue.length-ct:0;On;On=On.nextSibling){if(Ee=on(On,On.firstChild,0),Ee)return Rc(Oe(Ee.line,Ee.ch-Cn),pt);Cn+=On.textContent.length}for(var wi=te.previousSibling,Li=ct;wi;wi=wi.previousSibling){if(Ee=on(wi,wi.firstChild,-1),Ee)return Rc(Oe(Ee.line,Ee.ch+Li),pt);Li+=wi.textContent.length}}var Os=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new Ht,this.hasSelection=!1,this.composing=null};Os.prototype.init=function(it){var at=this,ct=this,dt=this.cm;this.createField(it);var pt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),Tt&&(pt.style.width="0px"),Yt(pt,"input",function(){Ut&&pe>=9&&at.hasSelection&&(at.hasSelection=null),ct.poll()}),Yt(pt,"paste",function(Rt){Nn(dt,Rt)||ep(Rt,dt)||(dt.state.pasteIncoming=+new Date,ct.fastPoll())});function Mt(Rt){if(!Nn(dt,Rt)){if(dt.somethingSelected())Jd({lineWise:!1,text:dt.getSelections()});else if(dt.options.lineWiseCopyCut){var te=ip(dt);Jd({lineWise:!0,text:te.text}),Rt.type=="cut"?dt.setSelections(te.ranges,null,ze):(ct.prevInput="",pt.value=te.text.join(`
|
|
|
`),Ve(pt))}else return;Rt.type=="cut"&&(dt.state.cutIncoming=+new Date)}}Yt(pt,"cut",Mt),Yt(pt,"copy",Mt),Yt(it.scroller,"paste",function(Rt){if(!(rl(it,Rt)||Nn(dt,Rt))){if(!pt.dispatchEvent){dt.state.pasteIncoming=+new Date,ct.focus();return}var te=new Event("paste");te.clipboardData=Rt.clipboardData,pt.dispatchEvent(te)}}),Yt(it.lineSpace,"selectstart",function(Rt){rl(it,Rt)||Ci(Rt)}),Yt(pt,"compositionstart",function(){var Rt=dt.getCursor("from");ct.composing&&ct.composing.range.clear(),ct.composing={start:Rt,range:dt.markText(Rt,dt.getCursor("to"),{className:"CodeMirror-composing"})}}),Yt(pt,"compositionend",function(){ct.composing&&(ct.poll(),ct.composing.range.clear(),ct.composing=null)})},Os.prototype.createField=function(it){this.wrapper=rp(),this.textarea=this.wrapper.firstChild},Os.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},Os.prototype.prepareSelection=function(){var it=this.cm,at=it.display,ct=it.doc,dt=Kh(it);if(it.options.moveInputWithCursor){var pt=Ia(it,ct.sel.primary().head,"div"),Mt=at.wrapper.getBoundingClientRect(),Rt=at.lineDiv.getBoundingClientRect();dt.teTop=Math.max(0,Math.min(at.wrapper.clientHeight-10,pt.top+Rt.top-Mt.top)),dt.teLeft=Math.max(0,Math.min(at.wrapper.clientWidth-10,pt.left+Rt.left-Mt.left))}return dt},Os.prototype.showSelection=function(it){var at=this.cm,ct=at.display;re(ct.cursorDiv,it.cursors),re(ct.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},Os.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var at=this.cm;if(at.somethingSelected()){this.prevInput="";var ct=at.getSelection();this.textarea.value=ct,at.state.focused&&Ve(this.textarea),Ut&&pe>=9&&(this.hasSelection=ct)}else it||(this.prevInput=this.textarea.value="",Ut&&pe>=9&&(this.hasSelection=null))}},Os.prototype.getField=function(){return this.textarea},Os.prototype.supportsTouch=function(){return!1},Os.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!nt||he()!=this.textarea))try{this.textarea.focus()}catch(it){}},Os.prototype.blur=function(){this.textarea.blur()},Os.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Os.prototype.receivedFocus=function(){this.slowPoll()},Os.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},Os.prototype.fastPoll=function(){var it=!1,at=this;at.pollingFast=!0;function ct(){var dt=at.poll();!dt&&!it?(it=!0,at.polling.set(60,ct)):(at.pollingFast=!1,at.slowPoll())}at.polling.set(20,ct)},Os.prototype.poll=function(){var it=this,at=this.cm,ct=this.textarea,dt=this.prevInput;if(this.contextMenuPending||!at.state.focused||Ct(ct)&&!dt&&!this.composing||at.isReadOnly()||at.options.disableInput||at.state.keySeq)return!1;var pt=ct.value;if(pt==dt&&!at.somethingSelected())return!1;if(Ut&&pe>=9&&this.hasSelection===pt||ht&&/[\uf700-\uf7ff]/.test(pt))return at.display.input.reset(),!1;if(at.doc.sel==at.display.selForContextMenu){var Mt=pt.charCodeAt(0);if(Mt==8203&&!dt&&(dt="\u200B"),Mt==8666)return this.reset(),this.cm.execCommand("undo")}for(var Rt=0,te=Math.min(dt.length,pt.length);Rt<te&&dt.charCodeAt(Rt)==pt.charCodeAt(Rt);)++Rt;return Ue(at,function(){pf(at,pt.slice(Rt),dt.length-Rt,null,it.composing?"*compose":null),pt.length>1e3||pt.indexOf(`
|
|
|
`)>-1?ct.value=it.prevInput="":it.prevInput=pt,it.composing&&(it.composing.range.clear(),it.composing.range=at.markText(it.composing.start,at.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Os.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Os.prototype.onKeyPress=function(){Ut&&pe>=9&&(this.hasSelection=null),this.fastPoll()},Os.prototype.onContextMenu=function(it){var at=this,ct=at.cm,dt=ct.display,pt=at.textarea;at.contextMenuPending&&at.contextMenuPending();var Mt=al(ct,it),Rt=dt.scroller.scrollTop;if(!Mt||qt)return;var te=ct.options.resetSelectionOnContextMenu;te&&ct.doc.sel.contains(Mt)==-1&&Ln(ct,Sa)(ct.doc,br(Mt),ze);var Xt=pt.style.cssText,ve=at.wrapper.style.cssText,on=at.wrapper.offsetParent.getBoundingClientRect();at.wrapper.style.cssText="position: static",pt.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(it.clientY-on.top-5)+"px; left: "+(it.clientX-on.left-5)+`px;
|
|
|
z-index: 1000; background: `+(Ut?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ee;Nt&&(Ee=window.scrollY),dt.input.focus(),Nt&&window.scrollTo(null,Ee),dt.input.reset(),ct.somethingSelected()||(pt.value=at.prevInput=" "),at.contextMenuPending=Cn,dt.selForContextMenu=ct.doc.sel,clearTimeout(dt.detectingSelectAll);function On(){if(pt.selectionStart!=null){var Li=ct.somethingSelected(),Ai="\u200B"+(Li?pt.value:"");pt.value="\u21DA",pt.value=Ai,at.prevInput=Li?"":"\u200B",pt.selectionStart=1,pt.selectionEnd=Ai.length,dt.selForContextMenu=ct.doc.sel}}function Cn(){if(at.contextMenuPending==Cn&&(at.contextMenuPending=!1,at.wrapper.style.cssText=ve,pt.style.cssText=Xt,Ut&&pe<9&&dt.scrollbars.setScrollTop(dt.scroller.scrollTop=Rt),pt.selectionStart!=null)){(!Ut||Ut&&pe<9)&&On();var Li=0,Ai=function(){dt.selForContextMenu==ct.doc.sel&&pt.selectionStart==0&&pt.selectionEnd>0&&at.prevInput=="\u200B"?Ln(ct,la)(ct):Li++<10?dt.detectingSelectAll=setTimeout(Ai,500):(dt.selForContextMenu=null,dt.input.reset())};dt.detectingSelectAll=setTimeout(Ai,200)}}if(Ut&&pe>=9&&On(),Ft){mo(it);var wi=function(){ln(window,"mouseup",wi),setTimeout(Cn,20)};Yt(window,"mouseup",wi)}else setTimeout(Cn,50)},Os.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},Os.prototype.setUneditable=function(){},Os.prototype.needsContentAttribute=!1;function dm(it,at){if(at=at?Mn(at):{},at.value=it.value,!at.tabindex&&it.tabIndex&&(at.tabindex=it.tabIndex),!at.placeholder&&it.placeholder&&(at.placeholder=it.placeholder),at.autofocus==null){var ct=he();at.autofocus=ct==it||it.getAttribute("autofocus")!=null&&ct==document.body}function dt(){it.value=te.getValue()}var pt;if(it.form&&(Yt(it.form,"submit",dt),!at.leaveSubmitMethodAlone)){var Mt=it.form;pt=Mt.submit;try{var Rt=Mt.submit=function(){dt(),Mt.submit=pt,Mt.submit(),Mt.submit=Rt}}catch(Xt){}}at.finishInit=function(Xt){Xt.save=dt,Xt.getTextArea=function(){return it},Xt.toTextArea=function(){Xt.toTextArea=isNaN,dt(),it.parentNode.removeChild(Xt.getWrapperElement()),it.style.display="",it.form&&(ln(it.form,"submit",dt),!at.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=pt))}},it.style.display="none";var te=ua(function(Xt){return it.parentNode.insertBefore(Xt,it.nextSibling)},at);return te}function jc(it){it.off=ln,it.on=Yt,it.wheelEventPixels=Wo,it.Doc=Ts,it.splitLines=Sn,it.countColumn=xe,it.findColumn=Hn,it.isWordChar=Pe,it.Pass=An,it.signal=qe,it.Line=Yo,it.changeEnd=na,it.scrollbarModel=sf,it.Pos=Oe,it.cmpPos=Xe,it.modes=Wn,it.mimeModes=_n,it.resolveMode=hi,it.getMode=Fe,it.modeExtensions=Ae,it.extendMode=Zt,it.copyState=He,it.startState=ye,it.innerMode=fn,it.commands=Rs,it.keyMap=Sl,it.keyName=Fc,it.isModifierKey=vd,it.lookupKey=Kl,it.normalizeKeyMap=Tc,it.StringStream=ae,it.SharedTextMarker=_u,it.TextMarker=Ze,it.LineWidget=Ss,it.e_preventDefault=Ci,it.e_stopPropagation=Wi,it.e_stop=mo,it.addClass=Ge,it.contains=Le,it.rmClass=At,it.keyNames=Lu}lm(ua),Sd(ua);var Jh="iter insert remove copy getEditor constructor".split(" ");for(var yf in Ts.prototype)Ts.prototype.hasOwnProperty(yf)&&Je(Jh,yf)<0&&(ua.prototype[yf]=function(it){return function(){return it.apply(this.doc,arguments)}}(Ts.prototype[yf]));return ci(Ts),ua.inputStyles={textarea:Os,contenteditable:Ra},ua.defineMode=function(it){!ua.defaults.mode&&it!="null"&&(ua.defaults.mode=it),si.apply(this,arguments)},ua.defineMIME=ri,ua.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),ua.defineMIME("text/plain","null"),ua.defineExtension=function(it,at){ua.prototype[it]=at},ua.defineDocExtension=function(it,at){Ts.prototype[it]=at},ua.fromTextArea=dm,jc(ua),ua.version="5.58.2",ua})},25419:function(En,yn,xt){(function(Ot){Ot(xt(89780),xt(15525),xt(98101))})(function(Ot){"use strict";Ot.defineMode("markdown",function(jt,Qt){var Me=Ot.getMode(jt,"text/html"),Ut=Me.name=="null";function pe(xe){if(Ot.findModeByName){var Ht=Ot.findModeByName(xe);Ht&&(xe=Ht.mime||Ht.mimes[0])}var Je=Ot.getMode(jt,xe);return Je.name=="null"?null:Je}Qt.highlightFormatting===void 0&&(Qt.highlightFormatting=!1),Qt.maxBlockquoteDepth===void 0&&(Qt.maxBlockquoteDepth=0),Qt.taskLists===void 0&&(Qt.taskLists=!1),Qt.strikethrough===void 0&&(Qt.strikethrough=!1),Qt.emoji===void 0&&(Qt.emoji=!1),Qt.fencedCodeBlockHighlighting===void 0&&(Qt.fencedCodeBlockHighlighting=!0),Qt.fencedCodeBlockDefaultMode===void 0&&(Qt.fencedCodeBlockDefaultMode="text/plain"),Qt.xml===void 0&&(Qt.xml=!0),Qt.tokenTypeOverrides===void 0&&(Qt.tokenTypeOverrides={});var Nt={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 Ie in Nt)Nt.hasOwnProperty(Ie)&&Qt.tokenTypeOverrides[Ie]&&(Nt[Ie]=Qt.tokenTypeOverrides[Ie]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,qt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ce=/^\[(x| )\](?=\s)/i,Ce=Qt.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Be=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Tt=/^[^#!\[\]*_\\<>` "'(~:]+/,et=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,nt=/^\s*\[[^\]]+?\]:.*$/,ht=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,st=" ";function gt(xe,Ht,Je){return Ht.f=Ht.inline=Je,Je(xe,Ht)}function vt(xe,Ht,Je){return Ht.f=Ht.block=Je,Je(xe,Ht)}function wt(xe){return!xe||!/\S/.test(xe.string)}function Ft(xe){if(xe.linkTitle=!1,xe.linkHref=!1,xe.linkText=!1,xe.em=!1,xe.strong=!1,xe.strikethrough=!1,xe.quote=0,xe.indentedCode=!1,xe.f==At){var Ht=Ut;if(!Ht){var Je=Ot.innerMode(Me,xe.htmlState);Ht=Je.mode.name=="xml"&&Je.state.tagStart===null&&!Je.state.context&&Je.state.tokenize.isInText}Ht&&(xe.f=me,xe.block=It,xe.htmlState=null)}return xe.trailingSpace=0,xe.trailingSpaceNewLine=!1,xe.prevLine=xe.thisLine,xe.thisLine={stream:null},null}function It(xe,Ht){var Je=xe.column()===Ht.indentation,Tn=wt(Ht.prevLine.stream),An=Ht.indentedCode,ze=Ht.prevLine.hr,Te=Ht.list!==!1,dn=(Ht.listStack[Ht.listStack.length-1]||0)+3;Ht.indentedCode=!1;var Hn=Ht.indentation;if(Ht.indentationDiff===null&&(Ht.indentationDiff=Ht.indentation,Te)){for(Ht.list=null;Hn<Ht.listStack[Ht.listStack.length-1];)Ht.listStack.pop(),Ht.listStack.length?Ht.indentation=Ht.listStack[Ht.listStack.length-1]:Ht.list=!1;Ht.list!==!1&&(Ht.indentationDiff=Hn-Ht.listStack[Ht.listStack.length-1])}var hn=!Tn&&!ze&&!Ht.prevLine.header&&(!Te||!An)&&!Ht.prevLine.fencedCodeEnd,pn=(Ht.list===!1||ze||Tn)&&Ht.indentation<=dn&&xe.match(we),de=null;if(Ht.indentationDiff>=4&&(An||Ht.prevLine.fencedCodeEnd||Ht.prevLine.header||Tn))return xe.skipToEnd(),Ht.indentedCode=!0,Nt.code;if(xe.eatSpace())return null;if(Je&&Ht.indentation<=dn&&(de=xe.match(Ce))&&de[1].length<=6)return Ht.quote=0,Ht.header=de[1].length,Ht.thisLine.header=!0,Qt.highlightFormatting&&(Ht.formatting="header"),Ht.f=Ht.inline,re(Ht);if(Ht.indentation<=dn&&xe.eat(">"))return Ht.quote=Je?1:Ht.quote+1,Qt.highlightFormatting&&(Ht.formatting="quote"),xe.eatSpace(),re(Ht);if(!pn&&!Ht.setext&&Je&&Ht.indentation<=dn&&(de=xe.match(qt))){var vn=de[1]?"ol":"ul";return Ht.indentation=Hn+xe.current().length,Ht.list=!0,Ht.quote=0,Ht.listStack.push(Ht.indentation),Ht.em=!1,Ht.strong=!1,Ht.code=!1,Ht.strikethrough=!1,Qt.taskLists&&xe.match(ce,!1)&&(Ht.taskList=!0),Ht.f=Ht.inline,Qt.highlightFormatting&&(Ht.formatting=["list","list-"+vn]),re(Ht)}else{if(Je&&Ht.indentation<=dn&&(de=xe.match(et,!0)))return Ht.quote=0,Ht.fencedEndRE=new RegExp(de[1]+"+ *$"),Ht.localMode=Qt.fencedCodeBlockHighlighting&&pe(de[2]||Qt.fencedCodeBlockDefaultMode),Ht.localMode&&(Ht.localState=Ot.startState(Ht.localMode)),Ht.f=Ht.block=Wt,Qt.highlightFormatting&&(Ht.formatting="code-block"),Ht.code=-1,re(Ht);if(Ht.setext||(!hn||!Te)&&!Ht.quote&&Ht.list===!1&&!Ht.code&&!pn&&!nt.test(xe.string)&&(de=xe.lookAhead(1))&&(de=de.match(Be)))return Ht.setext?(Ht.header=Ht.setext,Ht.setext=0,xe.skipToEnd(),Qt.highlightFormatting&&(Ht.formatting="header")):(Ht.header=de[0].charAt(0)=="="?1:2,Ht.setext=Ht.header),Ht.thisLine.header=!0,Ht.f=Ht.inline,re(Ht);if(pn)return xe.skipToEnd(),Ht.hr=!0,Ht.thisLine.hr=!0,Nt.hr;if(xe.peek()==="[")return gt(xe,Ht,Ke)}return gt(xe,Ht,Ht.inline)}function At(xe,Ht){var Je=Me.token(xe,Ht.htmlState);if(!Ut){var Tn=Ot.innerMode(Me,Ht.htmlState);(Tn.mode.name=="xml"&&Tn.state.tagStart===null&&!Tn.state.context&&Tn.state.tokenize.isInText||Ht.md_inside&&xe.current().indexOf(">")>-1)&&(Ht.f=me,Ht.block=It,Ht.htmlState=null)}return Je}function Wt(xe,Ht){var Je=Ht.listStack[Ht.listStack.length-1]||0,Tn=Ht.indentation<Je,An=Je+3;if(Ht.fencedEndRE&&Ht.indentation<=An&&(Tn||xe.match(Ht.fencedEndRE))){Qt.highlightFormatting&&(Ht.formatting="code-block");var ze;return Tn||(ze=re(Ht)),Ht.localMode=Ht.localState=null,Ht.block=It,Ht.f=me,Ht.fencedEndRE=null,Ht.code=0,Ht.thisLine.fencedCodeEnd=!0,Tn?vt(xe,Ht,Ht.block):ze}else return Ht.localMode?Ht.localMode.token(xe,Ht.localState):(xe.skipToEnd(),Nt.code)}function re(xe){var Ht=[];if(xe.formatting){Ht.push(Nt.formatting),typeof xe.formatting=="string"&&(xe.formatting=[xe.formatting]);for(var Je=0;Je<xe.formatting.length;Je++)Ht.push(Nt.formatting+"-"+xe.formatting[Je]),xe.formatting[Je]==="header"&&Ht.push(Nt.formatting+"-"+xe.formatting[Je]+"-"+xe.header),xe.formatting[Je]==="quote"&&(!Qt.maxBlockquoteDepth||Qt.maxBlockquoteDepth>=xe.quote?Ht.push(Nt.formatting+"-"+xe.formatting[Je]+"-"+xe.quote):Ht.push("error"))}if(xe.taskOpen)return Ht.push("meta"),Ht.length?Ht.join(" "):null;if(xe.taskClosed)return Ht.push("property"),Ht.length?Ht.join(" "):null;if(xe.linkHref?Ht.push(Nt.linkHref,"url"):(xe.strong&&Ht.push(Nt.strong),xe.em&&Ht.push(Nt.em),xe.strikethrough&&Ht.push(Nt.strikethrough),xe.emoji&&Ht.push(Nt.emoji),xe.linkText&&Ht.push(Nt.linkText),xe.code&&Ht.push(Nt.code),xe.image&&Ht.push(Nt.image),xe.imageAltText&&Ht.push(Nt.imageAltText,"link"),xe.imageMarker&&Ht.push(Nt.imageMarker)),xe.header&&Ht.push(Nt.header,Nt.header+"-"+xe.header),xe.quote&&(Ht.push(Nt.quote),!Qt.maxBlockquoteDepth||Qt.maxBlockquoteDepth>=xe.quote?Ht.push(Nt.quote+"-"+xe.quote):Ht.push(Nt.quote+"-"+Qt.maxBlockquoteDepth)),xe.list!==!1){var Tn=(xe.listStack.length-1)%3;Tn?Tn===1?Ht.push(Nt.list2):Ht.push(Nt.list3):Ht.push(Nt.list1)}return xe.trailingSpaceNewLine?Ht.push("trailing-space-new-line"):xe.trailingSpace&&Ht.push("trailing-space-"+(xe.trailingSpace%2?"a":"b")),Ht.length?Ht.join(" "):null}function ne(xe,Ht){if(xe.match(Tt,!0))return re(Ht)}function me(xe,Ht){var Je=Ht.text(xe,Ht);if(typeof Je!="undefined")return Je;if(Ht.list)return Ht.list=null,re(Ht);if(Ht.taskList){var Tn=xe.match(ce,!0)[1]===" ";return Tn?Ht.taskOpen=!0:Ht.taskClosed=!0,Qt.highlightFormatting&&(Ht.formatting="task"),Ht.taskList=!1,re(Ht)}if(Ht.taskOpen=!1,Ht.taskClosed=!1,Ht.header&&xe.match(/^#+$/,!0))return Qt.highlightFormatting&&(Ht.formatting="header"),re(Ht);var An=xe.next();if(Ht.linkTitle){Ht.linkTitle=!1;var ze=An;An==="("&&(ze=")"),ze=(ze+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Te="^\\s*(?:[^"+ze+"\\\\]+|\\\\\\\\|\\\\.)"+ze;if(xe.match(new RegExp(Te),!0))return Nt.linkHref}if(An==="`"){var dn=Ht.formatting;Qt.highlightFormatting&&(Ht.formatting="code"),xe.eatWhile("`");var Hn=xe.current().length;if(Ht.code==0&&(!Ht.quote||Hn==1))return Ht.code=Hn,re(Ht);if(Hn==Ht.code){var hn=re(Ht);return Ht.code=0,hn}else return Ht.formatting=dn,re(Ht)}else if(Ht.code)return re(Ht);if(An==="\\"&&(xe.next(),Qt.highlightFormatting)){var pn=re(Ht),de=Nt.formatting+"-escape";return pn?pn+" "+de:de}if(An==="!"&&xe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ht.imageMarker=!0,Ht.image=!0,Qt.highlightFormatting&&(Ht.formatting="image"),re(Ht);if(An==="["&&Ht.imageMarker&&xe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ht.imageMarker=!1,Ht.imageAltText=!0,Qt.highlightFormatting&&(Ht.formatting="image"),re(Ht);if(An==="]"&&Ht.imageAltText){Qt.highlightFormatting&&(Ht.formatting="image");var pn=re(Ht);return Ht.imageAltText=!1,Ht.image=!1,Ht.inline=Ht.f=Le,pn}if(An==="["&&!Ht.image)return Ht.linkText&&xe.match(/^.*?\]/)||(Ht.linkText=!0,Qt.highlightFormatting&&(Ht.formatting="link")),re(Ht);if(An==="]"&&Ht.linkText){Qt.highlightFormatting&&(Ht.formatting="link");var pn=re(Ht);return Ht.linkText=!1,Ht.inline=Ht.f=xe.match(/\(.*?\)| ?\[.*?\]/,!1)?Le:me,pn}if(An==="<"&&xe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ht.f=Ht.inline=Vt,Qt.highlightFormatting&&(Ht.formatting="link");var pn=re(Ht);return pn?pn+=" ":pn="",pn+Nt.linkInline}if(An==="<"&&xe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ht.f=Ht.inline=Vt,Qt.highlightFormatting&&(Ht.formatting="link");var pn=re(Ht);return pn?pn+=" ":pn="",pn+Nt.linkEmail}if(Qt.xml&&An==="<"&&xe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var vn=xe.string.indexOf(">",xe.pos);if(vn!=-1){var bn=xe.string.substring(xe.start,vn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(bn)&&(Ht.md_inside=!0)}return xe.backUp(1),Ht.htmlState=Ot.startState(Me),vt(xe,Ht,At)}if(Qt.xml&&An==="<"&&xe.match(/^\/\w*?>/))return Ht.md_inside=!1,"tag";if(An==="*"||An==="_"){for(var Qe=1,Pn=xe.pos==1?" ":xe.string.charAt(xe.pos-2);Qe<3&&xe.eat(An);)Qe++;var Ne=xe.peek()||" ",Pe=!/\s/.test(Ne)&&(!ht.test(Ne)||/\s/.test(Pn)||ht.test(Pn)),ie=!/\s/.test(Pn)&&(!ht.test(Pn)||/\s/.test(Ne)||ht.test(Ne)),Dt=null,fe=null;if(Qe%2&&(!Ht.em&&Pe&&(An==="*"||!ie||ht.test(Pn))?Dt=!0:Ht.em==An&&ie&&(An==="*"||!Pe||ht.test(Ne))&&(Dt=!1)),Qe>1&&(!Ht.strong&&Pe&&(An==="*"||!ie||ht.test(Pn))?fe=!0:Ht.strong==An&&ie&&(An==="*"||!Pe||ht.test(Ne))&&(fe=!1)),fe!=null||Dt!=null){Qt.highlightFormatting&&(Ht.formatting=Dt==null?"strong":fe==null?"em":"strong em"),Dt===!0&&(Ht.em=An),fe===!0&&(Ht.strong=An);var hn=re(Ht);return Dt===!1&&(Ht.em=!1),fe===!1&&(Ht.strong=!1),hn}}else if(An===" "&&(xe.eat("*")||xe.eat("_"))){if(xe.peek()===" ")return re(Ht);xe.backUp(1)}if(Qt.strikethrough){if(An==="~"&&xe.eatWhile(An)){if(Ht.strikethrough){Qt.highlightFormatting&&(Ht.formatting="strikethrough");var hn=re(Ht);return Ht.strikethrough=!1,hn}else if(xe.match(/^[^\s]/,!1))return Ht.strikethrough=!0,Qt.highlightFormatting&&(Ht.formatting="strikethrough"),re(Ht)}else if(An===" "&&xe.match(/^~~/,!0)){if(xe.peek()===" ")return re(Ht);xe.backUp(2)}}if(Qt.emoji&&An===":"&&xe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ht.emoji=!0,Qt.highlightFormatting&&(Ht.formatting="emoji");var Se=re(Ht);return Ht.emoji=!1,Se}return An===" "&&(xe.match(/^ +$/,!1)?Ht.trailingSpace++:Ht.trailingSpace&&(Ht.trailingSpaceNewLine=!0)),re(Ht)}function Vt(xe,Ht){var Je=xe.next();if(Je===">"){Ht.f=Ht.inline=me,Qt.highlightFormatting&&(Ht.formatting="link");var Tn=re(Ht);return Tn?Tn+=" ":Tn="",Tn+Nt.linkInline}return xe.match(/^[^>]+/,!0),Nt.linkInline}function Le(xe,Ht){if(xe.eatSpace())return null;var Je=xe.next();return Je==="("||Je==="["?(Ht.f=Ht.inline=Ge(Je==="("?")":"]"),Qt.highlightFormatting&&(Ht.formatting="link-string"),Ht.linkHref=!0,re(Ht)):"error"}var he={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ge(xe){return function(Ht,Je){var Tn=Ht.next();if(Tn===xe){Je.f=Je.inline=me,Qt.highlightFormatting&&(Je.formatting="link-string");var An=re(Je);return Je.linkHref=!1,An}return Ht.match(he[xe]),Je.linkHref=!0,re(Je)}}function Ke(xe,Ht){return xe.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ht.f=Ve,xe.next(),Qt.highlightFormatting&&(Ht.formatting="link"),Ht.linkText=!0,re(Ht)):gt(xe,Ht,me)}function Ve(xe,Ht){if(xe.match(/^\]:/,!0)){Ht.f=Ht.inline=sn,Qt.highlightFormatting&&(Ht.formatting="link");var Je=re(Ht);return Ht.linkText=!1,Je}return xe.match(/^([^\]\\]|\\.)+/,!0),Nt.linkText}function sn(xe,Ht){return xe.eatSpace()?null:(xe.match(/^[^\s]+/,!0),xe.peek()===void 0?Ht.linkTitle=!0:xe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ht.f=Ht.inline=me,Nt.linkHref+" url")}var Mn={startState:function(){return{f:It,prevLine:{stream:null},thisLine:{stream:null},block:It,htmlState:null,indentation:0,inline:me,text:ne,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(xe){return{f:xe.f,prevLine:xe.prevLine,thisLine:xe.thisLine,block:xe.block,htmlState:xe.htmlState&&Ot.copyState(Me,xe.htmlState),indentation:xe.indentation,localMode:xe.localMode,localState:xe.localMode?Ot.copyState(xe.localMode,xe.localState):null,inline:xe.inline,text:xe.text,formatting:!1,linkText:xe.linkText,linkTitle:xe.linkTitle,linkHref:xe.linkHref,code:xe.code,em:xe.em,strong:xe.strong,strikethrough:xe.strikethrough,emoji:xe.emoji,header:xe.header,setext:xe.setext,hr:xe.hr,taskList:xe.taskList,list:xe.list,listStack:xe.listStack.slice(0),quote:xe.quote,indentedCode:xe.indentedCode,trailingSpace:xe.trailingSpace,trailingSpaceNewLine:xe.trailingSpaceNewLine,md_inside:xe.md_inside,fencedEndRE:xe.fencedEndRE}},token:function(xe,Ht){if(Ht.formatting=!1,xe!=Ht.thisLine.stream){if(Ht.header=0,Ht.hr=!1,xe.match(/^\s*$/,!0))return Ft(Ht),null;if(Ht.prevLine=Ht.thisLine,Ht.thisLine={stream:xe},Ht.taskList=!1,Ht.trailingSpace=0,Ht.trailingSpaceNewLine=!1,!Ht.localState&&(Ht.f=Ht.block,Ht.f!=At)){var Je=xe.match(/^\s*/,!0)[0].replace(/\t/g,st).length;if(Ht.indentation=Je,Ht.indentationDiff=null,Je>0)return null}}return Ht.f(xe,Ht)},innerMode:function(xe){return xe.block==At?{state:xe.htmlState,mode:Me}:xe.localState?{state:xe.localState,mode:xe.localMode}:{state:xe,mode:Mn}},indent:function(xe,Ht,Je){return xe.block==At&&Me.indent?Me.indent(xe.htmlState,Ht,Je):xe.localState&&xe.localMode.indent?xe.localMode.indent(xe.localState,Ht,Je):Ot.Pass},blankLine:Ft,getType:re,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Mn},"xml"),Ot.defineMIME("text/markdown","markdown"),Ot.defineMIME("text/x-markdown","markdown")})},98101:function(En,yn,xt){(function(Ot){Ot(xt(89780))})(function(Ot){"use strict";Ot.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 jt=0;jt<Ot.modeInfo.length;jt++){var Qt=Ot.modeInfo[jt];Qt.mimes&&(Qt.mime=Qt.mimes[0])}Ot.findModeByMIME=function(Me){Me=Me.toLowerCase();for(var Ut=0;Ut<Ot.modeInfo.length;Ut++){var pe=Ot.modeInfo[Ut];if(pe.mime==Me)return pe;if(pe.mimes){for(var Nt=0;Nt<pe.mimes.length;Nt++)if(pe.mimes[Nt]==Me)return pe}}if(/\+xml$/.test(Me))return Ot.findModeByMIME("application/xml");if(/\+json$/.test(Me))return Ot.findModeByMIME("application/json")},Ot.findModeByExtension=function(Me){Me=Me.toLowerCase();for(var Ut=0;Ut<Ot.modeInfo.length;Ut++){var pe=Ot.modeInfo[Ut];if(pe.ext){for(var Nt=0;Nt<pe.ext.length;Nt++)if(pe.ext[Nt]==Me)return pe}}},Ot.findModeByFileName=function(Me){for(var Ut=0;Ut<Ot.modeInfo.length;Ut++){var pe=Ot.modeInfo[Ut];if(pe.file&&pe.file.test(Me))return pe}var Nt=Me.lastIndexOf("."),Ie=Nt>-1&&Me.substring(Nt+1,Me.length);if(Ie)return Ot.findModeByExtension(Ie)},Ot.findModeByName=function(Me){Me=Me.toLowerCase();for(var Ut=0;Ut<Ot.modeInfo.length;Ut++){var pe=Ot.modeInfo[Ut];if(pe.name.toLowerCase()==Me)return pe;if(pe.alias){for(var Nt=0;Nt<pe.alias.length;Nt++)if(pe.alias[Nt].toLowerCase()==Me)return pe}}}})},67549:function(En,yn,xt){(function(Ot){Ot(xt(89780))})(function(Ot){"use strict";Ot.defineMode("stex",function(jt,Qt){"use strict";function Me(Tt,et){Tt.cmdState.push(et)}function Ut(Tt){return Tt.cmdState.length>0?Tt.cmdState[Tt.cmdState.length-1]:null}function pe(Tt){var et=Tt.cmdState.pop();et&&et.closeBracket()}function Nt(Tt){for(var et=Tt.cmdState,nt=et.length-1;nt>=0;nt--){var ht=et[nt];if(ht.name!="DEFAULT")return ht}return{styleIdentifier:function(){return null}}}function Ie(Tt,et,nt){return function(){this.name=Tt,this.bracketNo=0,this.style=et,this.styles=nt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var we={};we.importmodule=Ie("importmodule","tag",["string","builtin"]),we.documentclass=Ie("documentclass","tag",["","atom"]),we.usepackage=Ie("usepackage","tag",["atom"]),we.begin=Ie("begin","tag",["atom"]),we.end=Ie("end","tag",["atom"]),we.label=Ie("label","tag",["atom"]),we.ref=Ie("ref","tag",["atom"]),we.eqref=Ie("eqref","tag",["atom"]),we.cite=Ie("cite","tag",["atom"]),we.bibitem=Ie("bibitem","tag",["atom"]),we.Bibitem=Ie("Bibitem","tag",["atom"]),we.RBibitem=Ie("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function qt(Tt,et){Tt.f=et}function ce(Tt,et){var nt;if(Tt.match(/^\\[a-zA-Z@]+/)){var ht=Tt.current().slice(1);return nt=we.hasOwnProperty(ht)?we[ht]:we.DEFAULT,nt=new nt,Me(et,nt),qt(et,Be),nt.style}if(Tt.match(/^\\[$&%#{}_]/)||Tt.match(/^\\[,;!\/\\]/))return"tag";if(Tt.match("\\["))return qt(et,function(gt,vt){return Ce(gt,vt,"\\]")}),"keyword";if(Tt.match("\\("))return qt(et,function(gt,vt){return Ce(gt,vt,"\\)")}),"keyword";if(Tt.match("$$"))return qt(et,function(gt,vt){return Ce(gt,vt,"$$")}),"keyword";if(Tt.match("$"))return qt(et,function(gt,vt){return Ce(gt,vt,"$")}),"keyword";var st=Tt.next();if(st=="%")return Tt.skipToEnd(),"comment";if(st=="}"||st=="]"){if(nt=Ut(et),nt)nt.closeBracket(st),qt(et,Be);else return"error";return"bracket"}else return st=="{"||st=="["?(nt=we.DEFAULT,nt=new nt,Me(et,nt),"bracket"):/\d/.test(st)?(Tt.eatWhile(/[\w.%]/),"atom"):(Tt.eatWhile(/[\w\-_]/),nt=Nt(et),nt.name=="begin"&&(nt.argument=Tt.current()),nt.styleIdentifier())}function Ce(Tt,et,nt){if(Tt.eatSpace())return null;if(nt&&Tt.match(nt))return qt(et,ce),"keyword";if(Tt.match(/^\\[a-zA-Z@]+/))return"tag";if(Tt.match(/^[a-zA-Z]+/))return"variable-2";if(Tt.match(/^\\[$&%#{}_]/)||Tt.match(/^\\[,;!\/]/)||Tt.match(/^[\^_&]/))return"tag";if(Tt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Tt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ht=Tt.next();return ht=="{"||ht=="}"||ht=="["||ht=="]"||ht=="("||ht==")"?"bracket":ht=="%"?(Tt.skipToEnd(),"comment"):"error"}function Be(Tt,et){var nt=Tt.peek(),ht;return nt=="{"||nt=="["?(ht=Ut(et),ht.openBracket(nt),Tt.eat(nt),qt(et,ce),"bracket"):/[ \t\r]/.test(nt)?(Tt.eat(nt),null):(qt(et,ce),pe(et),ce(Tt,et))}return{startState:function(){var Tt=Qt.inMathMode?function(et,nt){return Ce(et,nt)}:ce;return{cmdState:[],f:Tt}},copyState:function(Tt){return{cmdState:Tt.cmdState.slice(),f:Tt.f}},token:function(Tt,et){return et.f(Tt,et)},blankLine:function(Tt){Tt.f=ce,Tt.cmdState.length=0},lineComment:"%"}}),Ot.defineMIME("text/x-stex","stex"),Ot.defineMIME("text/x-latex","stex")})},15525:function(En,yn,xt){(function(Ot){Ot(xt(89780))})(function(Ot){"use strict";var jt={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},Qt={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Ot.defineMode("xml",function(Me,Ut){var pe=Me.indentUnit,Nt={},Ie=Ut.htmlMode?jt:Qt;for(var we in Ie)Nt[we]=Ie[we];for(var we in Ut)Nt[we]=Ut[we];var qt,ce;function Ce(Vt,Le){function he(Ve){return Le.tokenize=Ve,Ve(Vt,Le)}var Ge=Vt.next();if(Ge=="<")return Vt.eat("!")?Vt.eat("[")?Vt.match("CDATA[")?he(et("atom","]]>")):null:Vt.match("--")?he(et("comment","-->")):Vt.match("DOCTYPE",!0,!0)?(Vt.eatWhile(/[\w\._\-]/),he(nt(1))):null:Vt.eat("?")?(Vt.eatWhile(/[\w\._\-]/),Le.tokenize=et("meta","?>"),"meta"):(qt=Vt.eat("/")?"closeTag":"openTag",Le.tokenize=Be,"tag bracket");if(Ge=="&"){var Ke;return Vt.eat("#")?Vt.eat("x")?Ke=Vt.eatWhile(/[a-fA-F\d]/)&&Vt.eat(";"):Ke=Vt.eatWhile(/[\d]/)&&Vt.eat(";"):Ke=Vt.eatWhile(/[\w\.\-:]/)&&Vt.eat(";"),Ke?"atom":"error"}else return Vt.eatWhile(/[^&<]/),null}Ce.isInText=!0;function Be(Vt,Le){var he=Vt.next();if(he==">"||he=="/"&&Vt.eat(">"))return Le.tokenize=Ce,qt=he==">"?"endTag":"selfcloseTag","tag bracket";if(he=="=")return qt="equals",null;if(he=="<"){Le.tokenize=Ce,Le.state=vt,Le.tagName=Le.tagStart=null;var Ge=Le.tokenize(Vt,Le);return Ge?Ge+" tag error":"tag error"}else return/[\'\"]/.test(he)?(Le.tokenize=Tt(he),Le.stringStartCol=Vt.column(),Le.tokenize(Vt,Le)):(Vt.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Tt(Vt){var Le=function(he,Ge){for(;!he.eol();)if(he.next()==Vt){Ge.tokenize=Be;break}return"string"};return Le.isInAttribute=!0,Le}function et(Vt,Le){return function(he,Ge){for(;!he.eol();){if(he.match(Le)){Ge.tokenize=Ce;break}he.next()}return Vt}}function nt(Vt){return function(Le,he){for(var Ge;(Ge=Le.next())!=null;){if(Ge=="<")return he.tokenize=nt(Vt+1),he.tokenize(Le,he);if(Ge==">")if(Vt==1){he.tokenize=Ce;break}else return he.tokenize=nt(Vt-1),he.tokenize(Le,he)}return"meta"}}function ht(Vt,Le,he){this.prev=Vt.context,this.tagName=Le,this.indent=Vt.indented,this.startOfLine=he,(Nt.doNotIndent.hasOwnProperty(Le)||Vt.context&&Vt.context.noIndent)&&(this.noIndent=!0)}function st(Vt){Vt.context&&(Vt.context=Vt.context.prev)}function gt(Vt,Le){for(var he;;){if(!Vt.context||(he=Vt.context.tagName,!Nt.contextGrabbers.hasOwnProperty(he)||!Nt.contextGrabbers[he].hasOwnProperty(Le)))return;st(Vt)}}function vt(Vt,Le,he){return Vt=="openTag"?(he.tagStart=Le.column(),wt):Vt=="closeTag"?Ft:vt}function wt(Vt,Le,he){return Vt=="word"?(he.tagName=Le.current(),ce="tag",Wt):Nt.allowMissingTagName&&Vt=="endTag"?(ce="tag bracket",Wt(Vt,Le,he)):(ce="error",wt)}function Ft(Vt,Le,he){if(Vt=="word"){var Ge=Le.current();return he.context&&he.context.tagName!=Ge&&Nt.implicitlyClosed.hasOwnProperty(he.context.tagName)&&st(he),he.context&&he.context.tagName==Ge||Nt.matchClosing===!1?(ce="tag",It):(ce="tag error",At)}else return Nt.allowMissingTagName&&Vt=="endTag"?(ce="tag bracket",It(Vt,Le,he)):(ce="error",At)}function It(Vt,Le,he){return Vt!="endTag"?(ce="error",It):(st(he),vt)}function At(Vt,Le,he){return ce="error",It(Vt,Le,he)}function Wt(Vt,Le,he){if(Vt=="word")return ce="attribute",re;if(Vt=="endTag"||Vt=="selfcloseTag"){var Ge=he.tagName,Ke=he.tagStart;return he.tagName=he.tagStart=null,Vt=="selfcloseTag"||Nt.autoSelfClosers.hasOwnProperty(Ge)?gt(he,Ge):(gt(he,Ge),he.context=new ht(he,Ge,Ke==he.indented)),vt}return ce="error",Wt}function re(Vt,Le,he){return Vt=="equals"?ne:(Nt.allowMissing||(ce="error"),Wt(Vt,Le,he))}function ne(Vt,Le,he){return Vt=="string"?me:Vt=="word"&&Nt.allowUnquoted?(ce="string",Wt):(ce="error",Wt(Vt,Le,he))}function me(Vt,Le,he){return Vt=="string"?me:Wt(Vt,Le,he)}return{startState:function(Vt){var Le={tokenize:Ce,state:vt,indented:Vt||0,tagName:null,tagStart:null,context:null};return Vt!=null&&(Le.baseIndent=Vt),Le},token:function(Vt,Le){if(!Le.tagName&&Vt.sol()&&(Le.indented=Vt.indentation()),Vt.eatSpace())return null;qt=null;var he=Le.tokenize(Vt,Le);return(he||qt)&&he!="comment"&&(ce=null,Le.state=Le.state(qt||he,Vt,Le),ce&&(he=ce=="error"?he+" error":ce)),he},indent:function(Vt,Le,he){var Ge=Vt.context;if(Vt.tokenize.isInAttribute)return Vt.tagStart==Vt.indented?Vt.stringStartCol+1:Vt.indented+pe;if(Ge&&Ge.noIndent)return Ot.Pass;if(Vt.tokenize!=Be&&Vt.tokenize!=Ce)return he?he.match(/^(\s*)/)[0].length:0;if(Vt.tagName)return Nt.multilineTagIndentPastTag!==!1?Vt.tagStart+Vt.tagName.length+2:Vt.tagStart+pe*(Nt.multilineTagIndentFactor||1);if(Nt.alignCDATA&&/<!\[CDATA\[/.test(Le))return 0;var Ke=Le&&/^<(\/)?([\w_:\.-]*)/.exec(Le);if(Ke&&Ke[1])for(;Ge;)if(Ge.tagName==Ke[2]){Ge=Ge.prev;break}else if(Nt.implicitlyClosed.hasOwnProperty(Ge.tagName))Ge=Ge.prev;else break;else if(Ke)for(;Ge;){var Ve=Nt.contextGrabbers[Ge.tagName];if(Ve&&Ve.hasOwnProperty(Ke[2]))Ge=Ge.prev;else break}for(;Ge&&Ge.prev&&!Ge.startOfLine;)Ge=Ge.prev;return Ge?Ge.indent+pe:Vt.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Nt.htmlMode?"html":"xml",helperType:Nt.htmlMode?"html":"xml",skipAttribute:function(Vt){Vt.state==ne&&(Vt.state=Wt)},xmlCurrentTag:function(Vt){return Vt.tagName?{name:Vt.tagName,close:Vt.type=="closeTag"}:null},xmlCurrentContext:function(Vt){for(var Le=[],he=Vt.context;he;he=he.prev)he.tagName&&Le.push(he.tagName);return Le.reverse()}}}),Ot.defineMIME("text/xml","xml"),Ot.defineMIME("application/xml","xml"),Ot.mimeModes.hasOwnProperty("text/html")||Ot.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(En,yn,xt){"use strict";xt.d(yn,{$u:function(){return we},BD:function(){return Qe},E9:function(){return Ie},FF:function(){return fi},FJ:function(){return vt},Hn:function(){return gt},KX:function(){return Ft},NB:function(){return kt},S0:function(){return de},UL:function(){return qt},Vk:function(){return st},Vm:function(){return mt},YI:function(){return vn},ZA:function(){return Qt},Zt:function(){return ce},al:function(){return Dt},bn:function(){return ie},bx:function(){return Pn},g2:function(){return bn},h1:function(){return ne},hD:function(){return ci},l4:function(){return pe},rU:function(){return St},s_:function(){return Ne},uz:function(){return Kt},z6:function(){return Ce}}),En=xt.hmd(En),function(){var Ct;function Yn(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function yi(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Yn(a)}}function _e(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Wn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},_n;if(typeof Object.setPrototypeOf=="function")_n=Object.setPrototypeOf;else{var si;t:{var ri={a:!0},hi={};try{hi.__proto__=ri,si=hi.a;break t}catch(a){}si=!1}_n=si?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Fe=_n;function Ae(a,y){if(a.prototype=Wn(y.prototype),a.prototype.constructor=a,Fe)Fe(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var b=Object.getOwnPropertyDescriptor(y,x);b&&Object.defineProperty(a,x,b)}else a[x]=y[x];a.QA=y.prototype}var Zt=typeof xt.g!="undefined"&&xt.g!=null?xt.g:self,He=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var b=arguments[x];if(b)for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(a[E]=b[E])}return a},fn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function ye(a,y){if(y){var x=Zt;a=a.split(".");for(var b=0;b<a.length-1;b++){var E=a[b];E in x||(x[E]={}),x=x[E]}a=a[a.length-1],b=x[a],y=y(b),y!=b&&y!=null&&fn(x,a,{writable:!0,value:y})}}ye("Object.assign",function(a){return a||He}),ye("Array.prototype.fill",function(a){return a||function(y,x,b){var E=this.length||0;for(0>x&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x<b;x++)this[x]=y;return this}});var ae=typeof globalThis=="object"&&globalThis||typeof xt.g=="object"&&xt.g.global===xt.g&&xt.g||typeof self=="object"&&self.self===self&&self||{};ae.requestAnimationFrame===void 0&&(ae.setImmediate===void 0?ae.requestAnimationFrame=function(a){ae.setTimeout(a,0)}:ae.requestAnimationFrame=ae.setImmediate);function Ye(){}function gn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&ae.clearTimeout(x),x=In(function(){x=-1,a.apply(b,E)},y)}}function In(a,y){return ae.setTimeout(a,y)}function Re(a){return ae.document.createElement(a)}function _t(a){throw Error(a)}function nn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),_t(a)}function cn(a,y,x,b){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",b!==void 0&&(x+="."+b),_t(x+" is not in the range "+y+": "+a)}function Bn(a){ae.console&&ae.console.log(a)}function Oe(a){return typeof a=="object"&&a!==null}function Xe(a){return Array.isArray(a)||ae.NodeList&&a instanceof ae.NodeList||ae.HTMLCollection&&a instanceof ae.HTMLCollection}function Gn(a){return Array.prototype.slice.call(a)}function Xn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):_t("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Jn(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):_t("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Rn(){var a=Ki.pop();return a===void 0?[]:a}function ni(a){a.length=0,Ki.push(a)}function Qn(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(Oe(a)&&a.constructor)return Qn(a.constructor);return typeof a}function qn(a){var y=a;return Oe(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 Si(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 Vi(a,y,x){Object.defineProperty(jr.prototype,a,{get:y,set:x})}function un(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var b=0,E=0;E<a.length;E+=2)x[b++]=y[a.substr(E,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=b=0;256>x;x++)b=(b+y[x]+119)%256,E=y[x],y[x]=y[b],y[b]=E;b=x=0;for(var z="",tt=0;tt<a.length;tt++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[b])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var lo=ae.navigator!==void 0&&0<ae.navigator.userAgent.indexOf("Trident/7"),to=ae.navigator!==void 0&&ae.navigator.platform!==void 0&&ae.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Ki=[];Object.freeze([]),Ye.className="Util",Ye.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Ye.adym="gojs.net",Ye.vfo="28e645fdb266",Ye.className="Util";function en(a,y,x){Gi(this),this.j=a,this.xa=y,this.o=x}en.prototype.toString=function(){return"EnumValue."+this.xa};function Dn(a,y){return y==null||y===""?null:a[y]}Zt.Object.defineProperties(en.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),en.className="EnumValue";function gi(){this.ew=[]}gi.prototype.toString=function(){return this.ew.join("")},gi.prototype.add=function(a){a!==""&&this.ew.push(a)},gi.className="StringBuilder";function ki(){}ki.className="PropertyCollection";var Pi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){ae.console&&ae.console.log(a)},HA:function(a,y,x,b){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var z=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(tt,ot){return function(){throw Error("Property "+tt.Zl[ot.Tj]+" of "+tt.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Di(){}Di.prototype.reset=function(){},Di.prototype.next=function(){return!1},Di.prototype.Ad=function(){return!1},Di.prototype.first=function(){return null},Di.prototype.any=function(){return!1},Di.prototype.all=function(){return!0},Di.prototype.each=function(){return this},Di.prototype.map=function(){return this},Di.prototype.filter=function(){return this},Di.prototype.de=function(){},Di.prototype.toString=function(){return"EmptyIterator"},Zt.Object.defineProperties(Di.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Di.prototype.first=Di.prototype.first,Di.prototype.hasNext=Di.prototype.Ad,Di.prototype.next=Di.prototype.next,Di.prototype.reset=Di.prototype.reset;var Zi=null;Di.className="EmptyIterator",Zi=new Di;function Ri(a){this.key=-1,this.value=a}Ri.prototype.reset=function(){this.key=-1},Ri.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Ri.prototype.Ad=function(){return this.next()},Ri.prototype.first=function(){return this.key=0,this.value},Ri.prototype.any=function(a){return this.key=-1,a(this.value)},Ri.prototype.all=function(a){return this.key=-1,a(this.value)},Ri.prototype.each=function(a){return this.key=-1,a(this.value),this},Ri.prototype.map=function(a){return new Ri(a(this.value))},Ri.prototype.filter=function(a){return a(this.value)?new Ri(this.value):Zi},Ri.prototype.de=function(){this.value=null},Ri.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Zt.Object.defineProperties(Ri.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Ri.prototype.first=Ri.prototype.first,Ri.prototype.hasNext=Ri.prototype.Ad,Ri.prototype.next=Ri.prototype.next,Ri.prototype.reset=Ri.prototype.reset,Ri.className="SingletonIterator";function $i(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}$i.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},$i.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,b=this.qf;if(b!==null)for(;x<y;){var E=a[x];if(b(E))return this.key=this.Za=x,this.value=E,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},$i.prototype.Ad=function(){return this.next()},$i.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var b=0;b<y;){var E=a[b];if(x(E))return this.key=this.Za=b,this.value=E;b++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},$i.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var z=y[E];if((b===null||b(z))&&a(z))return!0}return!1},$i.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var z=y[E];if((b===null||b(z))&&!a(z))return!1}return!0},$i.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var z=y[E];(b===null||b(z))&&a(z)}return this},$i.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,z=0;z<b;z++){var tt=y[z];(E===null||E(tt))&&x.push(a(tt))}return a=new mn,a.s=x,a.xb(),a.iterator},$i.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,z=0;z<b;z++){var tt=y[z];(E===null||E(tt))&&a(tt)&&x.push(tt)}return a=new mn,a.s=x,a.xb(),a.iterator},$i.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},$i.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Zt.Object.defineProperties($i.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,b=x.length,E=0;E<b;E++)a(x[E])&&y++;return y}return this.Bb.s.length}}}),$i.prototype.first=$i.prototype.first,$i.prototype.hasNext=$i.prototype.Ad,$i.prototype.next=$i.prototype.next,$i.prototype.reset=$i.prototype.reset,$i.className="ListIterator";function qi(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}qi.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},qi.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)},qi.prototype.Ad=function(){return this.next()},qi.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},qi.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},qi.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},qi.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},qi.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new mn,a.s=x,a.xb(),a.iterator},qi.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new mn,a.s=x,a.xb(),a.iterator},qi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},qi.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Zt.Object.defineProperties(qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),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="ListIteratorBackwards";function mn(a){Gi(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&_t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=mn.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.toString=function(){return"List()#"+ji(this)},Ct.add=function(a){return a===null?this:(this._isFrozen&&nn(this,a),this.s.push(a),this.xb(),this)},Ct.push=function(a){this.add(a)},Ct.addAll=function(a){if(a===null)return this;this._isFrozen&&nn(this);var y=this.s;if(Xe(a))for(var x=a.length,b=0;b<x;b++)y.push(a[b]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Ct.clear=function(){this._isFrozen&&nn(this),this.s.length=0,this.xb()},Ct.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Ct.has=function(a){return this.contains(a)},Ct.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Ct.M=function(a){var y=this.s;return(0>a||a>=y.length)&&cn(a,"0 <= i < length",mn,"elt:i"),y[a]},Ct.get=function(a){return this.M(a)},Ct.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&cn(a,"0 <= i < length",mn,"setElt:i"),this._isFrozen&&nn(this,a),x[a]=y},Ct.set=function(a,y){this.cd(a,y)},Ct.first=function(){var a=this.s;return a.length===0?null:a[0]},Ct.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Ct.pop=function(){this._isFrozen&&nn(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,b=0;b<x;b++)if(a(y[b]))return!0;return!1},mn.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},mn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},mn.prototype.map=function(a){for(var y=new mn,x=[],b=this.s,E=b.length,z=0;z<E;z++)x.push(a(b[z]));return y.s=x,y.xb(),y},mn.prototype.filter=function(a){for(var y=new mn,x=[],b=this.s,E=b.length,z=0;z<E;z++){var tt=b[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},Ct=mn.prototype,Ct.Gb=function(a,y){0>a&&cn(a,">= 0",mn,"insertAt:i"),this._isFrozen&&nn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Ct.remove=function(a){if(a===null)return!1;this._isFrozen&&nn(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)},Ct.delete=function(a){return this.remove(a)},Ct.mb=function(a){var y=this.s;(0>a||a>=y.length)&&cn(a,"0 <= i < length",mn,"removeAt:i"),this._isFrozen&&nn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Ct.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&nn(this);for(var E=a,z=y+1;z<b;)x[E++]=x[z++];return x.length=b-(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},Ct=mn.prototype,Ct.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},Ct.Iv=function(){for(var a=new tn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},Ct.sort=function(a){return this._isFrozen&&nn(this),this.s.sort(a),this.xb(),this},Ct.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&nn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=E-1)&&cn(y,"0 <= from < length",mn,"sortRange:from"),z===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},Ct.reverse=function(){return this._isFrozen&&nn(this),this.s.reverse(),this.xb(),this},Zt.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 Zi;var a=this.Sa;return a!==null?(a.reset(),a):new $i(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Zi;var a=this.Hg;return a!==null?(a.reset(),a):new qi(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 Lo(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Lo.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Lo.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)},Lo.prototype.Ad=function(){return this.next()},Lo.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},Lo.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},Lo.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},Lo.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},Lo.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},Lo.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new mn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Lo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Lo.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Zt.Object.defineProperties(Lo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Lo.prototype.first=Lo.prototype.first,Lo.prototype.hasNext=Lo.prototype.Ad,Lo.prototype.next=Lo.prototype.next,Lo.prototype.reset=Lo.prototype.reset,Lo.className="SetIterator";function tn(a){Gi(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&_t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=tn.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.toString=function(){return"Set()#"+ji(this)},Ct.add=function(a){if(a===null)return this;this._isFrozen&&nn(this,a);var y=a;return Oe(a)&&(y=Yi(a)),this.Tb[y]===void 0&&(this.Sb++,a=new zi(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},Ct.addAll=function(a){if(a===null)return this;if(this._isFrozen&&nn(this),Xe(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},Ct.contains=function(a){if(a===null)return!1;var y=a;return Oe(a)&&(y=ji(a),y===void 0)?!1:this.Tb[y]!==void 0},Ct.has=function(a){return this.contains(a)},Ct.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Ct.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Ct.first=function(){var a=this.ea;return a===null?null:a.value},tn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},tn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},tn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},tn.prototype.map=function(a){for(var y=new tn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},tn.prototype.filter=function(a){for(var y=new tn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},Ct=tn.prototype,Ct.remove=function(a){if(a===null)return!1;this._isFrozen&&nn(this,a);var y=a;if(Oe(a)&&(y=ji(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},Ct.delete=function(a){return this.remove(a)},Ct.hp=function(a){if(a===null)return this;if(this._isFrozen&&nn(this),Xe(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},Ct.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&nn(this);var y=new tn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var b=x.value;y.contains(b)||a.push(b)}return this.hp(a),this},Ct.clear=function(){this._isFrozen&&nn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},tn.prototype.copy=function(){var a=new tn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},tn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,b;for(b in y)a[x]=y[b].value,x++;return a},tn.prototype.Hv=function(){var a=new mn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Gi(a){a.__gohashid=No++}function Yi(a){var y=a.__gohashid;return y===void 0&&(y=No++,a.__gohashid=y),y}function ji(a){return a.__gohashid}Zt.Object.defineProperties(tn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Zi;var a=this.Sa;return a!==null?(a.reset(),a):new Lo(this)}}}),tn.prototype.toList=tn.prototype.Hv,tn.prototype.toArray=tn.prototype.Fa,tn.prototype.clear=tn.prototype.clear,tn.prototype.retainAll=tn.prototype.pA,tn.prototype.removeAll=tn.prototype.hp,tn.prototype.delete=tn.prototype.delete,tn.prototype.remove=tn.prototype.remove,tn.prototype.first=tn.prototype.first,tn.prototype.containsAny=tn.prototype.Ty,tn.prototype.containsAll=tn.prototype.Sy,tn.prototype.has=tn.prototype.has,tn.prototype.contains=tn.prototype.contains,tn.prototype.addAll=tn.prototype.addAll,tn.prototype.add=tn.prototype.add,tn.prototype.thaw=tn.prototype.ka,tn.prototype.freeze=tn.prototype.freeze;var No=1;tn.className="Set",tn.uniqueHash=Gi,tn.hashIdUnique=Yi,tn.hashId=ji;function Mo(a){this.ma=a,this.qa=a.Ja,this.sa=null}Mo.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Mo.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)},Mo.prototype.Ad=function(){return this.next()},Mo.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},Mo.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},Mo.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},Mo.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},Mo.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},Mo.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new mn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},Mo.prototype.de=function(){this.value=this.key=null,this.qa=-1},Mo.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Zt.Object.defineProperties(Mo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Mo.prototype.first=Mo.prototype.first,Mo.prototype.hasNext=Mo.prototype.Ad,Mo.prototype.next=Mo.prototype.next,Mo.prototype.reset=Mo.prototype.reset,Mo.className="MapKeySetIterator";function Ii(a){tn.call(this),Gi(this),this._isFrozen=!0,this.ma=a}Ae(Ii,tn),Ct=Ii.prototype,Ct.freeze=function(){return this},Ct.ka=function(){return this},Ct.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Ct.add=function(){_t("This Set is read-only: "+this.toString())},Ct.contains=function(a){return this.ma.contains(a)},Ct.has=function(a){return this.contains(a)},Ct.remove=function(){_t("This Set is read-only: "+this.toString())},Ct.delete=function(a){return this.remove(a)},Ct.clear=function(){_t("This Set is read-only: "+this.toString())},Ct.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Ii.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Ii.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Ii.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Ii.prototype.map=function(a){for(var y=new tn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Ii.prototype.filter=function(a){for(var y=new tn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Ii.prototype.copy=function(){return new Ii(this.ma)},Ii.prototype.Iv=function(){var a=new tn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ii.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},Ii.prototype.Hv=function(){var a=new mn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Zt.Object.defineProperties(Ii.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Zi:new Mo(this.ma)}}}),Ii.prototype.toList=Ii.prototype.Hv,Ii.prototype.toArray=Ii.prototype.Fa,Ii.prototype.toSet=Ii.prototype.Iv,Ii.prototype.first=Ii.prototype.first,Ii.prototype.clear=Ii.prototype.clear,Ii.prototype.delete=Ii.prototype.delete,Ii.prototype.remove=Ii.prototype.remove,Ii.prototype.has=Ii.prototype.has,Ii.prototype.contains=Ii.prototype.contains,Ii.prototype.add=Ii.prototype.add,Ii.prototype.thaw=Ii.prototype.ka,Ii.prototype.freeze=Ii.prototype.freeze,Ii.className="MapKeySet";function Ni(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Ni.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Ni.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)},Ni.prototype.Ad=function(){return this.next()},Ni.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},Ni.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},Ni.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},Ni.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},Ni.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},Ni.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new mn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Ni.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Ni.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Zt.Object.defineProperties(Ni.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ni.prototype.first=Ni.prototype.first,Ni.prototype.hasNext=Ni.prototype.Ad,Ni.prototype.next=Ni.prototype.next,Ni.prototype.reset=Ni.prototype.reset,Ni.className="MapValueSetIterator";function zi(a,y){this.key=a,this.value=y,this.ll=this.va=null}zi.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},zi.className="KeyValuePair";function uo(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}uo.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},uo.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)},uo.prototype.Ad=function(){return this.next()},uo.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},uo.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},uo.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},uo.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},uo.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},uo.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},uo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},uo.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Zt.Object.defineProperties(uo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),uo.prototype.first=uo.prototype.first,uo.prototype.hasNext=uo.prototype.Ad,uo.prototype.next=uo.prototype.next,uo.prototype.reset=uo.prototype.reset,uo.className="MapIterator";function li(a){Gi(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"&&_t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ct=li.prototype,Ct.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.toString=function(){return"Map()#"+ji(this)},Ct.add=function(a,y){this._isFrozen&&nn(this,a);var x=a;Oe(a)&&(x=Yi(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new zi(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):b.value=y,this},Ct.set=function(a,y){return this.add(a,y)},Ct.addAll=function(a){if(a===null)return this;if(Xe(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];this.add(b.key,b.value)}else if(a instanceof li)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},Ct.first=function(){return this.ea},li.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},li.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},li.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},li.prototype.map=function(a){for(var y=new li,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},li.prototype.filter=function(a){for(var y=new li,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Ct=li.prototype,Ct.contains=function(a){var y=a;return Oe(a)&&(y=ji(a),y===void 0)?!1:this.Tb[y]!==void 0},Ct.has=function(a){return this.contains(a)},Ct.I=function(a){var y=a;return Oe(a)&&(y=ji(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Ct.get=function(a){return this.I(a)},Ct.remove=function(a){if(a===null)return!1;this._isFrozen&&nn(this,a);var y=a;if(Oe(a)&&(y=ji(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},Ct.delete=function(a){return this.remove(a)},Ct.clear=function(){this._isFrozen&&nn(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()},li.prototype.copy=function(){var a=new li,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},li.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,b;for(b in a){var E=a[b];y[x]=new zi(E.key,E.value),x++}return y},li.prototype.Lf=function(){return new Ii(this)},Zt.Object.defineProperties(li.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Zi;var a=this.Sa;return a!==null?(a.reset(),a):new uo(this)}},iteratorKeys:{get:function(){return 0>=this.count?Zi:new Mo(this)}},iteratorValues:{get:function(){if(0>=this.count)return Zi;var a=this.jf;return a!==null?(a.reset(),a):new Ni(this)}}}),li.prototype.toKeySet=li.prototype.Lf,li.prototype.toArray=li.prototype.Fa,li.prototype.clear=li.prototype.clear,li.prototype.delete=li.prototype.delete,li.prototype.remove=li.prototype.remove,li.prototype.get=li.prototype.get,li.prototype.getValue=li.prototype.I,li.prototype.has=li.prototype.has,li.prototype.contains=li.prototype.contains,li.prototype.first=li.prototype.first,li.prototype.addAll=li.prototype.addAll,li.prototype.set=li.prototype.set,li.prototype.add=li.prototype.add,li.prototype.thaw=li.prototype.ka,li.prototype.freeze=li.prototype.freeze,li.className="Map";function $t(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):_t("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Ho,or,Cr,Fr,cr;$t.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},$t.prototype.h=function(a,y){return this.x=a,this.y=y,this},$t.prototype.sg=function(a,y){return this.x=a,this.y=y,this},$t.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},$t.prototype.copy=function(){var a=new $t;return a.x=this.x,a.y=this.y,a},Ct=$t.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&_t("cannot thaw constant: "+this),this._isFrozen=!1,this};function oo(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new $t(x,E)}return new $t}function fo(a){return a.x.toString()+" "+a.y.toString()}Ct.toString=function(){return"Point("+this.x+","+this.y+")"},Ct.D=function(a){return a instanceof $t?this.x===a.x&&this.y===a.y:!1},Ct.hi=function(a,y){return this.x===a&&this.y===y},Ct.Xa=function(a){return ke.B(this.x,a.x)&&ke.B(this.y,a.y)},Ct.add=function(a){return this.x+=a.x,this.y+=a.y,this},Ct.re=function(a){return this.x-=a.x,this.y-=a.y,this},Ct.offset=function(a,y){return this.x+=a,this.y+=y,this},$t.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},Ct=$t.prototype,Ct.scale=function(a,y){return this.x*=a,this.y*=y,this},Ct.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Ct.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Ct.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},Ct.ab=function(a){return _o(a.x-this.x,a.y-this.y)},Ct.direction=function(a,y){return _o(a-this.x,y-this.y)};function _o(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}Ct.Ry=function(a,y){return ke.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Ct.fA=function(a,y,x,b){return ke.qh(a,y,x,b,this.x,this.y,this),this},Ct.gA=function(a,y){return ke.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Ct.uA=function(a,y,x,b){return ke.No(this.x,this.y,a,y,x,b,this),this},Ct.vA=function(a,y){return ke.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Ct.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},Ct.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},Ct.transform=function(a){return a.Ga(this),this};function Co(a,y){return y.Cd(a),a}function lr(a,y,x,b,E,z){var tt=E-x,ot=z-b,rt=tt*tt+ot*ot;x-=a,b-=y;var lt=-x*tt-b*ot;return 0>=lt||lt>=rt?(tt=E-a,ot=z-y,Math.min(x*x+b*b,tt*tt+ot*ot)):(a=tt*b-ot*x,a*a/rt)}function ha(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function So(a,y,x,b){return a=x-a,y=b-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(b=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}Ct.w=function(){return isFinite(this.x)&&isFinite(this.y)},$t.alloc=function(){var a=Xi.pop();return a===void 0?new $t:a},$t.allocAt=function(a,y){var x=Xi.pop();return x===void 0?new $t(a,y):(x.x=a,x.y=y,x)},$t.free=function(a){Xi.push(a)},$t.prototype.isReal=$t.prototype.w,$t.prototype.setSpot=$t.prototype.yi,$t.prototype.setRectSpot=$t.prototype.xi,$t.prototype.snapToGridPoint=$t.prototype.vA,$t.prototype.snapToGrid=$t.prototype.uA,$t.prototype.projectOntoLineSegmentPoint=$t.prototype.gA,$t.prototype.projectOntoLineSegment=$t.prototype.fA,$t.intersectingLineSegments=function(a,y,x,b,E,z,tt,ot){return ke.Rl(a,y,x,b,E,z,tt,ot)},$t.prototype.compareWithLineSegmentPoint=$t.prototype.Ry,$t.compareWithLineSegment=function(a,y,x,b,E,z){return ke.Fl(a,y,x,b,E,z)},$t.prototype.direction=$t.prototype.direction,$t.prototype.directionPoint=$t.prototype.ab,$t.prototype.normalize=$t.prototype.normalize,$t.prototype.distanceSquared=$t.prototype.zd,$t.prototype.distanceSquaredPoint=$t.prototype.Bf,$t.prototype.scale=$t.prototype.scale,$t.prototype.rotate=$t.prototype.rotate,$t.prototype.offset=$t.prototype.offset,$t.prototype.subtract=$t.prototype.re,$t.prototype.add=$t.prototype.add,$t.prototype.equalsApprox=$t.prototype.Xa,$t.prototype.equalTo=$t.prototype.hi,$t.prototype.equals=$t.prototype.D,$t.prototype.set=$t.prototype.set,$t.prototype.setTo=$t.prototype.sg;var Xi=[];$t.className="Point",$t.parse=oo,$t.stringify=fo,$t.distanceLineSegmentSquared=lr,$t.distanceSquared=ha,$t.direction=So,$t.Origin=Ho=new $t(0,0).ja(),$t.InfiniteTopLeft=or=new $t(-1/0,-1/0).ja(),$t.InfiniteBottomRight=Cr=new $t(1/0,1/0).ja(),$t.SixPoint=Fr=new $t(6,6).ja(),$t.NoPoint=cr=new $t(NaN,NaN).ja(),$t.parse=oo,$t.stringify=fo,$t.distanceLineSegmentSquared=lr,$t.distanceSquared=ha,$t.direction=So;function Zn(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):_t("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Ji,qo,Or,ur,Yo,xr,wr;Zn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Zn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Zn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Zn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Zn.prototype.copy=function(){var a=new Zn;return a.width=this.width,a.height=this.height,a},Ct=Zn.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&_t("cannot thaw constant: "+this),this._isFrozen=!1,this};function ta(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Zn(x,E)}return new Zn}function da(a){return a.width.toString()+" "+a.height.toString()}Ct.toString=function(){return"Size("+this.width+","+this.height+")"},Ct.D=function(a){return a instanceof Zn?this.width===a.width&&this.height===a.height:!1},Ct.hi=function(a,y){return this.width===a&&this.height===y},Ct.Xa=function(a){return ke.B(this.width,a.width)&&ke.B(this.height,a.height)},Ct.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},Ct.w=function(){return isFinite(this.width)&&isFinite(this.height)},Zn.alloc=function(){var a=wa.pop();return a===void 0?new Zn:a},Zn.free=function(a){wa.push(a)},Zn.prototype.isReal=Zn.prototype.w,Zn.prototype.inflate=Zn.prototype.Bc,Zn.prototype.equalsApprox=Zn.prototype.Xa,Zn.prototype.equalTo=Zn.prototype.hi,Zn.prototype.equals=Zn.prototype.D,Zn.prototype.set=Zn.prototype.set,Zn.prototype.setTo=Zn.prototype.sg;var wa=[];Zn.className="Size",Zn.parse=ta,Zn.stringify=da,Zn.ZeroSize=Ji=new Zn(0,0).ja(),Zn.OneSize=qo=new Zn(1,1).ja(),Zn.SixSize=Or=new Zn(6,6).ja(),Zn.EightSize=ur=new Zn(8,8).ja(),Zn.TenSize=Yo=new Zn(10,10).ja(),Zn.InfiniteSize=xr=new Zn(1/0,1/0).ja(),Zn.NoSize=wr=new Zn(NaN,NaN).ja(),Zn.parse=ta,Zn.stringify=da;function an(a,y,x,b){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof $t?(x=a.x,a=a.y,y instanceof $t?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof Zn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):_t("Incorrect second argument supplied to Rect constructor "+y)):_t("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ct=an.prototype,Ct.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ct.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Jr(a,y,x){a.width=y,a.height=x}Ct.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},Ct.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ct.dd=function(a){return this.x=a.x,this.y=a.y,this},Ct.tA=function(a){return this.width=a.width,this.height=a.height,this},an.prototype.copy=function(){var a=new an;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Ct=an.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&_t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Zs(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var z=0;a[y]==="";)y++;(b=a[y++])&&(z=parseFloat(b));for(var tt=0;a[y]==="";)y++;return(b=a[y++])&&(tt=parseFloat(b)),new an(x,E,z,tt)}return new an}function ps(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Ct.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Ct.D=function(a){return a instanceof an?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Ct.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},Ct.Xa=function(a){return ke.B(this.x,a.x)&&ke.B(this.y,a.y)&&ke.B(this.width,a.width)&&ke.B(this.height,a.height)};function Ds(a,y){return ke.$(a.x,y.x)&&ke.$(a.y,y.y)&&ke.$(a.width,y.width)&&ke.$(a.height,y.height)}Ct.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Ct.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},Ct.contains=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},Ct.offset=function(a,y){return this.x+=a,this.y+=y,this},Ct.Bc=function(a,y){return $o(this,y,a,y,a)},Ct.Co=function(a){return $o(this,a.top,a.right,a.bottom,a.left)},Ct.Fv=function(a){return $o(this,-a.top,-a.right,-a.bottom,-a.left)},Ct.Hz=function(a,y,x,b){return $o(this,a,y,x,b)};function $o(a,y,x,b,E){var z=a.width;return x+E<=-z?(a.x+=z/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}Ct.Ex=function(a){return Ms(this,a.x,a.y,a.width,a.height)},Ct.Uu=function(a,y,x,b){return Ms(this,a,y,x,b)};function Ms(a,y,x,b,E){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}Ct.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Ct.Vu=function(a,y,x,b){var E=this.width,z=this.x;return E!==1/0&&x!==1/0&&(E+=z,x+=a,isNaN(x)||isNaN(E)||z>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function Nr(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}Ct.Ye=function(a){return Go(this,a.x,a.y,0,0)},Ct.ed=function(a){return Go(this,a.x,a.y,a.width,a.height)},Ct.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),Go(this,a,y,x,b)};function Go(a,y,x,b,E){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}Ct.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 fr(a,y,x,b,E,z,tt,ot){return tt===void 0&&(tt=0),ot===void 0&&(ot=0),a<=E&&E+tt<=a+x&&y<=z&&z+ot<=y+b}function aa(a,y,x,b,E,z,tt,ot){return a>tt+E||E>x+a?!1:!(y>ot+z||z>b+y)}Ct.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ct.Mz=function(){return this.width===0&&this.height===0},an.alloc=function(){var a=ko.pop();return a===void 0?new an:a},an.allocAt=function(a,y,x,b){var E=ko.pop();return E===void 0?new an(a,y,x,b):E.h(a,y,x,b)},an.free=function(a){ko.push(a)},Zt.Object.defineProperties(an.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 $t(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Zn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new $t(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}}}),an.prototype.isEmpty=an.prototype.Mz,an.prototype.isReal=an.prototype.w,an.intersectsLineSegment=function(a,y,x,b,E,z,tt,ot){return ke.Fx(a,y,x,b,E,z,tt,ot)},an.prototype.setSpot=an.prototype.yi,an.prototype.union=an.prototype.Kv,an.prototype.unionRect=an.prototype.ed,an.prototype.unionPoint=an.prototype.Ye,an.prototype.intersects=an.prototype.Vu,an.prototype.intersectsRect=an.prototype.Yc,an.prototype.intersect=an.prototype.Uu,an.prototype.intersectRect=an.prototype.Ex,an.prototype.grow=an.prototype.Hz,an.prototype.subtractMargin=an.prototype.Fv,an.prototype.addMargin=an.prototype.Co,an.prototype.inflate=an.prototype.Bc,an.prototype.offset=an.prototype.offset,an.prototype.contains=an.prototype.contains,an.prototype.containsRect=an.prototype.Re,an.prototype.containsPoint=an.prototype.ca,an.prototype.equalsApprox=an.prototype.Xa,an.prototype.equalTo=an.prototype.hi,an.prototype.equals=an.prototype.D,an.prototype.setSize=an.prototype.tA,an.prototype.setPoint=an.prototype.dd,an.prototype.set=an.prototype.set,an.prototype.setTo=an.prototype.sg;var xo=null,tr=null,ko=[];an.className="Rect",an.parse=Zs,an.stringify=ps,an.contains=fr,an.intersects=aa,an.ZeroRect=xo=new an(0,0,0,0).ja(),an.NoRect=tr=new an(NaN,NaN,NaN,NaN).ja(),an.parse=Zs,an.stringify=ps,an.contains=fr,an.intersects=aa;function vi(a,y,x,b){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):_t("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}vi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},vi.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},vi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},vi.prototype.copy=function(){var a=new vi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Ct=vi.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&_t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Dr(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new vi;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new vi(x);for(var z=NaN;a[y]==="";)y++;if((b=a[y++])&&(z=parseFloat(b)),isNaN(z))return new vi(x,E);for(var tt=NaN;a[y]==="";)y++;return(b=a[y++])&&(tt=parseFloat(b)),isNaN(tt)?new vi(x,E):new vi(x,E,z,tt)}return new vi}function sa(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Ct.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Ct.D=function(a){return a instanceof vi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Ct.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},Ct.Xa=function(a){return ke.B(this.top,a.top)&&ke.B(this.right,a.right)&&ke.B(this.bottom,a.bottom)&&ke.B(this.left,a.left)},Ct.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},vi.alloc=function(){var a=ws.pop();return a===void 0?new vi:a},vi.free=function(a){ws.push(a)},vi.prototype.isReal=vi.prototype.w,vi.prototype.equalsApprox=vi.prototype.Xa,vi.prototype.equalTo=vi.prototype.hi,vi.prototype.equals=vi.prototype.D,vi.prototype.set=vi.prototype.set,vi.prototype.setTo=vi.prototype.sg;var ts=null,Ls=null,ws=[];vi.className="Margin",vi.parse=Dr,vi.stringify=sa,vi.ZeroMargin=ts=new vi(0,0,0,0).ja(),vi.TwoMargin=Ls=new vi(2,2,2,2).ja(),vi.parse=Dr,vi.stringify=sa;function xi(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var Qr,ea,ss,Al,Rl,Zo,ph,ol,rl,As,bu,Ru,Ws,pl,Hh,hd,Gh,$d,$h,mh,zu,zl,dd,Zh,vh,hr,zr,ks,Xa,Ga,va,Ta,Va,$a,ju,jl;xi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},xi.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},xi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},xi.prototype.copy=function(){var a=new xi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Ct=xi.prototype,Ct.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ct.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return Object.isFrozen(this)&&_t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ia(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function xc(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Qr;if(a==="TopLeft")return ea;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return ss;if(a==="TopRight")return Al;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Rl;if(a==="Center")return Zo;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return ph;if(a==="BottomLeft")return ol;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return rl;if(a==="BottomRight")return As;if(a==="TopSide")return bu;if(a==="LeftSide")return Ru;if(a==="RightSide")return Ws;if(a==="BottomSide")return pl;if(a==="TopBottomSides")return Hh;if(a==="LeftRightSides")return hd;if(a==="TopLeftSides")return Gh;if(a==="TopRightSides")return $d;if(a==="BottomLeftSides")return $h;if(a==="BottomRightSides")return mh;if(a==="NotTopSide")return zu;if(a==="NotLeftSide")return zl;if(a==="NotRightSide")return dd;if(a==="NotBottomSide")return Zh;if(a==="AllSides")return vh;if(a==="Default")return hr;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var z=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(z=parseFloat(b));for(var tt=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(tt=parseFloat(b)),new xi(x,E,z,tt)}return new xi}function Pc(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Ct.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(Qr)?"None":this.D(ea)?"TopLeft":this.D(ss)?"Top":this.D(Al)?"TopRight":this.D(Rl)?"Left":this.D(Zo)?"Center":this.D(ph)?"Right":this.D(ol)?"BottomLeft":this.D(rl)?"Bottom":this.D(As)?"BottomRight":this.D(bu)?"TopSide":this.D(Ru)?"LeftSide":this.D(Ws)?"RightSide":this.D(pl)?"BottomSide":this.D(Hh)?"TopBottomSides":this.D(hd)?"LeftRightSides":this.D(Gh)?"TopLeftSides":this.D($d)?"TopRightSides":this.D($h)?"BottomLeftSides":this.D(mh)?"BottomRightSides":this.D(zu)?"NotTopSide":this.D(zl)?"NotLeftSide":this.D(dd)?"NotRightSide":this.D(Zh)?"NotBottomSide":this.D(vh)?"AllSides":this.D(hr)?"Default":"None"},Ct.D=function(a){return a instanceof xi?(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},Ct.gv=function(){return new xi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Ct.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(zr))a=Ru;else if(a.D(ks))a=Ws;else if(a.D(Xa))a=bu;else if(a.D(Ga))a=pl;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Ct.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Ct.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Ct.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Ct.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Ct.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},xi.alloc=function(){var a=Wh.pop();return a===void 0?new xi:a},xi.free=function(a){Wh.push(a)},xi.prototype.isDefault=xi.prototype.Xb,xi.prototype.isNone=xi.prototype.ys,xi.prototype.isSide=xi.prototype.$c,xi.prototype.isNoSpot=xi.prototype.Mc,xi.prototype.isSpot=xi.prototype.sb,xi.prototype.includesSide=xi.prototype.Hf,xi.prototype.opposite=xi.prototype.gv,xi.prototype.equals=xi.prototype.D,xi.prototype.set=xi.prototype.set,xi.prototype.setTo=xi.prototype.sg;var Wh=[];xi.className="Spot",xi.parse=xc,xi.stringify=Pc,xi.None=Qr=Ia(new xi(0,0,0,0),0).ja(),xi.Default=hr=Ia(new xi(0,0,-1,0),-1).ja(),xi.TopLeft=ea=new xi(0,0,0,0).ja(),xi.TopCenter=ss=new xi(.5,0,0,0).ja(),xi.TopRight=Al=new xi(1,0,0,0).ja(),xi.LeftCenter=Rl=new xi(0,.5,0,0).ja(),xi.Center=Zo=new xi(.5,.5,0,0).ja(),xi.RightCenter=ph=new xi(1,.5,0,0).ja(),xi.BottomLeft=ol=new xi(0,1,0,0).ja(),xi.BottomCenter=rl=new xi(.5,1,0,0).ja(),xi.BottomRight=As=new xi(1,1,0,0).ja(),xi.MiddleTop=va=ss,xi.MiddleLeft=Ta=Rl,xi.MiddleRight=Va=ph,xi.MiddleBottom=$a=rl,xi.Top=Xa=ss,xi.Left=zr=Rl,xi.Right=ks=ph,xi.Bottom=Ga=rl,xi.TopSide=bu=Ia(new xi(0,0,1,1),1).ja(),xi.LeftSide=Ru=Ia(new xi(0,0,1,2),1).ja(),xi.RightSide=Ws=Ia(new xi(0,0,1,4),1).ja(),xi.BottomSide=pl=Ia(new xi(0,0,1,8),1).ja(),xi.TopBottomSides=Hh=Ia(new xi(0,0,1,9),1).ja(),xi.LeftRightSides=hd=Ia(new xi(0,0,1,6),1).ja(),xi.TopLeftSides=Gh=Ia(new xi(0,0,1,3),1).ja(),xi.TopRightSides=$d=Ia(new xi(0,0,1,5),1).ja(),xi.BottomLeftSides=$h=Ia(new xi(0,0,1,10),1).ja(),xi.BottomRightSides=mh=Ia(new xi(0,0,1,12),1).ja(),xi.NotTopSide=zu=Ia(new xi(0,0,1,14),1).ja(),xi.NotLeftSide=zl=Ia(new xi(0,0,1,13),1).ja(),xi.NotRightSide=dd=Ia(new xi(0,0,1,11),1).ja(),xi.NotBottomSide=Zh=Ia(new xi(0,0,1,7),1).ja(),xi.AllSides=vh=Ia(new xi(0,0,1,15),1).ja(),ju=new xi(.156,.156).ja(),jl=new xi(.844,.844).ja(),xi.parse=xc,xi.stringify=Pc;function Po(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Po.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},Po.prototype.setTransform=function(a,y,x,b,E,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=z,this},Po.prototype.copy=function(){var a=new Po;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},Po.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Po.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},Po.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Po.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Po.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},Po.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,z=a.m11*y,tt=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*z,E=this.m12*E+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},Po.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=z,this},Po.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,z=this.m11*-b+this.m21*a,tt=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Ct=Po.prototype,Ct.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Ct.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Ct.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)},Ct.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ct.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ct.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,z=this.m11,tt=this.m12,ot=this.m21,rt=this.m22,lt=this.dx,ut=this.dy,ft=y*z+x*ot+lt,yt=y*tt+x*rt+ut,Pt=b*z+x*ot+lt,bt=b*tt+x*rt+ut;return x=y*z+E*ot+lt,y=y*tt+E*rt+ut,z=b*z+E*ot+lt,b=b*tt+E*rt+ut,E=Math.min(ft,Pt),ft=Math.max(ft,Pt),Pt=Math.min(yt,bt),yt=Math.max(yt,bt),E=Math.min(E,x),ft=Math.max(ft,x),Pt=Math.min(Pt,y),yt=Math.max(yt,y),E=Math.min(E,z),ft=Math.max(ft,z),Pt=Math.min(Pt,b),yt=Math.max(yt,b),a.h(E,Pt,ft-E,yt-Pt),a},Po.alloc=function(){var a=cd.pop();return a===void 0?new Po:a},Po.free=function(a){cd.push(a)},Po.prototype.transformRect=Po.prototype.pp,Po.prototype.transformPoint=Po.prototype.Ga,Po.prototype.scale=Po.prototype.scale,Po.prototype.translate=Po.prototype.translate,Po.prototype.rotate=Po.prototype.rotate,Po.prototype.invert=Po.prototype.Vj,Po.prototype.multiplyInverted=Po.prototype.bv,Po.prototype.multiply=Po.prototype.multiply,Po.prototype.reset=Po.prototype.reset,Po.prototype.isIdentity=Po.prototype.ws,Po.prototype.equals=Po.prototype.D,Po.prototype.setTransform=Po.prototype.setTransform,Po.prototype.set=Po.prototype.set;var cd=[];Po.className="Transform",Po.xF="54a702f3e53909c447824c6706603faf4c";var ke={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=ke.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);ke.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,b,E,z,tt){if(0>=E&&(E=1e-6),a<x)var ot=a,rt=x;else ot=x,rt=a;if(y<b)var lt=y,ut=b;else lt=b,ut=y;if(a===x)return lt<=tt&&tt<=ut&&a-E<=z&&z<=a+E;if(y===b)return ot<=z&&z<=rt&&y-E<=tt&&tt<=y+E;if(rt+=E,ot-=E,ot<=z&&z<=rt&&(ut+=E,lt-=E,lt<=tt&&tt<=ut))if(rt-ot>ut-lt)if(a-x>E||x-a>E){if(z=(b-y)/(x-a)*(z-a)+y,z-E<=tt&&tt<=z+E)return!0}else return!0;else if(y-b>E||b-y>E){if(tt=(x-a)/(b-y)*(tt-y)+a,tt-E<=z&&z<=tt+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,z,tt,ot,rt,lt,ut,ft){if(ke.Yb(a,y,tt,ot,ft,x,b)&&ke.Yb(a,y,tt,ot,ft,E,z))return ke.Yb(a,y,tt,ot,ft,lt,ut);var yt=(a+x)/2,Pt=(y+b)/2,bt=(x+E)/2,Bt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(yt+bt)/2,x=(Pt+Bt)/2,bt=(bt+E)/2,Bt=(Bt+z)/2;var Jt=(b+bt)/2,Gt=(x+Bt)/2;return ke.cs(a,y,yt,Pt,b,x,Jt,Gt,rt,lt,ut,ft)||ke.cs(Jt,Gt,bt,Bt,E,z,tt,ot,rt,lt,ut,ft)},ax:function(a,y,x,b,E,z,tt,ot,rt){var lt=(x+E)/2,ut=(b+z)/2;return rt.h((((a+x)/2+lt)/2+(lt+(E+tt)/2)/2)/2,(((y+b)/2+ut)/2+(ut+(z+ot)/2)/2)/2),rt},My:function(a,y,x,b,E,z,tt,ot){var rt=(x+E)/2,lt=(b+z)/2;return So(((a+x)/2+rt)/2,((y+b)/2+lt)/2,(rt+(E+tt)/2)/2,(lt+(z+ot)/2)/2)},Dl:function(a,y,x,b,E,z,tt,ot,rt,lt){if(ke.Yb(a,y,tt,ot,rt,x,b)&&ke.Yb(a,y,tt,ot,rt,E,z))Go(lt,a,y,0,0),Go(lt,tt,ot,0,0);else{var ut=(a+x)/2,ft=(y+b)/2,yt=(x+E)/2,Pt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(ut+yt)/2,x=(ft+Pt)/2,yt=(yt+E)/2,Pt=(Pt+z)/2;var bt=(b+yt)/2,Bt=(x+Pt)/2;ke.Dl(a,y,ut,ft,b,x,bt,Bt,rt,lt),ke.Dl(bt,Bt,yt,Pt,E,z,tt,ot,rt,lt)}return lt},Qe:function(a,y,x,b,E,z,tt,ot,rt,lt){if(ke.Yb(a,y,tt,ot,rt,x,b)&&ke.Yb(a,y,tt,ot,rt,E,z))lt.length===0&&(lt.push(a),lt.push(y)),lt.push(tt),lt.push(ot);else{var ut=(a+x)/2,ft=(y+b)/2,yt=(x+E)/2,Pt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(ut+yt)/2,x=(ft+Pt)/2,yt=(yt+E)/2,Pt=(Pt+z)/2;var bt=(b+yt)/2,Bt=(x+Pt)/2;ke.Qe(a,y,ut,ft,b,x,bt,Bt,rt,lt),ke.Qe(bt,Bt,yt,Pt,E,z,tt,ot,rt,lt)}return lt},jv:function(a,y,x,b,E,z,tt,ot,rt,lt){if(ke.Yb(a,y,E,z,lt,x,b))return ke.Yb(a,y,E,z,lt,ot,rt);var ut=(a+x)/2,ft=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var yt=(ut+x)/2,Pt=(ft+b)/2;return ke.jv(a,y,ut,ft,yt,Pt,tt,ot,rt,lt)||ke.jv(yt,Pt,x,b,E,z,tt,ot,rt,lt)},OA:function(a,y,x,b,E,z,tt){return tt.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+z)/2)/2),tt},iv:function(a,y,x,b,E,z,tt,ot){if(ke.Yb(a,y,E,z,tt,x,b))Go(ot,a,y,0,0),Go(ot,E,z,0,0);else{var rt=(a+x)/2,lt=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ut=(rt+x)/2,ft=(lt+b)/2;ke.iv(a,y,rt,lt,ut,ft,tt,ot),ke.iv(ut,ft,x,b,E,z,tt,ot)}return ot},ep:function(a,y,x,b,E,z,tt,ot){if(ke.Yb(a,y,E,z,tt,x,b))ot.length===0&&(ot.push(a),ot.push(y)),ot.push(E),ot.push(z);else{var rt=(a+x)/2,lt=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ut=(rt+x)/2,ft=(lt+b)/2;ke.ep(a,y,rt,lt,ut,ft,tt,ot),ke.ep(ut,ft,x,b,E,z,tt,ot)}return ot},Eo:function(a,y,x,b,E,z,tt,ot,rt,lt,ut,ft,yt,Pt){if(ke.Yb(a,y,tt,ot,yt,x,b)&&ke.Yb(a,y,tt,ot,yt,E,z))return!ke.Rl(a,y,tt,ot,rt,lt,ut,ft)||(yt=(a-tt)*(lt-ft)-(y-ot)*(rt-ut),yt===0)?!1:(Pt.h(((a*ot-y*tt)*(rt-ut)-(a-tt)*(rt*ft-lt*ut))/yt,((a*ot-y*tt)*(lt-ft)-(y-ot)*(rt*ft-lt*ut))/yt),!0);var bt=(a+x)/2,Bt=(y+b)/2,Jt=(x+E)/2,Gt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(bt+Jt)/2,x=(Bt+Gt)/2,Jt=(Jt+E)/2,Gt=(Gt+z)/2;var se=(b+Jt)/2,ue=(x+Gt)/2,ge=1/0,be=!1,We=0,Un=0;return ke.Eo(a,y,bt,Bt,b,x,se,ue,rt,lt,ut,ft,yt,Pt)&&(a=(Pt.x-rt)*(Pt.x-rt)+(Pt.y-lt)*(Pt.y-lt),a<ge&&(ge=a,be=!0,We=Pt.x,Un=Pt.y)),ke.Eo(se,ue,Jt,Gt,E,z,tt,ot,rt,lt,ut,ft,yt,Pt)&&(Pt.x-rt)*(Pt.x-rt)+(Pt.y-lt)*(Pt.y-lt)<ge&&(be=!0,We=Pt.x,Un=Pt.y),be&&(Pt.x=We,Pt.y=Un),be},Fo:function(a,y,x,b,E,z,tt,ot,rt,lt,ut,ft,yt){var Pt=0;if(ke.Yb(a,y,tt,ot,yt,x,b)&&ke.Yb(a,y,tt,ot,yt,E,z)){if(yt=(a-tt)*(lt-ft)-(y-ot)*(rt-ut),yt===0)return Pt;var bt=((a*ot-y*tt)*(rt-ut)-(a-tt)*(rt*ft-lt*ut))/yt,Bt=((a*ot-y*tt)*(lt-ft)-(y-ot)*(rt*ft-lt*ut))/yt;if(bt>=ut)return Pt;if((rt>ut?rt-ut:ut-rt)<(lt>ft?lt-ft:ft-lt)){if(y<ot?(rt=y,a=ot):(rt=ot,a=y),Bt<rt||Bt>a)return Pt}else if(a<tt?(rt=a,a=tt):rt=tt,bt<rt||bt>a)return Pt;0<yt?Pt++:0>yt&&Pt--}else{bt=(a+x)/2,Bt=(y+b)/2;var Jt=(x+E)/2,Gt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(bt+Jt)/2,x=(Bt+Gt)/2,Jt=(Jt+E)/2,Gt=(Gt+z)/2;var se=(b+Jt)/2,ue=(x+Gt)/2;Pt+=ke.Fo(a,y,bt,Bt,b,x,se,ue,rt,lt,ut,ft,yt),Pt+=ke.Fo(se,ue,Jt,Gt,E,z,tt,ot,rt,lt,ut,ft,yt)}return Pt},qh:function(a,y,x,b,E,z,tt){return ke.$(a,x)?(y<b?(x=y,y=b):x=b,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):ke.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(tt.h(b,y),!1):E>a?(tt.h(a,y),!1):(tt.h(E,y),!0)):(E=((a-E)*(a-x)+(y-z)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(tt.h(a,y),!1):1.000005<E?(tt.h(x,b),!1):(tt.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,z,tt,ot,rt){return ke.B(a,x)&&ke.B(y,b)?(rt.h(a,y),!1):ke.$(E,tt)?ke.$(a,x)?(ke.qh(a,y,x,b,E,z,rt),!1):ke.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,rt):(ot=(ot-z)/(tt-E),ke.$(a,x)?(x=ot*(a-E)+z,y<b?(E=y,y=b):E=b,x<E?(rt.h(a,E),!1):x>y?(rt.h(a,y),!1):(rt.h(a,x),!0)):(tt=(b-y)/(x-a),ke.$(ot,tt)?(ke.qh(a,y,x,b,E,z,rt),!1):(E=(tt*a-ot*E+z-y)/(tt-ot),ke.$(tt,0)?(a<x?(b=a,a=x):b=x,E<b?(rt.h(b,y),!1):E>a?(rt.h(a,y),!1):(rt.h(E,y),!0)):ke.qh(a,y,x,b,E,tt*(E-a)+y,rt))))},MA:function(a,y,x,b,E){return ke.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,z,tt,ot,rt,lt){function ut(Jt,Gt){var se=(Jt-a)*(Jt-a)+(Gt-y)*(Gt-y);se<ft&&(ft=se,rt.h(Jt,Gt))}var ft=1/0;ut(rt.x,rt.y);var yt=0,Pt=0,bt=0,Bt=0;if(E<tt?(yt=E,Pt=tt):(yt=tt,Pt=E),z<ot?(bt=E,Bt=tt):(bt=tt,Bt=E),yt=(Pt-yt)/2+lt,lt=(Bt-bt)/2+lt,E=(E+tt)/2,z=(z+ot)/2,yt===0||lt===0)return rt;if(.5>(x>a?x-a:a-x)){if(yt=1-(x-E)*(x-E)/(yt*yt),0>yt)return rt;yt=Math.sqrt(yt),b=-lt*yt+z,ut(x,lt*yt+z),ut(x,b)}else{if(x=(b-y)/(x-a),b=1/(yt*yt)+x*x/(lt*lt),ot=2*x*(y-x*a)/(lt*lt)-2*x*z/(lt*lt)-2*E/(yt*yt),yt=ot*ot-4*b*(2*x*a*z/(lt*lt)-2*y*z/(lt*lt)+z*z/(lt*lt)+E*E/(yt*yt)-1+(y-x*a)*(y-x*a)/(lt*lt)),0>yt)return rt;yt=Math.sqrt(yt),lt=(-ot+yt)/(2*b),ut(lt,x*lt-x*a+y),yt=(-ot-yt)/(2*b),ut(yt,x*yt-x*a+y)}return rt},Ff:function(a,y,x,b,E,z,tt,ot,rt){var lt=1e21,ut=a,ft=y;if(ke.Ve(a,y,a,b,E,z,tt,ot,rt)){var yt=(rt.x-E)*(rt.x-E)+(rt.y-z)*(rt.y-z);yt<lt&&(lt=yt,ut=rt.x,ft=rt.y)}return ke.Ve(x,y,x,b,E,z,tt,ot,rt)&&(yt=(rt.x-E)*(rt.x-E)+(rt.y-z)*(rt.y-z),yt<lt&&(lt=yt,ut=rt.x,ft=rt.y)),ke.Ve(a,y,x,y,E,z,tt,ot,rt)&&(y=(rt.x-E)*(rt.x-E)+(rt.y-z)*(rt.y-z),y<lt&&(lt=y,ut=rt.x,ft=rt.y)),ke.Ve(a,b,x,b,E,z,tt,ot,rt)&&(a=(rt.x-E)*(rt.x-E)+(rt.y-z)*(rt.y-z),a<lt&&(lt=a,ut=rt.x,ft=rt.y)),rt.h(ut,ft),1e21>lt},us:function(a,y,x){return ke.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,z,tt,ot){var rt=a+x,lt=y+b;return E===tt?(z<ot?(tt=z,z=ot):tt=ot,a<=E&&E<=rt&&tt<=lt&&z>=y):z===ot?(E<tt?(ot=E,E=tt):ot=tt,y<=z&&z<=lt&&ot<=rt&&E>=a):!!(fr(a,y,x,b,E,z)||fr(a,y,x,b,tt,ot)||ke.Rl(a,y,rt,y,E,z,tt,ot)||ke.Rl(rt,y,rt,lt,E,z,tt,ot)||ke.Rl(rt,lt,a,lt,E,z,tt,ot)||ke.Rl(a,lt,a,y,E,z,tt,ot))},Rl:function(a,y,x,b,E,z,tt,ot){return a===x&&y===b&&E===tt&&z===ot?a===E&&y===z:0>=ke.Fl(a,y,x,b,E,z)*ke.Fl(a,y,x,b,tt,ot)&&0>=ke.Fl(E,z,tt,ot,a,y)*ke.Fl(E,z,tt,ot,x,b)},Fl:function(a,y,x,b,E,z){return x-=a,b-=y,a=E-a,y=z-y,z=a*b-y*x,z===0&&(z=a*x+y*b,0<z&&(z=(a-x)*x+(y-b)*b,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,z){var tt=Math.PI;z||(b*=tt/180,E*=tt/180);var ot=b>E?-1:1;z=[];var rt=tt/2,lt=b;if(b=Math.min(2*tt,Math.abs(E-b)),1e-5>b)return rt=lt+ot*Math.min(b,rt),ot=a+x*Math.cos(lt),lt=y+x*Math.sin(lt),a+=x*Math.cos(rt),y+=x*Math.sin(rt),x=(ot+a)/2,rt=(lt+y)/2,z.push([ot,lt,x,rt,x,rt,a,y]),z;for(;1e-5<b;)E=lt+ot*Math.min(b,rt),z.push(ke.Vy(x,lt,E,a,y)),b-=Math.abs(E-lt),lt=E;return z},Vy:function(a,y,x,b,E){var z=(x-y)/2,tt=a*Math.cos(z),ot=a*Math.sin(z),rt=-ot,lt=tt*tt+rt*rt,ut=lt+tt*tt+rt*ot;return lt=4/3*(Math.sqrt(2*lt*ut)-ut)/(tt*ot-rt*tt),ot=tt-lt*rt,tt=rt+lt*tt,rt=-tt,lt=z+y,z=Math.cos(lt),lt=Math.sin(lt),[b+a*Math.cos(y),E+a*Math.sin(y),b+ot*z-tt*lt,E+ot*lt+tt*z,b+ot*z-rt*lt,E+ot*lt+rt*z,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,z,tt){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/z)*z+b;var ot=x;return x+E-a<E/2&&(ot=x+E),a=b,b+z-y<z/2&&(a=b+z),tt.h(ot,a),tt},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var b;do y=x%a,x=b=a,a=y;while(0<y);return b},$y:function(a,y,x,b){var E=0>x,z=0>b;if(a<y)var tt=1,ot=0;else tt=0,ot=1;var rt=tt===0?a:y,lt=tt===0?x:b;return(tt===0?E:z)&&(lt=-lt),tt=ot,x=tt===0?x:b,(tt===0?E:z)&&(x=-x),ke.az(rt,tt===0?a:y,lt,x,0,0)},az:function(a,y,x,b,E,z){if(0<b)if(0<x){E=a*a,z=y*y,a*=x;var tt=y*b,ot=-z+tt,rt=-z+Math.sqrt(a*a+tt*tt);y=ot;for(var lt=0;9999999999>lt&&(y=.5*(ot+rt),!(y===ot||y===rt));++lt){var ut=a/(y+E),ft=tt/(y+z);if(ut=ut*ut+ft*ft-1,0<ut)ot=y;else if(0>ut)rt=y;else break}x=E*x/(y+E)-x,b=z*b/(y+z)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,z=a*x,z<b?(b=z/b,z=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new ki,um:new ki,Mf:new ki,Nf:0,vm:100};ke.za=ke.AA;function $n(a){Gi(this),this.l=2,a===void 0&&(a=$n.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===$n.o?this.ee=new mn:($n.V===null&&($n.V=new mn().freeze()),this.ee=$n.V),this.aq=this.ee.Ja,this.Ip=new an().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=ea,this.gg=As,this.Rk=this.Sk=NaN,this.Uf=On}$n.prototype.copy=function(){var a=new $n;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===$n.o){for(var y=this.ee.s,x=a.ee,b=0;b<y.length;b++)x.add(y[b].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},$n.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},$n.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==$n.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},$n.prototype.ka=function(){if(Object.isFrozen(this)&&_t("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==$n.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},$n.prototype.Xa=function(a){if(!(a instanceof $n))return!1;if(this.type!==a.type)return this.type===$n.j&&a.type===$n.o?wc(this,a):a.type===$n.j&&this.type===$n.o?wc(a,this):!1;if(this.type===$n.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return ke.B(this.startX,a.startX)&&ke.B(this.startY,a.startY)&&ke.B(this.endX,a.endX)&&ke.B(this.endY,a.endY)};function wc(a,y){return a.type!==$n.j||y.type!==$n.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&ke.B(a.startX,y.startX)&&ke.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Mr&&ke.B(a.endX,y.endX)&&ke.B(a.endY,y.endY))))}$n.ia=function(a){return a.toString()},$n.prototype.qb=function(a){a.classType===$n&&(this.type=a)},$n.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case $n.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 $n.u:var y=new an(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 $n.F:if(y=new an(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 $n.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var z=x[E];0<E&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},$n.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",b=0;b<y;b++){var E=a[b];x=E.match(/[Ff]/)!==null?b===0?x+E:x+("X"+(E[0]===" "?"":" ")+E):x+((b===0?"":"X ")+"F"+(E[0]===" "?"":" ")+E)}return x},$n.parse=function(a,y){function x(){return Bt>=ge-1?!0:lt[Bt+1].match(be)!==null}function b(){return Bt++,lt[Bt]}function E(eo){var _i=parseFloat(b()),nr=parseFloat(b());Jt===Jt.toLowerCase()&&(_i=ue.x+_i,nr=ue.y+nr),eo.h(_i,nr)}function z(){return E(ue),ue}function tt(){return E(se),se}function ot(){var eo=Gt.toLowerCase();return eo!=="c"&&eo!=="s"&&eo!=="q"&&eo!=="t"?ue:new $t(2*ue.x-se.x,2*ue.y-se.y)}y===void 0&&(y=!1);var rt=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(rt,"$1 $2"),a=a.replace(rt,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var lt=a.split(" ");for(a=0;a<lt.length;a++){var ut=lt[a];if(ut.match(/(\.[0-9]*)(\.)/gm)!==null){rt=Rn();for(var ft="",yt=!1,Pt=0;Pt<ut.length;Pt++){var bt=ut[Pt];bt!=="."||yt?bt==="."?(rt.push(ft),ft="."):ft+=bt:(yt=!0,ft+=bt)}for(rt.push(ft),lt.splice(a,1),ut=0;ut<rt.length;ut++)lt.splice(a+ut,0,rt[ut]);a+=rt.length-1,ni(rt)}}var Bt=-1,Jt="",Gt="";rt=new $t(0,0);var se=new $t(0,0),ue=new $t(0,0),ge=lt.length;a=TS(null),yt=ft=ut=!1,Pt=!0,bt=null;for(var be=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Bt>=ge-1);)if(Gt=Jt,Jt=b(),Jt!=="")switch(Jt.toUpperCase()){case"X":Pt=!0,ft=ut=!1;break;case"M":for(bt=z(),a.mc===null||Pt===!0?(vg(a,bt.x,bt.y,ut,!ft,yt),Pt=!1):a.moveTo(bt.x,bt.y),rt.assign(ue);!x();)bt=z(),a.lineTo(bt.x,bt.y);break;case"L":for(;!x();)bt=z(),a.lineTo(bt.x,bt.y);break;case"H":for(;!x();)ue=new $t((Jt===Jt.toLowerCase()?ue.x:0)+parseFloat(b()),ue.y),a.lineTo(ue.x,ue.y);break;case"V":for(;!x();)ue=new $t(ue.x,(Jt===Jt.toLowerCase()?ue.y:0)+parseFloat(b())),a.lineTo(ue.x,ue.y);break;case"C":for(;!x();){bt=new $t,E(bt);var We=tt(),Un=z();bd(a,bt.x,bt.y,We.x,We.y,Un.x,Un.y)}break;case"S":for(;!x();)bt=ot(),We=tt(),Un=z(),bd(a,bt.x,bt.y,We.x,We.y,Un.x,Un.y);break;case"Q":for(;!x();)bt=tt(),We=z(),Gm(a,bt.x,bt.y,We.x,We.y);break;case"T":for(;!x();)se=bt=ot(),We=z(),Gm(a,bt.x,bt.y,We.x,We.y);break;case"B":for(;!x();){bt=parseFloat(b()),We=parseFloat(b()),Un=parseFloat(b());var pi=parseFloat(b()),ui=parseFloat(b()),zn=ui,xn=!1;x()||(zn=parseFloat(b()),x()||(xn=parseFloat(b())!==0)),Jt===Jt.toLowerCase()&&(Un+=ue.x,pi+=ue.y),a.arcTo(bt,We,Un,pi,ui,zn,xn)}break;case"A":for(;!x();)bt=Math.abs(parseFloat(b())),We=Math.abs(parseFloat(b())),Un=parseFloat(b()),ui=pi=!1,xn=zn=0,zn=b(),zn.length===1?(pi=!!parseFloat(zn),ui=!!parseFloat(b()),zn=parseFloat(b())):zn.length===2?(pi=!!parseFloat(zn[0]),ui=!!parseFloat(zn[1]),zn=parseFloat(b())):(pi=!!parseFloat(zn[0]),ui=!!parseFloat(zn[1]),zn=parseFloat(zn.slice(2))),xn=parseFloat(b()),Jt===Jt.toLowerCase()&&(zn=ue.x+zn,xn=ue.y+xn),ue.h(zn,xn),wx(a,bt,We,Un,pi,ui,zn,xn);break;case"Z":Px(a),ue.assign(rt);break;case"F":for(bt="",We=1;lt[Bt+We];)if(lt[Bt+We]==="0")yt=!0,We++;else if(lt[Bt+We].match(/[Uu]/)!==null)We++;else if(lt[Bt+We].match(be)===null)We++;else{bt=lt[Bt+We];break}bt.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(bt="",We=1;lt[Bt+We];)if(lt[Bt+We].match(/[Ff]/)!==null)We++;else if(lt[Bt+We].match(be)===null)We++;else{bt=lt[Bt+We];break}bt.match(/[Mm]/)?ft=!0:a.mc.isShadowed=!1}if(rt=a.os,$m=a,y)for(y=rt.figures.iterator;y.next();)y.value.isFilled=!0;return rt},$n.Ha=function(a,y){for(var x=a.length,b=$t.alloc(),E=0;E<x;E++){var z=a[E];b.x=z[0],b.y=z[1],y.Ga(b),z[0]=b.x,z[1]=b.y,b.x=z[2],b.y=z[3],y.Ga(b),z[2]=b.x,z[3]=b.y,b.x=z[4],b.y=z[5],y.Ga(b),z[4]=b.x,z[5]=b.y,b.x=z[6],b.y=z[7],y.Ga(b),z[6]=b.x,z[7]=b.y}$t.free(b)},$n.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===$n.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},$n.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===$n.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var b=a[x];b._isInvalidBounds=!1;var E=b.segments;b.sr=E.Ja,b=E.s,E=b.length;for(var z=0;z<E;z++){var tt=b[z];tt._isInvalidBounds=!1,tt.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),rf(this,a,!1),Go(a,0,0,0,0),a.freeze()},$n.prototype.ix=function(){var a=new an;return rf(this,a,!0),a};function rf(a,y,x){switch(a.type){case $n.j:case $n.u:case $n.F:x?y.h(a.od,a.pd,0,0):Go(y,a.od,a.pd,0,0),Go(y,a.Dc,a.Ec,0,0);break;case $n.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var z=a[E];x&&E===0?y.h(z.startX,z.startY,0,0):Go(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,ot=tt.length,rt=z.startX,lt=z.startY,ut=0;ut<ot;ut++){var ft=tt[ut];switch(ft.type){case Mr:case Ca:rt=ft.endX,lt=ft.endY,Go(y,rt,lt,0,0);break;case ls:ke.Dl(rt,lt,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,y),rt=ft.endX,lt=ft.endY;break;case Ml:ke.iv(rt,lt,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),rt=ft.endX,lt=ft.endY;break;case ya:case Hl:var yt=ft.type===ya?al(ft,z):Ks(ft,z,rt,lt),Pt=yt.length;if(Pt===0){rt=ft.type===ya?ft.centerX:ft.endX,lt=ft.type===ya?ft.centerY:ft.endY,Go(y,rt,lt,0,0);break}ft=null;for(var bt=0;bt<Pt;bt++)ft=yt[bt],ke.Dl(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,y);ft!==null&&(rt=ft[6],lt=ft[7]);break;default:_t("Unknown Segment type: "+ft.type)}}}break;default:_t("Unknown Geometry type: "+a.type)}}$n.prototype.normalize=function(){this._isFrozen&&nn(this);var a=this.ix();return this.offset(-a.x,-a.y),new $t(-a.x,-a.y)},$n.prototype.offset=function(a,y){return this._isFrozen&&nn(this),this.transform(1,0,0,1,a,y),this},$n.prototype.scale=function(a,y){return this._isFrozen&&nn(this),this.transform(a,0,0,y,0,0),this},$n.prototype.rotate=function(a,y,x){this._isFrozen&&nn(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=Po.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),Po.free(b),this},Ct=$n.prototype,Ct.transform=function(a,y,x,b,E,z){switch(this.type){case $n.j:case $n.u:case $n.F:var tt=this.od,ot=this.pd;this.od=tt*a+ot*x+E,this.pd=tt*y+ot*b+z,tt=this.Dc,ot=this.Ec,this.Dc=tt*a+ot*x+E,this.Ec=tt*y+ot*b+z;break;case $n.o:for(var rt=this.figures.s,lt=rt.length,ut=0;ut<lt;ut++){var ft=rt[ut];tt=ft.startX,ot=ft.startY,ft.startX=tt*a+ot*x+E,ft.startY=tt*y+ot*b+z,ft=ft.segments.s;for(var yt=ft.length,Pt=0;Pt<yt;Pt++){var bt=ft[Pt];switch(bt.type){case Mr:case Ca:tt=bt.endX,ot=bt.endY,bt.endX=tt*a+ot*x+E,bt.endY=tt*y+ot*b+z;break;case ls:tt=bt.point1X,ot=bt.point1Y,bt.point1X=tt*a+ot*x+E,bt.point1Y=tt*y+ot*b+z,tt=bt.point2X,ot=bt.point2Y,bt.point2X=tt*a+ot*x+E,bt.point2Y=tt*y+ot*b+z,tt=bt.endX,ot=bt.endY,bt.endX=tt*a+ot*x+E,bt.endY=tt*y+ot*b+z;break;case Ml:tt=bt.point1X,ot=bt.point1Y,bt.point1X=tt*a+ot*x+E,bt.point1Y=tt*y+ot*b+z,tt=bt.endX,ot=bt.endY,bt.endX=tt*a+ot*x+E,bt.endY=tt*y+ot*b+z;break;case ya:tt=bt.centerX,ot=bt.centerY,bt.centerX=tt*a+ot*x+E,bt.centerY=tt*y+ot*b+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),bt.startAngle+=tt),0>a&&(bt.startAngle=180-bt.startAngle,bt.sweepAngle=-bt.sweepAngle),0>b&&(bt.startAngle=-bt.startAngle,bt.sweepAngle=-bt.sweepAngle),bt.radiusX*=Math.sqrt(a*a+x*x),bt.radiusY!==void 0&&(bt.radiusY*=Math.sqrt(y*y+b*b));break;case Hl:if(tt=bt.endX,ot=bt.endY,bt.endX=tt*a+ot*x+E,bt.endY=tt*y+ot*b+z,bt.radiusX===0||bt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),bt.xAxisRotation+=tt),0>a&&(bt.xAxisRotation=180-bt.xAxisRotation,bt.isClockwiseArc=!bt.isClockwiseArc),0>b&&(bt.xAxisRotation=-bt.xAxisRotation,bt.isClockwiseArc=!bt.isClockwiseArc),bt.radiusX*=Math.sqrt(a*a+x*x),bt.radiusY*=Math.sqrt(y*y+b*b);break;default:_t("Unknown Segment type: "+bt.type)}}}}return this._isInvalidBounds=!0,this},Ct.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,z=this.Ec;switch(this.type){case $n.j:return ke.Yb(x,b,E,z,y,a.x,a.y);case $n.u:var tt=an.allocAt(Math.min(x,E)-y,Math.min(b,z)-y,Math.abs(E-x)+2*y,Math.abs(z-b)+2*y);return a=tt.ca(a),an.free(tt),a;case $n.F:tt=Math.min(x,E)-y;var ot=Math.min(b,z)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(z-b)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),ot=a.y-(ot+y),1>=tt*tt/(x*x)+ot*ot/(y*y));case $n.o:return Hu(this,a,y,!0,!1);default:return!1}};function Hu(a,y,x,b,E){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,ot=0,rt,lt,ut,ft,yt=a.figures.s,Pt=yt.length,bt=0;bt<Pt;bt++){var Bt=yt[bt],Jt=!Bt.isEvenOdd;if(Bt.isFilled){if(b&&Bt.ca(z,y,x))return!0;var Gt=Bt.segments;rt=Bt.startX,lt=Bt.startY;for(var se=rt,ue=lt,ge=Gt.s,be=0;be<=Gt.length;be++){var We=void 0;if(be!==Gt.length){We=ge[be];var Un=We.type;a=We.endX,ft=We.endY}else Un=Mr,a=se,ft=ue;switch(Un){case Ca:if(se=Gu(z,y,tt,y,rt,lt,se,ue),isNaN(se))return!0;ot+=se,se=a,ue=ft;break;case Mr:if(rt=Gu(z,y,tt,y,rt,lt,a,ft),isNaN(rt))return!0;ot+=rt;break;case ls:ut=ke.Fo(rt,lt,We.point1X,We.point1Y,We.point2X,We.point2Y,a,ft,tt,y,z,y,.5),ot+=ut;break;case Ml:ut=ke.Fo(rt,lt,(rt+2*We.point1X)/3,(lt+2*We.point1Y)/3,(2*We.point1X+a)/3,(2*We.point1Y+ft)/3,a,ft,tt,y,z,y,.5),ot+=ut;break;case ya:case Hl:Un=We.type===ya?al(We,Bt):Ks(We,Bt,rt,lt);var pi=Un.length;if(pi===0){if(rt=Gu(z,y,tt,y,rt,lt,We.type===ya?We.centerX:We.endX,We.type===ya?We.centerY:We.endY),isNaN(rt))return!0;ot+=rt;break}We=null;for(var ui=0;ui<pi;ui++){if(We=Un[ui],ui===0){if(ut=Gu(z,y,tt,y,rt,lt,We[0],We[1]),isNaN(ut))return!0;ot+=ut}ut=ke.Fo(We[0],We[1],We[2],We[3],We[4],We[5],We[6],We[7],tt,y,z,y,.5),ot+=ut}We!==null&&(a=We[6],ft=We[7]);break;default:_t("Unknown Segment type: "+We.type)}rt=a,lt=ft}if(Jt){if(ot!==0)return!0}else if(ot%2!==0)return!0;ot=0}else if(Bt.ca(z,y,E?x:x+2))return!0}return!1}function Gu(a,y,x,b,E,z,tt,ot){if(ke.Yb(E,z,tt,ot,.05,a,y))return NaN;var rt=(a-x)*(z-ot);if(rt===0)return 0;var lt=((a*b-y*x)*(E-tt)-(a-x)*(E*ot-z*tt))/rt;if(y=(a*b-y*x)*(z-ot)/rt,lt>=a)return 0;if((E>tt?E-tt:tt-E)<(z>ot?z-ot:ot-z)){if(z<ot){if(y<z||y>ot)return 0}else if(y<ot||y>z)return 0}else if(E<tt){if(lt<E||lt>tt)return 0}else if(lt<tt||lt>E)return 0;return 0<rt?1:-1}function ih(a,y,x,b){a=a.figures.s;for(var E=a.length,z=0;z<E;z++)if(a[z].ca(y,x,b))return!0;return!1}Ct.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new $t),this.type===$n.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,z=this.flattenedTotalLength*a,tt=0,ot=0;ot<E;ot++){var rt=b[ot],lt=rt.length;for(a=0;a<lt;a++){var ut=rt[a];if(tt+ut>=z)return b=z-tt,b=ut===0?0:b/ut,x=x[ot],ot=x[2*a],E=x[2*a+1],y.h(ot+(x[2*a+2]-ot)*b,E+(x[2*a+3]-E)*b),y;tt+=ut}}return y},Ct.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===$n.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,b=y.length,E=this.flattenedTotalLength*a,z=0,tt=0;tt<b;tt++){var ot=x[tt],rt=ot.length;for(a=0;a<rt;a++){var lt=ot[a];if(z+lt>=E)return E=y[tt],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;z+=lt}}return NaN},Ct.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===$n.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,z=this.flattenedTotalLength*a,tt=0,ot=0;ot<E;ot++){var rt=b[ot],lt=rt.length;for(a=0;a<lt;a++){var ut=rt[a];if(tt+ut>=z)return b=z-tt,b=ut===0?0:b/ut,ut=x[ot],x=ut[2*a],ot=ut[2*a+1],E=ut[2*a+2],a=ut[2*a+3],y[0]=x+(E-x)*b,y[1]=ot+(a-ot)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-ot)?0:1>Math.abs(E-x)?0<=a-ot?90:270:1>Math.abs(a-ot)?0<=E-x?0:180:180*Math.atan2(a-ot,E-x)/Math.PI,y;tt+=ut}}return y},Ct.xx=function(a){if(this.type===$n.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var z=a.x;if(a=a.y,y===b){if(x<E){var tt=x;b=E}else tt=E,b=x;return a<=tt?tt===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-tt)}if(x===E)return y<b?tt=y:(tt=b,b=y),z<=tt?tt===y?0:1:z>=b?b===y?0:1:Math.abs(z-y)/(b-tt);tt=(b-y)*(b-y)+(E-x)*(E-x);var ot=$t.alloc();return ke.qh(y,x,b,E,z,a,ot),a=ot.x,z=ot.y,$t.free(ot),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===$n.u){tt=this.startX,ot=this.startY;var rt=this.endX;if(E=this.endY,tt!==rt||ot!==E){y=rt-tt,x=E-ot,z=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,tt),rt),a=Math.min(Math.max(a,ot),E),tt=Math.abs(b-tt),rt=Math.abs(b-rt),ot=Math.abs(a-ot),E=Math.abs(a-E);var lt=Math.min(tt,rt,ot,E);if(lt===ot)return b/z;if(lt===rt)return(y+a)/z;if(lt===E)return(2*y+x-b)/z;if(lt===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,b=$t.alloc(),E=1/0,ot=tt=0,rt=y.length;for(var ut=lt=0,ft=0;ft<rt;ft++)for(var yt=y[ft],Pt=x[ft],bt=yt.length,Bt=0;Bt<bt;Bt+=2){var Jt=yt[Bt],Gt=yt[Bt+1];if(Bt!==0){ke.qh(lt,ut,Jt,Gt,a.x,a.y,b);var se=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);se<E&&(E=se,tt=ot,tt+=Math.sqrt((b.x-lt)*(b.x-lt)+(b.y-ut)*(b.y-ut))),ot+=Pt[(Bt-2)/2]}lt=Jt,ut=Gt}return $t.free(b),a=tt/z,0>a?0:1<a?1:a}return 0};function Cc(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===$n.j)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.endY),y.push(b),E.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(E);else if(a.type===$n.u)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.startY),b.push(a.endX),b.push(a.endY),b.push(a.startX),b.push(a.endY),b.push(a.startX),b.push(a.startY),y.push(b),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),x.push(E);else if(a.type===$n.F){var z=new Za;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new Xo(ya);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=al(tt,z),E=a.length,E===0)b.push(tt.centerX),b.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var ot=0;ot<E;ot++){var rt=a[ot];ke.Qe(tt,z,rt[2],rt[3],rt[4],rt[5],rt[6],rt[7],.5,b),tt=rt[6],z=rt[7]}}y.push(b),x.push(fd(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),tt=E.startX,z=E.startY,ot=tt,rt=z;for(var lt=E.segments.s,ut=lt.length,ft=0;ft<ut;ft++){var yt=lt[ft];switch(yt.type){case Ca:4<=b.length&&(y.push(b),x.push(fd(b))),b=[],b.push(yt.endX),b.push(yt.endY),tt=yt.endX,z=yt.endY,ot=tt,rt=z;break;case Mr:b.push(yt.endX),b.push(yt.endY),tt=yt.endX,z=yt.endY;break;case ls:ke.Qe(tt,z,yt.point1X,yt.point1Y,yt.point2X,yt.point2Y,yt.endX,yt.endY,.5,b),tt=yt.endX,z=yt.endY;break;case Ml:ke.ep(tt,z,yt.point1X,yt.point1Y,yt.endX,yt.endY,.5,b),tt=yt.endX,z=yt.endY;break;case ya:var Pt=al(yt,E),bt=Pt.length;if(bt===0){b.push(yt.centerX),b.push(yt.centerY),tt=yt.centerX,z=yt.centerY;break}for(var Bt=0;Bt<bt;Bt++){var Jt=Pt[Bt];ke.Qe(tt,z,Jt[2],Jt[3],Jt[4],Jt[5],Jt[6],Jt[7],.5,b),tt=Jt[6],z=Jt[7]}break;case Hl:if(Pt=Ks(yt,E,tt,z),bt=Pt.length,Bt=yt.endX,Jt=yt.endY,bt===0){b.push(Bt),b.push(Jt),tt=Bt,z=Jt;break}for(Bt=0;Bt<bt;Bt++)Jt=Pt[Bt],ke.Qe(tt,z,Jt[2],Jt[3],Jt[4],Jt[5],Jt[6],Jt[7],.5,b),tt=Jt[6],z=Jt[7];break;default:_t("Segment not of valid type: "+yt.type)}yt.isClosed&&(b.push(ot),b.push(rt))}4<=b.length&&(y.push(b),x.push(fd(b)))}}}function fd(a){for(var y=[],x=0,b=0,E=a.length,z=0;z<E;z+=2){var tt=a[z],ot=a[z+1];z!==0&&y.push(Math.sqrt(ha(x,b,tt,ot))),x=tt,b=ot}return y}Ct.add=function(a){return this.ee.add(a),this},Ct.pm=function(a,y,x,b,E,z,tt,ot){return this._isFrozen&&nn(this),this.fg=new xi(a,y,E,z).freeze(),this.gg=new xi(x,b,tt,ot).freeze(),this},Zt.Object.defineProperties($n.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 Cc(this),this.tk}},flattenedLengths:{get:function(){return Cc(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===$n.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===$n.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,b=a=0;b<x;b++)for(var E=y[b],z=E.length,tt=0;tt<z;tt++)a+=E[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&nn(this,a),this.na=a,a===$n.o?this.ee=new mn:($n.V===null&&($n.V=new mn().freeze()),this.ee=$n.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&nn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&nn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&nn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&nn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&nn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&nn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&nn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&nn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),$n.prototype.setSpots=$n.prototype.pm,$n.prototype.add=$n.prototype.add,$n.prototype.getFractionForPoint=$n.prototype.xx,$n.prototype.getPointAndAngleAlongPath=$n.prototype.Qu,$n.prototype.getAngleAlongPath=$n.prototype.wx,$n.prototype.getPointAlongPath=$n.prototype.Pu,$n.prototype.containsPoint=$n.prototype.ca,$n.prototype.transform=$n.prototype.transform,$n.prototype.rotate=$n.prototype.rotate,$n.prototype.scale=$n.prototype.scale,$n.prototype.offset=$n.prototype.offset,$n.prototype.normalize=$n.prototype.normalize,$n.prototype.computeBoundsWithoutOrigin=$n.prototype.ix,$n.prototype.equalsApprox=$n.prototype.Xa,$n.className="Geometry",$n.j=new en($n,"Line",0),$n.u=new en($n,"Rectangle",1),$n.F=new en($n,"Ellipse",2),$n.o=new en($n,"Path",3),$n.V=null,$n.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",$n.className="Geometry",$n.stringify=$n.ia,$n.fillPath=$n.nb,$n.parse=$n.parse,$n.Line=$n.j,$n.Rectangle=$n.u,$n.Ellipse=$n.F,$n.Path=$n.o;function Za(a,y,x,b,E){Gi(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new mn,this.sr=this.pl.Ja,this.fw=null}Za.prototype.copy=function(){var a=new Za;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var z=y[E].copy();b.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Ct=Za.prototype,Ct.Xa=function(a){if(!(a instanceof Za&&ke.B(this.startX,a.startX)&&ke.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},Ct.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},Ct.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},Ct.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},Ct.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},Ct.add=function(a){return this.pl.add(a),this},Ct.ca=function(a,y,x){for(var b=this.startX,E=this.startY,z=b,tt=E,ot=this.segments.s,rt=ot.length,lt=0;lt<rt;lt++){var ut=ot[lt];switch(ut.type){case Ca:z=ut.endX,tt=ut.endY,b=ut.endX,E=ut.endY;break;case Mr:if(ke.Yb(b,E,ut.endX,ut.endY,x,a,y))return!0;b=ut.endX,E=ut.endY;break;case ls:if(ke.cs(b,E,ut.point1X,ut.point1Y,ut.point2X,ut.point2Y,ut.endX,ut.endY,.5,a,y,x))return!0;b=ut.endX,E=ut.endY;break;case Ml:if(ke.jv(b,E,ut.point1X,ut.point1Y,ut.endX,ut.endY,.5,a,y,x))return!0;b=ut.endX,E=ut.endY;break;case ya:case Hl:var ft=ut.type===ya?al(ut,this):Ks(ut,this,b,E),yt=ft.length,Pt=ut.type===ya?ut.centerX:ut.endX,bt=ut.type===ya?ut.centerY:ut.endY;if(yt===0){if(ke.Yb(b,E,Pt,bt,x,a,y))return!0;b=Pt,E=bt;break}for(Pt=null,bt=0;bt<yt;bt++)if(Pt=ft[bt],bt===0&&ke.Yb(b,E,Pt[0],Pt[1],x,a,y)||ke.cs(Pt[0],Pt[1],Pt[2],Pt[3],Pt[4],Pt[5],Pt[6],Pt[7],.5,a,y,x))return!0;Pt!==null&&(b=Pt[6],E=Pt[7]);break;default:_t("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(b!==z||E!==tt)&&ke.Yb(b,E,z,tt,x,a,y))return!0}return!1},Zt.Object.defineProperties(Za.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&&nn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&nn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&nn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&nn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&nn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&nn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Za.prototype.add=Za.prototype.add,Za.prototype.equalsApprox=Za.prototype.Xa,Za.className="PathFigure";function Xo(a,y,x,b,E,z,tt,ot){Gi(this),a===void 0&&(a=Mr),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),z===void 0&&(z=0),tt===void 0&&(tt=0),a===Hl?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),ot&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===ya&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===ya&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}Xo.prototype.copy=function(){var a=new Xo;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},Ct=Xo.prototype,Ct.Xa=function(a){if(!(a instanceof Xo)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ca:case Mr:return ke.B(this.endX,a.endX)&&ke.B(this.endY,a.endY);case ls:return ke.B(this.endX,a.endX)&&ke.B(this.endY,a.endY)&&ke.B(this.point1X,a.point1X)&&ke.B(this.point1Y,a.point1Y)&&ke.B(this.point2X,a.point2X)&&ke.B(this.point2Y,a.point2Y);case Ml:return ke.B(this.endX,a.endX)&&ke.B(this.endY,a.endY)&&ke.B(this.point1X,a.point1X)&&ke.B(this.point1Y,a.point1Y);case ya:return ke.B(this.startAngle,a.startAngle)&&ke.B(this.sweepAngle,a.sweepAngle)&&ke.B(this.centerX,a.centerX)&&ke.B(this.centerY,a.centerY)&&ke.B(this.radiusX,a.radiusX)&&ke.B(this.radiusY,a.radiusY);case Hl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&ke.B(this.xAxisRotation,a.xAxisRotation)&&ke.B(this.endX,a.endX)&&ke.B(this.endY,a.endY)&&ke.B(this.radiusX,a.radiusX)&&ke.B(this.radiusY,a.radiusY);default:return!1}},Ct.qb=function(a){a.classType===Xo&&(this.type=a)},Ct.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ca:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Mr:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ls: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 Ml: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 ya: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 Hl: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":"")},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.close=function(){return this.isClosed=!0,this};function al(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,z=ke.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var tt=Po.alloc();tt.reset(),x<b?tt.scale(1,b/x):tt.scale(x/b,1),$n.Ha(z,tt),Po.free(tt)}for(x=z.length,b=0;b<x;b++)tt=z[b],tt[0]+=y,tt[1]+=E,tt[2]+=y,tt[3]+=E,tt[4]+=y,tt[5]+=E,tt[6]+=y,tt[7]+=E;return a.ae=z,a.ae}function Ks(a,y,x,b){function E(Bt,Jt,Gt,se){return(Bt*se<Jt*Gt?-1:1)*Math.acos((Bt*Gt+Jt*se)/(Math.sqrt(Bt*Bt+Jt*Jt)*Math.sqrt(Gt*Gt+se*se)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,ot=a.isLargeArc,rt=a.isClockwiseArc,lt=a.Dc,ut=a.Ec,ft=Math.cos(tt),yt=Math.sin(tt),Pt=ft*(x-lt)/2+yt*(b-ut)/2;tt=-yt*(x-lt)/2+ft*(b-ut)/2;var bt=Pt*Pt/(y*y)+tt*tt/(z*z);return 1<bt&&(y*=Math.sqrt(bt),z*=Math.sqrt(bt)),bt=(ot===rt?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*Pt*Pt)/(y*y*tt*tt+z*z*Pt*Pt)),isNaN(bt)&&(bt=0),ot=bt*y*tt/z,bt=bt*-z*Pt/y,isNaN(ot)&&(ot=0),isNaN(bt)&&(bt=0),x=(x+lt)/2+ft*ot-yt*bt,b=(b+ut)/2+yt*ot+ft*bt,ut=E(1,0,(Pt-ot)/y,(tt-bt)/z),ft=(Pt-ot)/y,lt=(tt-bt)/z,Pt=(-Pt-ot)/y,ot=(-tt-bt)/z,tt=E(ft,lt,Pt,ot),Pt=(ft*Pt+lt*ot)/(Math.sqrt(ft*ft+lt*lt)*Math.sqrt(Pt*Pt+ot*ot)),-1>=Pt?tt=Math.PI:1<=Pt&&(tt=0),!rt&&0<tt&&(tt-=2*Math.PI),rt&&0>tt&&(tt+=2*Math.PI),rt=y>z?1:y/z,Pt=y>z?z/y:1,y=ke.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=Po.alloc(),z.reset(),z.translate(x,b),z.rotate(a.Ne,0,0),z.scale(rt,Pt),$n.Ha(y,z),Po.free(z),a.ae=y,a.ae}Zt.Object.defineProperties(Xo.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&&nn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&nn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&nn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&nn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&nn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&nn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&nn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&nn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&nn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&cn(a,">= zero",Xo,"radiusX"),this._isFrozen&&nn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&cn(a,">= zero",Xo,"radiusY"),this._isFrozen&&nn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&nn(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&&nn(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&&nn(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&&nn(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&&nn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Xo.prototype.equalsApprox=Xo.prototype.Xa;var Ca=new en(Xo,"Move",0),Mr=new en(Xo,"Line",1),ls=new en(Xo,"Bezier",2),Ml=new en(Xo,"QuadraticBezier",3),ya=new en(Xo,"Arc",4),Hl=new en(Xo,"SvgArc",4);Xo.className="PathSegment",Xo.Move=Ca,Xo.Line=Mr,Xo.Bezier=ls,Xo.QuadraticBezier=Ml,Xo.Arc=ya,Xo.SvgArc=Hl;function Cs(){this.H=null,this.xu=new $t(0,0).freeze(),this.mt=new $t(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}Cs.prototype.copy=function(){var a=new Cs;return this.clone(a)},Cs.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},Cs.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},Cs.prototype.So=function(a,y){var x=this.diagram;return x===null||Oc(x,a,y),y},Cs.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Oc(x,a,y),y.assign(x.Ps(y))),y},Zt.Object.defineProperties(Cs.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}}}),Cs.prototype.getMultiTouchDocumentPoint=Cs.prototype.Bz,Cs.prototype.getMultiTouchViewPoint=Cs.prototype.So,Cs.className="InputEvent";function Kh(){this.H=null,this.xa="",this.ar=this.Lr=null}Kh.prototype.copy=function(){var a=new Kh;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Kh.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Zt.Object.defineProperties(Kh.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}}}),Kh.className="DiagramEvent";function Zr(){this.Fm=Wr,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Zr.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Zr.prototype.copy=function(){var a=new Zr;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=Oe(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Oe(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Oe(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Oe(y)&&typeof y.J=="function"?y.J():y,a},Zr.prototype.qb=function(a){a.classType===Zr&&(this.change=a)},Zr.prototype.toString=function(){var a="";return a=this.change===sl?a+"* ":this.change===Wr?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===sl?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=qn(this.object)),this.oldValue!==null&&(a+=" old: "+qn(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+qn(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Zr.prototype.I=function(a){return a?this.oldValue:this.newValue},Zr.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Zr.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Zr.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Zr.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Zr.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Zt.Object.defineProperties(Zr.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===sl&&(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}}}),Zr.prototype.redo=Zr.prototype.redo,Zr.prototype.canRedo=Zr.prototype.canRedo,Zr.prototype.undo=Zr.prototype.undo,Zr.prototype.canUndo=Zr.prototype.canUndo,Zr.prototype.getParam=Zr.prototype.Dz,Zr.prototype.getValue=Zr.prototype.I,Zr.prototype.clear=Zr.prototype.clear;var sl=new en(Zr,"Transaction",-1),Wr=new en(Zr,"Property",0),pa=new en(Zr,"Insert",1),Ba=new en(Zr,"Remove",2);Zr.className="ChangedEvent",Zr.Transaction=sl,Zr.Property=Wr,Zr.Insert=pa,Zr.Remove=Ba;function Ua(){this.o=new mn().freeze(),this.xa="",this.j=!1}Ua.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var b=this.changes.M(x);b!==null&&(y+=`
|
|
|
`+b.toString())}}return y},Ua.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()},Ua.prototype.canUndo=function(){return this.isComplete},Ua.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()}},Ua.prototype.canRedo=function(){return this.isComplete},Ua.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()}},Ua.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new li,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Wr&&b.object){var E=y.get(b.object);E||(E=new li,y.set(b.object,E));var z=E.get(b.propertyName);z===null?E.set(b.propertyName,-1):(0<z&&a.cd(z,null),E.set(b.propertyName,x))}}for(x=y=0;x<a.count;x++)b=a.M(x),b!==null&&(x>y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},Zt.Object.defineProperties(Ua.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}}}),Ua.prototype.optimize=Ua.prototype.ak,Ua.prototype.redo=Ua.prototype.redo,Ua.prototype.canRedo=Ua.prototype.canRedo,Ua.prototype.undo=Ua.prototype.undo,Ua.prototype.canUndo=Ua.prototype.canUndo,Ua.prototype.clear=Ua.prototype.clear,Ua.className="Transaction";function Vr(){this.Pt=new tn,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}Vr.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
|
|
|
`+this.history.M(b).toString(a-1);return y},Vr.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},Vr.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Ct=Vr.prototype,Ct.Xw=function(a){this.Pt.add(a)},Ct.Rx=function(a){this.Pt.remove(a)},Ct.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},Ct.eb=function(a){return a===void 0&&(a=""),_h(this,!0,a)},Ct.Kf=function(){return _h(this,!1,"")};function _h(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Bn("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=z,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}Ct.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()}},Vr.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Vr.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){Bn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Vr.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Vr.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){Bn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Vr.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Zr;for(b.change=sl,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Vr.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Ua);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||Bn("Change not within a transaction: "+x.toString()))}},Vr.prototype.skipsEvent=function(a){if(a===null||0>a.change.value)return!0;if(a=a.object,a===null)return!1;if(a.layer!==void 0){if(a=a.layer,a!==null&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1},Zt.Object.defineProperties(Vr.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}}}),Vr.prototype.handleChanged=Vr.prototype.Tu,Vr.prototype.redo=Vr.prototype.redo,Vr.prototype.undo=Vr.prototype.undo,Vr.prototype.canUndo=Vr.prototype.canUndo,Vr.prototype.discardHistoryAfterIndex=Vr.prototype.lx,Vr.prototype.rollbackTransaction=Vr.prototype.Kf,Vr.prototype.commitTransaction=Vr.prototype.eb,Vr.prototype.startTransaction=Vr.prototype.Ea,Vr.prototype.removeModel=Vr.prototype.Rx,Vr.prototype.addModel=Vr.prototype.Xw,Vr.prototype.clear=Vr.prototype.clear,Vr.className="UndoManager";function Vo(){Gi(this),this.H=_u,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Cs,this.Zr=-1}Vo.prototype.toString=function(){return this.name!==""?this.name+" Tool":Qn(this.constructor)},Vo.prototype.updateAdornments=function(){},Vo.prototype.canStart=function(){return this.isEnabled},Vo.prototype.doStart=function(){},Vo.prototype.doActivate=function(){this.isActive=!0},Vo.prototype.doDeactivate=function(){this.isActive=!1},Vo.prototype.doStop=function(){},Vo.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Vo.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Vo.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Vo.prototype.doMouseMove=function(){},Vo.prototype.doMouseUp=function(){this.stopTool()},Vo.prototype.doMouseWheel=function(){},Vo.prototype.canStartMultiTouch=function(){return!0},Vo.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,$t.allocAt(NaN,NaN)),b=y.So(1,$t.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,z=b.y-x.y;a.Jw=Math.sqrt(E*E+z*z),y.bubbles=!1}$t.free(x),$t.free(b)},Vo.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,$t.allocAt(NaN,NaN)),b=y.So(1,$t.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,z=b.y-x.y;z=Math.sqrt(E*E+z*z)/a.Jw,E=new $t((Math.min(b.x,x.x)+Math.max(b.x,x.x))/2,(Math.min(b.y,x.y)+Math.max(b.y,x.y))/2),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var ot=a.zoomPoint;a.zoomPoint=E,tt.resetZoom(z),a.zoomPoint=ot}y.bubbles=!1}$t.free(x),$t.free(b)},Vo.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Vo.prototype.doKeyUp=function(){},Vo.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Vo.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Vo.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(to?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||(to?y.meta:y.control)||y.shift||a.clearSelection()}},Vo.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(E){return!E.layer.isTemporary});var x=this.diagram,b=x.lastInput;return a=x.ic(b.documentPoint,a,y),b.targetObject=a,$f(a,b,x),b.handled};function $f(a,y,x){if(y.handled=!1,a===null||a.If()){var b=0;y.left?b=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(b=3);var E="ObjectSingleClicked";if(a!==null){switch(b){case 1:E="ObjectSingleClicked";break;case 2:E="ObjectDoubleClicked";break;case 3:E="ObjectContextClicked"}b!==0&&x.R(E,a)}else{switch(b){case 1:E="BackgroundSingleClicked";break;case 2:E="BackgroundDoubleClicked";break;case 3:E="BackgroundContextClicked"}b!==0&&x.R(E)}if(a!==null)for(;a!==null;){switch(x=null,b){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,b){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}Vo.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var b=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(b=null),y.targetObject=b;var E=!1;if(b!==a.Ck){var z=a.Ck,tt=z;for(a.Ck=b,this.doCurrentObjectChanged(z,b),y.handled=!1;z!==null;){var ot=z.mouseLeave;if(ot!==null&&(b===z||b!==null&&b.rg(z)||(ot(y,z,b),E=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;b!==null&&(tt=b.mouseEnter,!(tt!==null&&(z===b||z!==null&&z.rg(b)||(tt(y,b,z),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(z=b,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=b;z!==null&&(b=z.mouseOver,!(b!==null&&(b(y,z),E=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},Vo.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Vo.prototype.doCurrentObjectChanged=function(){},Vo.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var b=a.commandHandler,E=a.toolManager.mouseWheelBehavior;if(b!==null&&(E===Wd&&!y.shift||E===Zd&&y.control))(0<x?b.canIncreaseZoom():b.canDecreaseZoom())&&(E=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?b.increaseZoom():b.decreaseZoom(),a.zoomPoint=E),y.bubbles=!1;else if(E===Wd&&y.shift||E===Zd&&!y.control){b=a.position.copy();var z=y.event;E=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var ot="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(ot,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(ot,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:ot="pixel";break;case 1:ot="line";break;case 2:ot="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(ot,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(ot,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,b,y)}}},Vo.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Vo.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=In(function(){x.doWaitAfter(b)},a)},Vo.prototype.cancelWaitAfter=function(){this.Zr!==-1&&ae.clearTimeout(this.Zr),this.Zr=-1},Vo.prototype.doWaitAfter=function(){},Vo.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Qo);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Vo.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var b=x.toolManager.dragSize,E=b.width;return b=b.height,x.firstInput.isTouchEvent&&(E+=6,b+=6),Math.abs(y.x-a.x)>E||Math.abs(y.y-a.y)>b},Zt.Object.defineProperties(Vo.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Ze&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm},set:function(a){this.wm=a}}}),Vo.prototype.startTransaction=Vo.prototype.Ea,Vo.className="Tool";function jr(){Vo.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 Zn(2,2).ja(),this.Ha=5e3,this.ia=Zd,this.u=bc,this.Mp=this.j=null,this.zj=-1}Ae(jr,Vo),jr.prototype.initializeStandardTools=function(){},jr.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Qo&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},jr.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===yh&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Vh){y.bubbles=!0;return}if(this.gestureBehavior===yh)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===Zd?this.mouseWheelBehavior=Wd:this.mouseWheelBehavior===Wd&&(this.mouseWheelBehavior=Zd)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},jr.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Vh){y.bubbles=!0;return}if(this.gestureBehavior===yh)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Zf(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Zf(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}jr.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Qo&&(y===a||y.rg(a))||this.hideToolTip()},jr.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()))},jr.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)},jr.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 Qo)||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()},jr.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Qo){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof bo&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(ae.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=In(function(){E.hideToolTip()},a)}},jr.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y=x.y+20/y.scale+b.height>E.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.y<E.y&&(x.y=E.y),a.position=x}},jr.prototype.hideToolTip=function(){this.zj!==-1&&(ae.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Qo?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof bo&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},jr.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var b=this.mouseUpTools.M(x);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseUp());return}}a.doFocus(),this.doDeactivate()},jr.prototype.doMouseWheel=function(){this.standardMouseWheel()},jr.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},jr.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},jr.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var b=this.mouseDownTools.M(x);if(b.name===a)return b}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(b=this.mouseMoveTools.M(x),b.name===a)return b;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(b=this.mouseUpTools.M(x),b.name===a)return b;return null},jr.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.name===a)return y!==null?this.mouseDownTools.cd(b,y):this.mouseDownTools.mb(b),E}for(x=this.mouseMoveTools.length,b=0;b<x;b++)if(E=this.mouseMoveTools.M(b),E.name===a)return y!==null?this.mouseMoveTools.cd(b,y):this.mouseMoveTools.mb(b),E;for(x=this.mouseUpTools.length,b=0;b<x;b++)if(E=this.mouseUpTools.M(b),E.name===a)return y!==null?this.mouseUpTools.cd(b,y):this.mouseUpTools.mb(b),E;return null},jr.prototype.gb=function(a,y,x){y!==null&&(y.name=a,y.diagram=this.diagram),this.findTool(a)?this.replaceTool(a,y):y!==null&&x.add(y)},Zt.Object.defineProperties(jr.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 Qo?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}}}),jr.prototype.replaceStandardTool=jr.prototype.gb;var Zd=new en(jr,"WheelScroll",0),Wd=new en(jr,"WheelZoom",1),Wf=new en(jr,"WheelNone",2),bc=new en(jr,"GestureZoom",3),yh=new en(jr,"GestureCancel",4),Vh=new en(jr,"GestureNone",5);jr.className="ToolManager",jr.WheelScroll=Zd,jr.WheelZoom=Wd,jr.WheelNone=Wf,jr.GestureZoom=bc,jr.GestureCancel=yh,jr.GestureNone=Vh;function Ur(){Vo.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 $t(NaN,NaN),this.Fr=new $t,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new tn().freeze(),this.ia=new at,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var $u;Ae(Ur,Vo),Ur.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},Ur.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},Ur.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,(to?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Ur.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),je=null,this.isActive=!0,this.tl.set(a.position),af(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&&Ts(a),Xf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,je=this,rn=this.diagram,this.doSimulatedDragOut()))};function af(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof jn?(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 bi,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Ur.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Ur.prototype.Pd=function(a){return a===void 0?new Jh(Ho):this.isGridSnapEnabled?new Jh(new $t(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Jh(a.copy())},Ur.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Uh(this),Ud(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<$u.count){for(var y=$u,x=y.length,b=0;b<x;b++){var E=y.M(b);Sh(E),fu(E),Uh(E),E.diagram.ug()}y.clear()}Sh(this),this.tl.h(NaN,NaN),rn!==null&&(rn.currentCursor=""),je=rn=null,fu(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Kd(a,!0)},Ur.prototype.stopTransaction=function(){var a=this.diagram,y=Vo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Uh(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,sf(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Kf(){var a=je;fu(a),xh(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Ur.prototype.doCancel=function(){fu(this),xh(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Ur.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Ur.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Zu(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):xh(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 li,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var z=y.I(E);z!==null&&(z.location=E.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof jn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,af(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ld(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function fu(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 jn&&(x.value.point=new $t(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Sh(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 Eu(a,y,x){var b=a.diagram,E=a.startPoint,z=$t.alloc();z.assign(b.lastInput.documentPoint),a.moveParts(y,z.re(E),x),$t.free(z),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Ts(b),b.hk())}Ur.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&rh(b,a,y,this.dragOptions,x)};function xh(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof jn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Ld(b,-E.x,-E.y)}y.bd()}}function Ec(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),ml(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=sf(a,E,b),!a.isActive&&je===null)return;var ot=b!==null?b.part:null;if(ot===null||x.handlesDragDropForTopLevelParts&&ot.isTopLevel&&!(ot instanceof io)){var rt=x.mouseDragOver;rt!==null&&(rt(E),tt=!0)}if(!a.isActive&&je===null||(a.doDragOver(y,b),!a.isActive&&je===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}Ur.prototype.findDragOverObject=function(a){var y=this;return Lu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Qo||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Ur.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 sf(a,y,x){var b=!1,E=a.Cg.length,z=0<E?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<E;tt++){var ot=a.Cg[tt],rt=ot.mouseDragLeave;if(rt!==null&&(rt(y,ot,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&je===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=lf(E);for(E=a.Cg.length,x=0;x<E&&(tt=a.Cg[x],ot=tt.mouseDragEnter,ot===null||(ot(y,tt,z),b=!0,!y.handled));x++);return b}function lf(a){var y=a.panel;return y!==null?y:a instanceof Fi&&!(a instanceof io)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function _f(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(lt){return b.findValidLinkablePort(lt,x)});a=$t.alloc();var z=1/0,tt=null;for(E=E.iterator;E.next();){var ot=E.value;if(ot.part!==null){var rt=ot.ga(Zo,a);rt=y.Bf(rt),rt<z&&(tt=ot,z=rt)}}return $t.free(a),tt}function ml(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var z=null,tt=null;x.fromNode===null&&(z=_f(a,x.i(0),!1),z!==null&&(tt=z.part));var ot=null,rt=null;x.toNode===null&&(ot=_f(a,x.i(x.pointsCount-1),!0),ot!==null&&(rt=ot.part)),E.isValidLink(tt,z,rt,ot)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=tt,z!==null&&(x.fromPortId=z.portId),x.toNode=rt,ot!==null&&(x.toPortId=ot.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):no(E,tt,z,rt,ot):no(E,null,null,null,null)}}}}Ur.prototype.doDragOver=function(){};function Ph(a,y){var x=a.diagram;a.dragsLink&&ml(a,!0),Uh(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var z=b;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(E,z),E.handled))break;Wg(a,E,z),z=lf(z)}}else z=x.mouseDrop,z!==null&&z(E);if(a.isActive||je!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)z=E.key,z instanceof ei&&z.linksConnected.each(function(ot){ot.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||je!==null){for(a=an.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof ei&&oe(x,b,a);an.free(a)}}}function Wg(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof io||(x=a.mouseDrop,x!==null&&x(y))}function oe(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof jn},!0,function(E){return E instanceof jn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Ur.prototype.doDropOnto=function(){},Ur.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()?(Zu(this,!1),Xf(a,this.copiedParts),Eu(this,this.copiedParts,!1),Ud(a,this.copiedParts)):this.mayMove()?(fu(this),Eu(this,this.draggedParts,!0)):this.mayDragOut()?(Zu(this,!1),Eu(this,this.copiedParts,!1)):fu(this),Ec(this,a.lastInput.documentPoint))}},Ur.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?(fu(this),Zu(this,!0),Xf(a,this.copiedParts),Eu(this,this.copiedParts,!1),Ud(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,fu(this),this.mayMove()&&(Eu(this,this.draggedParts,!0),Ec(this,a.lastInput.documentPoint))),this.Ym=!0,Ph(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&le(this),a.Ya(),Ud(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Ur.prototype.simulatedMouseMove=function(a,y,x){if(je===null)return!1;var b=je.diagram;x instanceof Ze||(x=null);var E=rn;return x!==E&&(E!==null&&E!==b&&(E.ug(),je.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),rn=x,x!==null&&x!==b&&(Kf(),E=x.toolManager.findTool("Dragging"),E!==null&&($u.contains(E)||$u.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,b.doSimulatedDragOver()),!0)},Ur.prototype.simulatedMouseUp=function(a,y,x){if(je===null)return!1;var b=rn,E=je.diagram;if(x===null)return je.doCancel(),!0;if(x!==b){var z=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&z!==null)return b.ug(),je.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;rn=x,b=x.toolManager.findTool("Dragging"),b!==null&&(Kf(),$u.contains(b)||$u.add(b),b.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new $t),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=je,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function le(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof ei&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Ur.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(to?!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())},Ur.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())},Ur.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())},Ur.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Ur.prototype.Az=function(){return je},Ur.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=je;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Ur.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),ll(a),a.animationManager.Cc(),a=je,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Ur.prototype.doSimulatedDragLeave=function(){var a=je;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Ur.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=je;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;De(this,y.draggedParts.Lf(),!1,a.firstInput),Eu(this,this.copiedParts,!1),Ec(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Ur.prototype.doSimulatedDrop=function(){var a=this.diagram,y=je;if(y!==null){var x=y.diagram;if(y.Ym=!0,fu(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),De(this,y.draggedParts.Lf(),!0,a.lastInput),Eu(this,this.copiedParts,!1);var b=new tn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Ph(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function De(a,y,x,b){if(a.copiedParts===null){var E=a.diagram;if(!E.isReadOnly&&!E.isModelReadOnly){E.skipsUndoManager=!x,E.partManager.addsToTemporaryLayer=!x,a.startPoint=b.documentPoint,x=E.Kj(y,E,!0);var z=an.alloc();E=b=1/0;for(var tt=-1/0,ot=-1/0,rt=y.iterator;rt.next();){var lt=rt.value;if(lt.isVisible()){var ut=lt.location;lt=ut.x,ut=ut.y,isNaN(lt)||isNaN(ut)||(lt<b&&(b=lt),ut<E&&(E=ut),lt>tt&&(tt=lt),ut>ot&&(ot=ut))}}for(b===1/0?z.h(0,0,0,0):z.h(b,E,tt-b,ot-E),b=z.x+z.width/2,E=z.y+z.height/2,an.free(z),z=a.Fr,tt=new li,ot=$t.alloc(),rt=y.iterator;rt.next();)lt=rt.value,lt instanceof jn&<.canCopy()&&(ut=x.I(lt),ut!==null&&(ut.points=lt.points,Ld(ut,z.x-b,z.y-E),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)lt=y.value,lt.Zc()&<.canCopy()&&(rt=x.I(lt),rt!==null&&(lt=lt.location,ot.h(z.x-(b-lt.x),z.y-(E-lt.y)),rt.location=ot,rt.Va(),tt.add(rt,a.Pd(ot))));$t.free(ot),a.copiedParts=tt,af(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ld(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Ur.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Ur.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new $t},Zt.Object.defineProperties(Ur.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}}}),Ur.prototype.getDraggingSource=Ur.prototype.Az;var je=null,rn=null;Ur.className="DraggingTool",$u=new mn,Vi("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),jr.prototype.doCancel=function(){je!==null&&je.doCancel(),Vo.prototype.doCancel.call(this)};function Ue(){Vo.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new jn,y=new yo;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new yo,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new ei,y=new yo,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=qo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new ei,y=new yo,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=qo,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 li,this.Of=this.gj=this.Pf=null}Ae(Ue,Vo),Ue.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Ue.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var z=y.Df(),tt=Zn.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,b.desiredSize=tt,Zn.free(tt),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Zo,z=$t.alloc(),x.location=y.ga(Zo,z),$t.free(z),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Ue.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=qo,y.fromSpot=Qr,y.toSpot=Qr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Ue.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Ue.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof ei){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)}},Ue.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof ei))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof ei)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Ue.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,z=y.og(x,b,function(ft){return E.findValidLinkablePort(ft,a)},null,!0);for(b=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,ot=tt.part;if(ot instanceof ei){var rt=tt.ga(Zo,$t.alloc()),lt=x.x-rt.x,ut=x.y-rt.y;$t.free(rt),rt=lt*lt+ut*ut,rt<b&&(lt=this.validPortsCache.I(tt),lt!==null?lt&&(y=tt,b=rt):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,ot,tt)||!a&&this.isValidLink(ot,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,b=rt):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof ei&&(x.layer===null||x.layer.allowLink))?y:null},Ue.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},Ue.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},Ue.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Ue.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof ei))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof ei))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},Ue.prototype.isValidLink=function(a,y,x,b){if(!this.isValidFrom(a,y)||!this.isValidTo(x,b)||!(y===null||b===null||(y.fromLinkableSelfNode&&b.toLinkableSelfNode||!this.isInSameNode(y,b))&&(y.fromLinkableDuplicates&&b.toLinkableDuplicates||!this.isLinked(y,b)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var E=a.linkValidation;if(E!==null&&!E(a,y,x,b,this.originalLink))return!1}return x!==null&&(E=x.linkValidation,E!==null&&!E(a,y,x,b,this.originalLink))?!1:(E=this.linkValidation,E!==null?E(a,y,x,b,this.originalLink):!0)},Ue.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var b=new tn;return b.add(a),Ln(this,x,y,b)};function Ln(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Ln(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Ln(a,y.labeledLink,x,b))))}Ue.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==pf){if(b===op){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!kn(this,a,y,x,!0)}if(b===rp){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!kn(this,a,y,x,!0)}if(b===ep)return a===y?a=!0:(b=new tn,b.add(y),a=wn(this,b,a,y,x)),!a;if(b===np)return!kn(this,a,y,x,!1);if(b===ip)return a===y?a=!0:(b=new tn,b.add(y),a=Vn(this,b,a,y,x)),!a}return!0};function kn(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==b&&(!E||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&kn(a,tt,x,b,E)))return!0}return!1}function wn(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==E&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&wn(a,y,tt,b,E)))return!0}return!1}function Vn(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==E){var ot=tt.fromNode;if(tt=tt.toNode,ot=ot===x?tt:ot,ot!==x&&Vn(a,y,ot,b,E))return!0}}return!1}Zt.Object.defineProperties(Ue.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}}}),Ue.className="LinkingBaseTool";function ii(){Ue.call(this),this.name="Linking",this.V={},this.F=null,this.K=ti,this.Xd=null}Ae(ii,Ue),ii.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},ii.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 ei)))return null;var x=this.direction;if(x===ti||x===Bi){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===ti||x===Ti)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},ii.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 ei&&(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 ei&&(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)},ii.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()},ii.prototype.doStop=function(){Ue.prototype.doStop.call(this),this.startObject=null},ii.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var ot=tt.part;ot instanceof ei&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=ot,E=tt):(y=ot,x=tt,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(z=this.insertLink(y,x,b,E),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},ii.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof jn)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)},ii.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},ii.prototype.doNoLink=function(){},Zt.Object.defineProperties(ii.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 ti=new en(ii,"Either",0),Bi=new en(ii,"ForwardsOnly",0),Ti=new en(ii,"BackwardsOnly",0);ii.className="LinkingTool",ii.Either=ti,ii.ForwardsOnly=Bi,ii.BackwardsOnly=Ti;function bi(){Ue.call(this),this.name="Relinking";var a=new yo;a.figure="Diamond",a.desiredSize=ur,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new yo,a.figure="Diamond",a.desiredSize=ur,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new an}Ae(bi,Ue),bi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof jn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},bi.prototype.makeAdornment=function(a,y){var x=new Qo;return x.type=Fn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},bi.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},bi.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 Qo&&x.adornedPart instanceof jn))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=Ji),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Ji),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},bi.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===xg||x===kd)&&(x=Js),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}},bi.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()},bi.prototype.doStop=function(){Ue.prototype.doStop.call(this),this.handle=null},bi.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,b=this.originalToNode,E=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof ei&&(this.isForwards?(b=tt,E=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},bi.prototype.reconnectLink=function(a,y,x,b){return x=x!==null&&x.portId!==null?x.portId:"",b?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},bi.prototype.doNoRelink=function(){};function no(a,y,x,b,E){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),b!==null?(a.copyPortProperties(b,E,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Zt.Object.defineProperties(bi.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 Qo))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),bi.className="RelinkingTool",Vi("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Vi("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Mi(){Vo.call(this),this.name="LinkReshaping";var a=new yo;a.figure="Rectangle",a.desiredSize=Or,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new yo,a.figure="Diamond",a.desiredSize=ur,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new $t,this.Yq=new mn}Ae(Mi,Vo),Mi.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Ui},Mi.prototype.om=function(a,y){a.reshapingBehavior=y},Mi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof jn){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)}},Mi.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new Qo,E.type=Fn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=b?1:0;if(y.resegmentable&&y.computeCurve()!==Xl)for(var ot=x+tt;ot<z-tt;ot++){var rt=this.makeResegmentHandle(a,ot);rt!==null&&(rt.segmentIndex=ot,rt.segmentFraction=.5,rt.fromMaxLinks=999,E.add(rt))}for(tt=x+1;tt<z;tt++)if(ot=this.makeHandle(a,tt),ot!==null){if(ot.segmentIndex=tt,tt!==x)if(tt===x+1&&b){rt=y.i(x);var lt=y.i(x+1);ke.B(rt.x,lt.x)&&ke.B(rt.y,lt.y)&&(lt=y.i(x-1)),ke.B(rt.x,lt.x)?(this.om(ot,Do),ot.cursor="n-resize"):ke.B(rt.y,lt.y)&&(this.om(ot,vo),ot.cursor="w-resize")}else tt===z-1&&b?(rt=y.i(z-1),lt=y.i(z),ke.B(rt.x,lt.x)&&ke.B(rt.y,lt.y)&&(rt=y.i(z+1)),ke.B(rt.x,lt.x)?(this.om(ot,Do),ot.cursor="n-resize"):ke.B(rt.y,lt.y)&&(this.om(ot,vo),ot.cursor="w-resize")):tt!==z&&(this.om(ot,Jo),ot.cursor="move");E.add(ot)}E.adornedObject=a}return E},Mi.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Mi.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Mi.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},Mi.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 jn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},Mi.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Mi.prototype.stopTransaction=function(){var a=this.diagram,y=Vo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Mi.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Mi.prototype.getResegmentingPoint=function(){return this.handle.ga(Zo)},Mi.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Mi.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,b=y.i(x-1),E=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(Qi(this,tt,b,E,z,!0)||Qi(this,tt,b,E,z,!1))){var ot=y.points.copy();Qi(this,tt,b,E,z,!0)?(ot.cd(x-2,new $t(tt.x,(z.y+tt.y)/2)),ot.cd(x+1,new $t(z.x,(z.y+tt.y)/2))):(ot.cd(x-2,new $t((z.x+tt.x)/2,tt.y)),ot.cd(x+1,new $t((z.x+tt.x)/2,z.y))),ot.mb(x),ot.mb(x-1),y.points=ot,y.Wb()}else tt=y.i(x+2),Math.abs(E.x-z.x)<this.resegmentingDistance&&Math.abs(E.y-z.y)<this.resegmentingDistance&&(Qi(this,b,E,z,tt,!0)||Qi(this,b,E,z,tt,!1))&&(ot=y.points.copy(),Qi(this,b,E,z,tt,!0)?(ot.cd(x-1,new $t(b.x,(b.y+tt.y)/2)),ot.cd(x+2,new $t(tt.x,(b.y+tt.y)/2))):(ot.cd(x-1,new $t((b.x+tt.x)/2,b.y)),ot.cd(x+2,new $t((b.x+tt.x)/2,tt.y))),ot.mb(x+1),ot.mb(x),y.points=ot,y.Wb())}}else tt=$t.alloc(),ke.qh(b.x,b.y,z.x,z.y,E.x,E.y,tt)&&tt.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),$t.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Qi(a,y,x,b,E,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}Mi.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===Do?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===vo&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,b===Do?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===vo&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),z=y.i(b-1),tt=y.i(b+1);ke.B(z.x,E.x)&&ke.B(E.y,tt.y)?(ke.B(z.x,y.i(b-2).x)&&!ke.B(z.y,y.i(b-2).y)?(y.m(b,a.x,z.y),x++,b++):y.L(b-1,a.x,z.y),ke.B(tt.y,y.i(b+2).y)&&!ke.B(tt.x,y.i(b+2).x)?y.m(b+1,tt.x,a.y):y.L(b+1,tt.x,a.y)):ke.B(z.y,E.y)&&ke.B(E.x,tt.x)?(ke.B(z.y,y.i(b-2).y)&&!ke.B(z.x,y.i(b-2).x)?(y.m(b,z.x,a.y),x++,b++):y.L(b-1,z.x,a.y),ke.B(tt.x,y.i(b+2).x)&&!ke.B(tt.y,y.i(b+2).y)?y.m(b+1,a.x,tt.y):y.L(b+1,a.x,tt.y)):ke.B(z.x,E.x)&&ke.B(E.x,tt.x)?(ke.B(z.x,y.i(b-2).x)&&!ke.B(z.y,y.i(b-2).y)?(y.m(b,a.x,z.y),x++,b++):y.L(b-1,a.x,z.y),ke.B(tt.x,y.i(b+2).x)&&!ke.B(tt.y,y.i(b+2).y)?y.m(b+1,a.x,tt.y):y.L(b+1,a.x,tt.y)):ke.B(z.y,E.y)&&ke.B(E.y,tt.y)&&(ke.B(z.y,y.i(b-2).y)&&!ke.B(z.x,y.i(b-2).x)?(y.m(b,z.x,a.y),x++,b++):y.L(b-1,z.x,a.y),ke.B(tt.y,y.i(b+2).y)&&!ke.B(tt.x,y.i(b+2).x)?y.m(b+1,tt.x,a.y):y.L(b+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(z=b.findVisibleNode(),z!==null&&z!==b&&(b=z,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(z=E.ga(Zo,$t.alloc()),b=y.getLinkPointFromPoint(b,E,z,a,!0,$t.alloc()),y.L(0,b.x,b.y),$t.free(z),$t.free(b)),b=y.toNode,E=y.toPort,b!==null&&(z=b.findVisibleNode(),z!==null&&z!==b&&(b=z,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(Zo,$t.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,$t.alloc()),y.L(y.pointsCount-1,a.x,a.y),$t.free(x),$t.free(a));y.zf()},Mi.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Jo:return a;case Do:return new $t(y.i(x).x,a.y);case vo:return new $t(a.x,y.i(x).y);default:case Ui:return y.i(x)}},Zt.Object.defineProperties(Mi.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 Qo))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}}}),Mi.prototype.setReshapingBehavior=Mi.prototype.om,Mi.prototype.getReshapingBehavior=Mi.prototype.Ru;var Ui=new en(Mi,"None",0),vo=new en(Mi,"Horizontal",1),Do=new en(Mi,"Vertical",2),Jo=new en(Mi,"All",3);Mi.className="LinkReshapingTool",Mi.None=Ui,Mi.Horizontal=vo,Mi.Vertical=Do,Mi.All=Jo,Vi("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function ro(){Vo.call(this),this.name="Resizing",this.o=new Zn(1,1).freeze(),this.j=new Zn(9999,9999).freeze(),this.yg=new Zn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new yo;a.alignmentFocus=Zo,a.figure="Rectangle",a.desiredSize=Or,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new $t,this.Dw=new Zn,this.Tn=new $t,this.rt=new Zn(0,0),this.qt=new Zn(1/0,1/0),this.pt=new Zn(1,1)}Ae(ro,Vo),ro.prototype.updateAdornments=function(a){if(!(a===null||a instanceof jn)){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(),tc(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},ro.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Qo,y.type=Fn.Spot,y.locationSpot=Zo;var x=new Xs;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,ea)),y.add(this.makeHandle(a,Al)),y.add(this.makeHandle(a,As)),y.add(this.makeHandle(a,ol)),y.add(this.makeHandle(a,va)),y.add(this.makeHandle(a,Va)),y.add(this.makeHandle(a,$a)),y.add(this.makeHandle(a,Ta))}else if(yu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ro.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},ro.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=Zo),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof Fn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},ro.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},ro.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))},ro.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},ro.prototype.stopTransaction=function(){var a=this.diagram,y=Vo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ro.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},ro.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,$t.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),a.bd(),$t.free(E)}},ro.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,$t.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),$t.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},ro.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 io){var b=new mn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new at;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},ro.prototype.computeResize=function(a,y,x,b,E,z){y.Mc()&&(y=Zo);var tt=this.adornedObject.naturalBounds,ot=tt.x,rt=tt.y,lt=tt.x+tt.width,ut=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var yt=tt.height;0>=ft&&(ft=1),0>=yt&&(yt=1),ft=yt/ft}return yt=$t.alloc(),ke.No(a.x,a.y,ot,rt,E.width,E.height,yt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(yt.x,lt-b.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.y=Math.max(yt.y,ut-b.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width),a.x=lt-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(yt.x,lt-b.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.height=Math.max(Math.min(yt.y-rt,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width),a.x=lt-a.width)):(a.x=Math.max(yt.x,lt-b.width),a.x=Math.min(a.x,lt-x.width),a.width=lt-a.x,z||(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft,a.y=rt+.5*(ut-rt-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(yt.x-ot,b.width),x.width),a.y=Math.max(yt.y,ut-b.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(yt.x-ot,b.width),x.width),a.height=Math.max(Math.min(yt.y-rt,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width))):(a.width=Math.max(Math.min(yt.x-ot,b.width),x.width),z||(a.height=Math.max(Math.min(ft*a.width,b.height),x.height),a.width=a.height/ft,a.y=rt+.5*(ut-rt-a.height))):0>=y.y?(a.y=Math.max(yt.y,ut-b.height),a.y=Math.min(a.y,ut-x.height),a.height=ut-a.y,z||(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width,a.x=ot+.5*(lt-ot-a.width))):1<=y.y&&(a.height=Math.max(Math.min(yt.y-rt,b.height),x.height),z||(a.width=Math.max(Math.min(a.height/ft,b.width),x.width),a.height=ft*a.width,a.x=ot+.5*(lt-ot-a.width))),$t.free(yt),a},ro.prototype.computeReshape=function(){var a=Cn;return this.adornedObject instanceof yo&&(a=bv(this.adornedObject)),!(a===wi||this.diagram.lastInput.shift)},ro.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},ro.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},ro.prototype.computeCellSize=function(){var a=new Zn(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},Zt.Object.defineProperties(ro.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 Qo))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 Qo)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}}}),ro.className="ResizingTool",Vi("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Io(){Vo.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new $t,this.ue=null;var a=new yo;a.figure="Ellipse",a.desiredSize=ur,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new $t(NaN,NaN),this.u=0,this.F=50}Ae(Io,Vo),Io.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)}},Io.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Qo,y.type=Fn.Position,y.locationSpot=Zo;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(yu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Io.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},Io.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)},Io.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(Zo)},Io.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},Io.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new $t(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Io.prototype.stopTransaction=function(){var a=this.diagram,y=Vo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Io.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Io.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Io.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()},Io.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Io.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var y=this.adornedObject.panel;y!==null&&(a-=y.li()),360<=a?a-=360:0>a&&(a+=360),y=Math.min(Math.abs(this.snapAngleMultiple),180);var x=Math.min(Math.abs(this.snapAngleEpsilon),y/2);return!this.diagram.lastInput.shift&&0<y&&0<x&&(a%y<x?a=Math.floor(a/y)*y:a%y>y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},Zt.Object.defineProperties(Io.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 Qo))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 Qo)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}}}),Io.className="RotatingTool",Vi("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function mr(){Vo.call(this),this.name="ClickSelecting"}Ae(mr,Vo),mr.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},mr.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},mr.className="ClickSelectingTool";function po(){Vo.call(this),this.name="Action",this.pk=null}Ae(po,Vo),po.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},po.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()},po.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))}},po.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()},po.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())},po.prototype.doStop=function(){this.pk=null},po.className="ActionTool";function To(){Vo.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new $t(0,0)}Ae(To,Vo),To.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)},To.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},To.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Fi)x.Zc()&&(yu(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);Oe(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var z=$t.allocAt(a.x,a.y);this.isGridSnapEnabled&&Yf(this.diagram,b,a,z),b.location=z,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),$t.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Zt.Object.defineProperties(To.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}}}),To.className="ClickCreatingTool";function ho(){Vo.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Fi;a.layerName="Tool",a.selectable=!1;var y=new yo;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Ae(ho,Vo),ho.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))},ho.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},ho.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},ho.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var b=Zn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Zn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},ho.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()},ho.prototype.computeBoxBounds=function(){var a=this.diagram;return new an(a.firstInput.documentPoint,a.lastInput.documentPoint)},ho.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),to?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 b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Zt.Object.defineProperties(ho.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}}}),ho.className="DragSelectingTool";function Hi(){Vo.call(this),this.name="Panning",this.Xt=new $t,this.xy=new $t,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(ae.document,"scroll",a.Kw,!1),a.stopTool()}}Ae(Hi,Vo),Hi.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())},Hi.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(ae.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Hi.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Hi.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Hi.prototype.doMouseMove=function(){this.move()},Hi.prototype.doMouseUp=function(){this.move(),this.stopTool()},Hi.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,b=a.lastInput.documentPoint,E=y.x+x.x-b.x;x=y.y+x.y-b.y,a.allowHorizontalScroll||(E=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(E,x)}},Zt.Object.defineProperties(Hi.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Hi.className="PanningTool",Vi("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Vi("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Vi("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Vi("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Vi("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function bo(){this.F=this.u=this.j=this.o=null}Zt.Object.defineProperties(bo.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}}}),bo.className="HTMLInfo";function Wo(a,y,x){this.text=a,this.hx=y,this.visible=x}Wo.className="ContextMenuButtonInfo";function ir(){Vo.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new $t,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Ae(ir,Vo);function rr(a){var y=new bo;y.show=function(E,z,tt){tt.showDefaultContextMenu()},y.hide=function(E,z){z.hideDefaultContextMenu()},Ar=y,a.tu=function(){a.stopTool()},y=Re("div");var x=Re("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var b=Re("style");ae.document.getElementsByTagName("head")[0].appendChild(b),b.sheet.insertRule(".goCXul { list-style: none; }",0),b.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),b.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),b=a.diagram,b!==null&&(b.addEventListener(y,"contextmenu",ao,!1),b.addEventListener(y,"selectstart",ao,!1),b.addEventListener(x,"contextmenu",ao,!1)),y.className="goCXforeground",x.className="goCXbackground",ae.document.body&&(ae.document.body.appendChild(y),ae.document.body.appendChild(x)),Pr=y,Oa=x,Da=!0}function ao(a){return a.preventDefault(),!1}ir.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)},ir.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},ir.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},ir.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Ze||(a instanceof Ee?b=a:b=y.ic(x.documentPoint,null,function(E){return!E.layer.isTemporary})),b!==null){for(a=b;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return b.part}else if(y.contextMenu!==null)return y;return null},ir.prototype.doActivate=function(){},ir.prototype.doMouseDown=function(){if(Vo.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Qo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&yr(this)},ir.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Qo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}yr(this)};function yr(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof bo||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(br(a,!0),a.isActive||a.stopTool())}ir.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function br(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=Ar,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Ee?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Qo&&!a.currentContextMenu.visible&&a.stopTool()}}ir.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},ir.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Qo){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof bo&&a.show(y,x,this);this.currentContextMenu=a},ir.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y+b.height>E.bottom&&(x.y-=b.height+5/y.scale),x.y<E.y&&(x.y=E.y),a.position=x}},ir.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Qo?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof bo&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function na(a){var y=new mn;return y.add(new Wo("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Wo("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Wo("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Wo("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Wo("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Wo("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Wo("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Wo("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Wo("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Wo("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Wo("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Wo("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Wo("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}ir.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=na(this)),Pr.innerHTML="",Oa.addEventListener("pointerdown",this.tu,!1);var y=this,x=Re("ul");x.className="goCXul",Pr.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,z=E.visible;if(typeof E.hx=="function"&&(typeof z!="function"||z(a))){z=Re("li"),z.className="goCXli";var tt=Re("a");tt.className="goCXa",tt.href="#",tt.ky=E.hx,tt.addEventListener("pointerdown",function(ot){return this.ky(a),y.stopTool(),ot.preventDefault(),!1},!1),tt.textContent=E.text,z.appendChild(tt),x.appendChild(z)}}Pr.style.display="block",Oa.style.display="block"},ir.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Ar){Pr.style.display="none",Oa.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Oa,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Zt.Object.defineProperties(ir.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Qo?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Da===!1&&Ar===null&&ua&&rr(this),Ar},set:function(a){a===null&&(Da=!0),Ar=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Ar=null,Da=!1,Oa=null,Pr=null;ir.className="ContextMenuTool",Vi("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Uo(){Vo.call(this),this.name="TextEditing",this.Zh=new Lr,this.ia=null,this.V=Ro,this.vj=null,this.qa=zo,this.u=1,this.F=!0,this.o=null,this.j=new bo,this.kt=null,_r(this,this.j)}Ae(Uo,Vo);function _r(a,y){if(ua){var x=Re("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(er)):E==="Tab"?(a.acceptText(ar),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==zo){var b=a.kt;a.qa===vr&&(a.qa=Hr),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==zo){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,z){if(b instanceof Lr&&z instanceof Uo)if(z.state===bs)x.style.border="3px solid red",x.focus();else{var tt=b.ga(Zo),ot=E.position,rt=E.scale,lt=b.Df()*rt;lt<z.minimumEditorScale&&(lt=z.minimumEditorScale);var ut=b.naturalBounds.width*lt+6,ft=b.naturalBounds.height*lt+2,yt=(tt.x-ot.x)*rt;tt=(tt.y-ot.y)*rt,ot=b.verticalAlignment,rt=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*lt,ft=ot.y*ft-ot.y*rt+ot.offsetY-(.5*ft-.5*rt)-rt/2,x.value=b.text,E.div.style.font=b.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*lt+"%",x.style.lineHeight="normal",x.style.width=ut+"px",x.style.left=(yt-ut/2|0)-1+"px",x.style.top=(tt+ft|0)-1+"px",x.style.textAlign=b.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=b.lineCount,x.wA=lt,x.className="goTXarea",E.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}Uo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||_s&&_s!==this&&(_s.acceptText(os),_s&&_s!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Lr&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Ro&&!y.isSelected||this.starting===Yr&&2>a.lastInput.clickCount)):!1},Uo.prototype.doStart=function(){_s=this,this.textBlock!==null&&this.doActivate()},Uo.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 Lr&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=vr;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new an(this.textBlock.ga(ea),this.textBlock.ga(As));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Uo.prototype.doCancel=function(){this.stopTool()},Uo.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Uo.prototype.doMouseDown=function(){this.isActive&&this.acceptText(os)},Uo.prototype.acceptText=function(a){switch(a){case os:this.qa===us?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===vr||this.qa===bs||this.qa===Hr)&&(this.qa=Gr,Aa(this));break;case ba:case er:case ar:(er!==a||this.textBlock.isMultiline!==!0)&&(this.qa===vr||this.qa===bs||this.qa===Hr)&&(this.qa=Gr,Aa(this))}};function Aa(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,z="";b.valueFunction!==null&&(z=b.valueFunction()),a.isValidText(y,E,z)?(a.Ea(a.name),a.qa=us,a.transactionResult=a.name,y.text=z,a.doSuccess(E,z),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=bs,a.doError(E,z))}}Uo.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)},Uo.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Uo.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=zo,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Uo.prototype.doStop=function(){_s=null},Uo.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},Uo.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Zt.Object.defineProperties(Uo.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)}}}),Uo.prototype.measureTemporaryTextBlock=Uo.prototype.Lx;var ba=new en(Uo,"LostFocus",0),os=new en(Uo,"MouseDown",1),ar=new en(Uo,"Tab",2),er=new en(Uo,"Enter",3),sr=new en(Uo,"SingleClick",0),Ro=new en(Uo,"SingleClickSelected",1),Yr=new en(Uo,"DoubleClick",2),zo=new en(Uo,"StateNone",0),vr=new en(Uo,"StateActive",1),Hr=new en(Uo,"StateEditing",2),Gr=new en(Uo,"StateValidating",3),bs=new en(Uo,"StateInvalid",4),us=new en(Uo,"StateValidated",5),_s=null;Uo.className="TextEditingTool",Uo.LostFocus=ba,Uo.MouseDown=os,Uo.Tab=ar,Uo.Enter=er,Uo.SingleClick=sr,Uo.SingleClickSelected=Ro,Uo.DoubleClick=Yr,Uo.StateNone=zo,Uo.StateActive=vr,Uo.StateEditing=Hr,Uo.StateValidating=Gr,Uo.StateInvalid=bs,Uo.StateValidated=us,Vi("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function ia(a){Ll||(vl(),Ll=!0),this.H=_u,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=ql,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new tn,this.ce=new la,this.ce.Yd=this,this.Ei=new tn,this.pu=new tn,this.Sr=new tn,this.pr=new tn,a&&Object.assign(this,a)}ia.prototype.Xe=function(a){this.H=a},ia.prototype.canStart=function(){return!0};function Es(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ds(a.H),a.zb=!0)}function es(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===ql?(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===$l&&y.vc.clear(),a.Qw=!!(a.Pk===tu&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),Ns(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==zs&&b!==null&&(delete b.start.scale,delete b.end.scale),ae.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ts(x),Lc(x),a.zb=!1,y.start(),y.bc&&(ma(a),x.Ya(),oh(y,0),ll(x,!0),Ya(a),x.R("AnimationStarting",a)))}))}}function ms(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Wu(a,y,x,b){a.isTicking||ms(a)||y instanceof jn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}Ct=ia.prototype,Ct.fv=function(a){return this.ce.fv(a)},Ct.Xu=function(a){return this.ce.Xu(a)};function oa(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var z=E.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var ot=!0;else{for(ot=tt.vc.iterator;ot.next();){var rt=ot.key;if(rt instanceof Ee&&rt.diagram!==null||rt instanceof Ze){ot=!0;break t}}ot=!1}ot?Zl(tt,!1):tt.Xk=!0}}E.pu.clear(),E.bc!==!1&&(ma(E),ll(E.H),Ya(E)),ae.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),ae.requestAnimationFrame(function(){x()}))}function ca(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function ma(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 Ya(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Ct.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(),Ns(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Ns(y,this.H)},Ct.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))},Ct.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Sa(this,a))},Ct.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Wa(this.ce,y,"position",y.position,y.position),Sa(this,a))};function vs(a,y,x){!a.zb||y.D(x)||ms(a)||(a.H.pi||(y=x.copy()),Wa(a.ce,a.H,"position",y,x))}function Ir(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Sa(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function ys(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],ot=a[2];a=a[3];var rt=y[0],lt=y[1],ut=y[2];return y=y[3],ot===0||ot===100?(z=rt,tt=lt):(ut===0||ut===100)&&(rt=z,lt=tt),180<Math.abs(rt-z)&&(rt>z?z+=360:rt+=360),z=E(x,z,rt-z,b)%360,tt=E(x,tt,lt-tt,b),ot=E(x,ot,ut-ot,b),x=E(x,a,y-a,b),"hsla("+z+", "+tt+"%, "+ot+"%, "+x+")"}function vl(){function a(x,b,E,z,tt,ot){x.position=new $t(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot))}var y=new li;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,z,tt,ot){tt<ot?x.mm(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot),!1):x.position=new $t(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot))}),y.add("location",function(x,b,E,z,tt,ot){tt<ot?x.mm(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot),!0):x.location=new $t(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot))}),y.add("position:placeholder",function(x,b,E,z,tt,ot){tt<ot?x.mm(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot),!1):x.position=new $t(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot))}),y.add("position:nodeCollapse",function(x,b,E,z,tt,ot){var rt=x.actualBounds,lt=E.actualBounds;E=lt.x+lt.width/2-rt.width/2,rt=lt.y+lt.height/2-rt.height/2,tt<ot?x.mm(z(tt,b.x,E-b.x,ot),z(tt,b.y,rt-b.y,ot),!1):x.position=new $t(z(tt,b.x,E-b.x,ot),z(tt,b.y,rt-b.y,ot))}),y.add("desiredSize",function(x,b,E,z,tt,ot){x.desiredSize=new an(z(tt,b.width,E.width-b.width,ot),z(tt,b.height,E.height-b.height,ot))}),y.add("width",function(x,b,E,z,tt,ot){x.width=z(tt,b,E-b,ot)}),y.add("height",function(x,b,E,z,tt,ot){x.height=z(tt,b,E-b,ot)}),y.add("fill",function(x,b,E,z,tt,ot){x.fill=ys(b,E,tt,ot,z)}),y.add("stroke",function(x,b,E,z,tt,ot){x.stroke=ys(b,E,tt,ot,z)}),y.add("strokeWidth",function(x,b,E,z,tt,ot){x.strokeWidth=z(tt,b,E-b,ot)}),y.add("strokeDashOffset",function(x,b,E,z,tt,ot){x.strokeDashOffset=z(tt,b,E-b,ot)}),y.add("background",function(x,b,E,z,tt,ot){x.background=ys(b,E,tt,ot,z)}),y.add("areaBackground",function(x,b,E,z,tt,ot){x.areaBackground=ys(b,E,tt,ot,z)}),y.add("opacity",function(x,b,E,z,tt,ot){x.opacity=z(tt,b,E-b,ot)}),y.add("scale",function(x,b,E,z,tt,ot){x.scale=z(tt,b,E-b,ot)}),y.add("angle",function(x,b,E,z,tt,ot){x.angle=z(tt,b,E-b,ot)}),Gl=y}Zt.Object.defineProperties(ia.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&&cn(a,">= 1",ia,"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}}}),ia.prototype.stopAnimation=ia.prototype.Cc;var Gl=null,Ll=!1,ql=new en(ia,"Default",1),tu=new en(ia,"AnimateLocations",2),$l=new en(ia,"None",3);ia.className="AnimationManager",ia.defineAnimationEffect=function(a,y){Ll||(vl(),Ll=!0),Gl.add(a,y)},ia.Default=ql,ia.AnimateLocations=tu,ia.None=$l;function la(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=Ho,this.vc=new li,this.Tt=new li,this.yl=new tn,this.Ut=new tn,this.dw=Sd,a&&Object.assign(this,a)}la.prototype.suspend=function(){this.Xk=!0},la.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Zl(this,!0),ma(this.Yd),ll(this.H),Ya(this.Yd),this.H.redraw()};function Ns(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}Ct=la.prototype,Ct.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof Ze?a=x:x instanceof Ee&&(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===ql&&this===y.defaultAnimation&&(this.Lp=Mu,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=mf),ma(y),this.yl.each(function(b){b.data=null,a.add(b)}),Ya(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,oa(y,this),this)},Ct.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Ct.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Ze?this.H=a:a instanceof Ee&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Fi){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Wa(this,a,y,x,b,E),this};function Wa(a,y,x,b,E,z){var tt=a.vc;if(y instanceof Ze&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(qh(b),av(),b=[Yl.j,Yl.u,Yl.o,Yl.F],qh(E),av(),E=[Yl.j,Yl.u,Yl.o,Yl.F]),tt.contains(y)){var ot=tt.I(y),rt=ot.start,lt=ot.end;rt[x]===void 0&&(rt[x]=xa(b)),lt[x]=xa(E)}else rt={},lt={},rt[x]=xa(b),lt[x]=xa(E),ot=rt.position,y instanceof Ee&&ot instanceof $t&&!ot.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ot.assign(lt.position),ot=new Ku(rt,lt,z),tt.add(y,ot);tt=rt[x],tt instanceof $t&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Fi?ot.Ku.location=xa(y.location):z&&(ot.Ku[x]=xa(b))}function xa(a){return a instanceof $t||a instanceof Zn?a.copy():a}Ct.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Ct.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Zl(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var b=+new Date,E=b>a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,E<a.Gd?(a.Qd=+new Date-E,a.cn=a.Qd+a.Gd):E=a.Gd),ma(x),oh(a,E),ll(a.H,!0),Ya(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function oh(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var z=b.key;if(!(z instanceof Ee&&z.diagram===null)){var tt=b.value,ot=E?tt.end:tt.start;tt=E?tt.start:tt.end;var rt=Gl,lt;for(lt in tt)lt==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||rt.get(lt)===null||rt.get(lt)(z,ot[lt],tt[lt],a.Lp,y,x,a)}}}Ct.stop=function(){return this.bc?(this.Ml(!0),this):this},Ct.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,ma(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var z=Gl;b.next();){var tt=b.key,ot=b.value,rt=E?ot.end:ot.start,lt=E?ot.start:ot.end,ut=ot.Ku,ft;for(ft in lt)if(z.get(ft)!==null){var yt=ft;!ot.Hu||yt!=="position:nodeCollapse"&&yt!=="position:placeholder"||(yt="position"),z.get(yt)(tt,rt[ft],ut[ft]!==void 0?ut[ft]:ot.Hu?rt[ft]:lt[ft],this.Lp,this.Gd,this.Gd,this)}ot.Hu&&ut.location!==void 0&&tt instanceof Fi&&(tt.location=ut.location),ot.nv&&tt instanceof Fi&&tt.Zb(!1)}if(y.As.clear(),Kd(y,!1),y.Ya(),y.N(),ll(y,!0),x.defaultAnimation===this){for(ft=x.pr.iterator;ft.next();)E=ft.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}ll(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Ya(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Ns(this,null),x.Ml(this),y.$b())}},Ct.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof io&&(b=y.placeholder),b!==null?(x=b.ga(ea),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new $t(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof io)for(a=a.memberParts;a.next();)b=a.value,b instanceof ei&&this.Cj(b,y)},Ct.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof io&&(x=y.placeholder),x!==null){var b=x.ga(ea);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof io)for(a=a.memberParts;a.next();)b=a.value,b instanceof ei&&this.Aj(b,y)}},Ct.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Zt.Object.defineProperties(la.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&cn(a,">= 1",la,"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:_t("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}}}),la.prototype.getTemporaryState=la.prototype.Ez,la.prototype.stop=la.prototype.stop,la.prototype.add=la.prototype.add,la.prototype.addTemporaryPart=la.prototype.Iy;function eu(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Mu(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}la.className="Animation",la.EaseLinear=function(a,y,x,b){return x*a/b+y},la.EaseInOutQuad=eu,la.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},la.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},la.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},la.EaseOutExpo=Mu;function Ku(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Ku.className="AnimationState";function kl(a,y,x){this.xd=null,this.rf=a,this.so=x||Ea,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=hs))}kl.prototype.copy=function(){var a=new kl(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 Xr(a,y){a=a.uk,a!==null&&(a.duration&&(y.duration=a.duration),a.finished&&(y.finished=a.finished),a.easing&&(y.easing=a.easing))}Zt.Object.defineProperties(kl.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 Ea=new en(kl,"Default",1),hs=new en(kl,"Immediate",2),Ma=new en(kl,"Bundled",3);kl.className="AnimationTrigger",kl.Default=Ea,kl.Immediate=hs,kl.Bundled=Ma;function Kr(a){Gi(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)}Ct=Kr.prototype,Ct.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Is(x)}a.clear(),this.Zq.length=0},Ct.Xe=function(a){this.H=a},Ct.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,z=0,tt=0,ot=this.Pa.iterator;ot.next();){var rt=ot.value;rt instanceof io?E++:rt instanceof ei?b++:rt instanceof jn?z++:rt instanceof Qo?tt++:x++}if(ot="",0<x&&(ot+=x+" Parts "),0<b&&(ot+=b+" Nodes "),0<E&&(ot+=E+" Groups "),0<z&&(ot+=z+" Links "),0<tt&&(ot+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,ot+=`
|
|
|
`+x.toString(),b=x.data,b!==null&&ji(b)&&(ot+=" #"+ji(b)),x instanceof ei?ot+=" "+qn(b):x instanceof jn&&(ot+=" "+qn(x.fromNode)+" "+qn(x.toNode));return y+" "+this.Pa.count+": "+ot},Ct.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=$t.alloc(),z=this.Pa.s,tt=z.length;tt--;){var ot=z[tt];if((b!==!0||tc(ot)!==!1)&&ot.isVisible()&&(E.assign(a),Co(E,ot.oe),ot=ot.ic(E,y,x),ot!==null&&(y!==null&&(ot=y(ot)),ot!==null&&(x===null||x(ot)))))return $t.free(E),ot}return $t.free(E),null},Ct.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof mn||b instanceof tn||(b=new tn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var z=$t.alloc(),tt=this.Pa.s,ot=tt.length;ot--;){var rt=tt[ot];if((E!==!0||tc(rt)!==!1)&&rt.isVisible()){z.assign(a),Co(z,rt.oe);var lt=rt;rt.ji(z,y,x,b)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||b.add(lt))}}return $t.free(z),b},Ct.Cf=function(a,y,x,b,E){if(y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof mn||E instanceof tn||(E=new tn),this.Uh===!1)return E;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,ot=tt.length;ot--;){var rt=tt[ot];if((z!==!0||tc(rt)!==!1)&&rt.isVisible()){var lt=rt;rt.Cf(a,y,x,b,E)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||E.add(lt))}}return E},Ct.Nu=function(a,y,x,b,E,z,tt){if(this.Uh===!1)return E;for(var ot=this.Pa.s,rt=ot.length;rt--;){var lt=ot[rt];if((tt!==!0||tc(lt)!==!1)&&z(lt)&<.isVisible()){var ut=lt;lt.Cf(a,y,x,b,E)&&(y!==null&&(ut=y(ut)),ut===null||x!==null&&!x(ut)||E.add(ut))}}return E},Ct.og=function(a,y,x,b,E,z){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof mn||E instanceof tn)&&(z=E),E=!0),z instanceof mn||z instanceof tn||(z=new tn),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var ot=$t.alloc(),rt=$t.alloc(),lt=this.Pa.s,ut=lt.length;ut--;){var ft=lt[ut];if((tt!==!0||tc(ft)!==!1)&&ft.isVisible()){ot.assign(a),Co(ot,ft.oe),rt.h(a.x+y,a.y),Co(rt,ft.oe);var yt=ft;ft.og(ot,rt,x,b,E,z)&&(x!==null&&(yt=x(yt)),yt===null||b!==null&&!b(yt)||z.add(yt))}}return $t.free(ot),$t.free(rt),z},Ct.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Rn();for(var E=Rn(),z=0;z<b;z++){var tt=x[z];if(tt.vw=z,tt instanceof jn){if(tt.fd===!1)continue}else if(tt instanceof Qo&&tt.adornedPart!==null)continue;var ot=tt.actualBounds;tt.isVisible()&&Nr(ot,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&E.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],Dv(x),x=x.adornments;x.next();)b=x.value,b.measure(1/0,1/0),b.arrange(),b.Fd(!0);for(y=0;y<E.length;y++)Dv(E[y]);ni(a),ni(E)}}};function Ss(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Ct.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=Ss(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,ot=an.alloc(),rt=0;rt<b;rt++)this.Oj(a,x[rt],y,z,tt,ot,!0);if(an.free(ot),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function yl(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var z=E.length;if(z!==0){var tt=Ss(a,y),ot=a.Zq;ot.length=0;for(var rt=x.scale,lt=an.alloc(),ut=0;ut<z;ut++){var ft=E[ut];b.contains(ft)&&a.Oj(y,ft,x,ot,rt,lt,!1)}an.free(lt),y.globalAlpha=tt}}}Ct.Oj=function(a,y,x,b,E,z,tt){if(tt&&!tc(y))a.Hs(y);else{if(b!==null&&y instanceof jn&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,b=y.containingGroup;b!==null;)tt?b.tb!==null&&z.Ex(b.tb):b.tb!==null&&(tt=!0,z.assign(b.tb)),b=b.containingGroup;var ot=y.actualBounds;if(b=!1,tt&&y.isVisible()){if(!z.Yc(ot)){a.Hs(y);return}b=!z.Re(ot)}b&&(a.save(),a instanceof Nl?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),ot.width*E>x.Oq||ot.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,z=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(fa(y,a,y.areaBackground,!0,!0,z,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(fa(y,a,"rgba(0,0,0,0.3)",!0,!1,z,E),a.fillRect(E.x,E.y,E.width,E.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),fa(y,a,y.background,!0,!1,z,E),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),b&&(a.restore(),a.Vc(!0))}},Ct.g=function(a,y,x,b,E){var z=this.diagram;z!==null&&z.cb(Wr,a,this,y,x,b,E)},Ct.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&Is(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),gu(this,a,y),a},Ct.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,Is(y),a};function gu(a,y,x){if(y=uf(a,y,x),x instanceof io&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,z=E.length,tt=0;tt<z;tt++){var ot=E[tt];if(ot===x&&(y=tt,0<=b)||0>b&&ot.containingGroup===x&&(b=tt,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&gu(a,-1,y)}x.svg!==null&&x.svg.remove()}function uf(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var ot=y+1,rt=NaN;ot<E&&(rt=a.M(ot).zOrder,!!isNaN(rt));)ot++;if(!isNaN(tt)&&tt>b)for(;;){if(z===-1||tt<=b){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(rt)&&rt<b)for(;;){if(ot===E||rt>=b){if(ot--,ot===y)break;return a.mb(y),a.Gb(ot,x),ot}for(rt=NaN;++ot<E&&(rt=a.M(ot).zOrder,isNaN(rt)););}return y}Zt.Object.defineProperties(Kr.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===""&&_t("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&_t("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)&&cn(a,"0 <= value <= 1",Kr,"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))}}}),Kr.prototype.findObjectsNear=Kr.prototype.og,Kr.prototype.findObjectsIn=Kr.prototype.Cf,Kr.prototype.findObjectsAt=Kr.prototype.ji,Kr.prototype.findObjectAt=Kr.prototype.ic,Kr.className="Layer";function Ze(a,y){if(hm||(Os(),hm=!0),Gi(this),_u=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,ua){var x=this,b=function(){x.removeEventListener(ae.document,"DOMContentLoaded",b,!1),x.setRTL()};ae.document.body!==null?this.setRTL():x.addEventListener(ae.document,"DOMContentLoaded",b,!1)}this.ol=null,ng.add("Model",gr);var E=this;return this.Hb=function(z){var tt=E.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var ot=z.change;z.modelChange===""&&ot===Wr&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){E.partManager.doModelChanged(z)},this.hu=this.ku=null,hf(this),this.model=hy(),this.Wg=!0,_d(this),this.layout=new $r,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 dm,a!==void 0&&(typeof a=="string"||ae.Element&&a instanceof Element?Mc(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var wh,_u;function hf(a){a.Yd=new ia,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new mn,a.pj=new li,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new $t(NaN,NaN).freeze(),a.du=new $t(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new $t(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Po,a.zu=new $t(NaN,NaN).freeze(),a.ut=new an(NaN,NaN,NaN,NaN).freeze(),a.rj=new vi(0,0,0,0).freeze(),a.sj=Sd,a.nu=!1,a.Zt=null,a.fu=null,a.yh=zs,a.zk=hr,a.Fg=zs,a.pq=hr,a.yt=ea,a.Bt=ea,a.Fc=!0,a.pn=!1,a.De=new tn,a.Eh=new li,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new vi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Cs,a.bq.diagram=a,a.Qg=new Cs,a.Qg.diagram=a,a.cj=new Cs,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,ev(a),a.ai=new tn,a.Ht=!0,a.uu=xd,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 li,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 vi(5).freeze(),a.Hw=new tn().freeze(),a.Nt=999999999,a.nw=new tn().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new tn,a.ow=new tn,a.Xh=null,a.aw=new Zn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new $t,bounds:new an,Py:new Zn,bA:new Zn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new an(NaN,NaN,NaN,NaN).freeze(),a.wo=new Zn(NaN,NaN).freeze(),a.Sp=new an(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new li;var y=new ei,x=new Lr;x.bind(new La("text","",qn)),y.add(x),a.ny=y,a.Lg.add("",y),y=new ei,x=new Lr,x.stroke="brown",x.bind(new La("text","",qn)),y.add(x),a.Lg.add("Comment",y),y=new ei,y.selectable=!1,y.avoidable=!1,x=new yo,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Zn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new li,y=new io,y.selectionObjectName="GROUPPANEL",y.type=Fn.Vertical,x=new Lr,x.font="bold 12pt sans-serif",x.bind(new La("text","",qn)),y.add(x),x=new Fn(Fn.Auto),x.name="GROUPPANEL";var b=new yo;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Xs,b.padding=new vi(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new li,y=new jn,x=new yo,x.isPanelMain=!0,y.add(x),x=new yo,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new jn,x=new yo,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Qo,y.type=Fn.Auto,x=new yo,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Xs,x.margin=new vi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Qo,y.type=Fn.Link,x=new yo,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 gr,a.toolManager=new jr,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new at,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Yh(),a.eq=null,a.fq=cr,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 $t,a.zy=500,a.wp=new $t,a.wq=!1}Ze.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Ac=null,Xd="",gd(this,!1),this.Xn.clear(),pg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function gd(a,y){a.animationManager.Cc(!0),a.Hw=new tn().freeze(),a.nw=new tn().freeze();var x=a.skipsUndoManager,b=a.cc!==null&&a.cc!==void 0;b&&(a.skipsUndoManager=!0);var E=null;a.fe!==null&&(E=a.fe.part,E!==null&&a.remove(E));var z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var ot=a.Wa.s[y].parts;ot.next();){var rt=ot.value;rt!==E&&rt.data===null&&z.push(rt)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),pg(),a.Og.clear(),Ki=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),z}function Yh(){return null}Ze.prototype.reset=function(){this.clear(),this.vb=!0,hf(this),sh(this),this.Wg=!0,_d(this),this.layout=new $r,this.Wg=!1,this.model=hy(),this.model.undoManager=new Vr,this.vb=this.rn=!1,this.N()},Ze.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=ae.document.body);var y=Re("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},Ze.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=ae.document.body);var y=0;if(ua){var x=um;y=wh,x===null&&(x=um=Re("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=wh=Re("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||to||(y=11)}this.Db=y,this.Gw=!0},Ze.prototype.qb=function(a){a.classType===Ze&&(this.autoScale=a)},Ze.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1);return y};function Mc(a,y){if(ua){if(y!=null||_t("Diagram setup requires an argument DIV."),a.Ka!==null&&_t("Diagram has already completed setup."),typeof y=="string"?a.Ka=ae.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:_t("No DIV or DIV id supplied: "+y),a.Ka===null&&_t("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&_t("Invalid div id; div already has a Diagram associated with it."),!a.ol&&ae.ResizeObserver){var x=gn(function(){a.$b()},250);a.ol=new ae.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}ae.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=ae.go;var E=new vu(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",ae.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Bc(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new vu(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,ua){E=Re("div");var z=Re("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(E),E.appendChild(z),E.onscroll=Vf,E.addEventListener("pointerdown",cf),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=z}a.hk=gn(function(){a.Yh=null,a.N()},300),a.Ov=gn(function(){Lc(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var ot=Sl(a,tt,!0);ot.bubbles=!0;var rt=0,lt=0;ot.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(rt=0<tt.deltaX?1:-1),tt.deltaY!==0&&(lt=0<tt.deltaY?1:-1),ot.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-rt:-lt):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(rt=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(lt=0<tt.wheelDeltaY?-1:1),ot.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-rt:-lt):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(ot.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),Kl(ot,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,Sl(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var ot=a.Yt;ot[tt.pointerId]===void 0&&(ot[tt.pointerId]=tt),ot=a.oj;var rt=!1;if(ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType)if(ot[1]!==null&&ot[1].pointerId===tt.pointerId)ot[1]=tt,rt=!0;else if(ot[0]===null)ot[0]=tt;else if(ot[1]===null)ot[1]=tt,rt=!0;else{tt.preventDefault();return}else ot[0]=tt;(ot=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var lt=rt;rt=Tc(a,tt,!0,!1,!0,lt),vd(a,tt,rt),rt.targetDiagram=Nc(tt,tt.target),rt.targetObject=null,lt||rt.clone(a.bq),lt=a.uw,ot=ot?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(lt.x-tt.screenX)>ot||Math.abs(lt.y-tt.screenY)>ot)?a.yq++:a.yq=1,rt.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():Kl(rt,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var ot=a.oj;if(ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType){if(ot[1]!==null&&ot[1].pointerId===tt.pointerId){ot[1]=tt;return}if(ot[0]===null)ot[0]=tt;else return}else ot[0]=tt;if(ot[0].pointerId===tt.pointerId){ot=Tc(a,tt,!1,!1,!1,ot[1]!==null);var rt=ae.document.elementFromPoint(tt.clientX,tt.clientY)||null;rt!==null&&rt.shadowRoot!==void 0&&rt.shadowRoot!==null&&(rt=rt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var lt=a,ut=tt;rt&&rt.H&&(ut=tt,lt=rt.H),ot.targetDiagram=lt,vd(a,ut,ot),ot.targetObject=null,a.doMouseMove(),Kl(ot,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var ot=tt.pointerType==="touch"||tt.pointerType==="pen",rt=a.Yt;if(ot&&a.qu)delete rt[tt.pointerId],tt.preventDefault();else if(rt=a.oj,rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType)rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null);else{rt[0]=null,rt=Tc(a,tt,!1,!0,!0,!1);var lt=ae.document.elementFromPoint(tt.clientX,tt.clientY)||null;lt!==null&<.shadowRoot!==void 0&<.shadowRoot!==null&&(lt=lt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),lt!==null&<.H instanceof Ze&<.H!==a&&vd(lt.H,tt,rt),lt===null&&(lt=tt.target),vd(a,tt,rt),rt.clickCount=a.yq,rt.targetDiagram=Nc(tt,lt),rt.targetObject=null,a.doMouseUp(),Kl(rt,tt),ot&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var ot=a.Yt;ot[tt.pointerId]&&delete ot[tt.pointerId],ot=a.oj,ot[0]!==null&&ot[0].pointerId===tt.pointerId&&(ot[0]=null),ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var ot=a.oj;ot[0]!==null&&ot[0].pointerId===tt.pointerId?(ot[0]=null,a.wq=!1):ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null)},a.Vp=b.Z["d"+yf[1]+yf[2]+"wI"+zc.slice(1,5)]["b"+Fx.slice(1,y)](b.Z,vf,y,y),b.Vc(!0),Kg(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Ze.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Ze.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function Kg(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(ae,"resize",a.Ov,!1)}function Ts(a){30<a.Sq&&(a.Yh=1)}function Kd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Pi&&Pi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Ze.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:ae.devicePixelRatio||1},Ze.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Ze.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Ze.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Ze.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Ze.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Ze.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Ze.prototype.doFocus=function(){this.focus()},Ze.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=ae.scrollX||ae.pageXOffset,y=ae.scrollY||ae.pageYOffset;this.ta.focus(),ae.scrollTo(a,y)}},Ze.prototype.Oy=function(){this.H.R("GainedFocus")},Ze.prototype.Ny=function(){this.H.R("LostFocus")};function Lc(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===zs&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function _d(a){var y=new Kr;y.name="Background",a.Al(y),y=new Kr,y.name="",a.Al(y),y=new Kr,y.name="Foreground",a.Al(y),y=new Kr,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Kr,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Kr,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function df(a){var y=new Fn(Fn.Grid);y.name="GRID";var x=new yo;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new yo,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new yo,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new yo,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new yo,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new yo,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Fi,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 Vf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Eh(this.H)}function cf(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Eh(this.H)}Ze.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var b=this.documentBounds,E=this.viewportBounds,z=this.rj,tt=b.x-z.left,ot=b.y-z.top,rt=b.width+z.left+z.right,lt=b.height+z.top+z.bottom,ut=b.right+z.right;z=b.bottom+z.bottom;var ft=E.x;b=E.y;var yt=E.width,Pt=E.height,bt=E.right,Bt=E.bottom;E=this.scale;var Jt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Jt=Jt+a.scrollWidth-a.clientWidth;break;case"reverse":Jt=a.scrollWidth-Jt-a.clientWidth}var Gt=Jt;yt<rt||Pt<lt?(Jt=$t.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Gt&&(Jt.x=Gt/E+tt,this.ju=Gt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Jt.y=a.scrollTop/E+ot,this.lu=a.scrollTop),this.position=Jt,$t.free(Jt),this.Ee=this.qr=!1):(Jt=$t.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Jt.h(Gt+tt,this.position.y)),ut>bt&&(this.position=Jt.h(-(y.scrollWidth-this.Aa)+Gt-this.Aa/E+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(ot<b&&(this.position=Jt.h(this.position.x,a.scrollTop+ot)),z>Bt&&(this.position=Jt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+z))),$t.free(Jt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ut=b.right,bt=E.right,z=b.bottom,Bt=E.bottom,tt=b.x,ft=E.x,ot=b.y,b=E.y,yt>=rt&&tt>=ft&&ut<=bt&&(x.style.width="1px"),Pt>=lt&&ot>=b&&z<=Bt&&(x.style.height="1px"))}},Ze.prototype.computeBounds=function(a){return a===void 0&&(a=new an),ds(this),kc(this,a)};function kc(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,z=0;z<E;z++){var tt=b[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var ot=tt.length,rt=0;rt<ot;rt++){var lt=tt[rt];lt.isInDocumentBounds&<.isVisible()&&(lt=lt.actualBounds,lt.w()&&(x?(x=!1,y.assign(lt)):y.ed(lt)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Ze.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Xe(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof jn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds))}else for(a=a.iterator;a.next();)b=a.value,!y&&b instanceof jn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new an(NaN,NaN,0,0):x};function Wl(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=$t.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=an.allocAt(0,0,b.width,b.height);var E=$t.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,an.free(b),$t.free(E),$t.free(x)}x=a.yh,y&&a.Fg!==zs&&(x=a.Fg);var z=x!==zs?pd(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/z;var tt=a.ya/z,ot=a.zk,rt=a.pq;y&&!ot.sb()&&(rt.sb()||rt.Xb())&&(ot=rt.Xb()?Zo:rt),ff(a,a.documentBounds,E,tt,ot,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,ke.B(z.x,x)&&ke.B(z.y,b)&&ke.B(z.width,E)&&ke.B(z.height,tt)||a.onViewportBoundsChanged(new an(x,b,E,tt),z,y,!1)}}function pd(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var b=a.documentBounds;if(!b.w())return x;var E=b.width;b=b.height;var z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),ot=z/E,rt=tt/b;return y===_l?(y=Math.min(rt,ot),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Jd?(y=rt>ot?(tt-a.Db)/b:(z-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Ze.prototype.zoomToFit=function(){var a=this.sj;this.sj=Sd,this.scale=pd(this,_l),a!==Sd&&(Wl(this,!1),ff(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Ct=Ze.prototype,Ct.BA=function(a,y){y===void 0&&(y=_l);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===_l||y===Jd)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var z=this.ya;E=y===Jd?z/b>E/x?(z-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(z/b,E/x)}this.scale=E,this.position=new $t(a.x,a.y)}},Ct.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new $t(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},Ct.zz=function(a){if(a instanceof Ee){this.eq=a;var y=$t.alloc();this.fq=this.op(a.ga(ea,y)),$t.free(y)}else this.eq=null,this.fq=cr};function ff(a,y,x,b,E,z){var tt=$t.allocAt(a.pa.x,a.pa.y),ot=tt.x,rt=tt.y;if(a.eq!==null){var lt=$t.alloc();lt=a.eq.ga(ea,lt),ot=lt.x-a.fq.x/a.scale,rt=lt.y-a.fq.y/a.scale,E=Qr,$t.free(lt)}(z||a.scrollMode===Sd)&&(E.sb()&&(x>y.width&&(ot=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(rt=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,z=x-y.width,x<y.width+E.left+E.right?(ot=Math.min(ot+x/2,y.right+Math.max(z,E.right)-x/2),ot=Math.max(ot,y.left-Math.max(z,E.left)+x/2),ot-=x/2):ot>y.left?ot=y.left:ot<y.right-x&&(ot=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(rt=Math.min(rt+b/2,y.bottom+Math.max(x,E.bottom)-b/2),rt=Math.max(rt,y.top-Math.max(x,E.top)+b/2),rt-=b/2):rt>y.top?rt=y.top:rt<y.bottom-b&&(rt=y.bottom-b)),tt.x=isFinite(ot)?ot:-a.yb.left,tt.y=isFinite(rt)?rt:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),vs(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),sh(a),$t.free(tt)}Ct.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Lu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Fi)return a}else if(a=Lu(this,a,function(x){return x.part}),a instanceof Fi)return a;return null},Ct.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ds(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function Lu(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),ds(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}Ct.lz=function(a,y,x){return y===void 0&&(y=!0),Ch(this,a,function(b){return b.part},y?function(b){return b instanceof Fi&&b.canSelect()}:null,x)};function Ch(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof mn||E instanceof tn||(E=new tn),ds(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,b,E)}return E}Ct.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof mn||b instanceof tn||(b=new tn),ds(this);for(var E=this.Wa.iteratorBackwards;E.next();){var z=E.value;z.visible&&z.ji(a,y,x,b)}return b},Ct.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),md(this,a,function(E){return E instanceof Fi&&(!x||E.canSelect())},y,b)},Ct.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof mn||E instanceof tn||(E=new tn),ds(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,b,E)}return E},Ct.Nu=function(a,y,x,b,E,z){var tt=new tn;ds(this);for(var ot=this.Wa.iteratorBackwards;ot.next();){var rt=ot.value;rt.visible&&rt.Nu(a,y,x,b,tt,E,z)}return tt};function md(a,y,x,b,E){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof mn||E instanceof tn||(E=new tn),ds(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,b,E)}return E}Ct.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Xh(this,a,y,function(z){return z instanceof Fi&&(!b||z.canSelect())},x,E)},Ct.og=function(a,y,x,b,E,z){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof mn||E instanceof tn)&&(z=E),E=!0),z instanceof mn||z instanceof tn||(z=new tn),ds(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var ot=tt.value;ot.visible&&ot.og(a,y,x,b,E,z)}return z};function Xh(a,y,x,b,E,z){var tt=null;for(tt===void 0&&(tt=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof mn||E instanceof tn)&&(z=E),E=!0),z instanceof mn||z instanceof tn||(z=new tn),ds(a),a=a.Wa.iteratorBackwards;a.next();){var ot=a.value;ot.visible&&!ot.isTemporary&&ot.og(y,x,tt,b,E,z)}return z}Ze.prototype.acceptEvent=function(a){return Sl(this,a,a instanceof MouseEvent)};function Sl(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?vd(a,y,b):(b.viewPoint=a.Qg.viewPoint,b.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),b.modifiers=a,b.button=y.button,y.buttons!==void 0&&(b.buttons=y.buttons),to&&y.button===0&&y.ctrlKey&&(b.button=2),b.down=!1,b.up=!1,b.clickCount=1,b.delta=0,b.handled=!1,b.bubbles=!1,b.timestamp=y.timeStamp,b.isMultiTouch=!1,b.targetDiagram=Nc(y,y.target),b.targetObject=null,b}function Nc(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 Tc(a,y,x,b,E,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,to&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=b,tt.handled=!1,tt.bubbles=E,tt.isMultiTouch=z,tt}function Kl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Ze.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Sl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.down=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del";break;case 48:x.key="0";break;case 187:case 61:case 107:x.key="Add";break;case 189:case 173:case 109:x.key="Subtract";break;case 27:x.key="Esc"}return y.doKeyDown(),Kl(x,a)},Ze.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Sl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.up=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del"}return y.doKeyUp(),Kl(x,a)},Ze.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Sl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Kl(x,a)},Ze.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Sl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Kl(x,a)},Ze.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new $t(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?Co(new $t(y,a),this.Ab):new $t(y,a)};function vd(a,y,x){var b=a.ta,E=a.Aa,z=a.ya,tt=0,ot=0;b!==null&&(b=b.getBoundingClientRect(),tt=y.clientX-E/b.width*b.left,ot=y.clientY-z/b.height*b.top),x.viewPoint.h(tt,ot),a.Ab!==null?(y=$t.allocAt(tt,ot),a.Ab.Cd(y),x.documentPoint.assign(y),$t.free(y)):x.documentPoint.h(tt,ot)}function Oc(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var b=a.ta;b!==null&&(b=b.getBoundingClientRect(),x.h(y.clientX-a.Aa/b.width*b.left,y.clientY-a.ya/b.height*b.top))}}Ze.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Fc(a){a.ld||ds(a),a.Va()}Ze.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Ct=Ze.prototype,Ct.Pz=function(){return this.kg},Ct.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 $t(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&In(function(){b.ld=!1,Es(y,"Model"),a(b)},1)},Ct.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;ae.requestAnimationFrame(function(){y.kg&&y.bd()})}},Ct.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),ll(this))};function bh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Eh(a)||(y&&ds(a),x&&Wl(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,b=a.Xn;if(!x.isAnimating&&b.length!==0){for(var E=b.s,z=E.length,tt=0;tt<z;tt++){var ot=E[tt];za(ot,!1),ot.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(rt){rt.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Lc(a),bh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(ah(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),ds(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,ds(a),a.ou||Fc(a),bh(a,!0,!1),tt=!1,z?(x=an.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Ic(a)),a.R("LayoutCompleted"),bh(a,!0,!1),an.free(x)):x.Ok&&x.Qw&&(a.Fg!==zs?a.scale=pd(a,a.Fg):a.yh!==zs?a.scale=pd(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Wl(a,!0)),z&&tt&&a.eb("Initial Layout"),ds(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Ic(a){if(a.Fg!==zs)a.scale=pd(a,a.Fg);else if(a.yh!==zs)a.scale=pd(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Wl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),ah(a)}function ds(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new tn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof io&&b.U&65536&&(b.U=b.U^65536)})}}Ct.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof io||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof io&&x.isVisible()&&ra(this,x);for(a.reset();a.next();)x=a.value,x instanceof jn&&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 Qo&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function ra(a,y){for(var x=Rn(),b=Rn(),E=y.memberParts;E.next();){var z=E.value;z.isVisible()&&(z instanceof io?(Ul(z)||Us(z)||qd(z))&&ra(a,z):z instanceof jn?z.fromNode===y||z.toNode===y?b.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,E=0;E<a;E++)z=x[E],z.measure(1/0,1/0),z.arrange();for(ni(x),y.measure(1/0,1/0),y.arrange(),a=b.length,y=0;y<a;y++)x=b[y],x.measure(1/0,1/0),x.arrange();ni(b)}Ct.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},Ct.gc=function(a){if(this.Ka!==null){if(this.ta===null&&_t("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){iu(this);var x=this.Aa,b=this.ya;if(a.Gv.resize(x,b,x,b),x=this.Wa.s,b=x.length,this.Fd(x,b,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var E=this.Ca,z=Math.round(y.x*E)/E,tt=Math.round(y.y*E)/E,ot=this.Ab;for(ot.reset(),E!==1&&ot.scale(E),y.x===0&&y.y===0||ot.translate(-z,-tt),a.ti=null,Uy(a,ot.m11,ot.m12,ot.m21,ot.m22,ot.dx,ot.dy),this.pb!==1&&(a.globalAlpha=this.pb),Rs(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<b;y++)x[y].gc(a,this);a=!1,this.Yf?jc(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Po.prototype.Cd=Po.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,iu(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,ot=this.pa;var rt=this.Ca,lt=Math.round(ot.x*rt)/rt,ut=Math.round(ot.y*rt)/rt;for(rt!==1&&z.scale(rt),ot.x===0&&ot.y===0||z.translate(-lt,-ut),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Rs(this,a),ot=0;ot<E;ot++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[ot].gc(a,this);if(y=!1,this.Yf?jc(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Po.prototype.Cd=Po.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=Pi&&Pi.nx,x=this.zw,b||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,E=y=0;E<x.length;E++)y+=x[E];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),b)for(a.setTransform(1,0,0,1,0,0),b=0;b<x.length;b++)a.fillText(x[b].toString(),20,150+ +(20*b))}}};function Fa(a,y,x,b,E,z,tt,ot,rt,lt){if(a.Ka!==null){a.ta===null&&_t("No canvas specified"),tt===void 0&&(tt=null),ot===void 0&&(ot=null),rt===void 0&&(rt=!1),lt===void 0&&(lt=!1),iu(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ut=a.Ca;a.Ca=E;var ft=a.Wa.s,yt=ft.length;try{var Pt=new an(z.x,z.y,b.width/E,b.height/E),bt=Pt.copy();bt.Co(x),ah(a,bt),ds(a),a.Fd(ft,yt,a,Pt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),ot!==null&&ot!==""&&(y.fillStyle=ot,y.ox(0,0,b.width,b.height));var Bt=a.Mb;y.scale(Bt,Bt);var Jt=Po.alloc();Jt.reset(),Jt.translate(x.left,x.top),Jt.scale(E),z.x===0&&z.y===0||Jt.translate(-z.x,-z.y),y.setTransform(Jt.m11,Jt.m12,Jt.m21,Jt.m22,Jt.dx,Jt.dy),y.yc(),y instanceof Nl&&Uy(y,Jt.m11,Jt.m12,Jt.m21,Jt.m22,Jt.dx,Jt.dy),Po.free(Jt),Rs(a,y),y.globalAlpha=a.pb;var Gt=a.Qj("Grid");if(tt){var se=new tn,ue=tt.iterator;for(ue.reset();ue.next();){var ge=ue.value;ge instanceof Fi&&(lt||ge.layer!==Gt)&&(ge.Gj(),se.add(ge))}for(lt=0;lt<yt;lt++)yl(ft[lt],y,a,se,rt);se.each(function(We){return We.Gj()})}else for(se=0;se<yt;se++){var be=ft[se];be===Gt?lt&&be.gc(y,a,!0):be.gc(y,a,rt)}a.$i=!1,a.Yf&&jc(a.Yf,a)&&a.Vp()}finally{a.Ca=ut,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,yt,a,a.viewportBounds),ah(a),a.ib instanceof Nl&&(a.ib.Nj.PA(),a.redraw())}}}Ct.Gf=function(a){return this.Rg[a]},Ct.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Ct.Tx=function(){this.Rg=new ki,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(to||lo),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Rs(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Ct.Ql=function(a){return this.on[a]},Ct.sA=function(a,y){this.on[a]=y},Ct.Sx=function(){this.on=new ki,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Ct.set=function(a){return Object.assign(this,a),this},Ct.Du=function(a){return this.nm(a)},Ct.nm=function(a){return nu(this,a),this};function nu(a,y){var x=a instanceof Fn,b=a instanceof Ze,E;for(E in y){E===""&&_t("Setting properties requires non-empty property names");var z=a,tt=E;if(x||b){var ot=E.indexOf(".");if(0<ot){var rt=E.substring(0,ot);x?z=a.fb(rt):(z=a[rt],z==null&&(z=a.toolManager[rt])),Oe(z)?tt=E.substr(ot+1):_t("Unable to find object named: "+rt+" in "+a.toString()+" when trying to set property: "+E)}}if(tt[0]!=="_"&&!Si(z,tt))if(b&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(b&&tt==="Changed"){a.Pe(y[tt]);continue}else if(b&&Si(a.toolManager,tt))z=a.toolManager;else if(b&&am(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof Ei&&tt==="Changed"){a.Pe(y[tt]);continue}else _t('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[E],tt[0]==="_"&&z instanceof Ee&&z.Vw(tt)}}Ct.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new li,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Ct.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},Ze.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==mf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var b=this.scale,E=Math.max(a.y,y.y),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*b&&0<Math.max(0,z-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=an.alloc(),Jg(this,this.computeBounds(b)),an.free(b)),b=this.ta,b===null||b instanceof lh)))){var tt=this.Mb;E=this.Aa*tt;var ot=this.ya*tt,rt=this.scale*tt;z=Math.round(Math.round(y.x*rt)-Math.round(a.x*rt)),y=Math.round(Math.round(y.y*rt)-Math.round(a.y*rt)),rt=this.jw,a=this.oy,rt.width!==E&&(rt.width=E),rt.height!==ot&&(rt.height=ot),a.clearRect(0,0,E,ot),rt=190*tt;var lt=70*tt,ut=Math.max(z,0),ft=Math.max(y,0),yt=Math.floor(E-ut),Pt=Math.floor(ot-ft);a.drawImage(b.Oa,ut,ft,yt,Pt,0,0,yt,Pt),jc(this.Yf,this)&&a.clearRect(0,0,rt,lt),b=Rn(),a=Rn(),Pt=Math.abs(z),yt=Math.abs(y);var bt=ut===0?0:E-Pt;ut=$t.allocAt(bt,0),Pt=$t.allocAt(Pt+bt,ot),a.push(new an(Math.min(ut.x,Pt.x),Math.min(ut.y,Pt.y),Math.abs(ut.x-Pt.x),Math.abs(ut.y-Pt.y)));var Bt=this.Ab;if(Bt.reset(),Bt.scale(tt,tt),this.Ca!==1&&Bt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&Bt.translate(-tt.x,-tt.y),Co(ut,Bt),Co(Pt,Bt),b.push(new an(Math.min(ut.x,Pt.x),Math.min(ut.y,Pt.y),Math.abs(ut.x-Pt.x),Math.abs(ut.y-Pt.y))),bt=ft===0?0:ot-yt,ut.h(0,bt),Pt.h(E,yt+bt),a.push(new an(Math.min(ut.x,Pt.x),Math.min(ut.y,Pt.y),Math.abs(ut.x-Pt.x),Math.abs(ut.y-Pt.y))),Co(ut,Bt),Co(Pt,Bt),b.push(new an(Math.min(ut.x,Pt.x),Math.min(ut.y,Pt.y),Math.abs(ut.x-Pt.x),Math.abs(ut.y-Pt.y))),jc(this.Yf,this)&&(E=0<z?0:-z,ot=0<y?0:-y,ut.h(E,ot),Pt.h(rt+E,lt+ot),a.push(new an(Math.min(ut.x,Pt.x),Math.min(ut.y,Pt.y),Math.abs(ut.x-Pt.x),Math.abs(ut.y-Pt.y))),Co(ut,Bt),Co(Pt,Bt),b.push(new an(Math.min(ut.x,Pt.x),Math.min(ut.y,Pt.y),Math.abs(ut.x-Pt.x),Math.abs(ut.y-Pt.y)))),$t.free(ut),$t.free(Pt),bh(this,!1,!0),this.Ka===null&&_t("No div specified"),this.ta===null&&_t("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(iu(this),ot=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*ot,this.ya*ot),E.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,rt=Math.round(z.x*tt)/tt,lt=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-rt,-lt),E.save(),E.beginPath(),z=a.length,tt=0;tt<z;tt++)rt=a[tt],rt.width!==0&&rt.height!==0&&E.rect(Math.floor(rt.x),Math.floor(rt.y),Math.ceil(rt.width),Math.ceil(rt.height));for(E.clip(),E.setTransform(ot,0,0,ot,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),Rs(this,E),E.globalAlpha=this.pb,ot=0;ot<z;ot++)if(tt=y[ot],rt=b,tt.visible&&tt.pb!==0){lt=Ss(tt,E),ft=tt.Zq,ft.length=0,ut=this.scale,yt=an.alloc(),Pt=tt.Pa.s,Bt=Pt.length,bt=rt.length;for(var Jt=0;Jt<Bt;Jt++){var Gt=Pt[Jt],se=_c(Gt,Gt.actualBounds);t:{for(var ue=2/ut,ge=4/ut,be=0;be<bt;be++){var We=rt[be];if(We.width!==0&&We.height!==0&&se.Vu(We.x-ue,We.y-ue,We.width+ge,We.height+ge)){se=!0;break t}}se=!1}se&&tt.Oj(E,Gt,this,ft,ut,yt,!0)}an.free(yt),E.globalAlpha=lt}E.restore(),E.Vc(!0),this.Yf&&jc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}ni(b),ni(a),this.ld=!1}}else this.bd();x&&(Ts(this),this.bd(),Kd(this,!0))}else x?(Ts(this),this.bd(),Kd(this,!0)):this.bd()}};function iu(a){a.pn!==!1&&(a.pn=!1,Bc(a,a.Aa,a.ya))}function Bc(a,y,x){sh(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Eh(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,z=!1,tt=a.gf?a.Db:0,ot=a.Be?a.Db:0,rt=E.clientWidth||x+tt,lt=E.clientHeight||b+ot,ut=a.viewportBounds;E=ut.x;var ft=ut.y,yt=ut.width,Pt=ut.height;if((rt!==x+tt||lt!==b+ot)&&(a.gf=!1,a.Be=!1,ot=tt=0,a.Aa=rt,a.ya=lt,z=a.pn=!0,sh(a)),!a.hf||!a.viewportBounds.w())return!0;var bt=a.ku,Bt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Jt=a.documentBounds,Gt=0,se=0,ue=0,ge=0,be=ut.width,We=ut.height,Un=a.rj;a.contentAlignment.sb()?(Jt.width>be&&(Gt=Un.left,se=Un.right),Jt.height>We&&(ue=Un.top,ge=Un.bottom)):(Gt=Un.left,se=Un.right,ue=Un.top,ge=Un.bottom);var pi=Jt.width+Gt+se,ui=Jt.height+ue+ge;Un=a.scale;var zn=pi>rt/Un,xn=ui>lt/Un;if(!(z||a.gf||a.Be||zn||xn))return!0;Gt=Jt.x-Gt,rt=ut.x,se=Jt.right+se,lt=ut.right+tt,ue=Jt.y-ue;var eo=ut.y;Jt=Jt.bottom+ge,ut=ut.bottom+ot;var _i="1px";if(ge="1px",a.scrollMode===Sd&&(zn||xn)&&(zn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(zn=1,Gt+1<rt&&(zn=Math.max((rt-Gt)*Un+a.Aa,zn)),se>lt+1&&(zn=Math.max((se-lt)*Un+a.Aa,zn)),be+tt+1<pi&&(zn=Math.max((pi-be)*Un+a.Aa,zn)),_i=zn.toString()+"px"),xn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(zn=1,ue+1<eo&&(zn=Math.max((eo-ue)*Un+a.ya,zn)),Jt>ut+1&&(zn=Math.max((Jt-ut)*Un+a.ya,zn)),We+ot+1<ui&&(zn=Math.max((ui-We)*Un+a.ya,zn)),ge=zn.toString()+"px")),zn=_i!=="1px",xn=ge!=="1px",zn&&xn||!zn&&!xn||(xn&&(lt-=a.Db),zn&&(ut-=a.Db),pi<be+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Gt+1<rt&&(tt=Math.max((rt-Gt)*Un+a.Aa,tt)),se>lt+1&&(tt=Math.max((se-lt)*Un+a.Aa,tt)),be+1<pi&&(tt=Math.max((pi-be)*Un+a.Aa,tt)),_i=tt.toString()+"px"),zn=_i!=="1px",tt=a.ya,zn!==a.Be&&(tt=zn?a.ya-a.Db:a.ya+a.Db),ui<We+ot||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ot=1,ue+1<eo&&(ot=Math.max((eo-ue)*Un+tt,ot)),Jt>ut+1&&(ot=Math.max((Jt-ut)*Un+tt,ot)),We+1<ui&&(ot=Math.max((ui-We)*Un+tt,ot)),ge=ot.toString()+"px"),xn=ge!=="1px"),a.qr&&zn===a.Be&&xn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(zn!==a.Be&&(_i==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=zn,Bt.style.width=_i,xn!==a.gf&&(ge==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(ot=$t.alloc(),xn?(y.style.left=a.Db+"px",a.position=ot.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=ot.h(a.pa.x-a.Db/a.scale,a.pa.y)),$t.free(ot))),z&&sh(a),a.gf=xn,Bt.style.height=ge,a.gu=!0,z&&(a.pn=!0),y=bt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(be+1<pi?y=(a.position.x-Gt)*Un:Gt+1<rt?y=bt.scrollWidth-bt.clientWidth:se>lt+1&&(y=a.position.x*Un)),a.tn)switch(a.bu){case"negative":y=-(bt.scrollWidth-y-bt.clientWidth);break;case"reverse":y=bt.scrollWidth-y-bt.clientWidth}return bt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(We+1<ui?bt.scrollTop=(a.position.y-ue)*Un:ue+1<eo?bt.scrollTop=bt.scrollHeight-bt.clientHeight:Jt>ut+1&&(bt.scrollTop=a.position.y*Un)),rt=a.Aa,lt=a.ya,bt.style.width=rt+(a.gf?a.Db:0)+"px",bt.style.height=lt+(a.Be?a.Db:0)+"px",x!==rt||b!==lt||a.animationManager.zb?(x=an.allocAt(E,ft,yt,Pt),a.onViewportBoundsChanged(x,a.viewportBounds,Un,z),an.free(x),!1):!0}Ct=Ze.prototype,Ct.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&_t("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&&_t('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(pa,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Ct.oi=function(a){this.partManager.oi(a);var y=this;Zc(a,function(x){Dc(y,x)}),(a instanceof Qo||a instanceof io&&a.placeholder!==null)&&a.v(),a.data!==null&&Zc(a,function(x){sy(y.partManager,x)}),Us(a)!==!0&&qd(a)!==!0||this.De.add(a),RS(a,!0,this),jS(a)?(a.actualBounds.w()&&this.N(_c(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(_c(a,a.actualBounds)),this.$b()},Ct.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Zc(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),jS(a)?(a.actualBounds.w()&&this.N(_c(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(_c(a,a.actualBounds)),this.$b()},Ct.remove=function(a){Vd(this,a,!0)};function Vd(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(Ba,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}Ct.Is=function(a,y){if(y===void 0&&(y=!1),Xe(a))for(var x=a.length,b=0;b<x;b++){var E=a[b];y&&!E.canDelete()||this.remove(E)}else for(x=new tn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Ct.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Ze.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=Uf(this)),this.toolManager!==null){var E=new li;if(a!==null)if(Xe(a))for(var z=0;z<a.length;z++)pu(this,E,a[z],x,b);else for(a=a.iterator;a.next();)pu(this,E,a.value,x,b);else{for(a=this.parts;a.next();)pu(this,E,a.value,x,b);for(a=this.nodes;a.next();)pu(this,E,a.value,x,b);for(a=this.links;a.next();)pu(this,E,a.value,x,b)}rh(this,E,y,b,x)}};function pu(a,y,x,b,E,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!b||z||x.canMove()||x.canCopy()))if(E===void 0&&(E=Uf(a)),x instanceof ei){if(y.add(x,a.Pd(E,x,x.location)),x instanceof io&&(x.placeholder!==null||E.dragsMembers))for(z=x.memberParts;z.next();)pu(a,y,z.value,b,E,E.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var ot=tt.fromNode,rt=tt.toNode;ot!==null&&y.contains(ot)&&rt!==null&&y.contains(rt)&&pu(a,y,tt,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)pu(a,y,x.value,b,E)}else if(x instanceof jn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)pu(a,y,x.value,b,E);else x instanceof Qo||y.add(x,a.Pd(E,x,x.location))}function rh(a,y,x,b,E){if(y!==null&&y.count!==0){var z=$t.alloc(),tt=$t.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||Xf(a,y);for(var ot=Rn(),rt=Rn(),lt=y.iterator,ut=$t.alloc();lt.next();){var ft=lt.key,yt=lt.value;if(ft.Zc()){var Pt=_g(a,ft,y);Pt!==null?ot.push(new it(ft,yt,Pt)):(!E||ft.canMove())&&(Pt=yt.point,z.assign(Pt),a.computeMove(ft,z.add(tt),b,ut),ft.location=ut,yt.shifted===void 0&&(yt.shifted=new $t),yt.shifted.assign(ut.re(Pt)))}else lt.key instanceof jn&&rt.push(lt.sa)}for($t.free(ut),E=ot.length,lt=0;lt<E;lt++)ft=ot[lt],z.assign(ft.info.point),ft.Su.shifted===void 0&&(ft.Su.shifted=new $t),ft.node.location=z.add(ft.Su.shifted);for(E=$t.alloc(),lt=$t.alloc(),ft=rt.length,yt=0;yt<ft;yt++){var bt=rt[yt];if(Pt=bt.key,Pt instanceof jn)if(Pt.suspendsRouting){Pt.Tg=null,ut=Pt.fromNode;var Bt=Pt.toNode;if(a.draggedLink!==null&&b.dragsLink)if(Bt=bt.value.point,Pt.dragComputation===null)y.add(Pt,a.Pd(b,Pt,tt)),Ld(Pt,tt.x-Bt.x,tt.y-Bt.y);else{bt=$t.allocAt(0,0),(ut=Pt.i(0))&&ut.w()&&bt.assign(ut);var Jt=ut=$t.alloc().assign(bt).add(tt);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Jt=$t.alloc(),Yf(a,Pt,ut,Jt,b)),ut.assign(Pt.dragComputation(Pt,ut,Jt)).re(bt),y.add(Pt,a.Pd(b,Pt,ut)),Ld(Pt,ut.x-Bt.x,ut.y-Bt.y),$t.free(bt),$t.free(ut),Jt!==ut&&$t.free(Jt)}else ut!==null&&(E.assign(ut.location),Jt=y.I(ut),Jt!==null&&E.re(Jt.point)),Bt!==null&&(lt.assign(Bt.location),Jt=y.I(Bt),Jt!==null&<.re(Jt.point)),ut!==null&&Bt!==null?E.Xa(lt)?(ut=bt.value.point,Bt=z,Bt.assign(E),Bt.re(ut),y.add(Pt,a.Pd(b,Pt,E)),Ld(Pt,Bt.x,Bt.y)):(Pt.suspendsRouting=!1,Pt.bb()):(bt=bt.value.point,ut=ut!==null?E:Bt!==null?lt:tt,y.add(Pt,a.Pd(b,Pt,ut)),Ld(Pt,ut.x-bt.x,ut.y-bt.y))}else(Pt.fromNode===null||Pt.toNode===null)&&(ut=bt.value.point,y.add(Pt,a.Pd(b,Pt,tt)),Ld(Pt,tt.x-ut.x,tt.y-ut.y))}$t.free(z),$t.free(tt),$t.free(E),$t.free(lt),ni(ot),ni(rt),x||(ds(a),Ud(a,y))}}Ze.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new $t),b.assign(y),a===null)return b;var E=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=$t.alloc(),Yf(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var tt=a.minLocation,ot=tt.x;isNaN(ot)&&(ot=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var rt=a.maxLocation,lt=rt.x;return isNaN(lt)&&(lt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),rt=rt.y,isNaN(rt)&&(rt=z?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(ot,Math.min(x.x,lt)),Math.max(tt,Math.min(x.y,rt))),E!==y&&$t.free(E),b};function Uf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Yf(a,y,x,b,E){if(E===void 0&&(E=Uf(a)),b.assign(x),y!==null){var z=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var tt=E.gridSnapOrigin,ot=tt.x;if(tt=tt.y,E=E.gridSnapCellSpot,z!==null){var rt=z.gridCellSize;isNaN(a)&&(a=rt.width),isNaN(y)&&(y=rt.height),z=z.gridOrigin,isNaN(ot)&&(ot=z.x),isNaN(tt)&&(tt=z.y)}z=$t.allocAt(0,0),z.yi(0,0,a,y,E),ke.No(x.x,x.y,ot+z.x,tt+z.y,a,y,b),$t.free(z)}}function Xf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof jn&&(y.suspendsRouting=!0)}function Ud(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof jn&&(x.suspendsRouting=!1,Vv(x)&&x.bb())}a.Mr=!1}}function _g(a,y,x){return y=y.containingGroup,y!==null&&(a=_g(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Ct=Ze.prototype,Ct.Pd=function(a,y,x){if(x===void 0)return new Jh(Ho);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Jh(new $t(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Jh(x.copy())};function Vg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&_t("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&_t("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&_t("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&_t("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&_t("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Ct.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(pa,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Ct.Ww=function(a,y){Vg(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Ba,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;z<E;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(pa,"layers",this,null,a,null,z),this.N(),0>b&&this.Ya(),this},Ct.Cy=function(a,y){Vg(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Ba,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;z<E;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(pa,"layers",this,null,a,null,z+1),this.N(),0>b&&this.Ya(),this},Ct.kA=function(a){if(a.diagram!==this&&_t("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(Ba,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Ct.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Ct.Yw=function(a){return this.pf===null&&(this.pf=new mn),this.pf.add(a),this.model.Pe(a),this},Ct.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Ct.Pe=function(a){return this.zg===null&&(this.zg=new mn),this.zg.add(a),this},Ct.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Ct.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==sl&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},Ct.cb=function(a,y,x,b,E,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var ot=new Zr;ot.diagram=this,ot.change=a,ot.propertyName=y,ot.object=x,ot.oldValue=b,ot.oldParam=z,ot.newValue=E,ot.newParam=tt,this.ds(ot)},Ct.g=function(a,y,x,b,E){this.cb(Wr,a,this,y,x,b,E)},Ze.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===Wr){var E=a.object;if(Rr(E,a.propertyName,a.I(y)),E instanceof Ee){var z=E.part;z!==null&&z.Wb()}this.isModified=!0}else if(b===pa){var tt=a.object,ot=a.newParam,rt=a.newValue;if(tt instanceof Fn)if(typeof ot=="number"&&rt instanceof Ee){y?tt.pc(ot):tt.Gb(ot,rt);var lt=tt.part;lt!==null&<.Wb()}else typeof ot=="number"&&rt instanceof ja&&(rt.isRow?hS(tt,ot,y?void 0:rt):dS(tt,ot,y?void 0:rt));else if(tt instanceof Kr){var ut=a.oldParam===!0;typeof ot=="number"&&rt instanceof Fi&&(y?(rt.isSelected=!1,rt.isHighlighted=!1,rt.Wb(),tt.pc(ut?ot:-1,rt,ut)):tt.oi(ot,rt,ut))}else tt instanceof Ze?typeof ot=="number"&&rt instanceof Kr&&(y?this.Wa.mb(ot):(rt.Xe(this),this.Wa.Gb(ot,rt))):_t("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Ba){var ft=a.object,yt=a.oldParam,Pt=a.oldValue;if(ft instanceof Fn)typeof yt=="number"&&Pt instanceof Ee?y?ft.Gb(yt,Pt):ft.pc(yt):typeof yt=="number"&&Pt instanceof ja&&(Pt.isRow?hS(ft,yt,y?Pt:void 0):dS(ft,yt,y?Pt:void 0));else if(ft instanceof Kr){var bt=a.newParam===!0;typeof yt=="number"&&Pt instanceof Fi&&(y?0>ft.Pa.indexOf(Pt)&&ft.oi(yt,Pt,bt):(Pt.isSelected=!1,Pt.isHighlighted=!1,Pt.Wb(),ft.pc(bt?yt:-1,Pt,bt)))}else ft instanceof Ze?typeof yt=="number"&&Pt instanceof Kr&&(y?(Pt.Xe(this),this.Wa.Gb(yt,Pt)):this.Wa.mb(yt)):_t("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==sl&&_t("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Ze.prototype.Ea=function(a){return this.undoManager.Ea(a)},Ze.prototype.eb=function(a){return this.undoManager.eb(a)},Ze.prototype.Kf=function(){return this.undoManager.Kf()},Ze.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Ze.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Ze.prototype.rp=function(){this.partManager.rp()};function Ug(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,sh(a),a.N(),a.Ee=!0,b.zb&&(ms(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,sh(a);else{a.vb=!0;var E=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,ot=a.zoomPoint.x,rt=a.zoomPoint.y,lt=a.contentAlignment;isNaN(ot)&&(lt.$c()?lt.Hf(Ru)?ot=0:lt.Hf(Ws)&&(ot=z-1):ot=lt.sb()?lt.x*(z-1):z/2),isNaN(rt)&&(lt.$c()?lt.Hf(bu)?rt=0:lt.Hf(pl)&&(rt=tt-1):rt=lt.sb()?lt.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=$t.allocAt(a.pa.x+ot/y-ot/x,a.pa.y+rt/y-rt/x),a.position=z,$t.free(z),a.Ca=x,sh(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Wl(a,!1),b.zb&&(ms(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Ze.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==zs||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof jr&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Zf(E,this)),this.vb||this.invalidateViewport(a,y),ah(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function ah(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=Zn.alloc(),E=1,z=1,tt=x.O.s,ot=tt.length,rt=0;rt<ot;rt++){var lt=tt[rt],ut=Math.abs(lt.interval);2>ut||(pv(lt.figure)?z=z*ut/ke.vx(z,ut):E=E*ut/ke.vx(E,ut))}if(tt=x.gridCellSize,b.h(z*tt.width,E*tt.height),y!==void 0)E=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=an.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){an.free(y);return}E=y.width,z=y.height,a=y.x,tt=y.y,an.free(y)}x.width=E+2*b.width,x.height=z+2*b.height,y=$t.alloc(),ke.No(a,tt,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Zn.free(b),x.part.location=y,$t.free(y)}}Ze.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),b=x.length,E=0;E<b;E++)x[E].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},Ze.prototype.select=function(a){a!==null&&a.diagram===this&&(!a.isSelected||1<this.selection.count)&&(this.R("ChangingSelection",this.selection),this.clearSelection(!0),a.isSelected=!0,this.R("ChangedSelection",this.selection))},Ze.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Xe(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Fi||_t("Diagram.selectCollection given something that is not a Part: "+b),b.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Fi||_t("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Ze.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,b=0;b<x;b++)y[b].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Ct=Ze.prototype,Ct.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Ct.Jz=function(a){a=new tn().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof Fi||_t("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Ct.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,z=$t.alloc();if(a==="pixel")E=x;else if(a==="line")E=x*(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=b?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(E=x*Math.max(a-(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){E=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,E.y):y==="left"?this.position=z.h(E.x,x.y):y==="down"?this.position=z.h(x.x,E.bottom-x.height):y==="right"&&(this.position=z.h(E.right-x.width,x.y)),$t.free(z);return}_t("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-E):y==="down"?this.position=z.h(x.x,x.y+E):y==="left"?this.position=z.h(x.x-E,x.y):y==="right"?this.position=z.h(x.x+E,x.y):_t("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),$t.free(z)},Ct.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)},Ct.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Ct.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)},Ct.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,z=b+a.height,tt=y.m11,ot=y.m12,rt=y.m21,lt=y.m22,ut=y.dx,ft=y.dy,yt=x*tt+b*rt+ut;y=x*ot+b*lt+ft;var Pt=E*tt+b*rt+ut;return a=E*ot+b*lt+ft,b=x*tt+z*rt+ut,x=x*ot+z*lt+ft,tt=E*tt+z*rt+ut,E=E*ot+z*lt+ft,z=Math.min(yt,Pt),yt=Math.max(yt,Pt),Pt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,b),yt=Math.max(yt,b),Pt=Math.min(Pt,x),y=Math.max(y,x),z=Math.min(z,tt),yt=Math.max(yt,tt),Pt=Math.min(Pt,E),y=Math.max(y,E),new an(z,Pt,yt-z,y-Pt)},Ct.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),Co(a.copy(),this.Ab)};function om(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Yg(a){return a=ng.get(a),a!==null?new a:new gr}Ze.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===sl&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(rt){return rt.diagram=E}),a.mouseMoveTools.each(function(rt){return rt.diagram=E}),a.mouseUpTools.each(function(rt){return rt.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===sl){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ds(this));var z=this.animationManager;b==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||es(z),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var tt=a.isTransactionFinished;if(tt&&(om(this),this.As.clear(),ca(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var ot=this;In(function(){ot.currentTool.standardMouseOver(),ot.Rt=!1},10)}}}finally{this.aa=!0}}}};function Dc(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)Yd(a,y[b])}function Yd(a,y){if(y instanceof cl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof tn&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function Xg(a,y){if(y instanceof cl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var b=x.getAttribute("src")||"",E=a.Og.I(b);if(E!==null){for(var z=0;z<E.length;z++)if(E[z]===y){E.splice(z,1),E.length===0&&(a.Og.remove(b),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof tn&&x.Bg.remove(a),pg(b));break}}}}}Ze.prototype.Wd=function(){this.partManager.Wd()},Ze.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Ze.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Ze.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Ze.prototype.Vb=function(a){return this.partManager.Vb(a)},Ze.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Ct=Ze.prototype,Ct.Lc=function(a){return this.partManager.Lc(a)},Ct.ii=function(a){return this.partManager.ii(a)},Ct.Kc=function(a){return this.partManager.Kc(a)},Ct.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:_e(yi(y)))},Ct.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:_e(yi(y)))};function sh(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),Wl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Ct.Va=function(){if(this.Zi){var a=an.alloc();Jg(this,this.computeBounds(a)),an.free(a)}},Ct.rz=function(){for(var a=new tn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},Ct.qz=function(){return this.ai.iterator},Ct.Uz=function(a){ds(this),a&&Jf(this,!0),this.ld?Qg(this,!1):(this.Jk=!0,ll(this))};function Jf(a,y){for(var x=a.ai.iterator;x.next();)rm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function rm(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)rm(a,b.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 b=a.undoManager.transactionLevel,E=a.layout,z=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||Es(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)qg(a,tt.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),ds(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||es(z),a.aa=x}}}function qg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)qg(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),ra(a,y),E.isValidLayout=!0):a.xh=!0)}}Ct.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 ev(a){function y(E){var z=E.toLowerCase(),tt=new mn;x.add(E,tt),x.add(z,tt),b.add(E,E),b.add(z,E)}var x=new li,b=new li;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function 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;_t("Unknown DiagramEvent name: "+y)}Ct.Bj=function(a,y){return a=Qf(this,a),a!==null&&a.add(y),this},Ct.am=function(a,y){a=Qf(this,a),a!==null&&a.remove(y)},Ct.R=function(a,y,x){var b=Qf(this,a),E=new Kh;if(E.diagram=this,a=am(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function qf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Ct.Yj=function(a,y){return tg(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Ze.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?kc(this,a):a.assign(this.documentBounds)};function tg(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new kp(a.avoidanceCellSize)),E.vs||E.group!==x||E.Yx!==b){if(E.Hx=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),E.Ix=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=sm(a,x)),x===null){y=an.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,ot=tt.layer;ot!==null&&ot.visible&&!ot.isTemporary&&eg(a,tt,b,y)}an.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=an.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof ei&&eg(a,tt,b,y);an.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&o1(E);return E}function sm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?sm(a,y.containingGroup):null}function eg(a,y,x,b){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(b),a=a.Xh;var E=y.x,z=y.y;if(Pg(a,E,z))for(x=(z-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(z=a.ac[E],z.fill)z.fill(Nd,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=Nd}else if(y instanceof io)for(y=y.memberParts;y.next();)E=y.value,E instanceof ei&&eg(a,E,x,b)}}function yd(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Ze.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():tp(this)};function tp(a){a.vk===-1&&(a.vk=In(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=an.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Jg(a,y),an.free(y),a.Fc=!0,a.bd(),tp(a))}},a.vp))}Ze.prototype.ug=function(){this.vk!==-1&&(ae.clearTimeout(this.vk),this.vk=-1)},Ze.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var b=this.viewportBounds,E=this.scale;b=an.allocAt(0,0,b.width*E,b.height*E);var z=$t.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<b.x+x.left/2&&(z.x-=tt),a.x<b.x+x.left/4&&(z.x-=4*tt)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>b.x+b.width-x.right/2&&(z.x+=tt),a.x>b.x+b.width-x.right/4&&(z.x+=4*tt));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<b.y+x.top/2&&(z.y-=tt),a.y<b.y+x.top/4&&(z.y-=4*tt)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>b.y+b.height-x.bottom/2&&(z.y+=tt),a.y>b.y+b.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(Ho)||(y=new $t(y.x+z.x/E,y.y+z.y/E)),an.free(b),$t.free(z),y},Ct=Ze.prototype,Ct.Cs=function(){return null},Ct.av=function(){return null},Ct.bs=function(a,y){this.pj.add(a,y)},Ct.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof io&&(y.$p=null)})};function gf(a,y,x){function b(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-lt>rt?y(x,E,ot):ae.requestAnimationFrame(b)}for(var E=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof E!="function"||z)return y(x,E,a);var ot=a,rt=x.callbackTimeout||300,lt=+new Date;return ae.requestAnimationFrame(function(){b()}),null}Ct.Wz=function(a){return ua?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Ct.Jx=function(a){return a===void 0&&(a={}),gf(this,this.Xz,a)},Ct.Xz=function(a,y,x){var b=lm(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case zc+"data":E=b.getImageData(0,0,x.width,x.height);break;case zc:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&_t('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function lm(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&_t("properties argument must be an Object.");var E=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new Zn(1/0,1/0):new Zn(2e3,2e3));var ot=y.position||null,rt=y.parts||null,lt=y.padding===void 0?1:y.padding,ut=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var yt=y.document||document,Pt=y.elementFinished||null,bt=y.showTemporary;bt===void 0&&(bt=!ft),y=y.showGrid,y===void 0&&(y=bt),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof lt=="number"?lt=new vi(lt):lt instanceof vi||_t("MakeImage padding must be a Margin or a number."),lt.left=Math.max(lt.left,0),lt.right=Math.max(lt.right,0),lt.top=Math.max(lt.top,0),lt.bottom=Math.max(lt.bottom,0),a.ib.Vc(!0),ft=new vu(null,yt,void 0,!0);var Bt=ft.context;if(!(E||z||rt||ot))return ft.width=a.Aa+Math.ceil(lt.left+lt.right),ft.height=a.ya+Math.ceil(lt.top+lt.bottom),x==="SVG"?b===null?null:(b.resize(ft.width,ft.height,ft.width,ft.height),b.ownerDocument=yt,b.hs=Pt,Fa(a,b.context,lt,new Zn(ft.width,ft.height),a.Ca,a.pa,rt,ut,bt,y),b.context):(a.Xm=!1,Fa(a,Bt,lt,new Zn(ft.width,ft.height),a.Ca,a.pa,rt,ut,bt,y),a.Xm=!0,ft.context);var Jt=a.Pp,Gt=a.documentBounds.copy();if(Gt.Fv(a.yb),bt)for(var se=a.Wa.s,ue=se.length,ge=0;ge<ue;ge++){var be=se[ge];if(be.visible&&be.isTemporary){be=be.Pa.s;for(var We=be.length,Un=0;Un<We;Un++){var pi=be[Un];pi.isInDocumentBounds&&pi.isVisible()&&(pi=pi.actualBounds,pi.w()&&Gt.ed(pi))}}}if(se=new $t(Gt.x,Gt.y),rt!==null){for(ue=new an(0,0,0,0),ge=!0,be=rt.iterator,be.reset();be.next();)We=be.value,We instanceof Fi&&(Un=We.layer,Un!==null&&!Un.visible||Un!==null&&!bt&&Un.isTemporary||!We.isVisible()||(We=We.actualBounds,We.w()&&(ge?(ge=!1,ue.assign(We)):ue.ed(We))));Gt.width=ue.width,Gt.height=ue.height,se.x=ue.x,se.y=ue.y}return ot!==null&&ot.w()&&(se=ot,z||(z=Jt)),ue=ot=0,lt!==null&&(ot=lt.left+lt.right,ue=lt.top+lt.bottom),ge=be=0,E!==null&&(be=E.width,ge=E.height,isFinite(be)&&(be=Math.max(0,be-ot)),isFinite(ge)&&(ge=Math.max(0,ge-ue))),E!==null&&z!==null?(z==="NaN"&&(z=Jt),E.w()?(E=be,Gt=ge):isNaN(ge)?(E=be,Gt=Gt.height*z):(E=Gt.width*z,Gt=ge)):E!==null?E.w()?(z=Math.min(be/Gt.width,ge/Gt.height),E=be,Gt=ge):isNaN(ge)?(z=be/Gt.width,E=be,Gt=Gt.height*z):(z=ge/Gt.height,E=Gt.width*z,Gt=ge):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-ot)/Gt.width,(tt.height-ue)/Gt.height),z>Jt?(z=Jt,E=Gt.width,Gt=Gt.height):(E=tt.width,Gt=tt.height)):(E=Gt.width*z,Gt=Gt.height*z):(z=Jt,E=Gt.width,Gt=Gt.height),lt!==null?(E+=ot,Gt+=ue):lt=new vi(0),tt!==null&&(Jt=tt.width,tt=tt.height,isNaN(Jt)&&(Jt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Jt)&&(E=Math.min(E,Jt)),isFinite(tt)&&(Gt=Math.min(Gt,tt))),ft.width=Math.ceil(E),ft.height=Math.ceil(Gt),x==="SVG"?b===null?null:(b.resize(ft.width,ft.height,ft.width,ft.height),b.ownerDocument=yt,b.hs=Pt,Fa(a,b.context,lt,new Zn(Math.ceil(E),Math.ceil(Gt)),z,se,rt,ut,bt,y),b.context):(a.Xm=!1,Fa(a,Bt,lt,new Zn(Math.ceil(E),Math.ceil(Gt)),z,se,rt,ut,bt,y),a.Xm=!0,ft.context)}Zt.Object.defineProperties(Ze.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof pt||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new lh(this,ae.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 lh(this,ae.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(ae,"resize",this.Ov,!1),this.removeEventListener(ae,"wheel",this.$j,!0),_u===this&&(_u=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Mc(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)&&cn(a,"0 <= value <= 1",Ze,"opacity"),this.pb=a,this.g("opacity",y,a),this.N())}},validCycle:{get:function(){return this.wu},set:function(a){var y=this.wu;y!==a&&(this.wu=a,this.g("validCycle",y,a))}},layers:{get:function(){return this.Wa.iterator}},isModelReadOnly:{get:function(){var a=this.cc;return a===null?!1:a.isReadOnly},set:function(a){var y=this.cc;y!==null&&(y.isReadOnly=a)}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},isEnabled:{get:function(){return this.Jd},set:function(a){var y=this.Jd;y!==a&&(this.Jd=a,this.g("isEnabled",y,a))}},allowClipboard:{get:function(){return this.Us},set:function(a){var y=this.Us;y!==a&&(this.Us=a,this.g("allowClipboard",y,a))}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowDragOut:{get:function(){return this.Vs},set:function(a){var y=this.Vs;y!==a&&(this.Vs=a,this.g("allowDragOut",y,a))}},allowDrop:{get:function(){return this.Ws},set:function(a){var y=this.Ws;y!==a&&(this.Ws=a,this.g("allowDrop",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowInsert:{get:function(){return this.Ys},set:function(a){var y=this.Ys;y!==a&&(this.Ys=a,this.g("allowInsert",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}},allowUndo:{get:function(){return this.Zs},set:function(a){var y=this.Zs;y!==a&&(this.Zs=a,this.g("allowUndo",y,a))}},allowZoom:{get:function(){return this.at},set:function(a){var y=this.at;y!==a&&(this.at=a,this.g("allowZoom",y,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var y=this.nn;y!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",y,a),Wl(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),Wl(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),Wl(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),Wl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&cn(a,">= 0",Ze,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&cn(a,">= 0",Ze,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else cn(a,">= 0",Ze,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||om(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&&_t("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=gd(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Es(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 E=0;E<x.length;E++)this.add(x[E]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=b,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(ae,"pointermove",this.dk,!0),this.addEventListener(ae,"pointerdown",this.ui,!0),this.addEventListener(ae,"pointerup",this.fk,!0),this.addEventListener(ae,"pointerout",this.ek,!0),this.addEventListener(ae,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(ae,"wheel",this.$j,!0),this.addEventListener(ae,"selectstart",this.preventDefault,!1)):(this.removeEventListener(ae,"pointermove",this.dk,!0),this.removeEventListener(ae,"pointerdown",this.ui,!0),this.removeEventListener(ae,"pointerup",this.fk,!0),this.removeEventListener(ae,"pointerout",this.ek,!0),this.removeEventListener(ae,"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(ae,"wheel",this.$j,!0),this.removeEventListener(ae,"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=$t.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),vs(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?sh(this):(this.vb=!0,a=this.scale,ff(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)}$t.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=df(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=df(this)),a.type!==Fn.Grid&&_t("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),ah(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),sh(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||_t("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 vi(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===Sd&&Wl(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,Wl(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!==zs&&Wl(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()||_t("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()||_t("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)):cn(a,"> 0",Ze,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):cn(a,"> 0",Ze,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.zk},set:function(a){var y=this.zk;y.D(a)||(this.zk=a=a.J(),this.g("contentAlignment",y,a),Wl(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 vi(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&&_t("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!==xd&&a!==Ra&&a!==ig&&_t("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 Zn(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 vi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Zt.Object.defineProperties(Ze,{licenseKey:{get:function(){return ap.jc()},set:function(a){ap.add(a.replace(/\s/g,""))}},version:{get:function(){return Rc}}}),Ze.prototype.makeImageData=Ze.prototype.Jx,Ze.prototype.makeImage=Ze.prototype.Wz,Ze.prototype.cacheGroupExternalLinks=Ze.prototype.Fu,Ze.prototype.addRenderer=Ze.prototype.bs,Ze.prototype.makeSVG=Ze.prototype.av,Ze.prototype.makeSvg=Ze.prototype.Cs,Ze.prototype.stopAutoScroll=Ze.prototype.ug,Ze.prototype.doAutoScroll=Ze.prototype.gs,Ze.prototype.isUnoccupied=Ze.prototype.Yj,Ze.prototype.raiseDiagramEvent=Ze.prototype.R,Ze.prototype.removeDiagramListener=Ze.prototype.am,Ze.prototype.addDiagramListener=Ze.prototype.Bj,Ze.prototype.findTreeRoots=Ze.prototype.yz,Ze.prototype.layoutDiagram=Ze.prototype.Uz,Ze.prototype.findTopLevelGroups=Ze.prototype.qz,Ze.prototype.findTopLevelNodesAndLinks=Ze.prototype.rz,Ze.prototype.ensureBounds=Ze.prototype.Va,Ze.prototype.findLinksByExample=Ze.prototype.ls,Ze.prototype.findNodesByExample=Ze.prototype.ms,Ze.prototype.findLinkForData=Ze.prototype.Kc,Ze.prototype.findNodeForData=Ze.prototype.ii,Ze.prototype.findPartForData=Ze.prototype.Lc,Ze.prototype.findLinkForKey=Ze.prototype.findLinkForKey,Ze.prototype.findNodeForKey=Ze.prototype.Vb,Ze.prototype.findPartForKey=Ze.prototype.findPartForKey,Ze.prototype.rebuildParts=Ze.prototype.Wd,Ze.prototype.transformViewToDoc=Ze.prototype.Ps,Ze.prototype.transformRectDocToView=Ze.prototype.zA,Ze.prototype.transformDocToView=Ze.prototype.op,Ze.prototype.centerRect=Ze.prototype.es,Ze.prototype.scrollToRect=Ze.prototype.tv,Ze.prototype.scroll=Ze.prototype.scroll,Ze.prototype.highlightCollection=Ze.prototype.Jz,Ze.prototype.highlight=Ze.prototype.Iz,Ze.prototype.selectCollection=Ze.prototype.rA,Ze.prototype.select=Ze.prototype.select,Ze.prototype.updateAllRelationshipsFromData=Ze.prototype.rp,Ze.prototype.updateAllTargetBindings=Ze.prototype.updateAllTargetBindings,Ze.prototype.commit=Ze.prototype.commit,Ze.prototype.rollbackTransaction=Ze.prototype.Kf,Ze.prototype.commitTransaction=Ze.prototype.eb,Ze.prototype.startTransaction=Ze.prototype.Ea,Ze.prototype.raiseChanged=Ze.prototype.g,Ze.prototype.raiseChangedEvent=Ze.prototype.cb,Ze.prototype.removeChangedListener=Ze.prototype.ik,Ze.prototype.addChangedListener=Ze.prototype.Pe,Ze.prototype.removeModelChangedListener=Ze.prototype.mA,Ze.prototype.addModelChangedListener=Ze.prototype.Yw,Ze.prototype.findLayer=Ze.prototype.Qj,Ze.prototype.removeLayer=Ze.prototype.kA,Ze.prototype.addLayerAfter=Ze.prototype.Cy,Ze.prototype.addLayerBefore=Ze.prototype.Ww,Ze.prototype.addLayer=Ze.prototype.Al,Ze.prototype.moveParts=Ze.prototype.moveParts,Ze.prototype.copyParts=Ze.prototype.Kj,Ze.prototype.removeParts=Ze.prototype.Is,Ze.prototype.remove=Ze.prototype.remove,Ze.prototype.add=Ze.prototype.add,Ze.prototype.clearDelayedGeometries=Ze.prototype.bx,Ze.prototype.setProperties=Ze.prototype.nm,Ze.prototype.attach=Ze.prototype.Du,Ze.prototype.set=Ze.prototype.set,Ze.prototype.resetInputOptions=Ze.prototype.Sx,Ze.prototype.setInputOption=Ze.prototype.sA,Ze.prototype.getInputOption=Ze.prototype.Ql,Ze.prototype.resetRenderingHints=Ze.prototype.Tx,Ze.prototype.setRenderingHint=Ze.prototype.Xx,Ze.prototype.getRenderingHint=Ze.prototype.Gf,Ze.prototype.maybeUpdate=Ze.prototype.bd,Ze.prototype.requestUpdate=Ze.prototype.$b,Ze.prototype.delayInitialization=Ze.prototype.Xy,Ze.prototype.isUpdateRequested=Ze.prototype.Pz,Ze.prototype.invalidateDocumentBounds=Ze.prototype.Ya,Ze.prototype.findObjectsNear=Ze.prototype.og,Ze.prototype.findPartsNear=Ze.prototype.mz,Ze.prototype.findObjectsIn=Ze.prototype.Cf,Ze.prototype.findPartsIn=Ze.prototype.ux,Ze.prototype.findObjectsAt=Ze.prototype.ji,Ze.prototype.findPartsAt=Ze.prototype.lz,Ze.prototype.findObjectAt=Ze.prototype.ic,Ze.prototype.findPartAt=Ze.prototype.Ol,Ze.prototype.focusObject=Ze.prototype.zz,Ze.prototype.alignDocument=Ze.prototype.Jy,Ze.prototype.zoomToRect=Ze.prototype.BA,Ze.prototype.zoomToFit=Ze.prototype.zoomToFit,Ze.prototype.diagramScroll=Ze.prototype.kx,Ze.prototype.focus=Ze.prototype.focus;var ng=new li,um=null,ua=ae.document!==void 0,Ac=null,Xd="",zs=new en(Ze,"None",0),_l=new en(Ze,"Uniform",1),Jd=new en(Ze,"UniformToFill",2),pf=new en(Ze,"CycleAll",10),ep=new en(Ze,"CycleNotDirected",11),np=new en(Ze,"CycleNotDirectedFast",12),ip=new en(Ze,"CycleNotUndirected",13),op=new en(Ze,"CycleDestinationTree",14),rp=new en(Ze,"CycleSourceTree",15),Sd=new en(Ze,"DocumentScroll",1),mf=new en(Ze,"InfiniteScroll",2),xd=new en(Ze,"TreeParentCollapsed",21),Ra=new en(Ze,"AllParentsCollapsed",22),ig=new en(Ze,"AnyParentsCollapsed",23),ap=new mn,Rc="2.3.10",zc="image",vf=null,hm=!1;function Os(){if(ua){var a=ae.document.createElement("canvas"),y=a.getContext("2d"),x=un("7ca11abfd022028846");y[x]=un("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Ye.Dx+"4ae6247590da4bb21c324ba3a84e385776",Po.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",ke.za],E=1;5>E;E++)y[un("7ca11abfd7330390")](un(b[E-1]),10,15*E);for(y[x]=un("39f046ebb36e4b"),x=1;5>x;x++)y[un("7ca11abfd7330390")](un(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(Po.prototype.Cd=Po.prototype.Eu),vf=a}}Ze.className="Diagram",Ze.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=ae.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Ze?y.H:null},Ze.inherit=function(a,y){function x(){}if(Object.getPrototypeOf(a).prototype)throw Error(`Used go.Diagram.inherit defining already defined class
|
|
|
`+a);x.prototype=y.prototype,a.prototype=new x,a.prototype.constructor=a},Ze.useDOM=function(a){ua=a?ae.document!==void 0:!1},Ze.isUsingDOM=function(){return ua},Ze.None=zs,Ze.Uniform=_l,Ze.UniformToFill=Jd,Ze.CycleAll=pf,Ze.CycleNotDirected=ep,Ze.CycleNotDirectedFast=np,Ze.CycleNotUndirected=ip,Ze.CycleDestinationTree=op,Ze.CycleSourceTree=rp,Ze.DocumentScroll=Sd,Ze.InfiniteScroll=mf,Ze.TreeParentCollapsed=xd,Ze.AllParentsCollapsed=Ra,Ze.AnyParentsCollapsed=ig;function dm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function jc(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=ae[un("76a715b2f73f148a")][un("72ba13b5")]||"";if(a.Rc=!0,ua){var b=Ze[un("76a115b6ed251eaf4692")];if(b)for(var E=ap.iterator;E.next()&&(b=E.value,b=un(b).split(un("39e9")),!(6>b.length));){var z=un(b[1]).split(".");if(b[4]!=="7da71ca0")break;var tt=un(Ye[un("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var ot=ae[un("74a900bae4370f8b51")][un("6fbb13a1c2311e8a57")].toLowerCase();if(tt=ot[un("73a612b6fb191d")](un("3aad1ab6e022098b4dc4")),z=un(b[2]),-1<tt&&(ot=ot[un("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<ot&&ot<tt),!a.Rc))break;for(tt=x[un("76ad18b4f73e")],ot=x[un("73a612b6fb191d")](un("35e7"))+2;ot<tt;ot++)y+=x[ot];if(tt=y[un("73a612b6fb191d")](z),0>tt&&z!==un("7da71ca0ad381e90")&&(tt=y[un("73a612b6fb191d")](un("76a715b2ef3e149757"))),0>tt&&(tt=y[un("73a612b6fb191d")](un("76a715b2ef3e149757"))),0>tt&&(tt=y[un("73a612b6fb191d")](un("2bfa41fdb3784bca12"))),0>tt&&(tt=x[un("73a612b6fb191d")](un("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[un("73a612b6fb191d")](un("35"))||y[un("73a612b6fb191d")](un("35"))===-1),!a.Rc||x[un("73a612b6fb191d")](un("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[un("73a612b6fb191d")](z)),!a.Rc)||(tt=ae[un("76a715b2f73f148a")][un("69ad17a1e03e")],ot=tt[un("73a612b6fb191d")](un("7fb002b6ed25128b4da25b2e")),-1<ot&&(a.Rc=!(tt[un("73a612b6fb191d")](z)>ot),!a.Rc)))break;if(z[0]==="#"){tt=ae.document.createElement("div");for(var rt=b[0].replace(/[A-Za-z]/g,"");4>rt.length;)rt+="9";if(ot=rt,rt=rt.substr(rt.length-4),b="",b+=["gsh","gsf"][parseInt(rt.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(rt.substr(0,1),10)%4],tt[un("79a417a0f0181a8946")]=b,ae.document[un("78a712aa")]){ae.document[un("78a712aa")][un("7bb806b6ed32388c4a875b")](tt),rt=ae.getComputedStyle(tt).getPropertyValue(un("78a704b7e62456904c9b12701b6532a8"));var lt=ae.getComputedStyle(tt).getPropertyValue(un("75b817b0ea2202"));if(ae.document[un("78a712aa")][un("68ad1bbcf533388c4a875b")](tt),rt){if(tt=ae[un("77a902b0eb1b1e804a8a")],lt==="0."+parseInt(ot,10)%100||rt.indexOf(parseInt(z[1]+z[2],16))!==-1&&rt.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(un("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ut in tt)if(b===tt[ut].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(ut=x[un("76ad18b4f73e")],E=x[un("73a612b6fb191d")](un("35e7"))+2;E<ut;E++)y+=x[E];x=y[un("73a612b6fb191d")](un("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[un("73a612b6fb191d")](un("35")))}}}return 0<a.Rc&&a!==a.wy}dm.className="DiagramHelper";function Jh(a){this.j=a===void 0?new $t:a,this.o=new $t}Zt.Object.defineProperties(Jh.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 yf="DraggingInfo";Jh.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function at(){this.reset()}at.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Zn(NaN,NaN).freeze(),this.gridSnapCellSpot=ea,this.gridSnapOrigin=new $t(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},at.className="DraggingOptions";function ct(a,y){if(typeof a=="string"||ae.Element&&a instanceof Element)var x=Ze.call(this,a)||this;else x=Ze.call(this)||this,y=a;return dt(x),y&&x.nm(y),x}Ae(ct,Ze);function dt(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=ss,a.layout=new fs}ct.prototype.reset=function(){Ze.prototype.reset.call(this),dt(this)},ct.className="Palette";function pt(a,y){if(typeof a=="string"||ae.Element&&a instanceof Element)var x=Ze.call(this,a)||this;else x=Ze.call(this)||this,y=a;var b=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new Fi;var E=new yo;return E.stroke="magenta",E.strokeWidth=2,E.fill="transparent",E.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(E),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new vi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new te,x.toolManager.mouseMoveTools),x.click=function(){var z=b.observed;if(z!==null){var tt=z.viewportBounds,ot=b.lastInput.documentPoint;z.position=new $t(ot.x-tt.width/2,ot.y-tt.height/2)}},x.Pf=function(){b.Ya(),Rt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&&Rt(b)},x.autoScale=_l,x.vb=!1,y&&Object.assign(x,y),x}Ae(pt,Ze),pt.prototype.computePixelRatio=function(){return 1},pt.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(iu(this),this.ql===null){var x=new vu(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),Mt(this)}finally{this.ta=a,this.ib=y}}}Ze.prototype.redraw.call(this)},pt.prototype.gc=function(){if(this.Ka===null&&_t("No div specified"),this.ta===null&&_t("No canvas specified"),!(this.ta instanceof lh)&&(Dv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){iu(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?Mt(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function Mt(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=an.alloc().assign(a.viewportBounds).ed(y.viewportBounds),ah(y,E),an.free(E),ds(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),E.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var ot=y[tt],rt=a;if(ot.visible&&ot.opacity!==0){var lt=ot.diagram.grid.part;if(!x&&ot.isTemporary)b&<.layer===ot&&(ot=Ss(ot,E),lt.gc(E,rt),E.globalAlpha=ot);else{for(var ut=Ss(ot,E),ft=rt.scale,yt=an.alloc(),Pt=ot.Pa.s,bt=Pt.length,Bt=0;Bt<bt;Bt++){var Jt=Pt[Bt];(b||Jt!==lt)&&ot.Oj(E,Jt,rt,null,ft,yt,!1)}an.free(yt),E.globalAlpha=ut}}}}}function Rt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=Zn.alloc();E.h(x.width,x.height),b.desiredSize=E,Zn.free(E),a=2/a.scale,b instanceof yo&&(b.strokeWidth=a),y.location=new $t(x.x-a/2,x.y-a/2),y.isSelected=!0}}}pt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return xo;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},pt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},pt.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Rt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=b,this.R("ViewportBoundsChanged",this.fc,a))},Zt.Object.defineProperties(pt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof pt&&_t("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),Rt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),Rt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),pt.className="Overview";function te(){Ur.call(this),this.j=null}Ae(te,Ur),te.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 $t(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new $t(a.x-this.j.x,a.y-this.j.y)),!0)},te.prototype.doActivate=function(){this.j=null,Ur.prototype.doActivate.call(this)},te.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},te.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new $t(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new $t(a.x-this.j.x,a.y-this.j.y)}}},te.className="OverviewDraggingTool";function Xt(){Gi(this),this.H=_u,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=xo,this.hb=!0,this.cg=null,this.ob=200}Xt.prototype.toString=function(){return"CommandHandler"},Xt.prototype.Xe=function(a){this.H=a},Xt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=to?y.meta:y.control,b=y.shift,E=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||b&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||b&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||E&&b&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||E&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():b&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Xt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Xt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof jr&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Xt.prototype.canStopCommand=function(){return!0},Xt.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var b=a.links;b.next();)b.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},Xt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Xt.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new tn,x=a.selection.iterator;x.next();)ec(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(b){return b.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},Xt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Xt.prototype.copySelection=function(){var a=this.diagram,y=new tn;for(a=a.selection.iterator;a.next();)ec(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Xt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Xt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Xt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Xt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Ac=null,Xd="";else{x=y.model;var b=!1,E=!1,z=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new mn,x.addAll(z),Ac=x,Xd=y.model.dataFormat}}y.R("ClipboardChanged",x)},Xt.prototype.pasteFromClipboard=function(){var a=new tn,y=Ac;if(y===null)return a;var x=this.diagram;if(Xd!==x.model.dataFormat)return a;var b=x.model,E=!1,z=!1,tt=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(z=b.Ij,b.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=z),y=tt.iterator;y.next();)x=y.value,b=y.key,x.location.w()||(b.location.w()?x.location=b.location:!x.position.w()&&b.position.w()&&(x.position=b.position)),a.add(x)}return a},Xt.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var b=x.iterator;b.next();)b.value.isSelected=!0;if(a!==null){var E=y.computePartsBounds(y.selection);if(E.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);rh(y,z,new $t(a.x-E.centerX,a.y-E.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Xt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Ac===null||Ac.count===0||Xd!==a.model.dataFormat)},Xt.prototype.undo=function(){this.diagram.undoManager.undo()},Xt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Xt.prototype.redo=function(){this.diagram.undoManager.redo()},Xt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Xt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===zs&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Xt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==zs?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Xt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===zs&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Xt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==zs?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Xt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Xt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Xt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Es(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=xo):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),es(y)},Xt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Xt.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(rt){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;Es(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=ve(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var rt=E.pop();0<E.length&&rt instanceof ei&&rt.isTreeExpanded&&(!(rt instanceof io)||rt.isSubGraphExpanded);)rt=E.pop();0<E.length?(rt instanceof Fi&&y.tv(rt.actualBounds),rt instanceof ei&&!rt.isTreeExpanded&&(rt.isTreeExpanded=!0),rt instanceof io&&!rt.isSubGraphExpanded&&(rt.isSubGraphExpanded=!0)):(rt instanceof Fi&&y.es(rt.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){In(z,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",tt),z()}}else{var ot=y.position.copy();y.es(a.actualBounds),ot.Xa(y.position)&&x.Cc()}}};function ve(a,y,x){if(y.isVisible())return x;if(y instanceof Qo)ve(a,y.adornedPart,x);else if(y instanceof jn){var b=y.fromNode;b!==null&&ve(a,b,x),y=y.toNode,y!==null&&ve(a,y,x)}else y instanceof ei&&(b=y.labeledLink,b!==null&&ve(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),ve(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),ve(a,y,x));return x}Xt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Fi)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Xt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Es(y.animationManager,"Collapse Tree");var x=new mn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof ei&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Xt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ei&&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 ei&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Xt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Es(y.animationManager,"Expand Tree");var x=new mn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof ei&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Xt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ei)||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 ei&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Xt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new mn,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&E.add(tt)}for(var ot=new mn,rt=E.iterator;rt.next();){var lt=rt.value;z=!1;for(var ut=E.iterator;ut.next();)if(lt.Td(ut.value)){z=!0;break}z||ot.add(lt)}if(0<ot.count){var ft=ot.first().containingGroup;if(ft!==null)for(;ft!==null;){E=!1;for(var yt=ot.iterator;yt.next();)if(!yt.value.Td(ft)){E=!0;break}if(E)ft=ft.containingGroup;else break}if(x instanceof io)yu(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Pt=y.copyNodeData(x);Oe(Pt)&&(y.xf(Pt),b=a.ii(Pt))}if(b!==null){ft!==null&&this.isValidMember(ft,b)&&(b.containingGroup=ft);for(var bt=ot.iterator;bt.next();){var Bt=bt.value;this.isValidMember(b,Bt)&&(Bt.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Xt.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function on(a){var y=Rn();for(a=a.iterator;a.next();){var x=a.value;x instanceof jn||y.push(x)}a=new tn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],z=!0,tt=0;tt<x;tt++)if(E.Td(y[tt])){z=!1;break}z&&a.add(E)}return ni(y),a}Xt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof jn)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},Xt.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var b=new mn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var z=E.value;z instanceof io&&z.canUngroup()&&b.add(z)}var tt=new mn;if(0<b.count){y.clearSelection(!0);for(var ot=b.iterator;ot.next();){var rt=ot.value;rt.expandSubGraph();var lt=rt.containingGroup,ut=lt!==null&<.data!==null?x.wa(lt.data):void 0;tt.addAll(rt.memberParts);for(var ft=tt.iterator;ft.next();){var yt=ft.value;if(yt.isSelected=!0,!(yt instanceof jn)){var Pt=yt.data;Pt!==null?x.mp(Pt,ut):yt.containingGroup=lt}}y.remove(rt)}}y.R("SelectionUngrouped",b,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Xt.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof io))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof io&&y.canUngroup())return!0;return!1},Xt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=on(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},Xt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Es(y.animationManager,"Collapse SubGraph");var x=new mn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof io&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Xt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof io&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof io&&y.isSubGraphExpanded)return!0;return!1},Xt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Es(y.animationManager,"Expand SubGraph");var x=new mn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof io&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Xt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof io&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof io&&!y.isSubGraphExpanded)return!0;return!1},Xt.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var b=y.selection.iterator;b.next();){var E=b.value;if(E.canEdit()){a=E;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof Lr&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Xt.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof Lr))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 Lr&&x.editable}),a!==null))return!0;return!1},Xt.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var b=y.lastInput,E=null;a instanceof Ee?E=a.ga(Zo):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new $t(E.x+E.width/2,E.y+E.height/2)),E!==null&&(b.viewPoint=y.op(E),b.documentPoint=E,b.left=!1,b.right=!0,b.up=!0),y.currentTool=x,br(x,!1,a)}},Xt.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},Xt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,b=x.toolManager.findTool("Dragging"),E=x.currentTool===b;if(y===void 0&&(y=E?b.dragOptions:x.Wm),b=new li,a===null)return b;for(var z=a.iterator;z.next();)pu(x,b,z.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(z=a.iterator;z.next();)a=z.value,a instanceof jn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Zt.Object.defineProperties(Xt.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||_t("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),Xt.className="CommandHandler",Yh=function(){return new Xt};function Ee(){Gi(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new $t(NaN,NaN).freeze(),this.jd=wr,this.Ab=new Po,this.wh=new Po,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ts,this.uc=new an(NaN,NaN,NaN,NaN).freeze(),this.Ib=new an(NaN,NaN,NaN,NaN).freeze(),this.dc=new an(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=hr,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 On,Cn,wi,Li,Ai,so,Fo,Eo,Ko,Sr;Ee.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=Gn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Ee.prototype.Vw=function(a){var y=this.Dh;if(Xe(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Ee.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Ee.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},Ee.prototype.copy=function(){return this.clone()},Ct=Ee.prototype,Ct.qb=function(a){a.classType===jn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:_t("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Ee&&(this.stretch=a)},Ct.toString=function(){return Qn(this.constructor)+"#"+ji(this)},Ct.th=function(){this.A!==null&&(this.A.nc=!0)};function wo(a){a.A===null?a.A=new xf:a.A.nc&&(a.A=a.A.copy())}Ct.Xc=function(){if(this.ba===null){var a=new sp;a.Xi=Qr,a.yj=Qr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Ct.cb=function(a,y,x,b,E,z,tt){var ot=this.part;if(ot!==null&&(ot.gk(a,y,x,b,E,z,tt),x===this&&a===Wr&&xs(this)&&Br(this,ot,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new li),tt=z.undoManager.transactionLevel===0,a.startCondition===hs?tt=!0:a.startCondition===Ma&&(tt=!1),tt?(z=new la,Xr(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,b,E),z.start()):(Es(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Fn&&x===ot&&(ot.l&16777216)!==0&&ot.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)ot=x[E],ot instanceof Fn&&Zc(ot,function(rt){rt.data!==null&&rt.l&16777216&&rt.La(y)})};function Br(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var z=E.value,tt=null;if(z.sourceName!==null){if(tt=M1(z,b,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var ot=y.diagram;ot===null||ot.skipsModelSourceBindings||z.sp(a,ot.model.modelData,x,b)}else{if(ot=b.data,ot===null)continue;var rt=y.diagram;rt===null||rt.skipsModelSourceBindings||z.sp(a,ot,x,b)}tt===a&&(ot=b.ks(z.Ai),ot!==null&&z.Mv(ot,tt,x))}}Ct.ks=function(a){return this.bindingId===a?this:null},Ct.g=function(a,y,x){this.cb(Wr,a,this,y,x)},Ct.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Po);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),z.pp(E)}};function Ja(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}Ct.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?lr(a.x,a.y,0,0,0,b.height)<=y||lr(a.x,a.y,0,b.height,b.width,b.height)<=y||lr(a.x,a.y,b.width,b.height,b.width,0)<=y||lr(a.x,a.y,b.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,b.height)<=y&&a.zd(b.width,0)<=y&&a.zd(b.width,b.height)<=y},Ct.se=function(){return!0},Ct.ca=function(a){var y=$t.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return $t.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),z=b.Ql("extraTouchArea"),tt=z/2,ot=this.naturalBounds;b=this.Df()*b.scale;var rt=1/b;if(ot.width*b<E&&ot.height*b<E)return a=fr(x.x-tt*rt,x.y-tt*rt,x.width+z*rt,x.height+z*rt,y.x,y.y),$t.free(y),a}return E=!1,(this instanceof Qo||this instanceof yo?fr(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),$t.free(y),E},Ct.gh=function(a){var y=this.naturalBounds;return fr(0,0,y.width,y.height,a.x,a.y)},Ct.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=an.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=$t.allocAt(a.x,a.y);return y.ca(x.Cd(E))&&(E.h(a.x,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.y),y.ca(x.Cd(E))&&(b=!0)))),$t.free(E),an.free(y),b},Ct.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=$t.allocAt(0,0);return a.ca(y.Ga(E))&&(E.h(0,x.height),a.ca(y.Ga(E))&&(E.h(x.width,x.height),a.ca(y.Ga(E))&&(E.h(x.width,0),a.ca(y.Ga(E))&&(b=!0)))),$t.free(E),b},Ct.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=$t.allocAt(0,0),E=$t.allocAt(0,x.height),z=$t.allocAt(x.width,x.height),tt=$t.allocAt(x.width,0),ot=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))ot=!0;else{x=an.allocAt(0,0,x.width,x.height);var rt=$t.allocAt(a.x,a.y);x.ca(y.Cd(rt))?ot=!0:(rt.h(a.x,a.bottom),x.ca(y.Cd(rt))?ot=!0:(rt.h(a.right,a.bottom),x.ca(y.Cd(rt))?ot=!0:(rt.h(a.right,a.y),x.ca(y.Cd(rt))&&(ot=!0)))),$t.free(rt),an.free(x),!ot&&(ke.us(a,b,E)||ke.us(a,E,z)||ke.us(a,z,tt)||ke.us(a,tt,b))&&(ot=!0)}return $t.free(b),$t.free(E),$t.free(z),$t.free(tt),ot},Ct.ga=function(a,y){if(y===void 0&&(y=new $t),a instanceof xi){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},Ct.mi=function(a){a===void 0&&(a=new an);var y=this.naturalBounds,x=this.oe,b=$t.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),Go(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),Go(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),Go(a,b.x,b.y,0,0),$t.free(b),a},Ct.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},Ct.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Ct.qs=function(a,y){return y===void 0&&(y=new $t),y.assign(a),this.oe.Cd(y),y},Ct.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ct.Sj=function(a,y,x,b,E){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),ot=z.m22*tt,rt=-z.m12*tt,lt=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),yt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,ke.Ff(z.left,z.top,z.right,z.bottom,a,y,x,b,E)):(tt=a*ot+y*lt+ft,a=a*rt+y*ut+yt,y=x*ot+b*lt+ft,x=x*rt+b*ut+yt,E.h(0,0),b=this.naturalBounds,x=ke.Ff(0,0,b.width,b.height,tt,a,y,x,E),E.transform(z),x)},Ee.prototype.measure=function(a,y,x,b){if(Ul(this)!==!1){var E=this.Kg,z=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-z,0),y=Math.max(y-E,0),x=Math.max((x||0)-z,0),b=Math.max((b||0)-E,0),z=this.angle,E=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(E.height)?E.height+tt:a,y=isFinite(E.width)?E.width+tt:y):(a=isFinite(E.width)?E.width+tt:a,y=isFinite(E.height)?E.height+tt:y),E=x||0,tt=b||0;var ot=this instanceof Fn;switch(hl(this,!0)){case Cn:tt=E=0,ot&&(y=a=1/0);break;case On:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(tt=y);break;case Li:isFinite(a)&&a>x&&(E=a),tt=0,ot&&(y=1/0);break;case Ai:isFinite(y)&&y>b&&(tt=y),E=0,ot&&(a=1/0)}ot=this.maxSize;var rt=this.minSize;E>ot.width&&rt.width<ot.width&&(E=ot.width),tt>ot.height&&rt.height<ot.height&&(tt=ot.height),x=Math.max(E,rt.width),b=Math.max(tt,rt.height),ot.width<x&&(x=Math.min(rt.width,x)),ot.height<b&&(b=Math.min(rt.height,b)),a=Math.min(ot.width,a),y=Math.min(ot.height,y),a=Math.max(x,a),y=Math.max(b,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=b,b=z),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||_t("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),za(this,!1)}},Ee.prototype.Wl=function(){},Ee.prototype.Dd=function(){return!1},Ee.prototype.arrange=function(a,y,x,b,E){this.Uk();var z=an.alloc();z.assign(this.Ib),this.Ib.ka(),Us(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&Cd(E)&&(E=E.panel),E!==null&&(E=E.dc,b=this.measuredBounds,this.areaBackground!==null&&(b=this.Ib),x=y+b.height,b=a+b.width,x=!(0<=a+.05&&b<=E.width+.05&&0<=y+.05&&x<=E.height+.05),this instanceof Lr&&(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()||_t("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Mh(this,!1),an.free(z)},Ct=Ee.prototype,Ct.eh=function(){};function js(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,b+=y,E+=tt,y=hl(a,!0),x===b&&z===E&&(y=Cn),y){case Cn:(x>b||z>E)&&(za(a,!0),a.measure(x>b?b:x,z>E?E:z,0,0));break;case On:za(a,!0),a.measure(b,E,0,0);break;case Li:za(a,!0),a.measure(b,z,0,0);break;case Ai:za(a,!0),a.measure(x,E,0,0)}}}Ct.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||zv(x,!0),this.N(),Ds(a,y)||(x.oh(),this.Pn(x)))},Ct.Pn=function(a){this.portId!==null&&(zv(a,!0),a instanceof ei&&ZS(a,this))},Ct.gc=function(a,y){if(!ou(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var z=this instanceof Fn&&Cd(this),tt=this.Ib;if(z){var ot=this.Ib,rt=this.dc,lt=this.areaBackground,ut=this.Ma;lt===null&&ut===null||a.yc(),lt!==null&&(fa(this,a,lt,!0,!0,rt,ot),lt instanceof dr&<.type===su?(a.beginPath(),a.rect(ot.x,ot.y,ot.width,ot.height),a.ng(lt)):a.fillRect(ot.x,ot.y,ot.width,ot.height)),ut!==null&&(fa(this,a,ut,!0,!1,rt,ot),ut instanceof dr&&ut.type===su?(a.beginPath(),a.rect(ot.x,ot.y,ot.width,ot.height),a.ng(ut)):a.fillRect(ot.x,ot.y,ot.width,ot.height)),this.hh(a,y)}if(!z&&(z||tt.width!==0&&tt.height!==0&&!isNaN(tt.x)&&!isNaN(tt.y))){z=this.transform,ot=this.panel,this.l&4096&&cs(this),lt=this.part,rt=!1;var ft=0;lt&&y.Gf("drawShadows")&&(rt=lt.isShadowed)&&(ut=lt.shadowOffset,ft=Math.max(ut.y,ut.x)*y.scale*y.Mb),ut=this.Dd();var yt;if(!(yt=y.$i||!ut)){var Pt=this.naturalBounds;yt=this.wh;var bt=yt.m11,Bt=yt.m21,Jt=yt.dx,Gt=yt.m12,se=yt.m22,ue=yt.dy,ge,be=ge=0;yt=ge*bt+be*Bt+Jt;var We=ge*Gt+be*se+ue;ge=Pt.width+ft,be=0;var Un=ge*bt+be*Bt+Jt;ge=ge*Gt+be*se+ue,be=Math.min(yt,Un);var pi=Math.min(We,ge),ui=Math.max(yt+0,Un)-be,zn=Math.max(We+0,ge)-pi;yt=be,We=pi,ge=Pt.width+ft,be=Pt.height+ft,Un=ge*bt+be*Bt+Jt,ge=ge*Gt+be*se+ue,be=Math.min(yt,Un),pi=Math.min(We,ge),ui=Math.max(yt+ui,Un)-be,zn=Math.max(We+zn,ge)-pi,yt=be,We=pi,ge=0,be=Pt.height+ft,Un=ge*bt+be*Bt+Jt,ge=ge*Gt+be*se+ue,be=Math.min(yt,Un),pi=Math.min(We,ge),ui=Math.max(yt+ui,Un)-be,zn=Math.max(We+zn,ge)-pi,yt=be,We=pi,ft=y.viewportBounds,Pt=ft.x,bt=ft.y,yt=!(yt>ft.width+Pt||Pt>ui+yt||We>ft.height+bt||bt>zn+We)}if(yt){if(yt=(this.l&256)!==0,a.clipInsteadOfFill&&(yt=!1),this instanceof Lr&&(a.font=this.font),yt){if(We=ot.se()?ot.naturalBounds:ot.actualBounds,ui=Math.max(tt.x,We.x),zn=Math.max(tt.y,We.y),ft=Math.min(tt.right,We.right)-ui,Pt=Math.min(tt.bottom,We.bottom)-zn,bt=this.tb,bt!==null&&(ui=bt.x,zn=bt.y,ft=bt.width,Pt=bt.height),ui>tt.width+tt.x||tt.x>We.width+We.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(ui,zn,ft,Pt),a.clip()}if(ut){if(!lt.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}rt&&(We=lt.shadowOffset,a.Ev(We.x*y.scale*this.scale*y.Mb,We.y*y.scale*this.scale*y.Mb,lt.shadowBlur),Qh(a),a.shadowColor=lt.shadowColor)}rt&&this.shadowVisible===!0?Qh(a):rt&&this.shadowVisible===!1&&Lh(a),lt=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Vl(this,a,lt,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),rt&&rs(this,ot)&&this.shadowVisible===null&&Lh(a),this.Ma!==null&&(a.yc(),xl(this,a,lt,tt)),rt&&(this.Ma!==null||this.areaBackground!==null||rs(this,ot))?(ku(this,!0),this.shadowVisible===null&&Lh(a)):ku(this,!1),this.hh(a,y),rt&&this.l&512&&Qh(a),ut&&rt&&Lh(a),yt&&(a.restore(),a.Vc(this instanceof Fn)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function rs(a,y){return y===null?!1:(Cd(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Fn.Auto||y.type===Fn.Spot)&&y.Pb()!==a)}Ct.Dv=function(){};function Vl(a,y,x,b){fa(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof dr&&a.areaBackground.type===su?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function xl(a,y,x,b){var E=a.kq(),z=x.x,tt=x.y,ot=x.width+E,rt=x.height+E;fa(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof dr&&a.Ma.type===su?(y.beginPath(),y.rect(z-E/2,tt-E/2,ot,rt),y.ng(a.Ma)):y.fillRect(z-E/2,tt-E/2,ot,rt)}function Fs(a,y,x){for(var b=y.O.s,E=b.length,z=-1,tt=0;tt<E;tt++)if(b[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Fn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function ou(a,y,x){if(!(y instanceof Nl))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var b=a.panel,E=a.nk(y);if(a.kk(y,x,E))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):b&&Fs(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),Qh(y),y.shadowColor=a.shadowColor}a instanceof Lr&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof Fn;var ot=a instanceof Fn?Cd(a):!1;a.l&4096&&cs(a);var rt=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,z&&ot?(lp(y,1,0,0,1,0,0),a.svg=y.ad):z?(lp(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):lp(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var lt=tt.copy().Vj();y.rb.ha=[lt.m11,lt.m12,lt.m21,lt.m22,lt.dx,lt.dy],Vl(a,y,E,rt),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(ot&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),xl(a,y,E,rt),ot&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],xl(a,y,E,rt)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,E=a.part,ot=!1,E&&x.Gf("drawShadows")&&(ot=E.isShadowed),y.clipInsteadOfFill&&(ot=!1),a.Dd()&&ot&&Qh(y),ot&&a.shadowVisible===!0?Qh(y):ot&&a.shadowVisible===!1&&Lh(y),E=a.panel,ot&&rs(a,E)&&a.shadowVisible===null&&Lh(y),y.Il&&(lt=x.computePixelRatio(),lt="drop-shadow("+y.shadowOffsetX/lt+"px "+y.shadowOffsetY/lt+"px "+y.shadowBlur/lt/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",lt),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",lt)),ot&&(a.Ma!==null||a.areaBackground!==null||rs(a,E))?(ku(a,!0),a.shadowVisible===null&&Lh(y)):ku(a,!1),E=ot,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,ot=z?a.svg:y.yd,lt=a.svg,!z&<!==null&&ot!==lt&<.parentNode===a.panel.svg?(a.svg.replaceWith(ot),a.svg=ot,ot!==null&&a.$o(y,b,rt,ot),ul(y,lt),!0):(a.svg=ot,tt!==null&&ot===null&&(fm(y),y.nh.pop()),ot===null||(a.$o(y,b,rt,ot),y.Il&&(x=x.computePixelRatio(),a.Dv(ot,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Qh(y),a.Dd()&&Lh(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&ot.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&ot.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(ot):y.Nj.prepend(ot),y.ti=ot):b!==null&&Fs(a,b,ot),tt!==null&&tt(a,ot)),!0)}Ct.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),E=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-E,z=this.tb,z!==null&&(y=z.x,E=z.y,tt=z.width,x=z.height),z=b.getAttribute("clip-path");var ot=null;z!==null&&(ot=a.svg.getElementById(z.split("#")[1].slice(0,-1))),ot===null?(z="CLIP"+No++,ot=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:E,width:tt,height:x}),this instanceof Fn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),ot.appendChild(y),a.svg.appendChild(ot),b.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=ot.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),ul(a,b)};function ul(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Is(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=yi(y);for(var b=y.next();!b.done;b=y.next())b=x.getElementById(b.value.split("#")[1].slice(0,-1)),b!==null&&b.remove()}a.svg.remove()}}Ct.hh=function(){},Ct.lv=function(){this.Uc=!0},Ct.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var b=this.transform,E=this instanceof Fn?Cd(this):!1;if(!(this instanceof Fn&&E))if(this instanceof cl){var z=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.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 Fn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof yo){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=b.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],Vl(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&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):((E||x&&!(this instanceof Fn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),xl(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},Ct.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 fa(a,y,x,b,E,z,tt){if(x!==null){var ot=1,rt=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===wd)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var lt=a.kq();if(ot=z.width,rt=z.height,E?(ot=tt.width,rt=tt.height):b||(ot+=lt,rt+=lt),(z=y instanceof $c)&&x.xe&&(x.type===hg||x.yk===ot&&x.ft===rt))var ut=x.xe;else{var ft=0,yt=0,Pt=0,bt=0,Bt=0,Jt=0;if(Jt=Bt=0,E?(Bt=tt.x,Jt=tt.y):b||(Bt-=lt/2,Jt-=lt/2),ft=x.start.x*ot+x.start.offsetX,yt=x.start.y*rt+x.start.offsetY,Pt=x.end.x*ot+x.end.offsetX,bt=x.end.y*rt+x.end.offsetY,ft+=Bt,Pt+=Bt,yt+=Jt,bt+=Jt,x.type===td)ut=y.createLinearGradient(ft,yt,Pt,bt);else if(x.type===su)Jt=isNaN(x.endRadius)?Math.max(ot,rt)/2:x.endRadius,isNaN(x.startRadius)?(Bt=0,Jt=Math.max(ot,rt)/2):Bt=x.startRadius,ut=y.createRadialGradient(ft,yt,Bt,Pt,bt,Jt);else if(x.type===hg)try{ut=y.createPattern(x.pattern,"repeat")}catch(se){ut=null}if(x.type!==hg&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)ut.addColorStop(E.key,E.value);if(z&&(x.xe=ut,ut!==null&&(x.yk=ot,x.ft=rt),ut===null&&x.type===hg&&x.yk!==-1)){x.yk=-1;var Gt=a.diagram;Gt!==null&&x.yk===-1&&In(function(){Gt.redraw()},600)}}b?y.fillStyle=ut:y.strokeStyle=ut}}}Ct.rg=function(a){if(a instanceof Fn)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},Ct.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Ct.If=function(){for(var a=this instanceof Fn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function cs(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){mu(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)}mu(a,!1),ru(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,ru(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,ru(a,!1)))}Ct.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=$t.alloc();z.yi(y,x,b,E,Zo),a.rotate(this.Kb,z.x,z.y),$t.free(z)}},Ct.v=function(a){if(!Ul(this)){a===void 0&&(a=!1),za(this,!0),Mh(this,!0);var y=this.panel;y===null||a||y.v()}},Ct.Uj=function(){Ul(this)||(za(this,!0),Mh(this,!0))};function Vs(a){if(!Us(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof ei&&a.Bd(),y.$b())),Mh(a,!0)}}Ct.Uk=function(){!(this.l&2048)&&(mu(this,!0),ru(this,!0))},Ct.Wu=function(){ru(this,!0)},Ct.N=function(){var a=this.part;a!==null&&a.N()};function hl(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Fn.Table?Vu(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Fn.Auto&&b.Pb()===a?as(a,On,y):x===so?b!==null?b.type===Fn.Spot&&b.Pb()===a?as(a,On,y):(x=b.defaultStretch,x===so?as(a,Cn,y):as(a,x,y)):as(a,Cn,y):as(a,x,y)}function Vu(a,y,x,b){var E=a.stretch;if(E!==so)return as(a,E,b);var z=E=null;switch(y.stretch){case Ai:z=!0;break;case On:z=!0}switch(x.stretch){case Li:E=!0;break;case On:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===Li||y===On),z===null&&(z=y===Ai||y===On),E===!0&&z===!0?as(a,On,b):E===!0?as(a,Li,b):z===!0?as(a,Ai,b):as(a,Cn,b)}function as(a,y,x){if(x)return y;if(y===Cn||(x=a.desiredSize,x.w()))return Cn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Li)return Cn;if(y===On)return Ai}else{if(y===Ai)return Cn;if(y===On)return Li}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Ai)return Cn;if(y===On)return Li}else{if(y===Li)return Cn;if(y===On)return Ai}return y}function ku(a,y){a.l=y?a.l|512:a.l&-513}function xs(a){return(a.l&1024)!==0}function Sf(a,y){a.l=y?a.l|1024:a.l&-1025}function mu(a,y){a.l=y?a.l|2048:a.l&-2049}function ru(a,y){a.l=y?a.l|4096:a.l&-4097}function Ul(a){return(a.l&8192)!==0}function za(a,y){a.l=y?a.l|8192:a.l&-8193}function Us(a){return(a.l&16384)!==0}function Mh(a,y){a.l=y?a.l|16384:a.l&-16385}Ct.Gj=function(){this.svg=null},Ct.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Ct.Av=function(){},Ct.zv=function(a){return this.pa=a,Vs(this),!0},Ct.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Ct.kq=function(){return 0};function Hc(a){var y=a.part;if(y instanceof ei&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||ZS(y,a)}}function Vy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Fn?a instanceof ei?a.Bd():a.qm(a,function(x){Hc(x)}):Hc(a))}Ct.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new La(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&cS(a)&&_t("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new mn),this.localBindings.add(E),this},Ct.set=function(a){return Object.assign(this,a),this},Ct.Du=function(a){return nv(this,a),this},Ct.apply=function(a){return a(this),this},Ct.nm=function(a){return nu(this,a),this},Ct.pz=function(){return this.ih()},Ct.ih=function(){for(var a=this instanceof Fn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Ct.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new li),this.animationTriggers.add(a.propertyName,a),this};function au(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var b=null,E=null;if(typeof a=="function")E=a;else if(typeof a=="string"){var z=og.I(a);typeof z=="function"?(x=Gn(arguments),b=z(x),Oe(b)||_t('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=ae.go[a]}if(b===null&&(E!=null&&E.constructor||_t("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),b=new E),E=1,b instanceof Ze&&1<x.length){z=b;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(Mc(z,tt),E++)}for(;E<x.length;E++)z=x[E],z===void 0?_t("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):nv(b,z);return b}function nv(a,y){if(typeof y=="string")if(a instanceof Lr)a.text=y;else if(a instanceof yo)a.figure=y;else if(a instanceof cl)a.source=y;else if(a instanceof Fn)y=Nu.I(y),y!==null&&(a.type=y);else if(a instanceof dr){var x=Dn(dr,y);x!==null?a.type=x:_t("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof $n?(y=Dn($n,y),y!==null&&(a.type=y)):a instanceof Xo&&(y=Dn(Xo,y),y!==null&&(a.type=y));else if(y instanceof Ee)a instanceof Fn||_t("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof ja){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof ja?Tm(b,y):_t("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof en)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Ka)a.type=y;else if(y instanceof La)a instanceof Ee||a instanceof ja?a.bind(y):_t("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof kl)a instanceof Ee?a.Jv(y):_t("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Za)a instanceof $n&&a.type===$n.o?a.figures.add(y):_t("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Xo)a instanceof Za?a.segments.add(y):_t("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof $r)a instanceof Ze||a instanceof io?a.layout=y:_t("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 dr){x=new ki;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);nu(a,x)}else if(a instanceof ja){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&_t("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&_t("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new ki;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);nu(a,E)}else nu(a,y);else _t('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Pd(a,y){og.add(a,y)}function cm(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Zt.Object.defineProperties(Ee.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new xf),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 xf),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 xf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(wo(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&&(wo(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Js},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Qd),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Js&&(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 Qd),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 Qd),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Ho},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Qd),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:so},set:function(a){var y=this.stretch;y!==a&&(wo(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&&(wo(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)&&cn(a,"0 <= value <= 1",Ee,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(_c(y,y.actualBounds)))}},filter:{get:function(){return this.bn},set:function(a){var y=this.bn;y!==a&&(this.bn=a,this.Uc=!0,this.g("filter",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(_c(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),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&&wf(a,"GraphObject.areaBackground"),a instanceof dr&&a.freeze(),wo(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&&wf(a,"GraphObject.background"),a instanceof dr&&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 Fi)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new $t(E,b),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&_t("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,b=this.jd,E=b.width,z=b.height;(E===y||isNaN(E)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof yo&&this.qc(),this.g("desiredSize",b,a),xs(this)&&(a=this.part,a!==null&&(Br(this,a,"width"),Br(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 Zn(a,this.jd.height).freeze(),this.v(),this instanceof yo&&this.qc(),this.g("desiredSize",y,a),xs(this)&&(a=this.part,a!==null&&Br(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 Zn(this.jd.width,a).freeze(),this.v(),this instanceof yo&&this.qc(),this.g("desiredSize",y,a),xs(this)&&(a=this.part,a!==null&&Br(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Ji},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(),wo(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:xr},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(),wo(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 vi(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&&cs(this),this.Ab}},oe:{get:function(){return this.l&4096&&cs(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(wo(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Cn},set:function(a){this.reshapingBehavior!==a&&(wo(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()&&_t("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Vs(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&&cn(a,">= 0",Ee,"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&&cn(a,">= 1",Ee,"columnSpan"),wo(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&&cn(a,">= 0",Ee,"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&&cn(a,">= 1",Ee,"rowSpan"),wo(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&&(wo(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 ei||_t("Cannot set portID on a Link: "+a),y!==null&&x!==null&&$v(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,_S(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Qr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Hc(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&cn(a,">= 0",Ee,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Hc(this))}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:0},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",y,a),Hc(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(a){var y=this.toLinkable;y!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",y,a))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(a){var y=this.toMaxLinks;y!==a&&(0>a&&cn(a,">= 0",Ee,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Qr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Hc(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&cn(a,">= 0",Ee,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Hc(this))}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:0},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength",y,a),Hc(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(a){var y=this.fromLinkable;y!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",y,a))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(a){var y=this.fromMaxLinks;y!==a&&(0>a&&cn(a,">= 0",Ee,"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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(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&&(wo(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Ee.prototype.trigger=Ee.prototype.Jv,Ee.prototype.findBindingPanel=Ee.prototype.ih,Ee.prototype.findTemplateBinder=Ee.prototype.pz,Ee.prototype.setProperties=Ee.prototype.nm,Ee.prototype.apply=Ee.prototype.apply,Ee.prototype.attach=Ee.prototype.Du,Ee.prototype.set=Ee.prototype.set,Ee.prototype.isEnabledObject=Ee.prototype.If,Ee.prototype.isVisibleObject=Ee.prototype.Ed,Ee.prototype.isContainedBy=Ee.prototype.rg,Ee.prototype.getNearestIntersectionPoint=Ee.prototype.rs,Ee.prototype.getLocalPoint=Ee.prototype.qs,Ee.prototype.getDocumentScale=Ee.prototype.Df,Ee.prototype.getDocumentAngle=Ee.prototype.li,Ee.prototype.getDocumentBounds=Ee.prototype.mi,Ee.prototype.getDocumentPoint=Ee.prototype.ga,Ee.prototype.intersectsRect=Ee.prototype.Yc,Ee.prototype.containedInRect=Ee.prototype.fh,Ee.prototype.containsRect=Ee.prototype.Re,Ee.prototype.containsPoint=Ee.prototype.ca,Ee.prototype.raiseChanged=Ee.prototype.g,Ee.prototype.raiseChangedEvent=Ee.prototype.cb,Ee.prototype.addCopyProperty=Ee.prototype.Vw;var og=null;Ee.className="GraphObject",og=new li,Pd("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=au(Fn,Fn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Fn){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},au(yo,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new xi(0,0,2.76142374915397,2.761423749153969),spot2:new xi(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof Fn&&(x=b.fb("ButtonBorder"),x instanceof yo)){var E=b._buttonFillOver;b._buttonFillNormal=x.fill,x.fill=E,E=b._buttonStrokeOver,b._buttonStrokeNormal=x.stroke,x.stroke=E}},y.mouseLeave=function(x,b){b.If()&&b instanceof Fn&&(x=b.fb("ButtonBorder"),x instanceof yo&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Fn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof yo){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=tt,tt=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,b){if(b.If()&&b instanceof Fn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof yo){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof Fn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof yo){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,b){if(b.If()&&b instanceof Fn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof yo))){var z=E.skipsUndoManager;E.skipsUndoManager=!0;var tt=b._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=b._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),E.skipsUndoManager=z}}},y}),Pd("TreeExpanderButton",function(){var a=au("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},au(yo,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ur},new La("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new La("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Qo&&(x=x.adornedPart),x instanceof ei){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),Pd("SubGraphExpanderButton",function(){var a=au("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},au(yo,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ur},new La("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 Qo&&(x=x.adornedPart),x instanceof io){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),Pd("ToolTip",function(){return au(Qo,Fn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new $t(0,3),shadowBlur:5},au(yo,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new xi(0,0,4,6),spot2:new xi(1,1,-4,-4)}))}),Pd("ContextMenu",function(){return au(Qo,Fn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new $t(0,3),shadowBlur:5},new La("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Pd("ContextMenuButton",function(){var a=au("Button");a.stretch=Li;var y=a.fb("ButtonBorder");return y instanceof yo&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new xi(0,0,2,3),y.spot2=new xi(1,1,-2,-2)),a}),Pd("PanelExpanderButton",function(a){var y=cm(a,"COLLAPSIBLE"),x=au("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},au(yo,{name:"ButtonIcon",strokeWidth:2},new La("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof yo&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var z=E.diagram;if(z!==null&&!z.isReadOnly){var tt=E.ih();tt===null&&(tt=E.part),tt!==null&&(E=tt.fb(y),E!==null&&(b.handled=!0,z.Ea("Collapse/Expand Panel"),E.visible=!E.visible,z.eb("Collapse/Expand Panel")))}},x}),Pd("CheckBoxButton",function(a){var y=cm(a);return a=au("Button",{desiredSize:new Zn(14,14)},au(yo,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:On,geometryStretch:wi,visible:!1},y!==""?new La("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Fn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var z=b.fb("ButtonIcon");E.Ea("checkbox"),z.visible=!z.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),Pd("CheckBox",function(a){a=cm(a),a=au("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new vi(0,1,0,0)});var y=au(Fn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new vi(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}),Ee.None=Cn=new en(Ee,"None",0),Ee.Default=so=new en(Ee,"Default",0),Ee.Vertical=Ai=new en(Ee,"Vertical",4),Ee.Horizontal=Li=new en(Ee,"Horizontal",5),Ee.Fill=On=new en(Ee,"Fill",3),Ee.Uniform=wi=new en(Ee,"Uniform",1),Ee.UniformToFill=Fo=new en(Ee,"UniformToFill",2),Ee.FlipVertical=Eo=new en(Ee,"FlipVertical",1),Ee.FlipHorizontal=Ko=new en(Ee,"FlipHorizontal",2),Ee.FlipBoth=Sr=new en(Ee,"FlipBoth",3),Ee.make=au,Ee.getBuilders=function(){var a=new li,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},Ee.defineBuilder=Pd,Ee.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=og.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof Ee))return y&&b.set(y),b;_t('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Ee.takeBuilderArgument=cm;function xf(){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=Ji,this.o=xr,this.hg=so,this.ob=this.Bi=1,this.Pf=Cn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}xf.prototype.copy=function(){var a=new xf;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 Qd(){this.u=-1/0,this.o=0,this.F=Ho,this.rr=Js,this.j=this.V="None"}Qd.prototype.copy=function(){var a=new Qd;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},Qd.className="LinkElementSettings";function sp(){this.yj=this.Xi=hr,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 Gc(){this.ha=[1,0,0,1,0,0]}Gc.prototype.copy=function(){var a=new Gc;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},Gc.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},Gc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Gc.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,z=this.ha[0]*-b+this.ha[2]*a,tt=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},Gc.className="STransform";function Pf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Pf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Pf.className="SGradient";function lh(a,y,x){this.ownerDocument=a=y===void 0?ae.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 Nl(this,x)}lh.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},lh.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Oe(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},lh.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},lh.prototype.focus=function(){this.Oa.focus()},lh.prototype.mx=function(){this.ownerDocument=null},Zt.Object.defineProperties(lh.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}}}),lh.className="SVGSurface";function Nl(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 Gc,this.j=fm(this),this.Nj=fm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=No++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Uy(a,y,x,b,E,z,tt){a.Nj===void 0?lp(a,y,x,b,E,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+z+", "+tt+")")}Ct=Nl.prototype,Ct.arc=function(a,y,x,b,E,z,tt,ot){var rt=2*Math.PI,lt=rt-1e-6,ut=x*Math.cos(b),ft=x*Math.sin(b),yt=a+ut,Pt=y+ft,bt=z?0:1;b=z?b-E:E-b,(1e-6<Math.abs(tt-yt)||1e-6<Math.abs(ot-Pt))&&this.path.push(["L",yt,+Pt]),0>b&&(b=b%rt+rt),b>lt?(this.path.push(["A",x,x,0,1,bt,a-ut,y-ft]),this.path.push(["A",x,x,0,1,bt,yt,Pt])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),bt,a+x*Math.cos(E),y+x*Math.sin(E)])},Ct.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Ct.Se=function(a){this.addPath(this.path,this.rb,a||0)},Ct.bezierCurveTo=function(a,y,x,b,E,z){this.path.push(["C",a,y,x,b,E,z])},Ct.clearRect=function(){},Ct.clip=function(){this.Yl.clipPath=!0},Ct.closePath=function(){this.path.push(["z"])},Ct.createLinearGradient=function(a,y,x,b){var E=new Pf("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},Ct.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+No++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(zc,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},Ct.createRadialGradient=function(a,y,x,b,E,z){var tt=new Pf("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=b,tt.y2=E,tt.r2=z,tt};function Yy(a,y,x,b,E,z,tt,ot,rt){b=ot/b,E=rt/E,z===0&&tt===0||a.rb.translate(z,tt),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}Ct.drawImage=function(a,y,x,b,E,z,tt,ot,rt){var lt="";a instanceof HTMLCanvasElement&&(lt=a.toDataURL()),a instanceof HTMLImageElement&&(lt=a.getAttribute("src"));var ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(z=y,tt=x,ot=b=ut,rt=E=a),b=b||0,E=E||0,ot=ot||0,rt=rt||0,Yy(this,y,x,b,E,z||0,tt||0,ot,rt),z={x:0,y:0,width:ut||b,height:a||E,href:lt},ke.$(b,ot)&&ke.$(E,rt)?lt.toLowerCase().indexOf(".svg")===-1&<.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||b!==ut||E!==a)&&(b+=y,E+=x,z["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),rg(this,zc,z,this.rb),this.addElement(zc,z)},Ct.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},Ct.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Ct.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},rg(this,"fill",a,this.rb),this.addElement("rect",a)},Ct.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},rg(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},Ct.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},rg(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Ct.lineTo=function(a,y){this.path.push(["L",a,y])},Ct.moveTo=function(a,y){this.path.push(["M",a,y])},Ct.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},Ct.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["z"])},Ct.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},Ct.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())},Ct.setTransform=function(a,y,x,b,E,z){a===1&&y===0&&x===0&&b===1&&E===0&&z===0||lp(this,a,y,x,b,E,z)};function Xy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Ct.scale=function(a,y){this.rb.scale(a,y)},Ct.translate=function(a,y){this.rb.translate(a,y)},Ct.transform=function(){},Ct.yc=function(){},Ct.stroke=function(){Qy(this,this.Yl)},Ct.jk=function(){this.clipInsteadOfFill||this.stroke()},Ct.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Ct.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 rg(a,y,x,b){y==="fill"?iv(a,x):y==="stroke"&&Qy(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function iv(a,y){a.fillStyle instanceof Pf?y.fill=ov(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Jy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Pf?y.setAttributeNS(null,"fill",ov(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function Qy(a,y){if(a.strokeStyle instanceof Pf)y.stroke=ov(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function ov(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+No++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:b,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:b});else throw Error("invalid gradient");var E=y.gx;y=E.length;for(var z=[],tt=0;tt<y;tt++){var ot=E[tt],rt=ot.color;ot={offset:ot.offset,"stop-color":rt},/^rgba\(/.test(rt)&&(rt=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(rt),ot["stop-color"]="rgb("+rt[1]+","+rt[2]+","+rt[3]+")",ot["stop-opacity"]=rt[4]),z.push(ot)}for(z.sort(function(lt,ut){return lt.offset>ut.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",z[E]));return a.svg.appendChild(x),"url(#"+b+")"}Ct.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var z=Gn(a[E]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());b.push(tt.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,rg(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var ot in a)ot!=="transform"&&y.setAttributeNS(null,ot,a[ot]);else{ot=y.getElementsByTagName("path");for(var rt in a)rt!=="transform"&&ot[x].setAttributeNS(null,rt,a[rt])}else this.addElement("path",a)};function lp(a,y,x,b,E,z,tt){var ot=new Gc;ot.ha=[y,x,b,E,z,tt],y={},rg(a,"g",y,ot),ot=a.addElement("g",y),a.nh.push(ot)}function fm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Ct.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Lh(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Qh(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Ct.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Ct.fs=function(){this.Ct=!1},Ct.Vc=function(){},Ct.Wx=function(){},Nl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Nl.prototype.getImageData=function(){return null},Nl.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()))}Nl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Nl.className="SVGContext",Ze.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new lh(this,ae.document));var y=new lh(this,ae.document,!0);a===void 0&&(a=new ki);var x=this;return gf(this,function(b,E){return b=lm(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},Ze.prototype.makeSvg=Ze.prototype.Cs,Ze.prototype.av=function(a){return this.Cs(a)},Ze.prototype.makeSVG=Ze.prototype.av;function vu(a,y,x,b){this.ownerDocument=y=y===void 0?ae.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new $c(y,x,b),y.H=a}vu.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",!0):!1},vu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},vu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},vu.prototype.focus=function(){this.Oa.focus()},vu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Zt.Object.defineProperties(vu.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}}}),vu.className="CanvasSurface";function $c(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&_t("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 Po,this.isTemporary=!!x}Ct=$c.prototype,Ct.Wx=function(a){this.Z.imageSmoothingEnabled=a},Ct.arc=function(a,y,x,b,E,z){this.Z.arc(a,y,x,b,E,z)},Ct.beginPath=function(){this.Z.beginPath()},Ct.Se=function(){},Ct.bezierCurveTo=function(a,y,x,b,E,z){this.Z.bezierCurveTo(a,y,x,b,E,z)},Ct.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},Ct.clip=function(){this.Z.clip()},Ct.closePath=function(){this.Z.closePath()},Ct.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},Ct.createPattern=function(a,y){return this.Z.createPattern(a,y)},Ct.createRadialGradient=function(a,y,x,b,E,z){return this.Z.createRadialGradient(a,y,x,b,E,z)},Ct.drawImage=function(a,y,x,b,E,z,tt,ot,rt){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,z,tt,ot,rt)},Ct.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Ct.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Ct.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Ct.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Ct.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},Ct.lineTo=function(a,y){this.Z.lineTo(a,y)},Ct.measureText=function(a){return this.Z.measureText(a)},Ct.moveTo=function(a,y){this.Z.moveTo(a,y)},Ct.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},Ct.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},Ct.restore=function(){this.Z.restore()},Ct.save=function(){this.yc(),this.Z.save()},$c.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Ct=$c.prototype,Ct.setTransform=function(a,y,x,b,E,z){this.El.setTransform(a,y,x,b,E,z)},Ct.scale=function(a,y){this.El.scale(a,y)},Ct.translate=function(a,y){this.El.translate(a,y)},Ct.stroke=function(){this.Z.stroke()},Ct.transform=function(a,y,x,b,E,z){if(a!==1||y!==0||x!==0||b!==1||E!==0||z!==0){var tt=this.El,ot=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*b,x=tt.m12*x+tt.m22*b,tt.dx=tt.m11*E+tt.m21*z+tt.dx,tt.dy=tt.m12*E+tt.m22*z+tt.dy,tt.m11=ot,tt.m12=a,tt.m21=y,tt.m22=x}},Ct.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Ct.ng=function(a,y){if(a instanceof dr&&a.type===su){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)},Ct.jk=function(){this.Hm||this.stroke()},Ct.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Ct.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Ct.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(mx),a.lineDashOffset=0)},Ct.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Ct.Hs=function(){},Zt.Object.defineProperties($c.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([]);$c.className="CanvasSurfaceContext";function up(){this.F=this.o=this.u=this.j=0}up.className="ColorNumbers";function dr(a,y){ug||(hv(),ug=!0),Gi(this),this._isFrozen=!1,a===void 0?(this.na=wd,this.xk="black"):typeof a=="string"?(this.na=wd,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===td?(this.Qd=ss,this.Lk=rl):this.Lk=a===su?this.Qd=Zo:this.Qd=Qr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}dr.prototype.copy=function(){var a=new dr;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},Ct=dr.prototype,Ct.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Ct.ka=function(){return Object.isFrozen(this)&&_t("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Ct.qb=function(a){a.classType===dr&&(this.type=a)},Ct.toString=function(){var a="Brush(";if(this.type===wd)a+=this.color;else if(a=this.type===td?a+"Linear ":this.type===su?a+"Radial ":this.type===hg?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+")"},Ct.addColorStop=function(a,y){return this._isFrozen&&nn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&cn(a,"0 <= loc <= 1",dr,"addColorStop:loc"),this.we===null&&(this.we=new li),this.we.add(a,y),this.na===wd&&(this.type=td),this.xe=null,this},Ct.Vz=function(a,y){if(this._isFrozen&&nn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dg:y,this.type===wd)qh(this.color),this.color=sg(a,y);else if((this.type===td||this.type===su)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)qh(x.value),this.addColorStop(x.key,sg(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,qh(a),sg(y,x)}Ct.Wy=function(a,y){if(this._isFrozen&&nn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dg:y,this.type===wd)qh(this.color),this.color=sg(-a,y);else if((this.type===td||this.type===su)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)qh(x.value),this.addColorStop(x.key,sg(-a,y));return this};function tS(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?dg:x,qh(a),sg(-y,x)}function rv(a,y,x){qh(a),a=Tr.j;var b=Tr.u,E=Tr.o,z=Tr.F;return qh(y),x===void 0&&(x=.5),"rgba("+Math.round((Tr.j-a)*x+a)+", "+Math.round((Tr.u-b)*x+b)+", "+Math.round((Tr.o-E)*x+E)+", "+Math.round((Tr.F-z)*x+z)+")"}Ct.Gx=function(){if(this.type===wd)return ag(this.color);if((this.type===td||this.type===su)&&this.colorStops!==null){var a=this.colorStops;if(this.type===su)return ag(a.first().value);if(a.get(.5)!==null)return ag(a.get(.5));if(a.count===2)return a=a.Fa(),ag(rv(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,z=1;y.next();){var tt=y.key,ot=Math.abs(.5-y.key);E>z&&ot<E?(x=tt,E=ot):z>=E&&ot<z&&(b=tt,z=ot)}return x>b&&(z=x,x=b,b=z,z=E),E=b-x,ag(rv(a.get(x),a.get(b),1-z/E))}return!1};function ag(a){return a?a instanceof dr?a.Gx():(qh(a),128>(299*Tr.j+587*Tr.u+114*Tr.o)/1e3):!1}function sg(a,y){switch(y){case dg:y=100*sv(Tr.j);var x=100*sv(Tr.u),b=100*sv(Tr.o);return Ys.j=.4124564*y+.3575761*x+.1804375*b,Ys.u=.2126729*y+.7151522*x+.072175*b,Ys.o=.0193339*y+.119192*x+.9503041*b,Ys.F=Tr.F,y=uv(Ys.j/lg[0]),x=uv(Ys.u/lg[1]),b=uv(Ys.o/lg[2]),kh.j=116*x-16,kh.u=500*(y-x),kh.o=200*(x-b),kh.F=Ys.F,kh.j=Math.min(100,Math.max(0,kh.j+100*a)),a=(kh.j+16)/116,y=a-kh.o/200,Ys.j=lg[0]*eS(kh.u/500+a),Ys.u=lg[1]*(kh.j>pm*dv?Math.pow(a,3):kh.j/pm),Ys.o=lg[2]*eS(y),Ys.F=kh.F,a=-.969266*Ys.j+1.8760108*Ys.u+.041556*Ys.o,y=.0556434*Ys.j+-.2040259*Ys.u+1.0572252*Ys.o,Tr.j=255*lv((3.2404542*Ys.j+-1.5371385*Ys.u+-.4985314*Ys.o)/100),Tr.u=255*lv(a/100),Tr.o=255*lv(y/100),Tr.F=Ys.F,Tr.j=Math.round(Tr.j),255<Tr.j?Tr.j=255:0>Tr.j&&(Tr.j=0),Tr.u=Math.round(Tr.u),255<Tr.u?Tr.u=255:0>Tr.u&&(Tr.u=0),Tr.o=Math.round(Tr.o),255<Tr.o?Tr.o=255:0>Tr.o&&(Tr.o=0),"rgba("+Tr.j+", "+Tr.u+", "+Tr.o+", "+Tr.F+")";case nS:return av(),Yl.o=Math.min(100,Math.max(0,Yl.o+100*a)),"hsla("+Yl.j+", "+Yl.u+"%, "+Yl.o+"%, "+Yl.F+")";default:_t("Unknown color space: "+y)}}function qh(a){ug||(hv(),ug=!0);var y=cv;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,Tr.j=a[0],Tr.u=a[1],Tr.o=a[2],Tr.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Tr.j=0,Tr.u=0,Tr.o=0,Tr.F=1)}}function av(){var a=Tr.j/255,y=Tr.u/255,x=Tr.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),z=b-E;if(E=(b+E)/2,z===0)var tt=a=0;else{switch(b){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*E-1))}Yl.j=Math.round(tt),Yl.u=Math.round(100*a),Yl.o=Math.round(100*E),Yl.F=Tr.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>dv?Math.pow(a,1/3):(pm*a+16)/116}function eS(a){var y=a*a*a;return y>dv?y:(116*a-16)/pm}function wf(a,y){typeof a!="string"&&(a instanceof dr||_t("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){cv=ua?new vu(null,void 0,{willReadFrequently:!0}).context:null}Zt.Object.defineProperties(dr.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&nn(this,a),this.na=a,this.start.Mc()&&(a===td?this.start=ss:a===su&&(this.start=Zo)),this.end.Mc()&&(a===td?this.end=rl:a===su&&(this.end=Zo)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&nn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&nn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&nn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&nn(this,a),0>a&&cn(a,">= zero",dr,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&nn(this,a),0>a&&cn(a,">= zero",dr,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&nn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&nn(this,a),this.cr=a,this.xe=null}}}),dr.prototype.isDark=dr.prototype.Gx,dr.prototype.darkenBy=dr.prototype.Wy,dr.prototype.lightenBy=dr.prototype.Vz,dr.prototype.addColorStop=dr.prototype.addColorStop;var dv=216/24389,pm=24389/27,lg=[95.047,100,108.883],cv=null,Tr=new up,Yl=new up,Ys=new up,kh=new up,ug=!1;dr.className="Brush";var wd;dr.Solid=wd=new en(dr,"Solid",0);var td;dr.Linear=td=new en(dr,"Linear",1);var su;dr.Radial=su=new en(dr,"Radial",2);var hg;dr.Pattern=hg=new en(dr,"Pattern",4);var dg;dr.Lab=dg=new en(dr,"Lab",5);var nS;dr.HSL=nS=new en(dr,"HSL",6),dr.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var b=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},dr.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;ug||(hv(),ug=!0);var y=cv;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)},dr.lighten=function(a){return qy(a)},dr.lightenBy=qy,dr.darken=function(a){return tS(a)},dr.darkenBy=tS,dr.mix=rv,dr.isDark=ag;function Ka(){this.xa="Base"}Ka.prototype.measure=function(){},Ka.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Ka.prototype.arrange=function(){},Ka.prototype.Ly=function(a,y,x,b,E,z){a.arrange(y,x,b,E,z)},Ka.prototype.iA=function(a){a.Uj()},Ka.prototype.gc=function(){},Zt.Object.defineProperties(Ka.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Fn}}}),Ka.prototype.remeasureObject=Ka.prototype.iA,Ka.prototype.arrangeElement=Ka.prototype.Ly,Ka.prototype.measureElement=Ka.prototype.Yz,Ka.className="PanelLayout";function mm(){this.xa="Base"}Ae(mm,Ka),mm.prototype.measure=function(a,y,x,b,E,z,tt){var ot=b.length;a=ed(a);for(var rt=0;rt<ot;rt++){var lt=b[rt];if(lt.visible||lt===a){var ut=lt.margin,ft=ut.right+ut.left;ut=ut.top+ut.bottom,lt.measure(y,x,z,tt);var yt=lt.measuredBounds;ft=Math.max(yt.width+ft,0),ut=Math.max(yt.height+ut,0),yt=lt.position.x;var Pt=lt.position.y;isFinite(yt)||(yt=0),isFinite(Pt)||(Pt=0),lt instanceof yo&<.isGeometryPositioned&&(lt=lt.strokeWidth/2,yt-=lt,Pt-=lt),Go(E,yt,Pt,ft,ut)}}},mm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var z=y[E],tt=z.measuredBounds,ot=z.margin,rt=z.position.x,lt=z.position.y;if(rt=isNaN(rt)?-a:rt-a,lt=isNaN(lt)?-x:lt-x,z instanceof yo&&z.isGeometryPositioned){var ut=z.strokeWidth/2;rt-=ut,lt-=ut}z.visible&&z.arrange(rt+ot.left,lt+ot.top,tt.width,tt.height)}};function vm(){this.xa="Base"}Ae(vm,Ka),vm.prototype.measure=function(a,y,x,b,E,z,tt){var ot=b.length;y=Rn(),z=ed(a);for(var rt=0;rt<ot;rt++){var lt=b[rt];if(lt.visible||lt===z){var ut=hl(lt,!1);if(ut!==Cn&&ut!==Li)y.push(lt);else{lt.measure(1/0,x,0,tt),ut=lt.margin,lt=lt.measuredBounds;var ft=Math.max(lt.height+ut.top+ut.bottom,0);E.width+=Math.max(lt.width+ut.right+ut.left,0),E.height=Math.max(E.height,ft)}}}for(b=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):E.height!==0&&(x=Math.min(E.height,a.maxSize.height)),a=0;a<b;a++)rt=y[a],(rt.visible||rt===z)&&(ut=rt.margin,ot=ut.right+ut.left,ut=ut.top+ut.bottom,rt.measure(1/0,x,0,tt),rt=rt.measuredBounds,ut=Math.max(rt.height+ut,0),E.width+=Math.max(rt.width+ot,0),E.height=Math.max(E.height,ut));ni(y)},vm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.top,tt=a.isOpposite,ot=tt?x.width:E.left,rt=0;rt<b;rt++){var lt=z,ut=y[rt];if(ut.visible){var ft=ut.measuredBounds,yt=ut.margin,Pt=yt.top+yt.bottom,bt=z+E.bottom,Bt=ft.height,Jt=hl(ut,!1);(isNaN(ut.desiredSize.height)&&Jt===On||Jt===Ai)&&(Bt=Math.max(x.height-Pt-bt,0)),Pt=Bt+Pt+bt,bt=ut.alignment,bt.Xb()&&(bt=a.defaultAlignment),bt.sb()||(bt=Zo),tt&&(ot-=ft.width+yt.left+yt.right),ut.arrange(ot+bt.offsetX+yt.left,lt+bt.offsetY+yt.top+(x.height*bt.y-Pt*bt.y),ft.width,Bt),tt||(ot+=ft.width+yt.left+yt.right)}}};function ym(){this.xa="Base"}Ae(ym,Ka),ym.prototype.measure=function(a,y,x,b,E,z){var tt=b.length;x=Rn();for(var ot=ed(a),rt=0;rt<tt;rt++){var lt=b[rt];if(lt.visible||lt===ot){var ut=hl(lt,!1);if(ut!==Cn&&ut!==Ai)x.push(lt);else{var ft=lt.margin;ut=ft.right+ft.left,ft=ft.top+ft.bottom,lt.measure(y,1/0,z,0),lt=lt.measuredBounds,Jr(E,Math.max(E.width,Math.max(lt.width+ut,0)),E.height+Math.max(lt.height+ft,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)rt=x[a],(rt.visible||rt===ot)&&(lt=rt.margin,tt=lt.right+lt.left,lt=lt.top+lt.bottom,rt.measure(y,1/0,z,0),rt=rt.measuredBounds,lt=Math.max(rt.height+lt,0),E.width=Math.max(E.width,Math.max(rt.width+tt,0)),E.height+=lt);ni(x)}},ym.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.left,tt=a.isOpposite,ot=tt?x.height:E.top,rt=0;rt<b;rt++){var lt=z,ut=y[rt];if(ut.visible){var ft=ut.measuredBounds,yt=ut.margin,Pt=yt.left+yt.right,bt=z+E.right,Bt=ft.width,Jt=hl(ut,!1);(isNaN(ut.desiredSize.width)&&Jt===On||Jt===Li)&&(Bt=Math.max(x.width-Pt-bt,0)),Pt=Bt+Pt+bt,bt=ut.alignment,bt.Xb()&&(bt=a.defaultAlignment),bt.sb()||(bt=Zo),tt&&(ot-=ft.height+yt.bottom+yt.top),ut.arrange(lt+bt.offsetX+yt.left+(x.width*bt.x-Pt*bt.x),ot+bt.offsetY+yt.top,Bt,ft.height),tt||(ot+=ft.height+yt.bottom+yt.top)}}};function Sm(){this.xa="Base"}Ae(Sm,Ka),Sm.prototype.measure=function(a,y,x,b,E,z,tt){var ot=b.length,rt=a.Pb(),lt=rt.margin,ut=lt.right+lt.left,ft=lt.top+lt.bottom;rt.measure(y,x,z,tt);var yt=rt.measuredBounds;z=yt.width,tt=yt.height;var Pt=Math.max(z+ut,0),bt=Math.max(tt+ft,0),Bt=a.isClipping,Jt=an.allocAt(-lt.left,-lt.top,Pt,bt),Gt=an.allocAt(0,0,z,tt);fv(rt,Gt,!0),z=Gt.width,tt=Gt.height;for(var se=!0,ue=ed(a),ge=0;ge<ot;ge++){var be=b[ge];yt=y;var We=x;if(be!==rt&&(be.visible||be===ue)){lt=be.margin;var Un=lt.left,pi=lt.top;switch(Pt=lt.right+lt.left,bt=lt.top+lt.bottom,lt=hl(be,!1),lt){case On:yt=z,We=tt,pi=Un=bt=Pt=0;break;case Li:yt=z,Un=Pt=0;break;case Ai:We=tt,pi=bt=0}be.measure(yt,We,0,0),yt=be.measuredBounds,Pt=Math.max(yt.width+Pt,0),bt=Math.max(yt.height+bt,0),lt=be.alignment,lt.Xb()&&(lt=a.defaultAlignment),lt.sb()||(lt=Zo);var ui=be.alignmentFocus;if(ui.Xb()&&(ui=Zo),We=null,be instanceof Fn&&be.$e!==""&&(We=be.fb(be.$e),We===be&&(We=null)),Un=Gt.x-Un,pi=Gt.y-pi,We!==null){for(be.arrange(0,0,yt.width,yt.height),yt=We.actualBounds,yt=$t.allocAt(yt.x+(ui.x*yt.width-ui.offsetX),yt.y+(ui.y*yt.height-ui.offsetY)),We=We.panel;We!==be;)We.transform.Ga(yt),We=We.panel;Un+=lt.x*z+lt.offsetX-yt.x,pi+=lt.y*tt+lt.offsetY-yt.y,$t.free(yt)}else Un+=lt.x*z+lt.offsetX-(ui.x*yt.width+ui.offsetX),pi+=lt.y*tt+lt.offsetY-(ui.y*yt.height+ui.offsetY);se?(se=!1,E.h(Un,pi,Pt,bt)):Go(E,Un,pi,Pt,bt)}}switch(se?E.assign(Jt):Bt?E.Uu(Gt.x,Gt.y,Gt.width,Gt.height):Go(E,Jt.x,Jt.y,Jt.width,Jt.height),an.free(Jt),an.free(Gt),lt=rt.stretch,lt===so&&(lt=hl(rt,!1)),lt){case Cn:return;case On:if(!isFinite(y)&&!isFinite(x))return;break;case Li:if(!isFinite(y))return;break;case Ai:if(!isFinite(x))return}for(yt=rt.measuredBounds,z=yt.width,tt=yt.height,Pt=Math.max(z+ut,0),bt=Math.max(tt+ft,0),lt=rt.margin,Gt=an.allocAt(-lt.left,-lt.top,Pt,bt),fv(rt,Gt,!0),z=Gt.width,tt=Gt.height,y=0;y<ot;y++)x=b[y],x===rt||!x.visible&&x!==ue||(lt=x.margin,Pt=lt.right+lt.left,bt=lt.top+lt.bottom,yt=x.measuredBounds,Pt=Math.max(yt.width+Pt,0),bt=Math.max(yt.height+bt,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=Zo),x=x.alignmentFocus,x.Xb()&&(x=Zo),se?(se=!1,E.h(ut.x*z+ut.offsetX-(x.x*yt.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*yt.height+x.offsetY)-lt.top,Pt,bt)):Go(E,ut.x*z+ut.offsetX-(x.x*yt.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*yt.height+x.offsetY)-lt.top,Pt,bt));se?E.assign(Jt):Bt?E.Uu(Gt.x,Gt.y,Gt.width,Gt.height):Go(E,Jt.x,Jt.y,Jt.width,Jt.height),an.free(Gt)},Sm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),z=E.measuredBounds,tt=z.width,ot=z.height,rt=a.padding;z=rt.left,rt=rt.top;var lt=z-x.x,ut=rt-x.y;for(E.arrange(lt,ut,tt,ot),tt=an.allocAt(0,0,tt,ot),fv(E,tt,!1),ot=0;ot<b;ot++){var ft=y[ot];if(ft!==E){lt=ft.measuredBounds;var yt=lt.width,Pt=lt.height;ut=ft.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=Zo);var bt=ft.alignmentFocus;if(bt.Xb()&&(bt=Zo),lt=null,ft instanceof Fn&&ft.$e!==""&&(lt=ft.fb(ft.$e),lt===ft&&(lt=null)),lt!==null){var Bt=lt.actualBounds;for(bt=$t.allocAt(Bt.x+(bt.x*Bt.width-bt.offsetX),Bt.y+(bt.y*Bt.height-bt.offsetY)),lt=lt.panel;lt!==ft;)lt.transform.Ga(bt),lt=lt.panel;lt=ut.x*tt.width+ut.offsetX-bt.x,ut=ut.y*tt.height+ut.offsetY-bt.y,$t.free(bt)}else lt=ut.x*tt.width+ut.offsetX-(bt.x*yt+bt.offsetX),ut=ut.y*tt.height+ut.offsetY-(bt.y*Pt+bt.offsetY);lt+=tt.x-x.x,ut+=tt.y-x.y,ft.visible&&ft.arrange(z+lt,rt+ut,yt,Pt)}}an.free(tt)};function fv(a,y,x){var b=null;if(a instanceof Fn&&a.$e!==""&&(b=a.fb(a.$e),b===a&&(b=null)),b!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(b.actualBounds),b=b.panel;b!==a;)b.transform.pp(y),b=b.panel}function xm(){this.xa="Base"}Ae(xm,Ka),xm.prototype.measure=function(a,y,x,b,E,z,tt){var ot=b.length,rt=a.Pb(),lt=rt.margin,ut=y,ft=x,yt=lt.right+lt.left,Pt=lt.top+lt.bottom;rt.measure(y,x,z,tt),lt=rt.measuredBounds;var bt=0,Bt=null;rt instanceof yo&&(Bt=rt,bt=Bt.strokeWidth*Bt.scale);var Jt=Math.max(lt.width+yt,0);lt=Math.max(lt.height+Pt,0);var Gt=vv(rt),se=Gt.x*Jt+Gt.offsetX;Gt=Gt.y*lt+Gt.offsetY;var ue=yv(rt),ge=ue.x*Jt+ue.offsetX;for(ue=ue.y*lt+ue.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(se-ge)-bt,0)),isFinite(x)&&(ft=Math.max(Math.abs(Gt-ue)-bt,0)),bt=Zn.alloc(),bt.h(0,0),a=ed(a),ue=0;ue<ot;ue++)Gt=b[ue],Gt===rt||!Gt.visible&&Gt!==a||(lt=Gt.margin,Jt=lt.right+lt.left,se=lt.top+lt.bottom,Gt.measure(ut,ft,0,0),lt=Gt.measuredBounds,Jt=Math.max(lt.width+Jt,0),lt=Math.max(lt.height+se,0),bt.h(Math.max(Jt,bt.width),Math.max(lt,bt.height)));if(ot===1)E.width=Jt,E.height=lt,Zn.free(bt);else{switch(Gt=vv(rt),ue=yv(rt),ot=b=0,ue.x!==Gt.x&&ue.y!==Gt.y&&(b=bt.width/Math.abs(ue.x-Gt.x),ot=bt.height/Math.abs(ue.y-Gt.y)),Zn.free(bt),bt=0,Bt!==null&&(bt=Bt.strokeWidth*Bt.scale,bv(Bt)===wi&&(b=ot=Math.max(b,ot))),b+=Math.abs(Gt.offsetX)+Math.abs(ue.offsetX)+bt,ot+=Math.abs(Gt.offsetY)+Math.abs(ue.offsetY)+bt,Bt=rt.stretch,Bt===so&&(Bt=hl(rt,!1)),Bt){case Cn:tt=z=0;break;case On:isFinite(y)&&(b=y),isFinite(x)&&(ot=x);break;case Li:isFinite(y)&&(b=y),tt=0;break;case Ai:z=0,isFinite(x)&&(ot=x)}rt.Uj(),rt.measure(b,ot,z,tt),E.width=rt.measuredBounds.width+yt,E.height=rt.measuredBounds.height+Pt}},xm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,z=an.alloc();z.h(0,0,1,1);var tt=b.margin,ot=tt.left;tt=tt.top;var rt=a.padding,lt=rt.left;rt=rt.top,b.arrange(lt+ot,rt+tt,E.width,E.height);var ut=vv(b),ft=yv(b),yt=ut.y*E.height+ut.offsetY,Pt=ft.x*E.width+ft.offsetX;for(ft=ft.y*E.height+ft.offsetY,z.x=ut.x*E.width+ut.offsetX,z.y=yt,Go(z,Pt,ft,0,0),z.x+=ot+lt,z.y+=tt+rt,E=0;E<x;E++)ot=y[E],ot!==b&&(lt=ot.measuredBounds,tt=ot.margin,rt=Math.max(lt.width+tt.right+tt.left,0),ut=Math.max(lt.height+tt.top+tt.bottom,0),yt=ot.alignment,yt.Xb()&&(yt=a.defaultAlignment),yt.sb()||(yt=Zo),rt=z.width*yt.x+yt.offsetX-rt*yt.x+tt.left+z.x,tt=z.height*yt.y+yt.offsetY-ut*yt.y+tt.top+z.y,ot.visible&&(fr(z.x,z.y,z.width,z.height,rt,tt,lt.width,lt.height)?ot.arrange(rt,tt,lt.width,lt.height):ot.arrange(rt,tt,lt.width,lt.height,new an(z.x,z.y,z.width,z.height))));an.free(z)};function Pm(){this.xa="Base",this.name="Table"}Ae(Pm,Ka),Pm.prototype.measure=function(a,y,x,b,E){for(var z=b.length,tt=Rn(),ot=Rn(),rt=0;rt<z;rt++){var lt=b[rt],ut=lt instanceof Fn?lt:null;if(ut!==null&&Cd(ut)&<.visible){ot.push(ut);for(var ft=ut.O.s,yt=ft.length,Pt=0;Pt<yt;Pt++){var bt=ft[Pt];ut.type===Fn.TableRow?bt.row=lt.row:ut.type===Fn.TableColumn&&(bt.column=lt.column),tt.push(bt)}}else tt.push(lt)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Bt=[],Jt=0;Jt<z;Jt++){var Gt=tt[Jt];Gt.visible&&(za(Gt,!0),Mh(Gt,!0),Bt[Gt.row]||(Bt[Gt.row]=[]),Bt[Gt.row][Gt.column]||(Bt[Gt.row][Gt.column]=[]),Bt[Gt.row][Gt.column].push(Gt))}ni(tt);var se=Rn(),ue=Rn(),ge=Rn(),be={count:0},We={count:0},Un=y,pi=x,ui=a.rowDefs,zn=a.colDefs,xn=null;z=ui.length;for(var eo=0;eo<z;eo++)xn=ui[eo],xn!==void 0&&(xn.actual=0);z=zn.length;for(var _i=0;_i<z;_i++)xn=zn[_i],xn!==void 0&&(xn.actual=0);for(var nr=Bt.length,Er=0,Qa=0;Qa<nr;Qa++)Bt[Qa]&&(Er=Math.max(Er,Bt[Qa].length));var is=Math.min(a.topIndex,nr-1),Hs=Math.min(a.leftIndex,Er-1),qa=0;nr=Bt.length;for(var Id=ed(a),ka=0;ka<nr;ka++)if(Bt[ka]){Er=Bt[ka].length;var Qu=a.Fb(ka);Qu.actual=0;for(var Gs=Qu.oc=0;Gs<Er;Gs++)if(Bt[ka][Gs]){var Bd=a.Eb(Gs);se[Gs]===void 0&&(Bd.actual=0,Bd.oc=0,se[Gs]=!0);for(var Ql=Bt[ka][Gs],Pu=Ql.length,Fl=0;Fl<Pu;Fl++){var wl=Ql[Fl];if(wl.visible||wl===Id){var cc=1<wl.rowSpan||1<wl.columnSpan;cc&&(ka<is||Gs<Hs||ue.push(wl));var qu=wl.margin,Bg=qu.right+qu.left,Il=qu.top+qu.bottom,$s=Vu(wl,Qu,Bd,!1),Xp=wl.desiredSize,Bf=!isNaN(Xp.height),dh=!isNaN(Xp.width)&&Bf;if(cc||$s===Cn||dh||ka<is||Gs<Hs||(be[Gs]!==void 0||$s!==On&&$s!==Li||(be[Gs]=-1,be.count++),We[ka]!==void 0||$s!==On&&$s!==Ai||(We[ka]=-1,We.count++),ge.push(wl)),wl.measure(1/0,1/0,0,0),!(ka<is||Gs<Hs)){var Cl=wl.measuredBounds,Jc=Math.max(Cl.width+Bg,0),Bl=Math.max(Cl.height+Il,0);if(wl.rowSpan===1&&($s===Cn||$s===Li)){xn=a.Fb(ka);var fc=xn.Wc();qa=Math.max(Bl-xn.actual,0),qa+fc>pi&&(qa=Math.max(pi-fc,0));var W0=xn.oa===0;xn.oc=xn.oc+qa,xn.actual=xn.oa+qa,pi=Math.max(pi-(qa+(W0?fc:0)),0)}if(wl.columnSpan===1&&($s===Cn||$s===Ai)){xn=a.Eb(Gs);var Jp=xn.Wc();qa=Math.max(Jc-xn.actual,0),qa+Jp>Un&&(qa=Math.max(Un-Jp,0));var Hy=xn.oa===0;xn.oc=xn.oc+qa,xn.actual=xn.oa+qa,Un=Math.max(Un-(qa+(Hy?Jp:0)),0)}cc&&wl.Uj()}}}}}ni(se);var Rh=0,od=0;z=a.columnCount;for(var Df=0;Df<z;Df++){var gc=zn[Df];gc!==void 0&&(Rh+=isNaN(gc.Hc)?gc.oc:gc.Hc,gc.oc!==0&&(Rh+=gc.Wc()))}z=a.rowCount;for(var Dg=0;Dg<z;Dg++){var pc=ui[Dg];pc!==void 0&&(od+=isNaN(pc.Hc)?pc.oc:pc.Hc,pc.oc!==0&&(od+=pc.Wc()))}Un=Math.max(y-Rh,0);var zh=pi=Math.max(x-od,0),Dd=Un;z=ge.length;for(var bl=0;bl<z;bl++){var ch=ge[bl],K0=a.Fb(ch.row),rd=a.Eb(ch.column),Ag=ch.measuredBounds,th=ch.margin,Qc=th.right+th.left,fh=th.top+th.bottom;be[ch.column]=rd.oc===0&&be[ch.column]!==void 0?Math.max(Ag.width+Qc,be[ch.column]):null,We[ch.row]=K0.oc===0&&We[ch.row]!==void 0?Math.max(Ag.height+fh,We[ch.row]):null}var Af=0,Rg=0,Du;for(Du in We)Du!=="count"&&(Af+=We[Du]);for(Du in be)Du!=="count"&&(Rg+=be[Du]);for(var gs=Zn.alloc(),Qp=0;Qp<z;Qp++){var nl=ge[Qp];if(nl.visible||nl===Id){var Na=a.Fb(nl.row),il=a.Eb(nl.column),ad=0;isFinite(il.width)?ad=il.width:(isFinite(Un)&&be[nl.column]!==null?Rg===0?ad=il.actual+Un:ad=be[nl.column]/Rg*Dd:be[nl.column]!==null?ad=Un:ad=il.actual||Un,ad=Math.max(0,ad-il.Wc()));var Ad=0;switch(isFinite(Na.height)?Ad=Na.height:(isFinite(pi)&&We[nl.row]!==null?Af===0?Ad=Na.actual+pi:Ad=We[nl.row]/Af*zh:We[nl.row]!==null?Ad=pi:Ad=Na.actual||pi,Ad=Math.max(0,Ad-Na.Wc())),gs.h(Math.max(il.minimum,Math.min(ad,il.maximum)),Math.max(Na.minimum,Math.min(Ad,Na.maximum))),$s=Vu(nl,Na,il,!1),$s){case Li:gs.height=Math.max(gs.height,Na.actual+pi);break;case Ai:gs.width=Math.max(gs.width,il.actual+Un)}var qc=nl.margin,Gy=qc.right+qc.left,_0=qc.top+qc.bottom;nl.Uj(),nl.measure(gs.width,gs.height,il.minimum,Na.minimum);var zg=nl.measuredBounds,tf=Math.max(zg.width+Gy,0),Rf=Math.max(zg.height+_0,0);isFinite(Un)&&(tf=Math.min(tf,gs.width)),isFinite(pi)&&(Rf=Math.min(Rf,gs.height));var El=0;El=Na.actual,Na.actual=Math.max(Na.actual,Rf),Na.oc=Math.max(Na.oc,Rf),qa=Na.actual-El,pi=Math.max(pi-qa,0),We[nl.row]===null&&(zh=Math.max(zh-qa,0)),El=il.actual,il.actual=Math.max(il.actual,tf),il.oc=Math.max(il.oc,tf),qa=il.actual-El,Un=Math.max(Un-qa,0),be[nl.column]===null&&(Dd=Math.max(Dd-qa,0))}}ni(ge);var sd=Zn.alloc(),eh=Rn(),cu=Rn();if(z=ue.length,z!==0){for(var mc=0;mc<nr;mc++)if(Bt[mc]){Er=Bt[mc].length;var jg=a.Fb(mc);eh[mc]=jg.actual;for(var vc=0;vc<Er;vc++)if(Bt[mc][vc]){var V0=a.Eb(vc);cu[vc]=V0.actual}}}for(var Hg=0;Hg<z;Hg++){var ga=ue[Hg];if(ga.visible||ga===Id){var Au=a.Fb(ga.row),wu=a.Eb(ga.column);switch(gs.h(Math.max(wu.minimum,Math.min(y,wu.maximum)),Math.max(Au.minimum,Math.min(x,Au.maximum))),$s=Vu(ga,Au,wu,!1),$s){case On:cu[wu.index]!==0&&(gs.width=Math.min(gs.width,cu[wu.index])),eh[Au.index]!==0&&(gs.height=Math.min(gs.height,eh[Au.index]));break;case Li:cu[wu.index]!==0&&(gs.width=Math.min(gs.width,cu[wu.index]));break;case Ai:eh[Au.index]!==0&&(gs.height=Math.min(gs.height,eh[Au.index]))}isFinite(wu.width)&&(gs.width=wu.width),isFinite(Au.height)&&(gs.height=Au.height),sd.h(0,0);for(var U0=wu.minimum,Dl=Au.minimum,Rd=1;Rd<ga.rowSpan&&!(ga.row+Rd>=a.rowCount);Rd++)xn=a.Fb(ga.row+Rd),qa=0,qa=$s===On||$s===Ai?Math.max(xn.minimum,eh[ga.row+Rd]===0?xn.maximum:Math.min(eh[ga.row+Rd],xn.maximum)):Math.max(xn.minimum,isNaN(xn.Hc)?xn.maximum:Math.min(xn.Hc,xn.maximum)),sd.height+=qa,Dl+=xn.minimum;for(var Cu=1;Cu<ga.columnSpan&&!(ga.column+Cu>=a.columnCount);Cu++)xn=a.Eb(ga.column+Cu),qa=0,qa=$s===On||$s===Li?Math.max(xn.minimum,cu[ga.column+Cu]===0?xn.maximum:Math.min(cu[ga.column+Cu],xn.maximum)):Math.max(xn.minimum,isNaN(xn.Hc)?xn.maximum:Math.min(xn.Hc,xn.maximum)),sd.width+=qa,U0+=xn.minimum;gs.width+=sd.width,gs.height+=sd.height;var Gg=ga.margin,yc=Gg.right+Gg.left,qp=Gg.top+Gg.bottom;ga.measure(gs.width,gs.height,U0,Dl);for(var $g=ga.measuredBounds,gh=Math.max($g.width+yc,0),ef=Math.max($g.height+qp,0),Sc=0,Zg=0;Zg<ga.rowSpan&&!(ga.row+Zg>=a.rowCount);Zg++)xn=a.Fb(ga.row+Zg),Sc+=xn.total||0;if(Sc<ef){var zd=ef-Sc,jh=ef-Sc;if(ga.spanAllocation!==null)for(var jd=ga.spanAllocation,ld=0;ld<ga.rowSpan&&!(0>=zd)&&!(ga.row+ld>=a.rowCount);ld++){xn=a.Fb(ga.row+ld);var Hd=xn.oa||0,nf=jd(ga,xn,jh);xn.actual=Math.min(xn.maximum,Hd+nf),xn.oa!==Hd&&(zd-=xn.oa-Hd)}for(;0<zd;){var nh=xn.oa||0;if(isNaN(xn.height)&&xn.maximum>nh&&(xn.actual=Math.min(xn.maximum,nh+zd),xn.oa!==nh&&(zd-=xn.oa-nh)),xn.index===0)break;xn=a.Fb(xn.index-1)}}for(var zf=0,Gd=0;Gd<ga.columnSpan&&!(ga.column+Gd>=a.columnCount);Gd++)xn=a.Eb(ga.column+Gd),zf+=xn.total||0;if(zf<gh){var jf=gh-zf,$y=gh-zf;if(ga.spanAllocation!==null)for(var ud=ga.spanAllocation,of=0;of<ga.columnSpan&&!(0>=jf)&&!(ga.column+of>=a.columnCount);of++){xn=a.Eb(ga.column+of);var tm=xn.oa||0,Zy=ud(ga,xn,$y);xn.actual=Math.min(xn.maximum,tm+Zy),xn.oa!==tm&&(jf-=xn.oa-tm)}for(;0<jf;){var Y0=xn.oa||0;if(isNaN(xn.width)&&xn.maximum>Y0&&(xn.actual=Math.min(xn.maximum,Y0+jf),xn.oa!==Y0&&(jf-=xn.oa-Y0)),xn.index===0)break;xn=a.Eb(xn.index-1)}}}}ni(ue),Zn.free(sd),Zn.free(gs),eh!==void 0&&ni(eh),cu!==void 0&&ni(cu);var Hf=0,Gf=0,X0=a.desiredSize,gx=a.maxSize;$s=hl(a,!0);var em=od=Rh=0,nm=0;z=a.columnCount;for(var J0=0;J0<z;J0++)zn[J0]!==void 0&&(xn=a.Eb(J0),isFinite(xn.width)?(em+=xn.width,em+=xn.Wc()):Om(xn)===fp?(em+=xn.oa,em+=xn.Wc()):xn.oa!==0&&(Rh+=xn.oa,Rh+=xn.Wc()));isFinite(X0.width)?Hf=Math.min(X0.width,gx.width):Hf=$s!==Cn&&isFinite(y)?y:Rh,Hf=Math.max(Hf,a.minSize.width),Hf=Math.max(Hf-em,0);for(var Jx=Rh===0?1:Math.max(Hf/Rh,1),Q0=0;Q0<z;Q0++)zn[Q0]!==void 0&&(xn=a.Eb(Q0),isFinite(xn.width)||Om(xn)===fp||(xn.actual=xn.oa*Jx),xn.position=E.width,xn.oa!==0&&(E.width+=xn.oa,E.width+=xn.Wc()));z=a.rowCount;for(var q0=0;q0<z;q0++)ui[q0]!==void 0&&(xn=a.Fb(q0),isFinite(xn.height)?(nm+=xn.height,nm+=xn.Wc()):Om(xn)===fp?(nm+=xn.oa,nm+=xn.Wc()):xn.oa!==0&&(od+=xn.oa,od+=xn.Wc()));isFinite(X0.height)?Gf=Math.min(X0.height,gx.height):Gf=$s!==Cn&&isFinite(x)?x:od,Gf=Math.max(Gf,a.minSize.height),Gf=Math.max(Gf-nm,0);for(var Qx=od===0?1:Math.max(Gf/od,1),tv=0;tv<z;tv++)ui[tv]!==void 0&&(xn=a.Fb(tv),isFinite(xn.height)||Om(xn)===fp||(xn.actual=xn.oa*Qx),xn.position=E.height,xn.oa!==0&&(E.height+=xn.oa,E.height+=xn.Wc()));z=ot.length;for(var Wy=0;Wy<z;Wy++){var im=ot[Wy],Ky=0,_y=0;im.type===Fn.TableRow?(Ky=E.width,xn=a.Fb(im.row),_y=xn.actual):(xn=a.Eb(im.column),Ky=xn.actual,_y=E.height),im.measuredBounds.h(0,0,Ky,_y),za(im,!1)}ni(ot),a.inRowsCols=Bt},Pm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,z=E.left;E=E.top;var tt=a.inRowsCols;if(tt!==null){for(var ot,rt,lt=tt.length,ut=0,ft=0;ft<lt;ft++)tt[ft]&&(ut=Math.max(ut,tt[ft].length));rt=a.rowDefs,ot=a.colDefs;var yt=ft=0,Pt=Math.min(a.topIndex,lt-1);if(0<rt.length){for(;Pt!==lt&&(rt[Pt]===void 0||rt[Pt].oa===0);)Pt++;Pt=Math.max(Math.min(Pt,lt-1),0),ft=-rt[Pt].position}var bt=Math.min(a.leftIndex,ut-1);if(0<ot.length){for(;bt!==ut&&(ot[bt]===void 0||ot[bt].oa===0);)bt++;bt=Math.max(Math.min(bt,ut-1),0),yt=-ot[bt].position}for(var Bt=0,Jt=0;Bt!==lt&&rt[Bt]===void 0;)Bt++;for(;Jt!==lt&&ot[Jt]===void 0;)Jt++;ut=a.part,a.Fb(Bt),a.Eb(Jt);for(var Gt=0;Gt<y.length;Gt++){var se=y[Gt];if(se instanceof Fn&&se.visible&&Cd(se)){if(se.type===Fn.TableRow){ot=a.Fb(se.row);var ue=a.Eb(Jt)}else ot=a.Fb(Bt),ue=a.Eb(se.column);rt=ot.position+ft+E,ot.oa!==0&&(rt+=ot.Io(Math.max(Bt,Pt))),ot=ue.position+yt+z,ue.oa!==0&&(ot+=ue.Io(Math.max(Jt,bt))),ue=se.measuredBounds,se.Uk(),se.actualBounds.ka();var ge=se.actualBounds,be=an.allocAt(ge.x,ge.y,ge.width,ge.height);ge.x=se.type===Fn.TableRow?z:ot,ge.y=se.type===Fn.TableColumn?E:rt,ge.width=ue.width,ge.height=ue.height,se.actualBounds.freeze(),Mh(se,!1),Ds(be,ge)||ut===null||(ut.oh(),se.Pn(ut)),an.free(be)}}for(Gt=Zn.alloc(),se=0;se<lt;se++)if(tt[se]){for(ut=tt[se].length,ue=a.Fb(se),rt=ue.position+ft+E,ue.oa!==0&&(rt+=ue.Io(Math.max(Bt,Pt))),ge=0;ge<ut;ge++)if(tt[se][ge]){be=a.Eb(ge),ot=be.position+yt+z,be.oa!==0&&(ot+=be.Io(Math.max(Jt,bt)));for(var We=tt[se][ge],Un=We.length,pi=0;pi<Un;pi++){var ui=We[pi],zn=ui.measuredBounds;Gt.h(0,0);for(var xn=1;xn<ui.rowSpan&&!(se+xn>=a.rowCount);xn++){var eo=a.Fb(se+xn);eo.oa!==0&&(Gt.height+=eo.total)}for(xn=1;xn<ui.columnSpan&&!(ge+xn>=a.columnCount);xn++)eo=a.Eb(ge+xn),eo.oa!==0&&(Gt.width+=eo.total);var _i=be.oa+Gt.width,nr=ue.oa+Gt.height;xn=ot,eo=rt;var Er=_i,Qa=nr,is=ot,Hs=rt,qa=_i,Id=nr;ot+_i>x.width&&(qa=Math.max(x.width-ot,0)),rt+nr>x.height&&(Id=Math.max(x.height-rt,0));var ka=ui.alignment;if(ka.Xb()){ka=a.defaultAlignment,ka.sb()||(ka=Zo);var Qu=ka.x,Gs=ka.y,Bd=ka.offsetX;ka=ka.offsetY;var Ql=be.alignment,Pu=ue.alignment;Ql.sb()&&(Qu=Ql.x,Bd=Ql.offsetX),Pu.sb()&&(Gs=Pu.y,ka=Pu.offsetY)}else Qu=ka.x,Gs=ka.y,Bd=ka.offsetX,ka=ka.offsetY;(isNaN(Qu)||isNaN(Gs))&&(Gs=Qu=.5,ka=Bd=0),Ql=zn.width,Pu=zn.height;var Fl=ui.margin,wl=Fl.left+Fl.right,cc=Fl.top+Fl.bottom,qu=Vu(ui,ue,be,!1);!isNaN(ui.desiredSize.width)||qu!==On&&qu!==Li||(Ql=Math.max(_i-wl,0)),!isNaN(ui.desiredSize.height)||qu!==On&&qu!==Ai||(Pu=Math.max(nr-cc,0)),_i=ui.maxSize,nr=ui.minSize,Ql=Math.min(_i.width,Ql),Pu=Math.min(_i.height,Pu),Ql=Math.max(nr.width,Ql),Pu=Math.max(nr.height,Pu),_i=Pu+cc,xn+=Er*Qu-(Ql+wl)*Qu+Bd+Fl.left,eo+=Qa*Gs-_i*Gs+ka+Fl.top,ui.visible&&(fr(is,Hs,qa,Id,xn,eo,zn.width,zn.height)?ui.arrange(xn,eo,Ql,Pu):ui.arrange(xn,eo,Ql,Pu,new an(is,Hs,qa,Id)))}}}for(Zn.free(Gt),a=0;a<b;a++)x=y[a],z=x instanceof Fn?x:null,z!==null&&Cd(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function wm(){this.xa="Base"}Ae(wm,Ka),wm.prototype.measure=function(){},wm.prototype.arrange=function(){};function Cm(){this.xa="Base"}Ae(Cm,Ka),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function bm(){this.xa="Base"}Ae(bm,Ka),bm.prototype.measure=function(a,y,x,b,E,z,tt){1<b.length&&_t("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,z,tt);var ot=b.measuredBounds,rt=b.margin,lt=rt.right+rt.left;if(rt=rt.top+rt.bottom,isFinite(y)||isFinite(x)){var ut=b.scale,ft=ot.width;ot=ot.height;var yt=Math.max(y-lt,0),Pt=Math.max(x-rt,0),bt=1;a.viewboxStretch===wi?ft!==0&&ot!==0&&(bt=Math.min(yt/ft,Pt/ot)):ft!==0&&ot!==0&&(bt=Math.max(yt/ft,Pt/ot)),bt===0&&(bt=1e-4),b.Ca*=bt,ut!==b.scale&&(za(b,!0),b.measure(1/0,1/0,z,tt))}ot=b.measuredBounds,E.width=isFinite(y)?y:Math.max(ot.width+lt,0),E.height=isFinite(x)?x:Math.max(ot.height+rt,0)},bm.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,z=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=Zo),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-E*tt.y+tt.offsetY,b.width,b.height)};function hp(){this.xa="Base"}Ae(hp,Ka),hp.prototype.measure=function(){},hp.prototype.arrange=function(){},hp.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var z=a.naturalBounds,tt=a.actualBounds,ot=z.width,rt=z.height,lt=Math.ceil(ot/E),ut=Math.ceil(rt/b),ft=a.gridOrigin,yt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,ot,rt),y.clip(),y.Se();for(var Pt=[],bt=a.O.s,Bt=bt.length,Jt=0;Jt<Bt;Jt++){var Gt=bt[Jt],se=[];if(Pt.push(se),Gt.visible){var ue=Gt.interval;if(!(0>ue)){Gt=pv(Gt.figure);for(var ge=0;ge<Bt;ge++)if(ge!==Jt){var be=bt[ge];be.visible&&pv(be.figure)===Gt&&(be=be.interval,be>ue&&se.push(be))}}}}for(bt=a.O.s,Bt=bt.length,Jt=0;Jt<Bt;Jt++){var We=bt[Jt];if(We.visible&&(se=We.interval||1,Gt=Math.abs(se),!(2>E*Gt*x))){if(ue=We.segmentIndex,(!isFinite(ue)||isNaN(ue))&&(ue=0),0>ue&&(ue=Gt-Math.min(-ue,Gt)),ue=Math.round(ue%Gt),Gt=We.opacity,ge=1,Gt!==1){if(Gt===0)continue;ge=y.globalAlpha,y.globalAlpha=ge*Gt}be=Pt[Jt];var Un=!1,pi=We.strokeDashArray;if(pi!==null&&(Un=!0,y.js(pi,We.strokeDashOffset)),We.figure==="LineV"&&We.stroke!==null&&0<We.strokeWidth){for(y.lineWidth=We.strokeWidth,fa(a,y,We.stroke,!1,!1,z,tt),y.beginPath(),pi=We=Math.floor((yt-E)/E);pi<=We+lt;pi++){var ui=pi*E+yt;0<=ui&&ui<=ot&&Em(pi,se,ue,be)&&(y.moveTo(ui,0),y.lineTo(ui,rt))}y.stroke(),y.Se()}else if(We.figure==="LineH"&&We.stroke!==null&&0<We.strokeWidth){for(y.lineWidth=We.strokeWidth,fa(a,y,We.stroke,!1,!1,z,tt),y.beginPath(),pi=We=Math.floor((ft-b)/b);pi<=We+ut;pi++)ui=pi*b+ft,0<=ui&&ui<=rt&&Em(pi,se,ue,be)&&(y.moveTo(0,ui),y.lineTo(ot,ui));y.stroke(),y.Se()}else if(We.figure==="BarV"&&We.fill!==null)for(fa(a,y,We.fill,!0,!1,z,tt),We=We.width,isNaN(We)&&(We=E),ui=pi=Math.floor((yt-E)/E);ui<=pi+lt;ui++){var zn=ui*E+yt;0<=zn+We&&zn<=ot&&Em(ui,se,ue,be)&&y.fillRect(zn,0,We,rt)}else if(We.figure==="BarH"&&We.fill!==null)for(fa(a,y,We.fill,!0,!1,z,tt),We=We.height,isNaN(We)&&(We=b),ui=pi=Math.floor((ft-b)/b);ui<=pi+ut;ui++)zn=ui*b+ft,0<=zn+We&&zn<=rt&&Em(ui,se,ue,be)&&y.fillRect(0,zn,ot,We);Un&&y.fs(),Gt!==1&&(y.globalAlpha=ge)}}y.restore(),y.Vc(!1)};function Em(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function Mm(){this.xa="Base"}Ae(Mm,Ka),Mm.prototype.measure=function(a,y,x,b,E){var z=b.length;if(a instanceof Qo||a instanceof jn){var tt=null,ot=null;if(a instanceof jn&&(tt=a),a instanceof Qo&&(ot=a,tt=ot.adornedPart,a.j===null&&(a.j=[])),tt instanceof jn){var rt=tt;if(z===0)Jr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var lt=a instanceof Qo?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ut=rt.points,ft=tt.pointsCount;ot!==null?ot.Ul(!1):tt!==null&&tt.Ul(!1),ot=y.width;var yt=y.height,Pt=a.j;if(Pt.length=0,lt!==null){iS(a,ot,yt,lt);var bt=lt.measuredBounds;x.ed(bt),Pt.push(bt)}bt=Po.alloc();for(var Bt=$t.alloc(),Jt=$t.alloc(),Gt=0;Gt<z;Gt++){var se=b[Gt];if(se!==lt)if(se.isPanelMain&&se instanceof yo){iS(a,ot,yt,se);var ue=se.measuredBounds;x.ed(ue),Pt.push(ue)}else if(2>ft)se.measure(1/0,1/0,0,0),ue=se.measuredBounds,x.ed(ue),Pt.push(ue);else{var ge=se.segmentIndex,be=se.segmentFraction,We=se.alignmentFocus;We.Mc()&&(We=Zo);var Un=se.segmentOrientation,pi=se.segmentOffset;if(isNaN(ge)){var ui=rt.ua;ue=Rn(),ui.Qu(be,ue);var zn=$t.allocAt(ue[0],ue[1]);if(zn.add(rt.i(0)),ui.type===$n.j?zn.offset(-ui.startX,-ui.startY):(ui=ui.figures.first(),ui!==null&&zn.offset(-ui.startX,-ui.startY)),ui=ue[2],Un!==Js){var xn=rt.computeAngle(se,Un,ui);se.Kb=xn}xn=zn.x-y.x;var eo=zn.y-y.y;$t.free(zn),ni(ue)}else if(ge<-ft||ge>=ft)ue=$t.alloc(),rt.vg(),rt.computeMidPoint(ue),ui=rt.midAngle,Un!==Js&&(xn=rt.computeAngle(se,Un,ui),se.Kb=xn),xn=ue.x-y.x,eo=ue.y-y.y,$t.free(ue);else{if(xn=0,0<=ge?(eo=ut.M(ge),ue=ge<ft-1?ut.M(ge+1):eo):(xn=ft+ge,eo=ut.M(xn),ue=0<xn?ut.M(xn-1):eo),eo.Xa(ue)){0<=ge?(ui=0<ge?ut.M(ge-1):eo,xn=ge<ft-2?ut.M(ge+2):ue):(ui=xn<ft-1?ut.M(xn+1):eo,xn=1<xn?ut.M(xn-2):ue),zn=ui.Bf(eo);var _i=ue.Bf(xn);ui=zn>_i+10?0<=ge?ui.ab(eo):eo.ab(ui):_i>zn+10?0<=ge?ue.ab(xn):xn.ab(ue):0<=ge?ui.ab(xn):xn.ab(ui)}else ui=0<=ge?eo.ab(ue):ue.ab(eo);Un!==Js&&(xn=rt.computeAngle(se,Un,ui),se.Kb=xn),xn=eo.x+(ue.x-eo.x)*be-y.x,eo=eo.y+(ue.y-eo.y)*be-y.y}se.measure(1/0,1/0,0,0),ue=se.measuredBounds,zn=se.naturalBounds;var nr=0;se instanceof yo&&(nr=se.strokeWidth),_i=zn.width+nr;var Er=zn.height+nr;bt.reset(),bt.translate(-ue.x,-ue.y),bt.scale(se.scale,se.scale),bt.rotate(Un===Js?se.angle:ui,_i/2,Er/2),Un!==Cp&&Un!==Ep||bt.rotate(90,_i/2,Er/2),Un!==bp&&Un!==Mp||bt.rotate(-90,_i/2,Er/2),Un===n0&&(45<ui&&135>ui||225<ui&&315>ui)&&bt.rotate(-ui,_i/2,Er/2),zn=new an(0,0,_i,Er),Bt.xi(zn,We),bt.Ga(Bt),We=-Bt.x+nr/2*se.scale,se=-Bt.y+nr/2*se.scale,Jt.assign(pi),nr=isNaN(pi.x);var Qa=isNaN(pi.y);if(nr||Qa){_i=_i/2+3,Er=Er/2+3;var is=45<=ui&&135>=ui,Hs=225<=ui&&315>=ui;Un===Js&&(is||Hs)?(Jt.x=Qa?_i:pi.y,Jt.y=nr?Er:pi.x,is?0<=ge||isNaN(ge)&&.5>be||!nr||(Jt.y=-Er):Hs&&((0<=ge||isNaN(ge)&&.5>be)&&nr&&(Jt.y=-Er),Qa&&(Jt.x=-_i))):(nr&&(Jt.x=0<=ge||isNaN(ge)&&.5>be?_i:-_i),Qa&&(Jt.y=-Er),Jt.rotate(ui))}else Jt.rotate(ui);xn+=Jt.x,eo+=Jt.y,zn.set(ue),zn.h(xn+We,eo+se,ue.width,ue.height),Pt.push(zn),x.ed(zn)}}if(tt!==null)for(b=tt.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Jr(E,x.width||0,x.height||0),Po.free(bt),$t.free(Bt),$t.free(Jt)}}}},Mm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Qo||a instanceof jn){var b=a,E=null;a instanceof Qo&&(E=a,b=E.adornedPart);var z=a instanceof Qo?null:b.path,tt=a.j;if(tt.length!==0){var ot=0;if(z!==null&&ot<tt.length){var rt=tt[ot];ot++,z.arrange(rt.x-a.jg.x,rt.y-a.jg.y,rt.width,rt.height)}for(rt=0;rt<x;rt++){var lt=y[rt];if(lt!==z&&ot<tt.length){var ut=tt[ot];ot++,lt.arrange(ut.x-a.jg.x,ut.y-a.jg.y,ut.width,ut.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof jn)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,ot=tt.segmentIndex,rt=tt.segmentFraction;var yt=tt.alignmentFocus;if(lt=tt.segmentOrientation,ut=tt.segmentOffset,isNaN(ot)){var Pt=ft.ua,bt=Rn();Pt.Qu(rt,bt);var Bt=$t.allocAt(bt[0],bt[1]);Bt.add(ft.i(0)),Pt.type===$n.j||(Pt=Pt.figures.first()),Bt.offset(-Pt.startX,-Pt.startY),Pt=bt[2],lt!==Js&&(ft=ft.computeAngle(tt,lt,Pt),tt.angle=ft),ft=Bt.x;var Jt=Bt.y;$t.free(Bt),ni(bt)}else if(ot<-x||ot>=x)bt=$t.alloc(),Pt=ft,Jt=bt,Pt.vg(),Pt.computeMidPoint(Jt),Pt=ft.midAngle,lt!==Js&&(ft=ft.computeAngle(tt,lt,Pt),tt.angle=ft),ft=bt.x,Jt=bt.y,$t.free(bt);else{if(Bt=0,0<=ot?(bt=y.s[ot],Jt=ot<x-1?y.s[ot+1]:bt):(Bt=x+ot,bt=y.s[Bt],Jt=0<Bt?y.s[Bt-1]:bt),bt.Xa(Jt)){0<=ot?(Pt=0<ot?y.s[ot-1]:bt,Bt=ot<x-2?y.s[ot+2]:Jt):(Pt=Bt<x-1?y.s[Bt+1]:bt,Bt=1<Bt?y.s[Bt-2]:Jt);var Gt=Pt.Bf(bt),se=Jt.Bf(Bt);Pt=Gt>se+10?0<=ot?Pt.ab(bt):bt.ab(Pt):se>Gt+10?0<=ot?Jt.ab(Bt):Bt.ab(Jt):0<=ot?Pt.ab(Bt):Bt.ab(Pt)}else Pt=0<=ot?bt.ab(Jt):Jt.ab(bt);lt!==Js&&(ft=ft.computeAngle(tt,lt,Pt),tt.angle=ft),ft=bt.x+(Jt.x-bt.x)*rt,Jt=bt.y+(Jt.y-bt.y)*rt}if(yt.ys())tt.location=new $t(ft,Jt);else{yt.Mc()&&(yt=Zo),bt=Po.alloc(),bt.reset(),bt.scale(tt.scale,tt.scale),bt.rotate(tt.angle,0,0);var ue=tt.naturalBounds;Bt=an.allocAt(0,0,ue.width,ue.height),Gt=$t.alloc(),Gt.xi(Bt,yt),bt.Ga(Gt),yt=-Gt.x,se=-Gt.y;var ge=ue.width,be=ue.height;ue=$t.alloc(),ue.assign(ut);var We=isNaN(ut.x),Un=isNaN(ut.y);if(We||Un){ge=ge/2+3,be=be/2+3;var pi=45<=Pt&&135>=Pt,ui=225<=Pt&&315>=Pt;lt===Js&&(pi||ui)?(ue.x=Un?ge:ut.y,ue.y=We?be:ut.x,pi?0<=ot||isNaN(ot)&&.5>rt||!We||(ue.y=-be):ui&&((0<=ot||isNaN(ot)&&.5>rt)&&We&&(ue.y=-be),Un&&(ue.x=-ge))):(We&&(ue.x=0<=ot||isNaN(ot)&&.5>rt?ge:-ge),Un&&(ue.y=-be),ue.rotate(Pt))}else ue.rotate(Pt);ft+=ue.x,Jt+=ue.y,bt.pp(Bt),yt+=Bt.x,se+=Bt.y,ot=$t.allocAt(ft+yt,Jt+se),tt.move(ot),$t.free(ot),$t.free(ue),$t.free(Gt),an.free(Bt),Po.free(bt)}}E!==null?E.Ul(!1):b.Ul(!1),b=FS(a),a.location.h(a.position.x+b.x,a.position.y+b.y),$t.free(b)}};function iS(a,y,x,b){if(Ul(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Qo&&a.type===Fn.Link&&a.adornedObject instanceof yo&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof jn&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof Qo&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),za(b,!1)}}function dp(){this.xa="Base"}Ae(dp,Ka),dp.prototype.measure=function(a,y,x,b,E,z,tt){var ot=a.Pb();a.graduatedBounds=[];var rt=ot.margin,lt=rt.right+rt.left,ut=rt.top+rt.bottom;ot.measure(y,x,z,tt);var ft=ot.measuredBounds,yt=new an(-rt.left,-rt.top,Math.max(ft.width+lt,0),Math.max(ft.height+ut,0));a.graduatedBounds.push(yt),E.assign(yt);for(var Pt=ot.geometry,bt=ot.strokeWidth,Bt=Pt.flattenedSegments,Jt=Pt.flattenedLengths,Gt=Pt.flattenedTotalLength,se=Bt.length,ue=0,ge=0,be=Rn(),We=0;We<se;We++){var Un=Bt[We],pi=[];ge=ue=0;for(var ui=Un.length,zn=0;zn<ui;zn+=2){var xn=Un[zn],eo=Un[zn+1];if(zn!==0){var _i=180*Math.atan2(eo-ge,xn-ue)/Math.PI;0>_i&&(_i+=360),pi.push(_i)}ue=xn,ge=eo}be.push(pi)}if(a.graduatedIntervals===null){for(var nr=[],Er=a.O.s,Qa=Er.length,is=0;is<Qa;is++){var Hs=Er[is],qa=[];if(nr.push(qa),Hs.visible){var Id=Hs.interval;if(!(0>Id)){for(var ka=0;ka<Qa;ka++)if(ka!==is){var Qu=Er[ka];if(Qu.visible&&Hs.constructor===Qu.constructor){var Gs=Qu.interval;Gs>Id&&qa.push(Gs)}}}}}a.graduatedIntervals=nr}var Bd=a.graduatedIntervals,Ql=a.O.s,Pu=Ql.length,Fl=0,wl=0,cc=Gt;a.graduatedMarks=[];for(var qu,Bg=0;Bg<Pu;Bg++){var Il=Ql[Bg];if(qu=[],Il.visible&&Il!==ot){var $s=Math.abs(Il.interval),Xp=a.graduatedTickUnit;if(!(2>Xp*$s*Gt/a.graduatedRange&&Il.graduatedSkip===null)){var Bf=Jt[0][0],dh=0,Cl=0;wl=Gt*Il.graduatedStart-1e-4,cc=Gt*Il.graduatedEnd+1e-4;var Jc=Xp*$s,Bl=a.graduatedTickBase;if(Bl<a.graduatedMin){var fc=(a.graduatedMin-Bl)/Jc;fc=fc%1===0?fc:Math.floor(fc+1),Bl+=fc*Jc}else Bl>a.graduatedMin+Jc&&(Bl-=Math.floor((Bl-a.graduatedMin)/Jc)*Jc);for(var W0=Bd[Bg],Jp=Bl,Hy=1e-6*a.graduatedMax,Rh=1;Bl<=a.graduatedMax+Hy;Rh++){t:{for(var od=W0.length,Df=0;Df<od;Df++){var gc=(Bl-a.graduatedTickBase)%(W0[Df]*a.graduatedTickUnit),Dg=1e-6*a.graduatedTickUnit;if(gc<Dg&&gc>-Dg){var pc=!1;break t}}pc=!0}if(pc&&(Bl>a.graduatedMax&&(Bl=a.graduatedMax),Il.graduatedSkip===null||Il instanceof Lr&&!Il.graduatedSkip(Bl,Il)||Il instanceof yo&&!Il.graduatedSkip(Bl,Il))&&(Fl=(Bl-a.graduatedMin)*Gt/a.graduatedRange,Fl>Gt&&(Fl=Gt),wl<=Fl&&Fl<=cc)){for(var zh=be[dh][Cl],Dd=Jt[dh][Cl];dh<Jt.length;){for(;Fl>Bf&&Cl<Jt[dh].length-1;)Cl++,zh=be[dh][Cl],Dd=Jt[dh][Cl],Bf+=Dd;if(Fl<=Bf)break;dh++,Cl=0,zh=be[dh][Cl],Dd=Jt[dh][Cl],Bf+=Dd}var bl=Bt[dh],ch=bl[2*Cl],K0=bl[2*Cl+1],rd=(Fl-(Bf-Dd))/Dd,Ag=new $t(ch+(bl[2*Cl+2]-ch)*rd+bt/2-Pt.bounds.x,K0+(bl[2*Cl+3]-K0)*rd+bt/2-Pt.bounds.y);Ag.scale(ot.scale,ot.scale);t:{var th=zh,Qc=be[dh];if(!(.5005>rd&&.4995<rd)){var fh=th;if(.5>rd?0<Cl?fh=Qc[Cl-1]:ke.$(bl[0],bl[bl.length-2])&&ke.$(bl[1],bl[bl.length-1])&&(fh=Qc[Qc.length-1]):.5<rd&&(Cl+1<Qc.length?fh=Qc[Cl+1]:ke.$(bl[0],bl[bl.length-2])&&ke.$(bl[1],bl[bl.length-1])&&(fh=Qc[0])),th!==fh){var Af=Math.abs(th-fh);if(180<Af&&(th<fh?th+=360:fh+=360,Af=Math.abs(th-fh)),5e-4>rd||.9995<rd){zh=(th+fh)/2%360;break t}if(10>Af){var Rg=1-Math.abs(.5-rd);zh=(th*Rg+fh*(1-Rg))%360;break t}}}zh=th}if(Il instanceof Lr){var Du="";Il.graduatedFunction!==null?(Du=Il.graduatedFunction(Bl,Il),Du=Du!=null?Du.toString():""):Du=(+Bl.toFixed(2)).toString(),Du!==""&&qu.push({$l:Ag,angle:zh,text:Du})}else qu.push({$l:Ag,angle:zh})}Bl=Jp+Rh*Jc}}}a.graduatedMarks.push(qu)}ni(be);var gs=a.graduatedMarks;if(gs!==null)for(var Qp=b.length,nl=0;nl<Qp;nl++){var Na=b[nl],il=gs[nl];if(Na.visible&&Na!==ot&&il.length!==0){if(Na instanceof yo){var ad=a,Ad=E,qc=Na.alignmentFocus;qc.Mc()&&(qc=ss);var Gy=Na.angle;Na.Kb=0,Na.measure(1/0,1/0,0,0),Na.Kb=Gy;var _0=Na.measuredBounds,zg=_0.width,tf=_0.height,Rf=an.allocAt(0,0,zg,tf),El=$t.alloc();El.xi(Rf,qc),an.free(Rf);for(var sd=-El.x,eh=-El.y,cu=new an,mc=il.length,jg=0;jg<mc;jg++)for(var vc=il[jg],V0=vc.$l.x,Hg=vc.$l.y,ga=vc.angle,Au=0;4>Au;Au++){switch(Au){case 0:El.h(sd,eh);break;case 1:El.h(sd+zg,eh);break;case 2:El.h(sd,eh+tf);break;case 3:El.h(sd+zg,eh+tf)}El.rotate(ga+Na.angle),El.offset(V0,Hg),jg===0&&Au===0?cu.h(El.x,El.y,0,0):cu.Ye(El),El.offset(-V0,-Hg),El.rotate(-ga-Na.angle)}$t.free(El),ad.graduatedBounds!==null&&ad.graduatedBounds.push(cu),Go(Ad,cu.x,cu.y,cu.width,cu.height)}else if(Na instanceof Lr){var wu=a,U0=E;wu.temporaryTextBlock===null&&(wu.temporaryTextBlock=new Lr);var Dl=wu.temporaryTextBlock;yS(Dl,Na);var Rd=Na.alignmentFocus;Rd.Mc()&&(Rd=ss);for(var Cu=Na.segmentOrientation,Gg=Na.segmentOffset,yc=new an,qp=0,$g=0,gh=0,ef=0,Sc=0,Zg=il.length,zd=0;zd<Zg;zd++){var jh=il[zd];qp=jh.$l.x,$g=jh.$l.y,gh=jh.angle,Sc=ef=Na.angle,Cu!==Js&&(Sc=Cu===wp||Cu===e0?gh+Na.angle:gh,ef=jn.computeAngle(Cu,Sc)),Dl.Kb=ef,Dl.text=jh.text||"",Dl.measure(1/0,1/0,0,0);var jd=Dl.measuredBounds,ld=Dl.naturalBounds,Hd=ld.width,nf=ld.height,nh=Po.alloc();nh.reset(),nh.translate(-jd.x,-jd.y),nh.scale(Dl.scale,Dl.scale),nh.rotate(Sc,Hd/2,nf/2),Cu!==Cp&&Cu!==Ep||nh.rotate(90,Hd/2,nf/2),Cu!==bp&&Cu!==Mp||nh.rotate(-90,Hd/2,nf/2),Cu===n0&&(45<gh&&135>gh||225<gh&&315>gh)&&nh.rotate(-gh,Hd/2,nf/2);var zf=an.allocAt(0,0,Hd,nf),Gd=$t.alloc();Gd.xi(zf,Rd),nh.Ga(Gd);var jf=-Gd.x,$y=-Gd.y,ud=$t.alloc();ud.assign(Gg),isNaN(ud.x)&&(ud.x=Hd/2+3),isNaN(ud.y)&&(ud.y=-(nf/2+3)),ud.rotate(gh),qp+=ud.x+jf,$g+=ud.y+$y;var of=new an(qp,$g,jd.width,jd.height),tm=new an(jd.x,jd.y,jd.width,jd.height),Zy=new an(ld.x,ld.y,ld.width,ld.height);jh.Sz=ef,jh.lineCount=Dl.lineCount,jh.lines=[Dl.Cb,Dl.Ih,Dl.df,Dl.Le,Dl.Qc,Dl.Qb,Dl.ze],jh.actualBounds=of,jh.measuredBounds=tm,jh.naturalBounds=Zy,zd===0?yc.assign(of):yc.ed(of),$t.free(ud),$t.free(Gd),an.free(zf),Po.free(nh)}wu.graduatedBounds!==null&&wu.graduatedBounds.push(yc),Go(U0,yc.x,yc.y,yc.width,yc.height)}za(Na,!1)}}},dp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var z=a.graduatedBounds,tt=0,ot=z[tt];tt++,b!==null&&b.arrange(ot.x-x.x,ot.y-x.y,ot.width,ot.height);for(var rt=y.length,lt=0;lt<rt;lt++){var ut=y[lt];ot=E[lt],ut.visible&&ut!==b&&ot.length!==0&&(ot=z[tt],tt++,ut.arrange(ot.x-x.x,ot.y-x.y,ot.width,ot.height))}a.graduatedBounds=null}}},dp.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,z=E.width,tt=E.height;E=y instanceof Nl,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var ot=z.actualBounds,rt=a.O.s,lt=a.graduatedMarks,ut=rt.length,ft=0;ft<ut;ft++){var yt=rt[ft],Pt=lt[ft],bt=Pt.length;if(yt.visible&&yt!==z&&Pt.length!==0){if(yt instanceof yo){if(!(2>a.graduatedTickUnit*yt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&yt.graduatedSkip===null)){var Bt=yt.measuredBounds,Jt=yt.strokeWidth*yt.scale,Gt=yt.alignmentFocus;Gt.Mc()&&(Gt=ss);for(var se=0;se<bt;se++){var ue=Pt[se].$l,ge=Pt[se].angle,be=Gt,We=yt.Ab;We.reset(),We.translate(ue.x+ot.x,ue.y+ot.y),We.rotate(ge+yt.angle,0,0),We.translate(-Bt.width*be.x+be.offsetX+Jt/2,-Bt.height*be.y+be.offsetY+Jt/2),We.scale(yt.scale,yt.scale),mu(yt,!1),yt.wh.set(yt.Ab),yt.Kk=yt.scale,ru(yt,!1),yt.gc(y,x),E&&(a.svg.appendChild(yt.svg),yt.svg=null),yt.Ab.reset()}}}else if(yt instanceof Lr)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Lr),Bt=a.temporaryTextBlock,yS(Bt,yt),Jt=0;Jt<bt;Jt++)Gt=Pt[Jt],Gt.actualBounds&&Gt.measuredBounds&&Gt.naturalBounds&&(Bt.ec=Gt.text||"",Bt.Kb=Gt.Sz||0,Bt.Gc=Gt.lineCount||0,se=Gt.lines,se!==void 0&&(Bt.Cb=se[0],Bt.Ih=se[1],Bt.df=se[2],Bt.Le=se[3],Bt.Qc=se[4],Bt.Qb=se[5],Bt.ze=se[6]),Gt.naturalBounds&&(Bt.dc=Gt.naturalBounds),Gt.actualBounds&&(se=Gt.actualBounds,Bt.arrange(se.x,se.y,se.width,se.height)),se=Gt.actualBounds,Bt.arrange(se.x,se.y,se.width,se.height),ue=Gt.measuredBounds,Gt=Gt.naturalBounds,ge=Bt.Ab,ge.reset(),ge.translate(se.x+ot.x,se.y+ot.y),ge.translate(-ue.x,-ue.y),Bt.no(ge,Gt.x,Gt.y,Gt.width,Gt.height),mu(Bt,!1),Bt.wh.set(Bt.Ab),Bt.Kk=Bt.scale,ru(Bt,!1),Bt.Ng=yt.part,Bt.Me=yt.panel,Bt.gc(y,x),Bt.Me=null,Bt.Ng=null,E&&(a.svg.appendChild(Bt.svg),Bt.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Fn(a,y){if(Ee.call(this),this.na=null,a===void 0)this.na=Fn.Position;else if(typeof a=="string"){var x=Nu.I(a);x!==null&&(this.na=x)}else a instanceof Ka?this.na=a:a&&(this.na=Fn.Position,y=a);this.na===null&&_t("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Fn.Grid?1048576:0),this.O=new mn,this.yb=ts,this.Tm=hr,this.Uf=so,this.$g=null,this.$e="",this.jg=new an(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=wi,this.jn=Yo,this.kn=Ho,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Ae(Fn,Ee),Fn.prototype.cloneProtected=function(a){Ee.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},Fn.prototype.Af=function(a){Ee.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,b=0;b<x;b++)y[b].Me=a;a.$g=null},Fn.prototype.copy=function(){var a=Ee.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].copy();E.wi(a),E.Ng=null;var z=a.O,tt=z.count;if(z.Gb(tt,E),z=a.part,z!==null){z.Rh=null,E.portId!==null&&z instanceof ei&&(z.Te=!0);var ot=a.diagram;ot!==null&&ot.undoManager.isUndoingRedoing||z.cb(pa,"elements",a,null,E,null,tt)}}return a}return null},Ct=Fn.prototype,Ct.toString=function(){return"Panel("+this.type.name+")#"+ji(this)},Ct.Pn=function(a){Ee.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},Ct.hh=function(a,y){if(this.na===Fn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Fn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Fn.Table)if(a.yc(),a instanceof Nl){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===Fn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,z=E.length,tt=0;tt<z;tt++){var ot=E[tt];x&&ot===b&&(a.clipInsteadOfFill=!0),ot.gc(a,y),x&&ot===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Lm(a,y,!0,x,!0),b!==null&&Lm(a,y,!1,b,!0),x!==null&&oS(a,y,!0,x),b!==null&&oS(a,y,!1,b),x!==null&&Lm(a,y,!0,x,!1),b!==null&&Lm(a,y,!1,b,!1)}function oS(a,y,x,b){for(var E=b.length,z=a.actualBounds,tt=a.naturalBounds,ot=!0,rt=0;rt<E;rt++){var lt=b[rt];if(lt!==void 0&<.actual!==0)if(ot)ot=!1;else{if(x){if(lt.position>tt.height)continue}else if(lt.position>tt.width)continue;var ut=lt.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=lt.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&ft!==null){fa(a,y,ft,!1,!1,tt,z),ft=!1;var yt=lt.separatorDashArray;yt===null&&(yt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),yt!==null&&(ft=!0,y.js(yt,0)),y.beginPath(),yt=lt.position+ut,x?yt>tt.height&&(ut-=yt-tt.height):yt>tt.width&&(ut-=yt-tt.width),lt=lt.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(lt+=ut.top,yt=tt.width-ut.right,y.moveTo(ut.left,lt),y.lineTo(yt,lt)):(lt+=ut.left,yt=tt.height-ut.bottom,y.moveTo(lt,ut.top),y.lineTo(lt,yt)),y.stroke(),y.Se(),ft&&y.fs()}}}}function Lm(a,y,x,b,E){for(var z=b.length,tt=a.actualBounds,ot=a.naturalBounds,rt=rS(a,!0),lt=rS(a,!1),ut=0;ut<z;ut++){var ft=b[ut];if(ft!==void 0&&ft.background!==null&&ft.coversSeparators!==E&&ft.actual!==0){var yt=x?tt.height:tt.width;if(!(ft.position>yt)){var Pt=ft.Wc(),bt=ft.separatorStrokeWidth;isNaN(bt)&&(bt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Bt=ft.separatorStroke;Bt===null&&(Bt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Bt===null||ft.index===(x?rt:lt))&&(bt=0),Pt-=bt,bt=ft.position+bt,Pt+=ft.actual,bt+Pt>yt&&(Pt=yt-bt),0>=Pt||(yt=a.yb,fa(a,y,ft.background,!0,!1,ot,tt),x?y.fillRect(yt.left,bt+yt.top,tt.width-(yt.left+yt.right),Pt):y.fillRect(bt+yt.left,yt.top,Pt,tt.height-(yt.top+yt.bottom)))}}}}function rS(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;b<x;b++){var E=y?a.rowDefs[b]:a.colDefs[b];if(E!==void 0)return E.index}return 0}function pv(a){return a==="LineV"||a==="BarV"}Ct.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Ct.kk=function(a,y,x){if(!Ee.prototype.kk.call(this,a,y,x))return!1;if(this.type===Fn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Fn.Grid||this.na===Fn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},Ct.nk=function(){return!0},Ct.$o=function(a,y,x,b){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var E=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var ot=y[tt].actualBounds;E=tt===0?ot.x:Math.min(ot.x,E),z=tt===0?ot.y:Math.min(ot.y,z)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Ee.prototype.$o.call(this,a,y,x,b)},Ct.Sj=function(a,y,x,b,E){var z=this.se(),tt=this.transform,ot=1/(tt.m11*tt.m22-tt.m12*tt.m21),rt=tt.m22*ot,lt=-tt.m12*ot,ut=-tt.m21*ot,ft=tt.m11*ot,yt=ot*(tt.m21*tt.dy-tt.m22*tt.dx),Pt=ot*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,ke.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,b,E);if(this.background!==null)return z=a*rt+y*ut+yt,ot=a*lt+y*ft+Pt,a=x*rt+b*ut+yt,rt=x*lt+b*ft+Pt,E.h(0,0),x=this.naturalBounds,z=ke.Ff(0,0,x.width,x.height,z,ot,a,rt,E),E.transform(tt),z;z||(rt=1,ut=lt=0,ft=1,Pt=yt=0),ot=a*rt+y*ut+yt,a=a*lt+y*ft+Pt,rt=x*rt+b*ut+yt,x=x*lt+b*ft+Pt,E.h(rt,x),b=(rt-ot)*(rt-ot)+(x-a)*(x-a),lt=!1,ft=this.O.s,Pt=ft.length,ut=$t.alloc(),yt=null,y=1/0;var bt=null,Bt=this.isClipping&&this.na===Fn.Spot;Bt&&(bt=$t.alloc(),yt=this.Pb(),(lt=yt.Sj(ot,a,rt,x,bt))&&(y=(ot-bt.x)*(ot-bt.x)+(a-bt.y)*(a-bt.y)));for(var Jt=0;Jt<Pt;Jt++){var Gt=ft[Jt];Gt.visible&&Gt!==yt&&Gt.Sj(ot,a,rt,x,ut)&&(lt=!0,Gt=(ot-ut.x)*(ot-ut.x)+(a-ut.y)*(a-ut.y),Gt<b&&(b=Gt,E.set(ut)))}return Bt&&(y>b&&E.set(bt),$t.free(bt)),$t.free(ut),z&&E.transform(tt),lt},Ct.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Ee.prototype.Gj.call(this)},Ct.v=function(a){if(!Ul(this)){Ee.prototype.v.call(this,a),a=null,(this.na===Fn.Auto||this.na===Fn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if((E===a||E.isPanelMain)&&E.v(!0),!E.desiredSize.w()){var z=hl(E,!1);(E instanceof Xs||E instanceof Fn||E instanceof Lr||z!==Cn)&&E.v(!0)}}}},Ct.Uj=function(){if(!Ul(this)){za(this,!0),Mh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Ct.Uk=function(){if(!(this.l&2048)){mu(this,!0),ru(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Ct.Wu=function(){ru(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Ct.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,b=tt.height),x=Math.max(x,tt.width),b=Math.max(b,tt.height);var ot=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,ot.width)),isNaN(z.height)||(y=Math.min(z.height,ot.height)),a=Math.max(x,a),y=Math.max(b,y);var rt=this.yb;a=Math.max(a-rt.left-rt.right,0),y=Math.max(y-rt.top-rt.bottom,0);var lt=this.O.s;lt.length!==0&&this.na.measure(this,a,y,lt,E,x,b),a=E.width+rt.left+rt.right,rt=E.height+rt.top+rt.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(rt=z.height),a=Math.min(ot.width,a),rt=Math.min(ot.height,rt),a=Math.max(tt.width,a),rt=Math.max(tt.height,rt),a=Math.max(x,a),rt=Math.max(b,rt),Jr(E,a,rt),Jr(this.naturalBounds,a,rt),this.Ge(0,0,a,rt)},Ct.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function ed(a){return a.part!==null?a.part.locationObject:null}Ct.eh=function(a,y,x,b){var E=this.O.s;if(this.actualBounds.h(a,y,x,b),E.length!==0){if(!this.desiredSize.w()){a=hl(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,ot=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===b&&(a=Cn),a){case Cn:(y>x||z>b)&&(this.v(),this.measure(y>x?x:y,z>b?b:z,0,0));break;case On:this.v(!0),this.measure(x+ot,b+tt,0,0);break;case Li:this.v(!0),this.measure(x+ot,z+tt,0,0);break;case Ai:this.v(!0),this.measure(y+ot,b+tt,0,0)}}this.na.arrange(this,E,this.jg)}},Ct.gh=function(a){var y=this.naturalBounds,x=ed(this);if(fr(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=$t.allocAt(0,0);b--;){var z=y[b];if((z.visible||z===x)&&(Co(E.set(a),z.transform),z.ca(E)))return $t.free(E),!0}return $t.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},Ct.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},Ct.qm=function(a,y){if(y(this,a),a instanceof Fn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Zc(a,y){aS(a,a,y)}function aS(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var z=y[E];z instanceof Fn&&aS(a,z,x)}}function vx(a,y){sS(a,a,y)}function sS(a,y,x){if(x(y),y instanceof Fn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)sS(a,y[E],x)}}Ct.Nl=function(a){return lS(this,this,a)};function lS(a,y,x){if(x(y))return y;if(y instanceof Fn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var z=lS(a,y[E],x);if(z!==null)return z}}return null}Ct.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=cp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Fn){var z=E.fb(a);if(z!==null)return z}if(E.name===a)return E}return null};function uS(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof Fn?x=Math.max(x,uS(E)):E instanceof yo&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}Ct.se=function(){return!(this.type===Fn.TableRow||this.type===Fn.TableColumn)};function Cd(a){return a.type===Fn.TableRow||a.type===Fn.TableColumn}Ct.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Us(this)))return null;var b=this.naturalBounds,E=1/this.Df(),z=this.se(),tt=z?a:Co($t.allocAt(a.x,a.y),this.transform),ot=this.diagram,rt=10,lt=5;if(ot!==null&&(rt=ot.Ql("extraTouchArea"),lt=rt/2),fr(-(lt*E),-(lt*E),b.width+rt*E,b.height+rt*E,tt.x,tt.y)){if(!this.isAtomic){E=this.O.s;var ut=E.length;if(ot=$t.alloc(),lt=(rt=this.isClipping&&this.na===Fn.Spot)?this.Pb():null,rt&&(lt.se()?Co(ot.set(a),lt.transform):ot.set(a),!lt.ca(ot)))return $t.free(ot),z||$t.free(tt),null;for(var ft=ed(this);ut--;){var yt=E[ut];if((yt.visible||yt===ft)&&(yt.se()?Co(ot.set(a),yt.transform):ot.set(a),!rt||yt!==lt)){var Pt=null;if(yt instanceof Fn?Pt=yt.ic(ot,y,x):yt.pickable===!0&&yt.ca(ot)&&(Pt=yt),Pt!==null&&(y!==null&&(Pt=y(Pt)),Pt!==null&&(x===null||x(Pt))))return $t.free(ot),z||$t.free(tt),Pt}}$t.free(ot)}return this.background===null&&this.areaBackground===null?(z||$t.free(tt),null):(a=fr(0,0,b.width,b.height,tt.x,tt.y)?this:null,z||$t.free(tt),a)}return z||$t.free(tt),null},Ct.ji=function(a,y,x,b){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var E=this.naturalBounds,z=this.se(),tt=z?a:Co($t.allocAt(a.x,a.y),this.transform);if(E=fr(0,0,E.width,E.height,tt.x,tt.y),Cd(this)||E){if(!this.isAtomic){for(var ot=this.O.s,rt=ot.length,lt=$t.alloc(),ut=ed(this);rt--;){var ft=ot[rt];if(ft.visible||ft===ut){ft.se()?Co(lt.set(a),ft.transform):lt.set(a);var yt=ft;ft=ft instanceof Fn?ft:null,(ft!==null?ft.ji(lt,y,x,b):yt.ca(lt))&&yt.pickable!==!1&&(y!==null&&(yt=y(yt)),yt===null||x!==null&&!x(yt)||b.add(yt))}}$t.free(lt)}return z||$t.free(tt),E&&(this.background!==null||this.areaBackground!==null)}return z||$t.free(tt),!1},Ct.Cf=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Po.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return mv(this,y,x,E),z===void 0&&Po.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var ot=ed(this),rt=this.O.s,lt=rt.length;lt--;){var ut=rt[lt];if(ut.visible||ut===ot){var ft=ut.actualBounds,yt=this.naturalBounds;ft.x>yt.width||ft.y>yt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=ut,ut=ut instanceof Fn?ut:null,yt=Po.alloc(),yt.set(tt),(ut!==null?ut.Cf(a,y,x,b,E,yt):Ja(ft,a,b,yt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||E.add(ft)),Po.free(yt))}}return z===void 0&&Po.free(tt),b}return z===void 0&&Po.free(tt),!1};function mv(a,y,x,b){for(var E=a.O.s,z=E.length;z--;){var tt=E[z];if(tt.visible){var ot=tt.actualBounds,rt=a.naturalBounds;ot.x>rt.width||ot.y>rt.height||0>ot.x+ot.width||0>ot.y+ot.height||(tt instanceof Fn&&mv(tt,y,x,b),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||b.add(tt))}}}Ct.og=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var tt=this.naturalBounds,ot=this.se(),rt=ot?a:Co($t.allocAt(a.x,a.y),this.transform),lt=ot?y:Co($t.allocAt(y.x,y.y),this.transform),ut=rt.Bf(lt),ft=0<rt.x&&rt.x<tt.width&&0<rt.y&&rt.y<tt.height||lr(rt.x,rt.y,0,0,0,tt.height)<=ut||lr(rt.x,rt.y,0,tt.height,tt.width,tt.height)<=ut||lr(rt.x,rt.y,tt.width,tt.height,tt.width,0)<=ut||lr(rt.x,rt.y,tt.width,0,0,0)<=ut;if(tt=rt.zd(0,0)<=ut&&rt.zd(0,tt.height)<=ut&&rt.zd(tt.width,0)<=ut&&rt.zd(tt.width,tt.height)<=ut,ot||($t.free(rt),$t.free(lt)),ft){if(!this.isAtomic){rt=$t.alloc(),lt=$t.alloc(),ut=ed(this);for(var yt=this.O.s,Pt=yt.length;Pt--;){var bt=yt[Pt];if(bt.visible||bt===ut){var Bt=bt.actualBounds,Jt=this.naturalBounds;(!ot||!(Bt.x>Jt.width||Bt.y>Jt.height||0>Bt.x+Bt.width||0>Bt.y+Bt.height))&&(bt.se()?(Bt=bt.transform,Co(rt.set(a),Bt),Co(lt.set(y),Bt)):(rt.set(a),lt.set(y)),Bt=bt,bt=bt instanceof Fn?bt:null,(bt!==null?bt.og(rt,lt,x,b,E,z):Bt.tx(rt,lt,E))&&(x!==null&&(Bt=x(Bt)),Bt===null||b!==null&&!b(Bt)||z.add(Bt)))}}$t.free(rt),$t.free(lt)}return E?ft:tt}return!1};function vv(a){var y=null;return a instanceof yo&&(y=a.spot1,y===hr&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=ea),y}function yv(a){var y=null;return a instanceof yo&&(y=a.spot2,y===hr&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=As),y}Ct.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},Ct.M=function(a){return this.O.M(a)},Ct.Gb=function(a,y){y instanceof Fi&&_t("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&_t("Cannot make a Panel contain itself: "+this.toString()),_t("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&_t("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Fn.Grid||y instanceof yo||_t("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Fn.Graduated||y instanceof yo||y instanceof Lr||_t("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var b=y.data;b!==null&&typeof b=="object"&&(this.ge===null&&(this.ge=new li),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var z=-1,tt=this.O.s,ot=tt.length,rt=0;rt<ot;rt++)if(tt[rt]===y){z=rt;break}if(z!==-1){if(z===a||z+1>=E.count&&a>=E.count)return;E.mb(z),b=z}else _t("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Ul(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Fn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Nm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof ei&&(x.Te=!0),x.Te&&x instanceof ei&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(Ba,"elements",this,y,null,b,null),x.cb(pa,"elements",this,null,y,null,a)))};function Sv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Ct.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;E<x;E++)if(y[E]===a){b=E;break}b!==-1&&this.pc(b,!0)},Ct.mb=function(a){0<=a&&this.pc(a,!0)},Ct.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),za(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof ei&&(b instanceof Fn?b.qm(b,function(tt,ot){$v(z,ot,y)}):$v(z,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Ba,"elements",this,b,null,a,null))},Ct.Fb=function(a){0>a&&cn(a,">= 0",Fn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new ja;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(pa,"rowdefs",this,null,x,null,a)}return y[a]},Ct.oA=function(a){if(0>a&&cn(a,">= 0",Fn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Ba,"rowdefs",this,x,null,a,null),this.v()}}};function hS(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof ja?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Ct.Eb=function(a){0>a&&cn(a,">= 0",Fn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new ja;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(pa,"coldefs",this,null,x,null,a)}return y[a]},Ct.jA=function(a){if(0>a&&cn(a,">= 0",Fn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Ba,"coldefs",this,x,null,a,null),this.v()}}};function dS(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof ja?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Ct.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Tm(y,a),this},Ct.Hy=function(a,y){return(a=this.Fb(a))&&Tm(a,new ja(y)),this},Ct.By=function(a,y){return(a=this.Eb(a))&&Tm(a,new ja(y)),this},Ct.nz=function(a){if(0>a||this.type!==Fn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var z=x[E];if(z!==void 0&&(y+=z.total,a<y))break}return E},Ct.fz=function(a){if(0>a||this.type!==Fn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var z=x[E];if(z!==void 0&&(y+=z.total,a<y))break}return E},Ct.Fz=function(a,y){if(y===void 0&&(y=new $t(NaN,NaN)),this.type!==Fn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Ct.Gz=function(a){if(this.type!==Fn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function cS(a){return a=a.allBindings,a!==null&&a._isFrozen}function yu(a){var y=a.allBindings;if(y===null)a.data!==null&&_t("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(lt,ut){ut.th();var ft=ut.localBindings;if(ft!==null)for(Sf(ut,!1),ft=ft.iterator;ft.next();){var yt=ft.value;yt.mode===Bp&&Sf(ut,!0);var Pt=yt.sourceName;Pt!==null&&(Pt==="/"&&Sv(lt,!0),Pt=M1(yt,lt,ut),Pt!==null&&(x.add(Pt),Pt.srcBindings===null&&(Pt.srcBindings=new mn),Pt.srcBindings.add(yt))),y.add(yt)}if(ut instanceof Fn&&ut.type===Fn.Table){if(0<ut.rowCount){for(lt=ut.rowDefs,ft=lt.length,yt=0;yt<ft;yt++)if(Pt=lt[yt],Pt!==void 0&&Pt.be!==null)for(var bt=Pt.be.iterator;bt.next();){var Bt=bt.value;Bt.xd=Pt,Bt.to=2,Bt.wl=Pt.index,y.add(Bt)}}if(0<ut.columnCount){for(ut=ut.colDefs,lt=ut.length,ft=0;ft<lt;ft++)if(yt=ut[ft],yt!==void 0&&yt.be!==null)for(Pt=yt.be.iterator;Pt.next();)bt=Pt.value,bt.xd=yt,bt.to=1,bt.wl=yt.index,y.add(bt)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Sf(E,!0);for(var z=E.srcBindings.iterator;z.next();){var tt=z.value;E.localBindings===null&&(E.localBindings=new mn),E.localBindings.add(tt)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,z=E.xd,z!==null){E.xd=null;var ot=E.targetProperty,rt=ot.indexOf(".");0<rt&&z instanceof Fn&&(tt=ot.substring(0,rt),ot=ot.substr(rt+1),rt=z.fb(tt),rt!==null?(z=rt,E.targetProperty=ot):Bn('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+E.toString())),z instanceof ja?(tt=ji(z.panel),E.Ai=tt===void 0?-1:tt,z.panel.bindingId=E.Ai):z instanceof Ee?(tt=ji(z),E.Ai=tt===void 0?-1:tt,z.bindingId=E.Ai):_t("Unknown type of binding target: "+z)}y.freeze(),a instanceof Fi&&a.Zc()&&a.Va()}Ct.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof Fn&&(x.allBindings=null,x.ub=null);var b=x.localBindings;b!==null&&(x.localBindings=null,b.each(function(E){x.bind(E.copy())})),b=x.animationTriggers,b!==null&&(x.animationTriggers=null,b.each(function(E){x.Jv(E.value.copy())}))}),a&&yu(y),y},Ct.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,b=x.sourceProperty;if((a===""||b===""||b===a)&&(b=x.targetProperty,x.converter!==null||b!=="")){b=this.data;var E=x.sourceName;if(E!==null){if(E==="")b=this;else if(E==="/")b=this;else if(E===".")b=this;else if(E==="..")b=this;else if(b=this.fb(E),b===null)continue}else if(x.isToModel)if(b=this.diagram,b!==null)b=b.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(E==="/"?b=z.part:E==="."?b=z:E===".."&&(b=z.panel),E=x.to,E!==0){if(!(z instanceof Fn))continue;E===1?z=z.Eb(x.wl):E===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,b)}}},Ct.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,b=y.length,E=0,z=null;E<x&&(z=a[E],!(z instanceof Fn&&z.data!==null));)E++,z=a[E];if(x-E!==b)return!0;if(z===null)return 0<b;for(var tt=0;E<x&&tt<b;){if(z=a[E],!(z instanceof Fn)||z.data!==y[tt])return!0;E++,tt++}return!1}function cp(a){if(a.type===Fn.Spot||a.type===Fn.Auto)return Math.min(a.O.length,1);if(a.type===Fn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof yo&&b.isPanelMain))break}return x}return a.type===Fn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Fn&&Cd(a))?1:0}Ct.mv=function(){for(var a=cp(this);this.O.length>a;)this.pc(this.O.length-1,!1);fS(this,this.itemArray)};function fS(a,y){var x=cp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var b=0;b<x;b++)km(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var z=y[E],tt=b<a.O.length?a.O.M(b):null;if(tt instanceof Fn){if(tt.data!==z){var ot=Pv(a,tt.data),rt=Pv(a,z),lt=rt!==ot;lt||(ot=wv(a,ot),lt=wv(a,rt)!==ot),lt?(a.pc(b,!1),km(a,z,E,!1)):tt.data=z}}else km(a,z,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,xv(a,x,0),Ul(a)||a.v(),a.graduatedIntervals=null,a.If()||Nm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof ei&&(y.Te=!0),y.Te&&y instanceof ei&&(y.wc=null))}}function km(a,y,x,b){if(!(y==null||0>x)){var E=Pv(a,y);if(E=wv(a,E),E!==null){if(yu(E),E=E.copy(),E.l&16777216){var z=a.ih();z!==null&&Sv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new li),a.ge.add(y,E)),z=x+cp(a),a.Gb(z,E),b&&(E.ub=y,xv(a,z,x),E.ub=null),E.data=y}}}function xv(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof Fn){var E=y,z=x;b.type===Fn.TableRow?b.row=E:b.type===Fn.TableColumn&&(b.column=E),b.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=Pa(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;_t("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function wv(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(gS||(gS=!0,Bn('No item template Panel found for category "'+y+'" on '+a),Bn(" Using default item template."),a=new Fn,y=new Lr,y.bind(new La("text","",qn)),a.add(y),pS=a),b=pS)),b}function Nm(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Fn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var z=y[E];x&&z instanceof Fn&&!z.isEnabled||Nm(a,z,x)}}}function uh(a,y){y.name=a,Nu.add(a,y)}Zt.Object.defineProperties(Fn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Fn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&cn(a,">= 0",Fn,"padding"),a=new vi(a)):(0>a.left&&cn(a.left,">= 0",Fn,"padding:value.left"),0>a.right&&cn(a.right,">= 0",Fn,"padding:value.right"),0>a.top&&cn(a.top,">= 0",Fn,"padding:value.top"),0>a.bottom&&cn(a.bottom,">= 0",Fn,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:ts},set:function(a){typeof a=="number"&&(a=new vi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new lu),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 dr)&&(a instanceof dr&&a.freeze(),this.T===null&&(this.T=new lu),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 lu),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||_t("defaultRowSeparatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new lu),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 dr)&&(a instanceof dr&&a.freeze(),this.T===null&&(this.T=new lu),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 lu),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||_t("defaultColumnSeparatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new lu),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 lu),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||_t("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&ah(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()||_t("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&ah(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 nd),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),xs(this)&&(a=this.part,a!==null&&Br(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 nd),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),xs(this)&&(a=this.part,a!==null&&Br(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 nd),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 nd),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 nd,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 nd,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 nd,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 nd,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 lu),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new lu),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Fm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new lu),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Fm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new lu),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)&&_t("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new lu),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)&&_t("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new lu),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 Fi&&!(this instanceof Qo);yu(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof jn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Fi&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),b!==null&&b.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new xf),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||fS(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 li}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Fi||a.isPanelMain)&&_t("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(););wo(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&&(wo(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 io&&(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&&Nm(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),Zt.Object.defineProperties(Fn,{Position:{get:function(){return Nu.I("Position")}},Horizontal:{get:function(){return Nu.I("Horizontal")}},Vertical:{get:function(){return Nu.I("Vertical")}},Spot:{get:function(){return Nu.I("Spot")}},Auto:{get:function(){return Nu.I("Auto")}},Table:{get:function(){return Nu.I("Table")}},Viewbox:{get:function(){return Nu.I("Viewbox")}},TableRow:{get:function(){return Nu.I("TableRow")}},TableColumn:{get:function(){return Nu.I("TableColumn")}},Link:{get:function(){return Nu.I("Link")}},Grid:{get:function(){return Nu.I("Grid")}},Graduated:{get:function(){return Nu.I("Graduated")}}}),Fn.prototype.rebuildItemElements=Fn.prototype.mv,Fn.prototype.findItemPanelForData=Fn.prototype.sx,Fn.prototype.updateTargetBindings=Fn.prototype.La,Fn.prototype.copyTemplate=Fn.prototype.Uy,Fn.prototype.graduatedValueForPoint=Fn.prototype.Gz,Fn.prototype.graduatedPointForValue=Fn.prototype.Fz,Fn.prototype.findColumnForLocalX=Fn.prototype.fz,Fn.prototype.findRowForLocalY=Fn.prototype.nz,Fn.prototype.addColumnDefinition=Fn.prototype.By,Fn.prototype.addRowDefinition=Fn.prototype.Hy,Fn.prototype.addRowColumnDefinition=Fn.prototype.Gy,Fn.prototype.removeColumnDefinition=Fn.prototype.jA,Fn.prototype.getColumnDefinition=Fn.prototype.Eb,Fn.prototype.removeRowDefinition=Fn.prototype.oA,Fn.prototype.getRowDefinition=Fn.prototype.Fb,Fn.prototype.removeAt=Fn.prototype.mb,Fn.prototype.remove=Fn.prototype.remove,Fn.prototype.insertAt=Fn.prototype.Gb,Fn.prototype.elt=Fn.prototype.M,Fn.prototype.add=Fn.prototype.add,Fn.prototype.findObject=Fn.prototype.fb,Fn.prototype.findInVisualTree=Fn.prototype.Nl,Fn.prototype.walkVisualTreeFrom=Fn.prototype.qm,Fn.prototype.findMainElement=Fn.prototype.Pb;var gS=!1,pS=null,Nu=new li;Fn.className="Panel",Fn.definePanelLayout=uh,uh("Position",new mm),uh("Vertical",new ym),uh("Auto",new xm),uh("Link",new Mm);function nd(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}nd.prototype.copy=function(){var a=new nd;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},nd.className="GradPanelSettings";function lu(){this.Pc=[],this.Oc=[],this.j=this.ob=Fm,this.hb=this.Hb=0,this.Qp=ts,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}lu.prototype.copy=function(a){for(var y=new lu,x=this.Pc,b=x.length,E=y.Pc,z=0;z<b;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),E[z]=tt}for(x=this.Oc,b=x.length,E=y.Oc,z=0;z<b;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),E[z]=tt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},lu.className="TablePanelSettings";function ja(a){Gi(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=hr,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=so,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))}ja.prototype.copy=function(){var a=new ja;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=Gn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Tm(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=Gn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Ct=ja.prototype,Ct.qb=function(a){a.classType===ja&&(this.sizing=a)},Ct.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+ji(this)},Ct.wi=function(a){this.Me=a},Ct.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)},Ct.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Fn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,z=0;z<E;z++){var tt=b?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=b?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=b?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),b=this.dg,b===null)if(y!==null)b=y.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top+b.bottom:b.left+b.right)},Ct.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Wr,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Om(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Ct.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new La(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&cS(y)&&_t("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new mn),this.be.add(E),this},Zt.Object.defineProperties(ja.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&&cn(a,">= 0",ja,"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&&cn(a,">= 0",ja,"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))&&cn(a,">= 0",ja,"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&&cn(a,">= 0",ja,"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 vi(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&&wf(a,"RowColumnDefinition.separatorStroke"),a instanceof dr&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||_t("separatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&wf(a,"RowColumnDefinition.background"),a instanceof dr&&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}}}),ja.prototype.computeEffectiveSpacing=ja.prototype.Wc,ja.prototype.computeEffectiveSpacingTop=ja.prototype.Io;var Cv=new en(ja,"Default",0),fp=new en(ja,"None",1),Fm=new en(ja,"ProportionalExtra",2);ja.className="RowColumnDefinition",ja.Default=Cv,ja.None=fp,ja.ProportionalExtra=Fm;function yo(a,y){Ee.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)}Ae(yo,Ee),yo.prototype.cloneProtected=function(a){Ee.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=Gn(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 Wc(a){a.Na===null?a.Na=new Mv:a.Na.nc&&(a.Na=a.Na.copy())}Ct=yo.prototype,Ct.th=function(){Ee.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Ct.qb=function(a){a===Cn||a===wi||a===Fo||a===so?this.geometryStretch=a:Ee.prototype.qb.call(this,a)},Ct.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+ji(this)};function cg(a,y,x,b){var E=x.length;if(!(4>E)){var z=b.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var ot=x[0],rt=x[1],lt,ut,ft,yt,Pt,bt,Bt=0,Jt=Rn(),Gt=2;Gt<E;Gt+=2)lt=x[Gt],ut=x[Gt+1],ft=lt-ot,ot=ut-rt,ft===0&&(ft=.001),yt=ot/ft,Pt=Math.atan2(ot,ft),bt=Math.sqrt(ft*ft+ot*ot),Jt.push([ft,Pt,yt,bt]),Bt+=bt,ot=lt,rt=ut;ot=x[0],rt=x[1],ft=b.measuredBounds.width,b instanceof yo&&(ft-=b.strokeWidth),1>ft&&(ft=1),E=x=ft,lt=tt/2,ut=lt!==0,Gt=0,bt=Jt[Gt],ft=bt[0],Pt=bt[1],yt=bt[2],bt=bt[3];for(var se=0;.1<=Bt;){if(se===0&&(ut?(E=x,E-=lt,Bt-=lt,ut=!1):E=x,E===0&&(E=1)),E>Bt){ni(Jt);return}E>bt?(se=E-bt,E=bt):se=0;var ue=Math.sqrt(E*E/(1+yt*yt));if(0>ft&&(ue=-ue),ot+=ue,rt+=yt*ue,a.translate(ot,rt),a.rotate(Pt),a.translate(-(tt/2),-(z/2)),se===0&&b.hh(a,y),a.translate(tt/2,z/2),a.rotate(-Pt),a.translate(-ot,-rt),Bt-=E,bt-=E,se!==0){if(Gt++,Gt===Jt.length){ni(Jt);return}bt=Jt[Gt],ft=bt[0],Pt=bt[1],yt=bt[2],bt=bt[3],E=se}}ni(Jt)}}Ct.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;b!==null&&fa(this,a,b,!0,!1,tt,z);var ot=this.part,rt=this.ig;if(x===null||rt!==0||ot===null||!this.isPanelMain&&ot.Pb()!==this||(rt=ot.type===Fn.Link&&ot instanceof Qo&&ot.category==="Selection"&&ot.adornedObject instanceof yo&&ot.adornedPart.Pb()===ot.adornedObject?ot.adornedObject.strokeWidth:0),rt===0&&(x=null),x!==null&&rt!==0&&(fa(this,a,x,!1,!1,tt,z),a.lineWidth=rt,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,ot&&y.Gf("drawShadows")&&(z=ot.isShadowed),a.Il===!1&&(z=!1),ot=!0,x===null||b!==null&&b!=="transparent"||(ot=!1),tt=!1,rt=this.strokeDashArray,rt!==null&&(tt=!0,a.js(rt,this.strokeDashOffset)),E.type===$n.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===$n.u){var lt=E.startX;rt=E.startY;var ut=E.endX,ft=E.endY;E=Math.min(lt,ut);var yt=Math.min(rt,ft);lt=Math.abs(ut-lt),rt=Math.abs(ft-rt),a.beginPath(),a.rect(E,yt,lt,rt),b!==null&&a.ng(b),x!==null&&(ot&&z&&Lh(a),a.jk(),ot&&z&&Qh(a)),a.Se()}else if(E.type===$n.F)lt=E.startX,rt=E.startY,ut=E.endX,ft=E.endY,E=Math.abs(ut-lt)/2,yt=Math.abs(ft-rt)/2,lt=Math.min(lt,ut)+E,rt=Math.min(rt,ft)+yt,a.beginPath(),a.moveTo(lt,rt-yt),a.bezierCurveTo(lt+ke.wg*E,rt-yt,lt+E,rt-ke.wg*yt,lt+E,rt),a.bezierCurveTo(lt+E,rt+ke.wg*yt,lt+ke.wg*E,rt+yt,lt,rt+yt),a.bezierCurveTo(lt-ke.wg*E,rt+yt,lt-E,rt+ke.wg*yt,lt-E,rt),a.bezierCurveTo(lt-E,rt-ke.wg*yt,lt-ke.wg*E,rt-yt,lt,rt-yt),a.closePath(),b!==null&&a.ng(b),x!==null&&(ot&&z&&Lh(a),a.jk(),ot&&z&&Qh(a)),a.Se();else if(E.type===$n.o)for(E=E.figures,rt=E.length,yt=0;yt<rt;yt++){lt=E.s[yt],a.beginPath(),a.moveTo(lt.startX,lt.startY),ut=lt.segments.s,ft=ut.length;for(var Pt=null,bt=0;bt<ft;bt++){var Bt=ut[bt];switch(Bt.type){case Ca:a.moveTo(Bt.endX,Bt.endY);break;case Mr:a.lineTo(Bt.endX,Bt.endY);break;case ls:a.bezierCurveTo(Bt.point1X,Bt.point1Y,Bt.point2X,Bt.point2Y,Bt.endX,Bt.endY);break;case Ml:a.quadraticCurveTo(Bt.point1X,Bt.point1Y,Bt.endX,Bt.endY);break;case ya:if(Bt.radiusX===Bt.radiusY){var Jt=Math.PI/180;a.arc(Bt.point1X,Bt.point1Y,Bt.radiusX,Bt.startAngle*Jt,(Bt.startAngle+Bt.sweepAngle)*Jt,0>Bt.sweepAngle,Pt!==null?Pt.endX:lt.startX,Pt!==null?Pt.endY:lt.startY)}else if(Pt=al(Bt,lt),Jt=Pt.length,Jt===0)a.lineTo(Bt.centerX,Bt.centerY);else for(var Gt=0;Gt<Jt;Gt++){var se=Pt[Gt];Gt===0&&a.lineTo(se[0],se[1]),a.bezierCurveTo(se[2],se[3],se[4],se[5],se[6],se[7])}break;case Hl:if(Gt=Jt=0,Pt!==null&&Pt.type===ya){if(Pt=al(Pt,lt),se=Pt.length,se===0){a.lineTo(Bt.endX,Bt.endY);break}Pt=Pt[se-1]||null,Pt!==null&&(Jt=Pt[6],Gt=Pt[7])}else Jt=Pt!==null?Pt.endX:lt.startX,Gt=Pt!==null?Pt.endY:lt.startY;if(Pt=Ks(Bt,lt,Jt,Gt),Jt=Pt.length,Jt===0){a.lineTo(Bt.endX,Bt.endY);break}for(Gt=0;Gt<Jt;Gt++)se=Pt[Gt],a.bezierCurveTo(se[2],se[3],se[4],se[5],se[6],se[7]);break;default:_t("Segment not of valid type: "+Bt.type)}Bt.isClosed&&a.closePath(),Pt=Bt}ut=lt.isFilled,z?lt.isShadowed?(ut===!0&&b!=="transparent"&&b!==null&&a.ng(b,lt.isEvenOdd),x!==null&&(ut&&ot&&Lh(a),a.jk(),ut&&ot&&Qh(a))):(Lh(a),ut&&b!=="transparent"&&b!==null&&a.ng(b,lt.isEvenOdd),x!==null&&a.jk(),Qh(a)):(ut&&b!==null&&a.ng(b,lt.isEvenOdd),x!==null&&a.jk()),a.Se(yt)}if(tt&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),z=this.geometry,a.save(),a.beginPath(),b=Rn(),z.type===$n.j)b.push(z.startX),b.push(z.startY),b.push(z.endX),b.push(z.endY),cg(a,y,b,x);else if(z.type===$n.o)for(z=z.figures.iterator;z.next();){for(ot=z.value,b.length=0,b.push(ot.startX),b.push(ot.startY),tt=ot.startX,E=ot.startY,rt=tt,yt=E,lt=ot.segments.s,ut=lt.length,ft=0;ft<ut;ft++){switch(bt=lt[ft],bt.type){case Ca:cg(a,y,b,x),b.length=0,b.push(bt.endX),b.push(bt.endY),tt=bt.endX,E=bt.endY,rt=tt,yt=E;break;case Mr:b.push(bt.endX),b.push(bt.endY),tt=bt.endX,E=bt.endY;break;case ls:ke.Qe(tt,E,bt.point1X,bt.point1Y,bt.point2X,bt.point2Y,bt.endX,bt.endY,.5,b),tt=bt.endX,E=bt.endY;break;case Ml:ke.ep(tt,E,bt.point1X,bt.point1Y,bt.endX,bt.endY,.5,b),tt=bt.endX,E=bt.endY;break;case ya:if(Bt=al(bt,ot),Pt=Bt.length,Pt===0){b.push(bt.centerX),b.push(bt.centerY),tt=bt.centerX,E=bt.centerY;break}for(Jt=0;Jt<Pt;Jt++)Gt=Bt[Jt],ke.Qe(tt,E,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,b),tt=Gt[6],E=Gt[7];break;case Hl:if(Bt=Ks(bt,ot,tt,E),Pt=Bt.length,Pt===0){b.push(bt.endX),b.push(bt.endY),tt=bt.endX,E=bt.endY;break}for(Jt=0;Jt<Pt;Jt++)Gt=Bt[Jt],ke.Qe(tt,E,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,b),tt=Gt[6],E=Gt[7];break;default:_t("Segment not of valid type: "+bt.type)}bt.isClosed&&(b.push(rt),b.push(yt),cg(a,y,b,x))}cg(a,y,b,x)}else if(z.type===$n.u)b.push(z.startX),b.push(z.startY),b.push(z.endX),b.push(z.startY),b.push(z.endX),b.push(z.endY),b.push(z.startX),b.push(z.endY),b.push(z.startX),b.push(z.startY),cg(a,y,b,x);else if(z.type===$n.F){if(E=new Za,E.startX=z.endX,E.startY=(z.startY+z.endY)/2,tt=new Xo(ya),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,E.add(tt),z=al(tt,E),ot=z.length,ot===0)b.push(tt.centerX),b.push(tt.centerY);else for(tt=E.startX,E=E.startY,rt=0;rt<ot;rt++)yt=z[rt],ke.Qe(tt,E,yt[2],yt[3],yt[4],yt[5],yt[6],yt[7],.5,b),tt=yt[6],E=yt[7];cg(a,y,b,x)}ni(b),a.restore(),a.Vc(!1)}}}},Ct.kk=function(a,y,x){return!Ee.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)},Ct.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Ee.prototype.nk.call(this,a)},Ct.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)}},Ct.ga=function(a,y){if(y===void 0&&(y=new $t),a instanceof xi){a.Mc()&&_t("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,b=this.strokeWidth;y.h(a.x*(x.width+b)-b/2+x.x+a.offsetX,a.y*(x.height+b)-b/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Ct.mi=function(a){a===void 0&&(a=new an);var y=this.naturalBounds,x=this.oe;y=an.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=$t.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),Go(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),Go(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),Go(a,b.x,b.y,0,0),an.free(y),$t.free(b),a},Ct.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==$n.j||y||(E+=2);var z=an.alloc();if(z.assign(b),z.Bc(E+2,E+2),!z.ca(a))return an.free(z),!1;if(b=E+1e-4,x.type===$n.j)return this.stroke===null||(b=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>b)?!1:(an.free(z),ke.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===$n.u){y=x.startX;var tt=x.startY,ot=x.endX;if(x=x.endY,z.x=Math.min(y,ot),z.y=Math.min(tt,x),z.width=Math.abs(ot-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-b,-b),z.ca(a))return an.free(z),!1;z.Bc(b,b)}return this.stroke!==null&&z.Bc(E,E),a=z.ca(a),an.free(z),a}if(x.type===$n.F){tt=x.startX,E=x.startY,ot=x.endX;var rt=x.endY;if(x=Math.min(tt,ot),y=Math.min(E,rt),tt=Math.abs(ot-tt)/2,E=Math.abs(rt-E)/2,x=a.x-(x+tt),y=a.y-(y+E),this.fill===null){if(tt-=b,E-=b,0>=tt||0>=E||1>=x*x/(tt*tt)+y*y/(E*E))return an.free(z),!1;tt+=b,E+=b}return this.stroke!==null&&(tt+=b,E+=b),an.free(z),0>=tt||0>=E?!1:1>=x*x/(tt*tt)+y*y/(E*E)}if(x.type===$n.o)return an.free(z),this.fill===null?ih(x,a.x,a.y,E):Hu(x,a,E,1<this.strokeWidth,y);_t("Unknown Geometry type: "+x.type)},Ct.Wl=function(a,y,x,b){var E=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var ot=this.figure,rt=Ev[ot];if(rt===void 0){var lt=ke.Ze[ot];typeof lt=="string"&&(lt=ke.Ze[lt]),typeof lt=="function"?(rt=lt(null,100,100),Ev[ot]=rt):_t("Unsupported Figure: "+ot)}tt=rt.bounds}ot=tt.width,rt=tt.height,lt=tt.width;var ut=tt.height;switch(hl(this,!0)){case Cn:b=x=0;break;case On:lt=Math.max(a-z,0),ut=Math.max(y-z,0);break;case Li:lt=Math.max(a-z,0),b=0;break;case Ai:x=0,ut=Math.max(y-z,0)}isFinite(E.width)&&(lt=E.width),isFinite(E.height)&&(ut=E.height);var ft=this.maxSize,yt=this.minSize;switch(x=Math.max(x-z,yt.width),b=Math.max(b-z,yt.height),lt=Math.min(ft.width,lt),ut=Math.min(ft.height,ut),lt=isFinite(lt)?Math.max(x,lt):Math.max(ot,x),ut=isFinite(ut)?Math.max(b,ut):Math.max(rt,b),x=bv(this),x){case Cn:break;case On:ot=lt,rt=ut;break;case wi:x=Math.min(lt/ot,ut/rt),isFinite(x)||(x=1),ot*=x,rt*=x;break;default:_t(x+" is not a valid geometryStretch.")}this.Rd!==null?(ot===0&&(ot=.001),rt===0&&(rt=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,b=ot/tt.width,tt=rt/tt.height,isFinite(b)||(b=1),isFinite(tt)||(tt=1),this.ua=b===1&&tt===1?x:x.copy().scale(b,tt)):this.ua!==null&&ke.$(this.ua.Sk,a-z)&&ke.$(this.ua.Rk,y-z)||(this.ua=yo.makeGeometry(this,ot,rt)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&ot===0?0:tt.width+z,y===0&&rt===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),lt+z,ut+z),E.w()?(lt=E.width,ut=E.height,lt=Math.min(ft.width,lt),ut=Math.min(ft.height,ut),lt=Math.max(yt.width,lt),ut=Math.max(yt.height,ut),this.dc.h(0,0,lt,ut)):this.dc.assign(tt)};function bv(a){var y=a.geometryStretch;return a.Rd!==null?y===so?On:y:y===so?Ev[a.figure].defaultStretch:y}Ct.eh=function(a,y,x,b){js(this,a,y,x,b)},Ct.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ct.Sj=function(a,y,x,b,E){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),ot=z.m22*tt,rt=-z.m12*tt,lt=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),yt=tt*(z.m12*z.dx-z.m11*z.dy);z=a*ot+y*lt+ft,tt=a*rt+y*ut+yt,ot=x*ot+b*lt+ft,rt=x*rt+b*ut+yt,ft=this.ig/2,lt=this.ua,lt===null&&(this.measure(1/0,1/0),lt=this.ua);var Pt=lt.bounds;if(ut=!1,lt.type===$n.j)if(1.5>=this.strokeWidth)ut=ke.Ve(lt.startX,lt.startY,lt.endX,lt.endY,z,tt,ot,rt,E);else{if(lt.startX===lt.endX?(b=ft,ut=0):(y=(lt.endY-lt.startY)/(lt.endX-lt.startX),ut=ft/Math.sqrt(1+y*y),b=ut*y),y=Rn(),a=new $t,ke.Ve(lt.startX+b,lt.startY+ut,lt.endX+b,lt.endY+ut,z,tt,ot,rt,a)&&y.push(a),a=new $t,ke.Ve(lt.startX-b,lt.startY-ut,lt.endX-b,lt.endY-ut,z,tt,ot,rt,a)&&y.push(a),a=new $t,ke.Ve(lt.startX+b,lt.startY+ut,lt.startX-b,lt.startY-ut,z,tt,ot,rt,a)&&y.push(a),a=new $t,ke.Ve(lt.endX+b,lt.endY+ut,lt.endX-b,lt.endY-ut,z,tt,ot,rt,a)&&y.push(a),ot=y.length,ot===0)return ni(y),!1;for(ut=!0,rt=1/0,b=0;b<ot;b++)a=y[b],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<rt&&(rt=x,E.x=a.x,E.y=a.y);ni(y)}else if(lt.type===$n.u)ut=ke.Ff(Pt.x-ft,Pt.y-ft,Pt.x+Pt.width+ft,Pt.y+Pt.height+ft,z,tt,ot,rt,E);else if(lt.type===$n.F){y=an.allocAt(Pt.x,Pt.y,Pt.width,Pt.height).Bc(ft,ft);t:if(y.width===0)ut=ke.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,ot,rt,E);else if(y.height===0)ut=ke.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,ot,rt,E);else{if(a=y.width/2,lt=y.height/2,b=y.x+a,ut=y.y+lt,x=9999,z!==ot&&(x=(tt-rt)/(z-ot)),9999>Math.abs(x)){if(rt=tt-ut-x*(z-b),0>a*a*x*x+lt*lt-rt*rt){E.x=NaN,E.y=NaN,ut=!1;break t}ft=Math.sqrt(a*a*x*x+lt*lt-rt*rt),ot=(-(a*a*x*rt)+a*lt*ft)/(lt*lt+a*a*x*x)+b,a=(-(a*a*x*rt)-a*lt*ft)/(lt*lt+a*a*x*x)+b,lt=x*(ot-b)+rt+ut,rt=x*(a-b)+rt+ut,Math.abs((z-ot)*(z-ot))+Math.abs((tt-lt)*(tt-lt))<Math.abs((z-a)*(z-a))+Math.abs((tt-rt)*(tt-rt))?(E.x=ot,E.y=lt):(E.x=a,E.y=rt)}else{if(ot=lt*lt,rt=z-b,ot-=ot/(a*a)*rt*rt,0>ot){E.x=NaN,E.y=NaN,ut=!1;break t}rt=Math.sqrt(ot),ot=ut+rt,rt=ut-rt,Math.abs(ot-tt)<Math.abs(rt-tt)?(E.x=z,E.y=ot):(E.x=z,E.y=rt)}ut=!0}an.free(y)}else if(lt.type===$n.o){yt=$t.alloc();var bt=ot-z,Bt=rt-tt,Jt=bt*bt+Bt*Bt,Gt=z,se=tt;if(0<Jt&&Pt.contains(Gt,se)&&(yt.x=Gt,yt.y=se,this.ca(yt)))for(bt!==0&&.5>Math.abs(bt)?(Bt*=.5/bt,bt=.5):Bt!==0&&.5>Math.abs(Bt)&&(bt*=.5/Bt,Bt=.5),Gt-=bt,se-=Bt;Pt.contains(Gt,se);)Gt-=bt,se-=Bt;for(E.x=ot,E.y=rt,Bt=0;Bt<lt.figures.count;Bt++){var ue=lt.figures.s[Bt],ge=ue.isFilled?Gt:z,be=ue.isFilled?se:tt,We=ue.segments;Pt=ue.startX,bt=ue.startY;for(var Un=Pt,pi=bt,ui=0;ui<We.count;ui++){var zn=We.s[ui],xn=zn.type,eo=zn.endX,_i=zn.endY,nr=!1;switch(xn){case Ca:Un=eo,pi=_i;break;case Mr:nr=Bm(Pt,bt,eo,_i,ge,be,ot,rt,yt);break;case ls:nr=ke.Eo(Pt,bt,zn.point1X,zn.point1Y,zn.point2X,zn.point2Y,eo,_i,ge,be,ot,rt,.6,yt);break;case Ml:nr=ke.Eo(Pt,bt,Pt+2/3*(zn.point1X-Pt),bt+2/3*(zn.point1Y-bt),eo+2/3*(zn.point1X-eo),_i+2/3*(zn.point1Y-_i),eo,_i,ge,be,ot,rt,.6,yt);break;case ya:case Hl:xn=zn.type===ya?al(zn,ue):Ks(zn,ue,Pt,bt);var Er=xn.length;if(Er===0){nr=Bm(Pt,bt,zn.type===ya?zn.centerX:zn.endX,zn.type===ya?zn.centerY:zn.endY,ge,be,ot,rt,yt);break}for(_i=null,eo=0;eo<Er;eo++){if(_i=xn[eo],eo===0&&Bm(Pt,bt,_i[0],_i[1],ge,be,ot,rt,yt)){var Qa=Im(ge,be,yt,Jt,E);Qa<Jt&&(Jt=Qa,ut=!0)}ke.Eo(_i[0],_i[1],_i[2],_i[3],_i[4],_i[5],_i[6],_i[7],ge,be,ot,rt,.6,yt)&&(Qa=Im(ge,be,yt,Jt,E),Qa<Jt&&(Jt=Qa,ut=!0))}eo=_i[6],_i=_i[7];break;default:_t("Unknown Segment type: "+xn)}Pt=eo,bt=_i,nr&&(nr=Im(ge,be,yt,Jt,E),nr<Jt&&(Jt=nr,ut=!0)),zn.isClosed&&(eo=Un,_i=pi,Bm(Pt,bt,eo,_i,ge,be,ot,rt,yt)&&(zn=Im(ge,be,yt,Jt,E),zn<Jt&&(Jt=zn,ut=!0)))}}z=x-a,tt=b-y,ot=Math.sqrt(z*z+tt*tt),ot!==0&&(z/=ot,tt/=ot),E.x-=z*ft,E.y-=tt*ft,$t.free(yt)}else _t("Unknown Geometry type: "+lt.type);return ut?(this.transform.Ga(E),!0):!1};function Im(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function Bm(a,y,x,b,E,z,tt,ot,rt){if(ke.$(a,x)&&ke.$(y,b)||ke.$(E,tt)&&ke.$(z,ot))return!1;var lt=!1,ut=(E-tt)*(y-b)-(z-ot)*(a-x);return ut===0?!1:(rt.x=((E*ot-z*tt)*(a-x)-(E-tt)*(a*b-y*x))/ut,rt.y=((E*ot-z*tt)*(y-b)-(z-ot)*(a*b-y*x))/ut,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(rt.y>a||ke.$(rt.y,a))&&(rt.y<y||ke.$(rt.y,y))&&(lt=!0)):(y=a<x?a:x,a=a<x?x:a,(rt.x>y||ke.$(rt.x,y))&&(rt.x<a||ke.$(rt.x,a))&&(lt=!0)),lt)}Ct.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var b=this.strokeWidth/2,E=!1,z=$t.alloc();return z.h(x.x-b,x.y-b),a.ca(y.Ga(z))&&(z.h(x.x-b,x.bottom+b),a.ca(y.Ga(z))&&(z.h(x.right+b,x.bottom+b),a.ca(y.Ga(z))&&(z.h(x.right+b,x.y-b),a.ca(y.Ga(z))&&(E=!0)))),$t.free(z),E},Ct.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Po.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,z=a.top;a=a.bottom;var tt=$t.alloc();if(tt.h(b,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(E,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0)))return $t.free(tt),!0;var ot=$t.alloc(),rt=$t.alloc();return x.set(y),x.bv(this.transform),x.Vj(),ot.x=E,ot.y=z,ot.transform(x),tt.x=b,tt.y=z,tt.transform(x),y=!1,Kc(this,tt,ot,rt)?y=!0:(tt.x=E,tt.y=a,tt.transform(x),Kc(this,tt,ot,rt)?y=!0:(ot.x=b,ot.y=a,ot.transform(x),Kc(this,tt,ot,rt)?y=!0:(tt.x=b,tt.y=z,tt.transform(x),Kc(this,tt,ot,rt)&&(y=!0)))),$t.free(tt),Po.free(x),$t.free(ot),$t.free(rt),y};function Kc(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,z=x.y;return x=b.x,b=b.y,a===E?(y<z?(a=y,y=z):a=z,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}Ct.tx=function(a,y,x){function b(Jt,Gt){for(var se=Jt.length,ue=0;ue<se;ue+=2)if(Gt.zd(Jt[ue],Jt[ue+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),z=E;if(1.5<this.strokeWidth&&(E=this.strokeWidth/2+Math.sqrt(E),E*=E),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,ot=tt.x,rt=tt.y,lt=tt.x+tt.width;if(tt=tt.y+tt.height,ha(a.x,a.y,ot,rt)<=E&&ha(a.x,a.y,lt,rt)<=E&&ha(a.x,a.y,ot,tt)<=E&&ha(a.x,a.y,lt,tt)<=E)return!0}if(ot=y.startX,rt=y.startY,lt=y.endX,tt=y.endY,y.type===$n.j){if(x=(ot-lt)*(a.x-lt)+(rt-tt)*(a.y-tt),lr(a.x,a.y,ot,rt,lt,tt)<=(0<=(lt-ot)*(a.x-ot)+(tt-rt)*(a.y-rt)&&0<=x?E:z))return!0}else{if(y.type===$n.u)return y=!1,x&&(y=lr(a.x,a.y,ot,rt,ot,tt)<=E||lr(a.x,a.y,ot,rt,lt,rt)<=E||lr(a.x,a.y,lt,rt,lt,tt)<=E||lr(a.x,a.y,ot,tt,lt,tt)<=E),y;if(y.type===$n.F){y=a.x-(ot+lt)/2,z=a.y-(rt+tt)/2;var ut=Math.abs(lt-ot)/2,ft=Math.abs(tt-rt)/2;if(ut===0||ft===0)return lr(a.x,a.y,ot,rt,lt,tt)<=E;if(x){if(a=ke.$y(ut,ft,y,z),a*a<=E)return!0}else return!(ha(y,z,-ut,0)>=E||ha(y,z,0,-ft)>=E||ha(y,z,0,ft)>=E||ha(y,z,ut,0)>=E)}else if(y.type===$n.o){if(lt=y.bounds,z=lt.x,ot=lt.y,rt=lt.x+lt.width,lt=lt.y+lt.height,a.x>rt&&a.x<z&&a.y>lt&&a.y<ot&&lr(a.x,a.y,z,ot,z,lt)>E&&lr(a.x,a.y,z,ot,rt,ot)>E&&lr(a.x,a.y,rt,lt,z,lt)>E&&lr(a.x,a.y,rt,lt,rt,ot)>E)return!1;if(z=Math.sqrt(E),x){if(this.fill===null?ih(y,a.x,a.y,z):Hu(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,ut=z.startY,a.zd(tt,ut)>E)return!1;for(ot=z.segments.s,rt=ot.length,lt=0;lt<rt;lt++)switch(ft=ot[lt],ft.type){case Ca:case Mr:if(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>E)return!1;break;case ls:var yt=Rn();if(ke.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,yt),tt=b(yt,a),ni(yt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>E))return!1;break;case Ml:if(yt=Rn(),ke.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,yt),tt=b(yt,a),ni(yt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>E))return!1;break;case ya:case Hl:yt=ft.type===ya?al(ft,z):Ks(ft,z,tt,ut);var Pt=yt.length;if(Pt===0){if(tt=ft.type===ya?ft.centerX:ft.endX,ut=ft.type===ya?ft.centerY:ft.endY,a.zd(tt,ut)>E)return!1;break}ft=null;for(var bt=Rn(),Bt=0;Bt<Pt;Bt++)if(ft=yt[Bt],bt.length=0,ke.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,bt),b(bt,a))return ni(bt),!1;ni(bt),ft!==null&&(tt=ft[6],ut=ft[7]);break;default:_t("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Ct.qc=function(){this.ua=null},Ct.kq=function(){return this.ig};function mS(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=wp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Va):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new xi(1-Va.x,Va.y)))}yo.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Nh[a.toArrow];else a.fromArrow!=="None"?b=Nh[a.fromArrow]:(b=ke.Ze[a.figure],typeof b=="string"&&(b=ke.Ze[b]),b===void 0&&_t("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=ke.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function vS(a){var y=Nh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Nh[x],y===void 0){var b=null,E;for(E in ke.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=$n.parse(ke.um[b],!1),Nh[b]=a,x!==b&&(Nh[x]=b),b}}return typeof y=="string"?y:y instanceof $n?a:null}Zt.Object.defineProperties(yo.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),xs(this)&&(a=this.part,a!==null&&Br(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=$n.parse(a);var y=a.normalize();this.geometry=a,this.position=a=$t.allocAt(-y.x,-y.y),$t.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&&wf(a,"Shape.fill"),a instanceof dr&&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&&wf(a,"Shape.stroke"),a instanceof dr&&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 cn(a,"value >= 0",yo,"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"?cn(a,'"butt", "round", or "square"',yo,"strokeCap"):(Wc(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"?cn(a,'"miter", "bevel", or "round"',yo,"strokeJoin"):(Wc(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){Wc(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var z=a[E];0<=z&&isFinite(z)||_t("strokeDashArray:value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(Wc(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=ke.Ze[a];typeof x=="function"?x=a:(x=ke.Ze[a.toLowerCase()])||_t("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=vS(a);x===null?_t("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Qd),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),mS(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=vS(a);x===null?_t("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Qd),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),mS(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:hr},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Wc(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:hr},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Wc(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&&(Wc(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:so},set:function(a){var y=this.geometryStretch;y!==a&&(Wc(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 Th),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&ah(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 Th),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 Th),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 Th),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),yo.prototype.intersectsRect=yo.prototype.Yc,yo.prototype.containedInRect=yo.prototype.fh,yo.prototype.getNearestIntersectionPoint=yo.prototype.rs,yo.prototype.getDocumentBounds=yo.prototype.mi,yo.prototype.getDocumentPoint=yo.prototype.ga;var Nh=new ki,Ev=new ki;yo.className="Shape",yo.getFigureGenerators=function(){var a=new li,y;for(y in ke.Ze)y!==y.toLowerCase()&&a.add(y,ke.Ze[y]);return a.freeze(),a},yo.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=ke.Ze;b[a]=y,b[x]=a},yo.getArrowheadGeometries=function(){var a=new li;for(b in ke.um)if(Nh[b]===void 0){var y=$n.parse(ke.um[b],!1);Nh[b]=y,y=b.toLowerCase(),y!==b&&(Nh[y]=b)}for(var x in Nh)if(x!==x.toLowerCase()){var b=Nh[x];b instanceof $n&&a.add(x,b)}return a.freeze(),a},yo.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=$n.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||_t("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=Nh;b[a]=x,b[y]=a};function Mv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=so,this.gg=this.fg=hr}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 Lr(a,y){return Ee.call(this),jm||(dl=ua?new vu(null).context:null,jm=!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}Ae(Lr,Ee),Lr.prototype.cloneProtected=function(a){Ee.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 hh(a){a.da===null?a.da=new Iv:a.da.nc&&(a.da=a.da.copy())}Ct=Lr.prototype,Ct.th=function(){Ee.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function yS(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}Ct.qb=function(a){a.classType===Lr?this.wrap=a:Ee.prototype.qb.call(this,a)},Ct.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Ct.v=function(){Ee.prototype.v.call(this)},Ct.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,b=this.actualBounds,E=x.width,z=x.height,tt=pp(this),ot=a.textAlign=this.textAlign,rt=y.tn;ot==="start"?ot=rt?"right":"left":ot==="end"&&(ot=rt?"left":"right"),rt=this.isUnderline;var lt=this.isStrikethrough;fa(this,a,this.xc,!0,!1,x,b),(rt||lt)&&fa(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ut=this.oe,ft=ut.dx-(tt*ut.m21+ut.dx);ut=ut.dy-(tt*ut.m22+ut.dy);var yt=y.scale;switch(8>(ft*ft+ut*ut)*yt*yt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Nl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case Ko:a.translate(E,0),a.scale(-1,1);break;case Eo:a.translate(0,z),a.scale(1,-1);break;case Sr:a.translate(E,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,yt=(y+tt+ft)*ut,z>yt&&(b=this.verticalAlignment,b=b.y*z-b.y*yt+b.offsetY),ut===1&&this.ze!==null)ft=this.Cb,ft>E&&(ft=E),this.Oj(this.ze,a,0,b+y,E,tt,ft,x,ot,rt,lt);else if(this.Qc!==null&&this.Qb!==null)for(yt=0;yt<ut;yt++){var Pt=this.Qc[yt];Pt>E&&(Pt=E),b+=y,this.Oj(this.Qb[yt],a,0,b,E,tt,Pt,x,ot,rt,lt),b+=tt+ft}switch(this.flip){case Ko:a.scale(-1,1),a.translate(-E,0);break;case Eo:a.scale(1,-1),a.translate(0,-z);break;case Sr:a.scale(-1,-1),a.translate(-E,-z)}}},Ct.Oj=function(a,y,x,b,E,z,tt,ot,rt,lt,ut){var ft=0;if(ot)rt==="left"?ft=0:rt==="right"?ft=E-tt:rt==="center"&&(ft=(E-tt)/2),y.fillRect(x+ft,b+.25*z,tt,1);else{if(rt==="left"?ft=0:rt==="right"?ft=E:rt==="center"&&(ft=E/2),E=Dm!==null?Dm(this,z):.75*z,y.fillText(a,x+ft,b+E),a=z/20|0,a===0&&(a=1),rt==="right"?ft-=tt:rt==="center"&&(ft-=tt/2),lt){ot=Am!==null?Am(this,z):.8*z,rt=x+ft,lt=b+ot,E=x+ft+tt,ot=b+ot;var yt=a;y.beginPath(),y.lineWidth=yt,y.moveTo(rt,lt),y.lineTo(E,ot),y.stroke(),y.Se(),y instanceof Nl&&y.ad.classList.add("gojs-td")}ut&&(ut=b+z-z/2.2|0,a%2!==0&&(ut+=.5),b=x+ft,z=ut,x=x+ft+tt,tt=ut,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(b,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Nl&&y.ad.classList.add("gojs-td"))}},Ct.kk=function(a,y,x){if(!Ee.prototype.kk.call(this,a,y,x))return!1;if(fa(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},Ct.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Ee.prototype.nk.call(this,a)},Ct.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)}},Ct.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;dl!==null&&ES!==z&&(ES=dl.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),z.length===0)z=8;else if(this.isMultiline){for(var ot=tt=0,rt=!1;!rt;){var lt=z.indexOf(`
|
|
|
`,ot);lt===-1&&(lt=z.length,rt=!0),ot=z.substr(ot,lt-ot),this.formatting===mp&&(ot=ot.trim()),tt=Math.max(tt,Tu(ot)),ot=lt+1}z=tt}else tt=z.indexOf(`
|
|
|
`,0),0<=tt&&(z=z.substr(0,tt)),z=Tu(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=xS(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,rt=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Rm&&(y=this.Ae,y=this.overflow===Rm?SS(y):0,lt=this.spacingAbove+this.spacingBelow,lt=Math.max(0,pp(this)+lt),rt=Math.min(this.maxLines-1,Math.max(Math.floor(rt/lt+.01)-1,0)),!(rt+1>=this.Qb.length))){for(this.l|=16777216,lt=this.Qb[rt],y=Math.max(1,a-y);Tu(lt)>y&&1<lt.length;)lt=lt.substr(0,lt.length-1);lt+=vp,y=Tu(lt),this.Qb[rt]=lt,this.Qb=this.Qb.slice(0,rt+1),this.Qc[rt]=y,this.Qc=this.Qc.slice(0,rt+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===PS||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(b,tt),Jr(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},Ct.eh=function(a,y,x,b){js(this,a,y,x,b)};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,b){var E=a.formatting===mp;E&&(y=y.trim());var z=0,tt=a.Ae,ot=a.spacingAbove+a.spacingBelow;ot=Math.max(0,pp(a)+ot);var rt=a.overflow===Rm?SS(tt):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,ot);else if(tt=y,a.wrap===kv){a.Le=1;var lt=Tu(y);if(rt===0||lt<=x)a.Cb=Math.max(a.Cb,lt),gp(a,y,a.Cb),b!==null&&b.h(lt,ot);else{for(z=fg(a,tt),tt=tt.substr(z.length),y=fg(a,tt),lt=Tu(z+y);0<y.length&<<=x;)z+=y,tt=tt.substr(y.length),y=fg(a,tt),lt=z+y,E&&(lt=lt.trim()),lt=Tu(lt);for(E&&(y=y.trim()),z+=y,x=Math.max(1,x-rt);Tu(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=vp;var ut=Tu(z);a.Cb=ut,gp(a,z,ut),b!==null&&b.h(ut,ot)}}else{for(rt=0,tt.length===0&&(rt=1,gp(a,tt,0));0<tt.length;){for(y=fg(a,tt),tt=tt.substr(y.length);Tu(y)>x;){var ft=1;for(lt=Tu(y.substr(0,ft)),ut=0;lt<=x;)ft++,ut=lt,lt=Tu(y.substr(0,ft));if(ft===1){var yt=lt;z=Math.max(z,lt)}else yt=ut,z=Math.max(z,ut);if(ft--,1>ft&&(ft=1),gp(a,y.substr(0,ft),yt),rt++,y=y.substr(ft),a.Gc+rt>a.maxLines)break}for(ut=fg(a,tt),lt=Tu(y+ut);0<ut.length&<<=x;)y+=ut,tt=tt.substr(ut.length),ut=fg(a,tt),lt=y+ut,E&&(lt=lt.trim()),lt=Tu(lt);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ut.length===0?(ft=lt,z=Math.max(z,lt)):(ft=ut=Tu(y),z=Math.max(z,ut)),gp(a,y,ft),rt++,a.Gc+rt>a.maxLines))break}a.Le=Math.min(a.maxLines,rt),a.Cb=Math.max(a.Cb,z),b!==null&&b.h(a.Cb,ot*a.Le)}}function fg(a,y){if(a.wrap===wS)return y.substr(0,1);for(var x=y.length,b=0,E=Sx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===CS&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function Tu(a){return dl===null?8*a.length:dl.measureText(a).width}function pp(a){if(a.df!==null)return a.df;var y=a.Ae;if(dl===null){var x=16;return a.df=x}return Ov[y]!==void 0&&5e3>bS?x=Ov[y]:(x=1.3*dl.measureText("M").width,Ov[y]=x,bS++),a.df=x}function SS(a){if(dl===null)return 6;if(zm[a]!==void 0&&5e3>Fv)var y=zm[a];else y=dl.measureText(vp).width,zm[a]=y,Fv++;return y}function xS(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,pp(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
|
|
|
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var z=a.Gc=0,tt,ot=!1;!ot;){if(tt=x.indexOf(`
|
|
|
`,z),tt===-1&&(tt=x.length,ot=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==kv){a.Le=0;var rt=Zn.alloc();Lv(a,z,y,rt),E+=rt.height,Zn.free(rt),a.Gc+=a.Le}else Lv(a,z,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(ot=!0)}z=tt+1}return a.Lq=E}Zt.Object.defineProperties(Lr.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"||(hh(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Cn},set:function(a){var y=this.flip;y!==a&&(hh(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Xa},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),hh(this),this.da.Yr=a,Vs(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Zn.alloc();Lv(this,this.ec,999999,a);var y=a.width;Zn.free(a),a=xS(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Jr(this.dc,y,a)}return this.dc}},isMultiline:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",y,a))}},isUnderline:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;y!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",y,a))}},isStrikethrough:{get:function(){return(this.l&8388608)!==0},set:function(a){var y=(this.l&8388608)!==0;y!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",y,a))}},wrap:{get:function(){return this.da!==null?this.da.$r:Nv},set:function(a){var y=this.wrap;y!==a&&(hh(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Tv},set:function(a){var y=this.overflow;y!==a&&(hh(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&&wf(a,"TextBlock.stroke"),a instanceof dr&&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&&(hh(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&&(hh(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 Th),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 Th),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 Th),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 Th),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 Th),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&&(hh(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&&(hh(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&&(hh(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&&(hh(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&&(hh(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&&cn(a,"> 0",Lr,"maxLines"),hh(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 Dm=null,Am=null,kv=new en(Lr,"None",0),PS=new en(Lr,"WrapFit",1),Nv=new en(Lr,"WrapDesiredSize",2),wS=new en(Lr,"WrapBreakAll",3),Tv=new en(Lr,"OverflowClip",0),Rm=new en(Lr,"OverflowEllipsis",1),mp=new en(Lr,"FormatTrim",0),CS=new en(Lr,"FormatNone",0),Sx=/[ \u200b\u00ad]/,Ov=new ki,bS=0,zm=new ki,Fv=0,vp="...",ES="",dl=null,jm=!1;Lr.className="TextBlock";function Iv(){this.nc=!1,this.Hd=null,this.Xf=Cn,this.gq=mp,this.Jq=1/0,this.$q=Tv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Xa,this.$r=Nv}Iv.prototype.copy=function(){var a=new Iv;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},Lr.getEllipsis=function(){return vp},Lr.setEllipsis=function(a){vp=a,zm=new ki,Fv=0},Lr.getBaseline=function(){return Dm},Lr.setBaseline=function(a){Dm=a},Lr.getUnderline=function(){return Am},Lr.setUnderline=function(a){Am=a},Lr.isValidFont=function(a){if(jm||(dl=ua?new vu(null).context:null,jm=!0),dl===null)return!0;var y=dl.font;if(a===y||a==="10px sans-serif")return!0;dl.font="10px sans-serif",dl.font=a;var x=dl.font;if(x!=="10px sans-serif")return dl.font=y,!0;dl.font="19px serif";var b=dl.font;return dl.font=a,x=dl.font,dl.font=y,x!==b},Lr.FormatNone=CS,Lr.FormatTrim=mp,Lr.None=kv,Lr.OverflowClip=Tv,Lr.OverflowEllipsis=Rm,Lr.WrapBreakAll=wS,Lr.WrapDesiredSize=Nv,Lr.WrapFit=PS;function Th(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Th.prototype.copy=function(){var a=new Th;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Th.className="GradElementSettings";function cl(a,y){Ee.call(this),this.Eg=null,this.qo="",this.Xg=tr,this.Nk=On,this.Zg=this.Hd=null,this.Mk=Zo,this.Xf=Cn,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 gg;Ae(cl,Ee),cl.prototype.cloneProtected=function(a){Ee.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},cl.prototype.qb=function(a){a===Cn||a===wi||a===Fo?this.imageStretch=a:Ee.prototype.qb.call(this,a)},cl.prototype.toString=function(){return"Picture("+this.source+")#"+ji(this)};function pg(a){a===void 0&&(a=""),a!==""?gg[a]&&(delete gg[a],Hm--):(gg=new ki,Hm=0)}function MS(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var z=y.getAttribute("src")||"",tt=E.Og.I(z);if(tt!==null)for(var ot=tt.length,rt=0;rt<ot;rt++)z=tt[rt],E.Xn.add(z),z.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(za(a,!1),a.v())},y.Yp=function(x){y.ln=x;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value,z=y.getAttribute("src")||"",tt=E.Og.I(z);if(tt!==null){E=tt.length,z=Rn();for(var ot=0;ot<E;ot++)z.push(tt[ot]);if(y.hn)for(ot=0;ot<E;ot++)tt=z[ot],tt.Hd!==null&&tt.Hd(tt,x);ni(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}cl.prototype.hA=function(){if(this.source!==""){pg(this.source);var a=this.source;this.source="",this.source=a}},cl.prototype.redraw=function(){this.N(),this.Uc=!0},cl.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var b=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(b===null||b==="")||x.ln instanceof Event&&a instanceof $c)){var E=a instanceof Nl;b=this.naturalBounds;var z=0,tt=0,ot=this.qn,rt=ot?+x.width:x.naturalWidth;if(ot=ot?+x.height:x.naturalHeight,rt===void 0&&x.videoWidth&&(rt=x.videoWidth),ot===void 0&&x.videoHeight&&(ot=x.videoHeight),rt=rt||b.width,ot=ot||b.height,rt!==0&&ot!==0){var lt=rt,ut=ot;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,rt=this.Xg.width,ot=this.Xg.height);var ft=rt,yt=ot,Pt=this.Nk,bt=this.Mk;switch(Pt){case Cn:if(this.sourceRect.w())break;ft>=b.width&&(z=z+bt.offsetX+(ft*bt.x-b.width*bt.x)),yt>=b.height&&(tt=tt+bt.offsetY+(yt*bt.y-b.height*bt.y)),rt=Math.min(b.width,ft),ot=Math.min(b.height,yt);break;case On:ft=b.width,yt=b.height;break;case wi:case Fo:Pt===wi?(Pt=Math.min(b.height/yt,b.width/ft),ft*=Pt,yt*=Pt):Pt===Fo&&(Pt=Math.max(b.height/yt,b.width/ft),ft*=Pt,yt*=Pt,ft>=b.width&&(z=(z+bt.offsetX+(ft*bt.x-b.width*bt.x)/ft)*rt),yt>=b.height&&(tt=(tt+bt.offsetY+(yt*bt.y-b.height*bt.y)/yt)*ot),rt*=1/(ft/b.width),ot*=1/(yt/b.height),ft=b.width,yt=b.height)}Pt=this.Df()*y.scale;var Bt=ft*Pt*yt*Pt,Jt=rt*ot/Bt,Gt=x.__goCache;Pt=null;var se=xx;if(!E){if(x.sq&&Gt!==void 0&&4<Bt&&Jt>se*se)for(Gt.gi===null&&(kS(Gt,4,lt,ut,x),kS(Gt,16,lt,ut,x)),E=Gt.gi,lt=E.length,ut=0;ut<lt&&E[ut].ratio*E[ut].ratio<Jt;ut++)Pt=E[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new vu(null).context;try{E.drawImage(this.Eg,0,0)}catch(ue){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(ue){this.vl=!0}}if(this.vl)return}}switch(E=ft<b.width?bt.offsetX+(b.width*bt.x-ft*bt.x):0,bt=yt<b.height?bt.offsetY+(b.height*bt.y-yt*bt.y):0,this.flip){case Ko:a.translate(Math.min(b.width,ft),0),a.scale(-1,1);break;case Eo:a.translate(0,Math.min(b.height,yt)),a.scale(1,-1);break;case Sr:a.translate(Math.min(b.width,ft),Math.min(b.height,yt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Gt!==void 0&&Pt!==null&&Pt.ratio!==1){a.save(),y=Pt.ratio;try{a.drawImage(Pt.source,z/y,tt/y,Math.min(Pt.source.width,rt/y),Math.min(Pt.source.height,ot/y),E,bt,Math.min(b.width,ft),Math.min(b.height,yt)),a instanceof Nl&&(this.bt=[z/y,tt/y,Math.min(Pt.source.width,rt/y),Math.min(Pt.source.height,ot/y),E,bt,Math.min(b.width,ft),Math.min(b.height,yt)])}catch(ue){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,rt,ot,E,bt,Math.min(b.width,ft),Math.min(b.height,yt)),a instanceof Nl&&(this.bt=[z,tt,rt,ot,E,bt,Math.min(b.width,ft),Math.min(b.height,yt)])}catch(ue){this.en=!1}switch(this.flip){case Ko:a.scale(-1,1),a.translate(-Math.min(b.width,ft),0);break;case Eo:a.scale(1,-1),a.translate(0,-Math.min(b.height,yt));break;case Sr:a.scale(-1,-1),a.translate(-Math.min(b.width,ft),-Math.min(b.height,yt))}}}}},cl.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,z=hl(this,!0),tt=this.Eg,ot=this.qn,rt=0,lt=0;(ot||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(rt=ot?+tt.width:tt.naturalWidth,lt=ot?+tt.height:tt.naturalHeight),isFinite(E.width)||z===On||z===Li?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=rt)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:rt),isFinite(E.height)||z===On||z===Ai?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=lt)),b=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:lt),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),b=Math.max(b||0,z.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Jr(this.dc,a,y),this.Ge(0,0,a,y)},cl.prototype.eh=function(a,y,x,b){js(this,a,y,x,b)},Zt.Object.defineProperties(cl.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||_t("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Xg(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new tn),b!==null&&x&&Yd(b,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(za(this,!1),this.v())):x&&MS(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=gg;if(ua){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Hm&&(pg(),x=gg),b=Re("img"),b.hn=!0,MS(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Hm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new LS),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}}}),cl.prototype.redraw=cl.prototype.redraw,cl.prototype.reloadSource=cl.prototype.hA;var Hm=0,xx=4;cl.className="Picture",gg=new ki,cl.clearCache=pg;function LS(){this.gi=null}function kS(a,y,x,b,E){a.gi===null&&(a.gi=[]);var z=new vu(null),tt=z.context,ot=1/y;z.width=x/y,z.height=b/y,z.width!==0&&z.height!==0&&(y=new NS(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),tt.setTransform(ot*x,0,0,ot*x,0,0),tt.yc(),tt.drawImage(E,0,0),a.gi.push(y))}LS.className="PictureCacheArray";function NS(a,y){this.source=a,this.ratio=y}NS.className="PictureCacheInstance";function mg(){this.os=new $n,this.mc=null}mg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new $n,this.mc=null};function vg(a,y,x,b,E,z){a.mc=new Za,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function Px(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}mg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new Xo(Ca);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},mg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new Xo(Mr);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function bd(a,y,x,b,E,z,tt){var ot;ot===void 0&&(ot=!1);var rt=new Xo(ls);rt.point1X=y,rt.point1Y=x,rt.point2X=b,rt.point2Y=E,rt.endX=z,rt.endY=tt,ot&&rt.close(),a.mc.segments.add(rt)}function Gm(a,y,x,b,E){var z;z===void 0&&(z=!1);var tt=new Xo(Ml);tt.point1X=y,tt.point1Y=x,tt.endX=b,tt.endY=E,z&&tt.close(),a.mc.segments.add(tt)}mg.prototype.arcTo=function(a,y,x,b,E,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var ot=new Xo(ya);ot.startAngle=a,ot.sweepAngle=y,ot.centerX=x,ot.centerY=b,ot.radiusX=E,ot.radiusY=z!==0?z:E,tt&&ot.close(),this.mc.segments.add(ot)};function wx(a,y,x,b,E,z,tt,ot){var rt;rt===void 0&&(rt=!1),y=new Xo(Hl,tt,ot,y,x,b,E,z),rt&&y.close(),a.mc.segments.add(y)}function TS(a){var y=$m;return y!==null?($m=null,y.reset(a),y):(y=new mg,y.reset(a),y)}var $m=null;mg.className="StreamGeometryContext";function Bs(a,y){var x=a.toLowerCase(),b=ke.Ze;b[a]=y,b[x]=a}Bs("Rectangle",function(a,y,x){a="r"+y+","+x;var b=ke.Mf[a];return b!==void 0||(b=new $n($n.u),b.endX=y,b.endY=x,ke.Nf<ke.vm&&(ke.Mf[a]=b,ke.Nf++)),b}),Bs("Square",function(a,y,x){a="s"+y+","+x;var b=ke.Mf[a];return b!==void 0||(b=new $n($n.u),b.endX=y,b.endY=x,b.defaultStretch=wi,ke.Nf<ke.vm&&(ke.Mf[a]=b,ke.Nf++)),b}),Bs("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=ke.Mf[b];if(E!==void 0)return E;var z=a*ke.wg;return E=new $n().add(new Za(a,0,!0).add(new Xo(Mr,y-a,0)).add(new Xo(ls,y,a,y-z,0,y,z)).add(new Xo(Mr,y,x-a)).add(new Xo(ls,y-a,x,y,x-z,y-z,x)).add(new Xo(Mr,a,x)).add(new Xo(ls,0,x-a,z,x,0,x-z)).add(new Xo(Mr,0,a)).add(new Xo(ls,a,0,0,z,z,0).close())),1<z&&(E.spot1=new xi(0,0,z,z),E.spot2=new xi(1,1,-z,-z)),ke.Nf<ke.vm&&(ke.Mf[b]=E,ke.Nf++),E}),Bs("Border","RoundedRectangle"),Bs("Ellipse",function(a,y,x){a="e"+y+","+x;var b=ke.Mf[a];return b!==void 0||(b=new $n($n.F),b.endX=y,b.endY=x,b.spot1=ju,b.spot2=jl,ke.Nf<ke.vm&&(ke.Mf[a]=b,ke.Nf++)),b}),Bs("Circle",function(a,y,x){a="c"+y+","+x;var b=ke.Mf[a];return b!==void 0||(b=new $n($n.F),b.endX=y,b.endY=x,b.spot1=ju,b.spot2=jl,b.defaultStretch=wi,ke.Nf<ke.vm&&(ke.Mf[a]=b,ke.Nf++)),b}),Bs("TriangleRight",function(a,y,x){return new $n().add(new Za(0,0).add(new Xo(Mr,y,.5*x)).add(new Xo(Mr,0,x).close())).pm(0,.25,.5,.75)}),Bs("TriangleDown",function(a,y,x){return new $n().add(new Za(0,0).add(new Xo(Mr,y,0)).add(new Xo(Mr,.5*y,x).close())).pm(.25,0,.75,.5)}),Bs("TriangleLeft",function(a,y,x){return new $n().add(new Za(y,x).add(new Xo(Mr,0,.5*x)).add(new Xo(Mr,y,0).close())).pm(.5,.25,1,.75)}),Bs("TriangleUp",function(a,y,x){return new $n().add(new Za(y,x).add(new Xo(Mr,0,x)).add(new Xo(Mr,.5*y,0).close())).pm(.25,.5,.75,1)}),Bs("Triangle","TriangleUp"),Bs("Diamond",function(a,y,x){return new $n().add(new Za(.5*y,0).add(new Xo(Mr,0,.5*x)).add(new Xo(Mr,.5*y,x)).add(new Xo(Mr,y,.5*x).close())).pm(.25,.25,.75,.75)}),Bs("LineH",function(a,y,x){return a=new $n($n.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Bs("LineV",function(a,y,x){return a=new $n($n.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Bs("None","Rectangle"),Bs("BarH","Rectangle"),Bs("BarV","Rectangle"),Bs("MinusLine","LineH"),Bs("PlusLine",function(a,y,x){return new $n().add(new Za(0,x/2,!1).add(new Xo(Mr,y,x/2)).add(new Xo(Ca,y/2,0)).add(new Xo(Mr,y/2,x)))}),Bs("XLine",function(a,y,x){return new $n().add(new Za(0,x,!1).add(new Xo(Mr,y,0)).add(new Xo(Ca,0,0)).add(new Xo(Mr,y,x)))}),Bs("LineRight",function(a,y,x){return new $n().add(new Za(.25*y,0,!1).add(new Xo(Mr,.75*y,.5*x)).add(new Xo(Mr,.25*y,x)))}),Bs("LineDown",function(a,y,x){return new $n().add(new Za(0,.25*x,!1).add(new Xo(Mr,.5*y,.75*x)).add(new Xo(Mr,y,.25*x)))}),Bs("LineLeft",function(a,y,x){return new $n().add(new Za(.75*y,0,!1).add(new Xo(Mr,.25*y,.5*x)).add(new Xo(Mr,.75*y,x)))}),Bs("LineUp",function(a,y,x){return new $n().add(new Za(0,.75*x,!1).add(new Xo(Mr,.5*y,.25*x)).add(new Xo(Mr,y,.75*x)))}),ke.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 Bv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=wr,this.ir=null,this.jr="",this.lr=hr,this.Gq="",this.Hq=ea,this.Pq=or,this.Kq=Cr,this.Up=null,this.Cq=127,this.zr=Fr,this.yr="gray",this.Vg=4}Bv.prototype.copy=function(){var a=new Bv;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 Fi(a,y){a===void 0||a instanceof Ka||typeof a=="string"?Fn.call(this,a):(Fn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new $t(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new an,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Ae(Fi,Fn),Fi.prototype.cloneProtected=function(a){Fn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Ct=Fi.prototype,Ct.Af=function(a){Fn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Ct.toString=function(){var a=Qn(this.constructor)+"#"+ji(this);return this.data!==null&&(a+="("+qn(this.data)+")"),a};function fl(a){a.P===null?a.P=new Bv:a.P.nc&&(a.P=a.P.copy())}Ct.th=function(){Fn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Ct.gk=function(a,y,x,b,E,z,tt){var ot=this.diagram;ot!==null&&(a===pa&&y==="elements"?E instanceof Fn?Zc(E,function(rt){sy(ot.partManager,rt),Dc(ot,rt)}):Yd(ot,E):a===Ba&&y==="elements"&&(E instanceof Fn?Zc(E,function(rt){ly(ot.partManager,rt,ot)}):Xg(ot,E)),ot.cb(a,y,x,b,E,z,tt))},Ct.La=function(a){if(Fn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E instanceof Fn&&Zc(E,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Fi.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Fi.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Fi.prototype.bh=function(a,y){if(y!==null){var x=null,b=this.Qf;if(b!==null&&(x=b.I(a)),x!==y){if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}b===null&&(this.Qf=b=new li),y.Tf!==a&&(y.category=a),b.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},Fi.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Fi.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Rn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);ni(y)}},Fi.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof io?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Qo))break t;yu(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Fn.Link),x.adornedObject=y)}if(x!==null){x.type===Fn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},Fi.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Dv(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 Zm(a){if(qd(a)===!1){Rv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function OS(a){if(a.G|=2097152,qd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||BS(a,y,x),x=a.Ib;var b=an.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),an.free(b),Rv(a,!1)}}Fi.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new Po);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),this.Lb=z,z.ws()||z.pp(E)},Fi.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Zo;this.locationSpot.sb()&&(z=this.locationSpot);var tt=$t.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,b,E,z);a.rotate(this.Kb,tt.x,tt.y),$t.free(tt)}},Fi.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Fi.prototype.moveTo=function(a,y,x){a=$t.allocAt(a,y),this.move(a,x),$t.free(a)},Fi.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())},Fi.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())},Fi.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new li),y.I(a)!==null)return y.I(a);var x=Fn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Ed(a,y,x,b){b===void 0&&(b=new $t),x=x.Mc()?Zo:x;var E=y.naturalBounds;if(b.h(E.width*x.x+x.offsetX,E.height*x.y+x.offsetY),y===null||y===a)return b;for(y.transform.Ga(b),y=y.panel;y!==null&&y!==a;)y.transform.Ga(b),y=y.panel;return a.Lb!==null&&a.Lb.Ga(b),b.offset(-a.uc.x,-a.uc.y),b}Fi.prototype.mi=function(a){return a===void 0&&(a=new an),a.assign(this.actualBounds)},Fi.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function FS(a){var y=$t.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof yo?x.strokeWidth:0;if(y.yi(0,0,b.width+E,b.height+E,a.locationSpot),x!==a)for(y.offset(-E/2,-E/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function _c(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=uS(a));var b=a.ag,E=2*b;if(!a.isShadowed)return x.h(y.x-1-b,y.y-1-b,y.width+2+E,y.height+2+E),x;b=y.x,E=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,b-=tt/2,E-=tt/2,0<a.x?z+=a.x:(b+=a.x,z-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,z+2,y+2),x}Fi.prototype.arrange=function(){if(Us(this)===!1)OS(this);else{Mh(this,!1);var a=this.Ib,y=an.alloc();y.assign(a);var x=tc(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;BS(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||ke.B(y.width,a.width)&&ke.B(y.height,a.height)||0<=this.vw&&this.C(16),an.free(y),Rv(this,!1)}},Ct=Fi.prototype,Ct.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=an.alloc();E.assign(x.documentBounds),E.Fv(x.padding),a.x>E.x&&a.y>E.y&&a.right<E.right&&a.bottom<E.bottom&&y.x>E.x&&y.y>E.y&&y.right<E.right&&y.bottom<E.bottom&&(b=!0),an.free(E)}!(this.G&65536)&&a.D(y)||RS(this,b,x),x.N(),!a.w()&&!y.w()||Ds(a,y)||(this instanceof ei&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Ct.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&IS(this,b,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||b!==null&&!b.animationManager.isTicking&&b.undoManager.isUndoingRedoing||(b=this.ke,this.ke=new $t(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),qd(this)===!1&&Us(this)===!1&&(Zm(this),OS(this)),!0};function IS(a,y,x,b,E){y===null||a instanceof Qo||(y=y.animationManager,y.zb&&Wu(y,a,new $t(b,E),x))}Ct.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;qd(this)||Us(this)?E.h(NaN,NaN):E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}else{if(E.x===a&&E.y===y)return;b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}Zm(this)},Ct.Av=function(){this.G&=-2097153,Zm(this)};function BS(a,y,x){var b=FS(a),E=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?DS(a,y,x,E,b):AS(a,y,x,E,b):z?DS(a,y,x,E,b):tt&&AS(a,y,x,E,b),a.G|=2097152,$t.free(b),a.Uk()}function DS(a,y,x,b,E){var z=y.x,tt=y.y;y.h(x.x-E.x,x.y-E.y),b!==null&&(x=b.animationManager,(b=x.defaultAnimation.isAnimating)||!x.zb||a instanceof Qo||Wu(x,a,new $t(z,tt),y),b||y.x===z&&y.y===tt||a.g("position",new $t(z,tt),y.copy()))}function AS(a,y,x,b,E){var z=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(z)||b===null||a.g("location",z,x.copy())}function RS(a,y,x){zv(a,!1),a instanceof ei&&yd(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?tc(a)?(Nr(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Ct.si=function(){return!0},Ct.Zc=function(){return!0},Ct.ph=function(){return!1},Ct.Dd=function(){return!0};function Av(a,y,x,b){y.constructor===a.constructor||HS||(HS=!0,Bn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Bn(" Old class: "+Qn(a.constructor)+", new class: "+Qn(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,ot=!0,rt=!0,lt=!1;a instanceof ei&&(ot=a.isTreeLeaf,rt=a.isTreeExpanded,lt=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=b,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,b=!0,y!==null&&(b=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=E,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof ei&&(a.U=ot?a.U|4:a.U&-5,a.U=rt?a.U|1:a.U&-2,a.U=lt?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}Fi.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},Fi.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},Fi.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},Fi.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},Fi.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},Fi.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},Fi.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},Fi.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},Fi.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 qd(a){return(a.G&32768)!==0}function Rv(a,y){a.G=y?a.G|32768:a.G&-32769}function zv(a,y){a.G=y?a.G|65536:a.G&-65537}function tc(a){return(a.G&131072)!==0}Ct=Fi.prototype,Ct.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Wm(a,y){a.G=y?a.G|1048576:a.G&-1048577}Ct.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Ct.N=function(){var a=this.diagram;a!==null&&!Us(this)&&!qd(this)&&this.isVisible()&&this.Ib.w()&&a.N(_c(this,this.Ib))},Ct.v=function(){Fn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof ei&&this.labeledLink!==null&&Vs(this.labeledLink),a.$b(!0))},Ct.Vo=function(a){a||(a=this.Ah,a!==null&&Wv(a,this))},Ct.Wo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},Ct.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Ct.oz=function(){return jv(this,this)};function jv(a,y){var x=y.containingGroup;return x!==null?1+jv(a,x):y instanceof ei&&(y=y.labeledLink,y!==null)?jv(a,y):0}Ct.sz=function(){return zS(this,this)};function zS(a,y){var x=y.containingGroup;return x!==null||y instanceof ei&&(x=y.labeledLink,x!==null)?zS(a,x):y}Ct.Td=function(a){return a instanceof io?Hv(this,this,a):!1};function Hv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Hv(a,b,x)?y instanceof ei&&(y=y.labeledLink,y!==null)?Hv(a,y,x):!1:!0}Ct.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof io&&Wm(y,!0),y instanceof ei){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 ei&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof io&&Wm(y,!1),y instanceof ei&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Fi.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof ei&&this.isLinkLabel)},Fi.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 ei&&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 jS(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function ec(a,y,x,b,E,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Qo)){if(a.add(y),y instanceof ei){if(x&&y instanceof io)for(var tt=y.memberParts;tt.next();)ec(a,tt.value,x,b,E,z);if(E!==!1)for(tt=y.linksConnected;tt.next();){var ot=tt.value;if(!a.contains(ot)){var rt=ot.fromNode,lt=ot.toNode;rt=rt===null||a.contains(rt),lt=lt===null||a.contains(lt),(E?rt&<:rt||lt)&&ec(a,ot,x,b,E,z)}}if(1<b)for(y=y.Ou();y.next();)ec(a,y.value,x,b-1,E,z)}else if(y instanceof jn)for(y=y.labelNodes;y.next();)ec(a,y.value,x,b,E,z)}}Zt.Object.defineProperties(Fi.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Zi:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var b=y.pc(-1,this,!0);if(0<=b&&x.cb(Ba,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(pa,"parts",a,null,this,!0,b),b=this.layerChanged,b!==null){var E=x.aa;x.aa=!0,b(this,y,a),x.aa=E}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(fl(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&&gu(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 Qo?this.type!==Fn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:or},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),fl(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Cr},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),fl(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&&(fl(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:ea},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),fl(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,b=this.ke;if(!(b.x===y||isNaN(b.x)&&isNaN(y))||!(b.y===x||isNaN(b.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,Us(this)===!1&&(Zm(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),IS(this,E,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",b,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,b=this.data,E=null;if(x!==null&&b!==null&&!(this instanceof Qo)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof Qo?this instanceof Qo&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(yu(x),x=x.copy(),x!==null&&Av(this,x,y,a))):(z!==null&&z.jm(b,a),x=d1(x.partManager,b,a),x!==null&&(yu(x),x=x.copy(),x===null||x instanceof jn||(b=this.location.copy(),Av(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){Av(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(fl(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&&(fl(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&&(fl(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 jn?(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&&(fl(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&&(fl(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&&(fl(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:wr},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),fl(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&&(fl(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&&(fl(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:hr},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),fl(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&&_t("Cannot make a Group a member of itself: "+this.toString()),_t("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Kv(y,this):this instanceof io&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Wv(a,this):this instanceof io&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var z=E.wa(a!==null?a.data:null);E.mp(b,z)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof io){for(x=new tn,ec(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof ei)for(b=b.linksConnected;b.next();)yg(b.value)}if(this instanceof ei){for(x=this.linksConnected;x.next();)yg(x.value);x=this.labeledLink,x!==null&&yg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&gu(y,-1,a))}}else _t("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&&(fl(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof ei&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(fl(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&&(fl(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Fr},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),fl(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&&(fl(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&&(fl(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Fi.prototype.invalidateLayout=Fi.prototype.C,Fi.prototype.findCommonContainingGroup=Fi.prototype.px,Fi.prototype.isMemberOf=Fi.prototype.Td,Fi.prototype.findTopLevelPart=Fi.prototype.sz,Fi.prototype.findSubGraphLevel=Fi.prototype.oz,Fi.prototype.ensureBounds=Fi.prototype.Va,Fi.prototype.getDocumentBounds=Fi.prototype.mi,Fi.prototype.findObject=Fi.prototype.fb,Fi.prototype.moveTo=Fi.prototype.moveTo,Fi.prototype.invalidateAdornments=Fi.prototype.Wb,Fi.prototype.clearAdornments=Fi.prototype.Ej,Fi.prototype.removeAdornment=Fi.prototype.Jf,Fi.prototype.addAdornment=Fi.prototype.bh,Fi.prototype.findAdornment=Fi.prototype.Pj,Fi.prototype.updateTargetBindings=Fi.prototype.La;var HS=!1;Fi.className="Part",Fi.LayoutNone=0,Fi.LayoutAdded=1,Fi.LayoutRemoved=2,Fi.LayoutShown=4,Fi.LayoutHidden=8,Fi.LayoutNodeSized=16,Fi.LayoutGroupLayout=32,Fi.LayoutNodeReplaced=64,Fi.LayoutStandard=127,Fi.LayoutAll=16777215;function Qo(a,y){a===void 0||a instanceof Ka||typeof a=="string"?Fi.call(this,a):(Fi.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)}Ae(Qo,Fi),Qo.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Qo.prototype.updateRelationshipsFromData=function(){},Qo.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof jn&&y instanceof yo){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var b=0;b<y;b++){var E=x[b];E.isPanelMain&&E instanceof yo&&(E.ua=a)}}},Qo.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Us(a))},Qo.prototype.Zc=function(){return!1},Qo.prototype.gk=function(a,y,x,b,E,z,tt){if(a===pa&&y==="elements"){if(E instanceof Xs)this.$a===null&&(this.$a=E);else if(E instanceof Fn){var ot=E.Nl(function(rt){return rt instanceof Xs});ot instanceof Xs&&this.$a===null&&(this.$a=ot)}}else a===Ba&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Fn&&this.$a.rg(b)&&(this.$a=null));Fi.prototype.gk.call(this,a,y,x,b,E,z,tt)},Qo.prototype.updateAdornments=function(){},Qo.prototype.Lj=function(){},Zt.Object.defineProperties(Qo.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}}}),Qo.className="Adornment";function Gv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Ls,this.er=Vm,this.Kr=this.ij=this.Nq=this.Mq=null}Gv.prototype.copy=function(){var a=new Gv;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 ei(a,y){a===void 0||a instanceof Ka||typeof a=="string"?Fi.call(this,a):(Fi.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)}Ae(ei,Fi),ei.prototype.cloneProtected=function(a){Fi.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Ct=ei.prototype,Ct.Af=function(a){Fi.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Md(a){a.Ba===null?a.Ba=new Gv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Ct.th=function(){Fi.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function GS(a,y){y!==null&&(a.af===null&&(a.af=new tn),a.af.add(y))}function $S(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var z=E.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===b||z.Ds===y&&z.cv===a&&z.Ox===b&&z.Px===x)return z}return null}Ct.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=$S(this,a,y,x),a!==null&&a.Sl()},Ct.gk=function(a,y,x,b,E,z,tt){a===pa&&y==="elements"?this.wc=null:a===Ba&&y==="elements"&&(this.wc=null),Fi.prototype.gk.call(this,a,y,x,b,E,z,tt)},Ct.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Tl(x.fromPort),Tl(x.toPort),x.bb())}};function ZS(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Tl(x.fromPort),Tl(x.toPort),x.bb())}}function Tl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Tl(y.port)}}Ct.si=function(){return!0},ei.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},ei.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},ei.prototype.isVisible=function(){if(!Fi.prototype.isVisible.call(this))return!1;var a=!0,y=xd,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===xd){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Ra){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===ig&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},ei.prototype.Zb=function(a){Fi.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var b=x.To(this);b===null||b.Td(this.containingGroup)||x.bb()}x.Zb(a)}},ei.prototype.qx=function(){var a=new tn,y=new tn;return WS(this,this,a,y),y.iterator};function WS(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,z=a.diagram;z!==null&&(E=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(E?tt.fromNode===y:tt.toNode===y)&&WS(a,E?tt.toNode:tt.fromNode,x,b):b.add(tt)})}}ei.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new $i(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},Ct=ei.prototype,Ct.Mo=function(a){a===void 0&&(a=null);var y=new $i(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},Ct.Sd=function(a){a===void 0&&(a=null);var y=new $i(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},Ct.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new tn,y.add(x),y.add(E)):x=E):E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new tn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Ri(x):Zi},Ct.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new tn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Ri(x):Zi},Ct.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new tn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Ri(x):Zi},Ct.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new $i(this.jb),E=this;return b.predicate=function(z){return!((z.fromNode!==E||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==E||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},b},Ct.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new $i(this.jb),E=this;return b.predicate=function(z){return!(z.fromNode!==E||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},b};function Km(a,y,x){Tl(x);var b=a.jb.contains(y);if(b||a.jb.add(y),!b||y.fromNode===y.toNode){var E=a.linkConnected;if(E!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),E(a,y,x),tt!==null&&(tt.aa=z)}}!b&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(b=!0,a=a.diagram,a!==null&&(b=a.isTreePathToChildren),E=b?y:x,z=b?x:y,E.ci||(E.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function _m(a,y,x){Tl(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var z=a.linkDisconnected;if(E=a.diagram,z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(a,y,x),E!==null&&(E.aa=tt)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):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 b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}ei.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Ct=ei.prototype,Ct.Vo=function(a){Fi.prototype.Vo.call(this,a),a||(yp(this),a=this.Yk,a!==null&&qS(a,this))},Ct.Wo=function(a){Fi.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Ct.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,Fi.prototype.Lj.call(this)},Ct.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;KS(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function KS(a){a.wc===null?a.wc=new li:a.wc.clear(),a.qm(a,function(y,x){_S(y,x)}),a.wc.count===0&&a.wc.add("",a)}function _S(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function $v(a,y,x){var b=y.portId;if(b!==null&&(a.wc!==null&&a.wc.remove(b),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(b);a.next();)b=a.value,x===null&&(x=Rn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);ni(x)}}}Ct.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var b=x.jb.iterator;b.next();){var E=b.value;if(E.isTreeLink&&(y=E.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,b=x.jb.iterator;b.next()&&(E=b.value,!E.isTreeLink||(y=E.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Ct.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink&&(a=b.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(b=x.value,!b.isTreeLink||(a=b.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Ct.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Wm(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;)Wm(y,!1),y=y.pg();return x},Ct.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},Ct.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof ei)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},Ct.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new tn;return a(this,y),y},Ct.uz=function(){return VS(this,this)};function VS(a,y){return y=y.pg(),y===null?0:1+VS(a,y)}Ct.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new $i(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},Ct.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,b=this.jb.iterator;if(a)for(;b.next();)a=b.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new mn,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new mn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Ri(x):Zi},Ct.wz=function(a){a===void 0&&(a=1/0);var y=new tn;return ec(y,this,!1,a,!0),y},ei.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new tn;x.add(this),US(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===xd),y.Ue=!1}};function US(a,y,x,b,E,z,tt){if(1<b)for(var ot=x?a.Mo():a.Sd();ot.next();){var rt=ot.value;rt.isTreeLink&&(rt=rt.To(a),rt===null||rt===a||y.contains(rt)||(y.add(rt),US(rt,y,x,b-1,E,z,tt)))}else YS(a,y,x,E,z,tt)}function YS(a,y,x,b,E,z){for(var tt=E===a?!0:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),rt={};ot.next();){var lt=ot.value;if(lt.isTreeLink&&(lt=lt.To(a),lt!==null&<!==a)){var ut=y.contains(lt);if(ut||y.add(lt),tt){var ft=x?lt.Oo():lt.Po();rt.uv=a,ft.all(function(yt){return function(Pt){return Pt===yt.uv||!Pt.isTreeExpanded}}(rt))&&b.Aj(lt,E),lt.oh(),lt.Zb(!1)}lt.isTreeExpanded&&(lt.wasTreeExpanded=lt.isTreeExpanded,ut||YS(lt,y,x,b,E,z))}rt={uv:rt.uv}}a.isTreeExpanded=!1}ei.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new tn;x.add(this),XS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===xd),y.Ue=!1}};function XS(a,y,x,b,E,z,tt){for(var ot=z===a?!1:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),lt={};rt.next();){var ut=rt.value;if(ut.isTreeLink&&(ot||ut.fd||ut.bb(),ut=ut.To(a),ut!==null&&ut!==a&&!y.contains(ut))){if(y.add(ut),!ot){ut.Zb(!0),ut.oh();var ft=x?ut.Oo():ut.Po();lt.vv=a,ft.all(function(yt){return function(Pt){return Pt===yt.vv||!Pt.isTreeExpanded}}(lt))&&E.Cj(ut,z)}(2<b||ut.wasTreeExpanded)&&(ut.wasTreeExpanded=!1,XS(ut,y,x,b-1,E,z,tt))}lt={vv:lt.vv}}a.isTreeExpanded=!0}Zt.Object.defineProperties(ei.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Vm},set:function(a){var y=this.portSpreading;y!==a&&(Md(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&&yd(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Ls},set:function(a){typeof a=="number"&&(a=new vi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Md(this),this.Ba.yp=a;var x=this.diagram;x!==null&&yd(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&&(Md(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&&(Md(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&&(Md(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,b=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&b!==null&&!x.undoManager.isUndoingRedoing){var E=y.data,z=x.model;if(E!==null&&z.ri()){var tt=z.wa(b);tt!==void 0&&z.Qx(E,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&(qS(a,this),x===null||b===null||x.undoManager.isUndoingRedoing||(E=a.data,x=x.model,E!==null&&x.ri()&&(b=x.wa(b),b!==void 0&&x.Bu(E,b))),this.containingGroup=a.containingGroup),Vs(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&KS(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(Md(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))}}}),ei.prototype.expandTree=ei.prototype.expandTree,ei.prototype.collapseTree=ei.prototype.collapseTree,ei.prototype.findTreeParts=ei.prototype.wz,ei.prototype.findTreeChildrenNodes=ei.prototype.Ou,ei.prototype.findTreeChildrenLinks=ei.prototype.Qo,ei.prototype.findTreeLevel=ei.prototype.uz,ei.prototype.findTreeParentChain=ei.prototype.vz,ei.prototype.findTreeParentNode=ei.prototype.pg,ei.prototype.findTreeParentLink=ei.prototype.kh,ei.prototype.findCommonTreeParent=ei.prototype.gz,ei.prototype.findTreeRoot=ei.prototype.xz,ei.prototype.isInTreeOf=ei.prototype.Nz,ei.prototype.findPort=ei.prototype.ns,ei.prototype.findLinksTo=ei.prototype.kz,ei.prototype.findLinksBetween=ei.prototype.jz,ei.prototype.findNodesInto=ei.prototype.Oo,ei.prototype.findNodesOutOf=ei.prototype.Po,ei.prototype.findNodesConnected=ei.prototype.Mu,ei.prototype.findLinksInto=ei.prototype.Sd,ei.prototype.findLinksOutOf=ei.prototype.Mo,ei.prototype.findExternalTreeLinksConnected=ei.prototype.qx,ei.prototype.invalidateConnectedLinks=ei.prototype.Bd,ei.prototype.invalidateLinkBundle=ei.prototype.Lz;var bx=new en(ei,"SpreadingNone",10),Vm=new en(ei,"SpreadingEvenly",11),Zv=new en(ei,"SpreadingPacked",12);ei.className="Node",ei.SpreadingNone=bx,ei.SpreadingEvenly=Vm,ei.SpreadingPacked=Zv;function io(a,y){a===void 0||a instanceof Ka||typeof a=="string"?ei.call(this,a):(ei.call(this),a&&(y=a)),this.U|=4608,this.Gn=new tn,this.$a=null,this.Sc=new $r,this.Sc.group=this,this.gl=new tn,this.tb=this.$p=null,y&&Object.assign(this,y)}Ae(io,ei),io.prototype.cloneProtected=function(a){ei.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Xs});y instanceof Xs?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())},Ct=io.prototype,Ct.Af=function(a){ei.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 ei)x.Bd(y);else if(x instanceof jn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Ct.gk=function(a,y,x,b,E,z,tt){if(a===pa&&y==="elements"){if(E instanceof Xs)this.$a===null?this.$a=E:this.$a!==E&&_t("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Fn){var ot=E.Nl(function(rt){return rt instanceof Xs});ot instanceof Xs&&(this.$a===null?this.$a=ot:this.$a!==ot&&_t("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Ba&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Fn&&this.$a.rg(b)&&(this.$a=null));ei.prototype.gk.call(this,a,y,x,b,E,z,tt)},Ct.Xl=function(a,y){ei.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Fn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Fn&&(a=a.Pb()),this.tb===null&&(this.tb=new an),a.mi(this.tb),a instanceof yo&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Ct.eh=function(a,y,x,b){this.nf=this.$a,ei.prototype.eh.call(this,a,y,x,b)},Ct.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof jn||y.Va()}),ei.prototype.Va.call(this)},Ct.si=function(){if(!ei.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof ei){if(y.isVisible()&&Us(y))return!1}else if(y instanceof jn&&y.isVisible()&&Us(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Wv(a,y){if(a.Gn.add(y)){y instanceof io&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof jn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Kv(a,y){if(a.Gn.remove(y)){y instanceof io&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof jn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Ct.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)}ei.prototype.Lj.call(this)},io.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=on(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},io.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=on(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},io.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))},Ct=io.prototype,Ct.Bd=function(a){var y=(this.U&65536)!==0;if(ei.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(Tl(x.fromPort),Tl(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Tl(x.fromPort),Tl(x.toPort),x.bb()))}}},Ct.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new tn,b=y.iterator;b.next();){var E=b.value;if(E instanceof ei)for(E=E.linksConnected;E.next();){var z=E.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Ct.iz=function(){var a=this.Rj();a.add(this);for(var y=new tn,x=a.iterator;x.next();){var b=x.value;if(b instanceof ei)for(b=b.linksConnected;b.next();){var E=b.value,z=E.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},Ct.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new tn;return a(this,y),y},Ct.Rj=function(){var a=new tn;return ec(a,this,!0,0,!0),a.remove(this),a},Ct.Zb=function(a){ei.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},io.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();JS(this,y,a,this),a.Ue=!1}};function JS(a,y,x,b){for(var E=a.memberParts;E.next();){var z=E.value;if(z.Zb(!1),z instanceof io&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,JS(z,y,x,b)),z instanceof ei)z.Bd(y),x.Aj(z,b);else if(z instanceof jn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}io.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();QS(this,y,a,this),a.Ue=!1}};function QS(a,y,x,b){for(var E=a.memberParts;E.next();){var z=E.value;if(z.Zb(!0),z instanceof io&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,QS(z,y,x,b)),z instanceof ei)z.Bd(y),x.Cj(z,b);else if(z instanceof jn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}io.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,b=x.x;x=x.y;var E=a.x,z=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===z||isNaN(x)&&isNaN(z))){for(b=E-(isNaN(b)?0:b),x=z-(isNaN(x)?0:x),z=$t.alloc(),ei.prototype.move.call(this,a,y),a=new tn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof jn&&(E.suspendsRouting&&a.add(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(E.suspendsRouting=!0);for(y.reset();y.next();)if(E=y.value,!(E.ph()||E instanceof ei&&E.isLinkLabel)){var tt=E.position,ot=E.location;tt.w()?(z.x=tt.x+b,z.y=tt.y+x,E.position=z):ot.w()&&(z.x=ot.x+b,z.y=ot.y+x,E.location=z)}for(y.reset();y.next();)E=y.value,E instanceof jn&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(tt=E.position,z.x=tt.x+b,z.y=tt.y+x,z.w()?E.move(z):E.bb(),Vv(E)&&E.bb());$t.free(z)}},Zt.Object.defineProperties(io.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&&_t("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&&(Md(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&&(Md(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&&(Md(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(E){E.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(Md(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)}}}),io.prototype.expandSubGraph=io.prototype.expandSubGraph,io.prototype.collapseSubGraph=io.prototype.collapseSubGraph,io.prototype.findSubGraphParts=io.prototype.Rj,io.prototype.findContainingGroupChain=io.prototype.hz,io.prototype.findExternalNodesConnected=io.prototype.iz,io.prototype.findExternalLinksConnected=io.prototype.Lu,io.prototype.ensureBounds=io.prototype.Va,io.className="Group";function Xs(a){Ee.call(this),this.yb=ts,this.ko=new an(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Ae(Xs,Ee),Xs.prototype.cloneProtected=function(a){Ee.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Xs.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return fr(0,0,y.width,y.height,a.x,a.y)},Xs.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof io||a instanceof Qo)||_t("Placeholder is not inside a Group or Adornment."),a instanceof io){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Jr(b,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=$t.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),$t.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof yo&&(tt=z.strokeWidth);var ot=z.Df(),rt=z.naturalBounds,lt=(rt.width+tt)*ot;tt=(rt.height+tt)*ot,a.type!==Fn.Link&&(ot=z.ga(a.category==="Selection"?ea:a.locationSpot,$t.alloc()),a.location=ot,$t.free(ot)),isNaN(lt)||isNaN(tt)?(a=z.ga(ea,$t.alloc()),lt=an.allocAt(a.x,a.y,0,0),lt.Ye(z.ga(As,a)),lt.Ye(z.ga(Al,a)),lt.Ye(z.ga(ol,a)),Jr(y,lt.width+b||0,lt.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),$t.free(a),an.free(lt)):(Jr(y,lt+b||0,tt+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Xs.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Xs.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof io&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var E=x.toolManager.findTool("Dragging");if(E===x.currentTool&&(x=E.computeBorder(y,this.ko,a),x!==null))return x}x=an.alloc(),E=this.computeMemberBounds(x);var z=this.yb;return y instanceof io&&!y.isSubGraphExpanded?a.h(E.x-z.left,E.y-z.top,0,0):a.h(E.x-z.left,E.y-z.top,Math.max(E.width+z.left+z.right,0),Math.max(E.height+z.top+z.bottom,0)),an.free(x),b&&y instanceof io&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Xs.prototype.computeMemberBounds=function(a){if(!(this.part instanceof io))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var ot=tt.value;if(ot.isVisible()){if(ot instanceof jn&&(!y.computesBoundsIncludingLinks||Ul(ot)||ot.fromNode===y||ot.toNode===y))continue;ot=ot.actualBounds,ot.left<x&&(x=ot.left),ot.top<b&&(b=ot.top),ot.right>E&&(E=ot.right),ot.bottom>z&&(z=ot.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,z-b):(y=y.location,a.h(y.x,y.y,0,0)),a},Zt.Object.defineProperties(Xs.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new vi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Xs.className="Placeholder";function jn(a){Fi.call(this,Fn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Js,this.Om=0,this.Qm=Js,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 an,this.ua=new $n,this.u=this.o=this.Sf=this.Wf=null,this.su=new $t,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Ae(jn,Fi),jn.prototype.cloneProtected=function(a){Fi.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())},Ct=jn.prototype,Ct.Af=function(a){Fi.prototype.Af.call(this,a),this.ff=a.ff,this.vf=a.vf,a.Mg=null,a.bb(),a.Sf=this.Sf;var y=a.fromPort;y!==null&&Tl(y),a=a.toPort,a!==null&&Tl(a)},Ct.qb=function(a){a.classType===jn?(a.value&2)===2?this.routing=a:a===Xl||a===kd||a===xg?this.curve=a:a===Pp||a===qm||a===t0?this.adjusting=a:a!==Xv&&a!==Js&&_t("Unknown Link enum value for a Link property: "+a):Fi.prototype.qb.call(this,a)},Ct.Xc=function(){this.ba===null&&(this.ba=new sp)},Ct.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Us(a)||qd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Us(a)||qd(a)))},Ct.zv=function(){return!1},Ct.Av=function(){},Ct.Zc=function(){return!1},jn.prototype.computeAngle=function(a,y,x){return jn.computeAngle(y,x)},jn.computeAngle=function(a,y){switch(a){default:case Js:a=0;break;case wp:a=y;break;case Cp:a=y+90;break;case bp:a=y-90;break;case Jv:a=y+180;break;case e0:a=ke.bp(y),90<a&&270>a&&(a-=180);break;case Ep:a=ke.bp(y+90),90<a&&270>a&&(a-=180);break;case Mp:a=ke.bp(y-90),90<a&&270>a&&(a-=180);break;case n0:if(a=ke.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return ke.bp(a)};function yg(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&Kv(x,a),a.Ah=y,y!==null&&Wv(y,a);var E=a.containingGroupChanged;if(E!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),E(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}Ct=jn.prototype,Ct.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Fi.prototype.oh.call(this)},Ct.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Ct.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function qS(a,y){a.wd===null&&(a.wd=new tn),a.wd.add(y),a.v()}Ct.Vo=function(a){if(Fi.prototype.Vo.call(this,a),Vc(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 b=this.toPort;x===a&&b===y||Km(x,this,b)}Sp(this)}},Ct.Wo=function(a){if(Fi.prototype.Wo.call(this,a),Vc(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 b=this.toPort;x===a&&b===y||_m(x,this,b)}xp(this)}},Ct.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))},jn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},jn.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?Fi.prototype.move.call(this,a,!1):(a=$t.allocAt(x.x+b,x.y+E),Fi.prototype.move.call(this,a,!1),$t.free(a)),Ld(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},jn.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},jn.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},jn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(cr),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Xl))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()===Xl){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return ke.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),ke.ax(b.x,b.y,E.x,E.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,E=z=b=0;b<x/2&&z<y&&(E=tt[z],!(b+E>x/2));)b+=E,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},jn.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()===Xl))return this.ua.wx(.5);if(this.computeCurve()===Xl&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var b=this.i(x+2);return x=this.i(x+3),ke.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var z;E<b/2&&x<a&&(z=y[x],!(E+z>b/2));)E+=z,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},Ct=jn.prototype,Ct.i=function(a){return this.Nb.s[a]},Ct.dd=function(a,y){this.Nb.cd(a,y)},Ct.L=function(a,y,x){this.Nb.cd(a,new $t(y,x))},Ct.Kz=function(a,y){this.Nb.Gb(a,y)},Ct.m=function(a,y,x){this.Nb.Gb(a,new $t(y,x))},Ct.ne=function(a){this.Nb.add(a)},Ct.yf=function(a,y){this.Nb.add(new $t(a,y))},Ct.pv=function(a){this.Nb.mb(a)},Ct.Fj=function(){this.Nb.clear()};function Ld(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var b=a.fd,E=new mn,z=a.Nb.iterator;z.next();){var tt=z.value;E.add(new $t(tt.x+y,tt.y+x).freeze())}E.freeze(),z=a.Nb,a.Nb=E,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),Vs(a)),b?Um(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&Ir(tt.animationManager,a,E),a.g("points",z,E)}}Ct.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Ct.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,z=E.length,tt=0;tt<z;tt++){var ot=E[tt];x=Math.min(ot.x,x),b=Math.min(ot.y,b)}ot=tt=1/0;for(var rt=y.s,lt=rt.length,ut=0;ut<lt;ut++){var ft=rt[ut];tt=Math.min(ft.x,tt),ot=Math.min(ft.y,ot),ft.freeze()}if(y.freeze(),lt===z){for(z=0;z<lt;z++)if(ut=E[z],ft=rt[z],ut.x-x!==ft.x-tt||ut.y-b!==ft.y-ot){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&Ir(x.animationManager,this,y),Um(this),this.g("points",a,y)}},Ct.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))}Ct.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())}},Ct.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()}}},jn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Ef||(Ef=new ei,Ef.desiredSize=Ji,Ef.Va()),this.defaultFromPoint&&(Ef.location=this.defaultFromPoint,Ef.Va(),y=a=Ef)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var b=this.toNode,E=null;if(b===null?(Mf||(Mf=new ei,Mf.desiredSize=Ji,Mf.Va()),this.defaultToPoint&&(Mf.location=this.defaultToPoint,Mf.Va(),E=b=Mf)):E=this.toPort,E===null||b.isVisible()||(x=b.findVisibleNode(),x!==null&&x!==b?(b=x,E=x.port):b=x),this.Mw=b,b===null||!b.location.w())return!1;for(;!(E===null||E.actualBounds.w()&&E.Ed());)E=E.panel;if(E===null)return!1;var z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var ot=Sg(tt),rt=Sg(x),lt=y===E&&y!==null,ut=this.isOrthogonal,ft=this.curve===Xl;this.Wf=lt&&!ut?ft=!0:!1;var yt=this.computeAdjusting()===Js||lt;if(!ut&&!lt&&ot&&rt){if(ot=!1,!yt&&3<=z&&(yt=this.getLinkPoint(a,y,tt,!0,!1,b,E),rt=this.getLinkPoint(b,E,x,!1,!1,a,y),ot=this.adjustPoints(0,yt,z-1,rt))&&(yt=this.getLinkPoint(a,y,tt,!0,!1,b,E),rt=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,yt,z-1,rt)),!ot)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,b,E),yt=this.getLinkPoint(b,E,x,!1,!1,a,y),ot=yt.x-z.x,rt=yt.y-z.y,lt=this.computeCurviness(),ft=ut=0;var Pt=z.x+ot/3,bt=z.y+rt/3,Bt=Pt,Jt=bt;ke.B(rt,0)?Jt=0<ot?Jt-lt:Jt+lt:(ut=-ot/rt,ft=Math.sqrt(lt*lt/(ut*ut+1)),0>lt&&(ft=-ft),Bt=(0>rt?-1:1)*ft+Pt,Jt=ut*(Bt-Pt)+bt),Pt=z.x+2*ot/3,bt=z.y+2*rt/3;var Gt=Pt,se=bt;ke.B(rt,0)?se=0<ot?se-lt:se+lt:(Gt=(0>rt?-1:1)*ft+Pt,se=ut*(Gt-Pt)+bt),this.Fj(),this.ne(z),this.yf(Bt,Jt),this.yf(Gt,se),this.ne(yt),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else z=b,yt=E,b=this.getLinkPoint(a,y,tt,!0,!1,z,yt),E=this.getLinkPoint(z,yt,x,!1,!1,a,y),this.hasCurviness()?(yt=E.x-b.x,x=E.y-b.y,tt=this.computeCurviness(),a=b.x+yt/2,y=b.y+x/2,z=a,ot=y,ke.B(x,0)?ot=0<yt?ot-tt:ot+tt:(yt=-yt/x,z=Math.sqrt(tt*tt/(yt*yt+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,ot=yt*(z-a)+y),this.ne(b),this.yf(z,ot),this.ne(E)):(this.ne(b),this.ne(E),ot=an.alloc(),y.mi(ot),rt=ot.ca(E),yt.mi(ot),lt=ot.ca(b),(rt||lt)&&(tt=y.ga(Xm(tt),new $t),this.dd(0,this.getLinkPointFromPoint(a,y,tt,E,!0,tt)),x=yt.ga(Xm(x),new $t),this.dd(1,this.getLinkPointFromPoint(z,yt,x,b,!1,x))),an.free(ot))}else{ft=this.isAvoiding,yt&&(ut&&ft||lt)&&this.Fj();var ue=lt?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,b,E),Pt=Bt=bt=0,(ut||!ot||lt)&&(Jt=this.computeEndSegmentLength(a,y,tt,!0),Pt=this.getLinkDirection(a,y,ft,tt,!0,ut,b,E),lt&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(Pt-=ut?90:30,0>ue&&(Pt-=180)),0>Pt?Pt+=360:360<=Pt&&(Pt-=360),lt&&(Jt+=Math.abs(ue)*(ut?1:2)),Pt===0?bt=Jt:Pt===90?Bt=Jt:Pt===180?bt=-Jt:Pt===270?Bt=-Jt:(bt=Jt*Math.cos(Pt*Math.PI/180),Bt=Jt*Math.sin(Pt*Math.PI/180)),tt.Mc()&<&&(Jt=y.ga(Zo,$t.alloc()),Gt=$t.allocAt(Jt.x+1e3*bt,Jt.y+1e3*Bt),this.getLinkPointFromPoint(a,y,Jt,Gt,!0,ft),$t.free(Jt),$t.free(Gt))),Jt=this.getLinkPoint(b,E,x,!1,ut,a,y);var ge=se=Gt=0;if(ut||!rt||lt){var be=this.computeEndSegmentLength(b,E,x,!1);ge=this.getLinkDirection(b,E,Jt,x,!1,ut,a,y),lt&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(ge+=ut?0:30,0>ue&&(ge+=180)),0>ge?ge+=360:360<=ge&&(ge-=360),lt&&(be+=Math.abs(ue)*(ut?1:2)),ge===0?Gt=be:ge===90?se=be:ge===180?Gt=-be:ge===270?se=-be:(Gt=be*Math.cos(ge*Math.PI/180),se=be*Math.sin(ge*Math.PI/180)),x.Mc()&<&&(x=E.ga(Zo,$t.alloc()),tt=$t.allocAt(x.x+1e3*Gt,x.y+1e3*se),this.getLinkPointFromPoint(b,E,x,tt,!1,Jt),$t.free(x),$t.free(tt))}x=ft,(ut||!ot||lt)&&(x=new $t(ft.x+bt,ft.y+Bt)),tt=Jt,(ut||!rt||lt)&&(tt=new $t(Jt.x+Gt,Jt.y+se)),!yt&&!ut&&ot&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,Jt):!yt&&!ut&&rt&&3<z&&this.adjustPoints(1,x,z-1,Jt)?this.dd(0,ft):!yt&&(ut?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,Jt)):(this.Fj(),this.ne(ft),(ut||!ot||lt)&&this.ne(x),ut&&this.addOrthoPoints(x,Pt,tt,ge,a,b),(ut||!rt||lt)&&this.ne(tt),this.ne(Jt))}return!0};function _v(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}jn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,z){if(z===void 0&&(z=new $t),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var tt=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*E;var ot=-a.m12*E,rt=-a.m21*E,lt=a.m11*E,ut=E*(a.m21*a.dy-a.m22*a.dx),ft=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*tt+b.y*rt+ut,b=b.x*ot+b.y*lt+ft,tt=x.x*tt+x.y*rt+ut,x=x.x*ot+x.y*lt+ft}return y.Sj(E,b,tt,x,z),a!==null&&z.transform(a),z};function Ym(a,y){var x=y.Zn;return x===null&&(x=new Lf,x.port=y,x.node=y.part,y.Zn=x),s1(x,a)}jn.prototype.getLinkPoint=function(a,y,x,b,E,z,tt,ot){if(ot===void 0&&(ot=new $t),x.sb()&&!Sg(x))return y.ga(x,ot),ot;if(x.$c()){var rt=Ym(this,y);if(rt!==null){if(ot.assign(rt.Zo),E&&this.routing===e1){var lt=Ym(this,tt);if(lt!==null&&rt.Gl<lt.Gl){rt=$t.alloc(),lt=$t.alloc();var ut=new an(y.ga(ea,rt),y.ga(As,lt)),ft=this.computeSpot(!b,tt);a=this.getLinkPoint(z,tt,ft,!b,E,a,y,lt),(x.Hf(Ru)||x.Hf(Ws))&&a.y>=ut.y&&a.y<=ut.y+ut.height?ot.y=a.y:(x.Hf(bu)||x.Hf(pl))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(ot.x=a.x),$t.free(rt),$t.free(lt)}}return ot}}return x=y.ga(Xm(x),$t.alloc()),this.pointsCount>(E?6:2)?(tt=b?this.i(1):this.i(this.pointsCount-2),E&&(tt=_v(x,tt.copy()))):(rt=this.computeSpot(!b,tt),z=$t.alloc(),tt=tt.ga(Xm(rt),z),E&&(tt=_v(x,tt)),$t.free(z)),this.getLinkPointFromPoint(a,y,x,tt,b,ot),$t.free(x),ot},jn.prototype.getLinkDirection=function(a,y,x,b,E,z,tt,ot){t:if(b.sb())var rt=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(rt=Ym(this,y),rt!==null))switch(rt.Nc){case 1:rt=270;break t;case 2:rt=180;break t;default:case 4:rt=0;break t;case 8:rt=90;break t}rt=y.ga(Zo,$t.alloc()),this.pointsCount>(z?6:2)?(ot=E?this.i(1):this.i(this.pointsCount-2),ot=z?_v(rt,ot.copy()):x):(x=$t.alloc(),ot=ot.ga(Zo,x),$t.free(x)),x=Math.abs(ot.x-rt.x)>Math.abs(ot.y-rt.y)?ot.x>=rt.x?0:180:ot.y>=rt.y?90:270,$t.free(rt),rt=x}return b.Mc()&&tt.Td(a)&&(rt+=180,360<=rt&&(rt-=360)),Sg(b)||(a=y.li(),a===0)||(45<=a&&135>a?rt+=90:135<=a&&225>a?rt+=180:225<=a&&315>a&&(rt+=270),360<=rt&&(rt-=360)),rt},jn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Ym(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},jn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Zo:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===hr?Qr:y)):(a=y||this.toPort,a===null?a=Zo:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===hr?Qr:y)),a};function Sg(a){return a===Qr||a.x===.5&&a.y===.5}function Xm(a){return a.x===.5&&a.y===.5?a:Zo}jn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Js&&4<this.pointsCount?this.computeMidPoint(new $t):(a=y.Zn,a=a!==null?s1(a,this):null,a!==null?a.Zo:y.ga(Zo))},jn.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},jn.prototype.Cf=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Po.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return mv(this,y,x,E),z===void 0&&Po.free(tt),!0;if(this.Yc(a,tt)){var ot=!1;if(!this.isAtomic)for(var rt=this.O.s,lt=rt.length;lt--;){var ut=rt[lt];if(ut.visible||ut===this.locationObject){var ft=ut.actualBounds,yt=this.naturalBounds;if(!(ft.x>yt.width||ft.y>yt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=Po.alloc(),ft.set(tt),ut instanceof Fn)ot=ut.Cf(a,y,x,b,E,ft);else if(this.path===ut){if(ut instanceof yo)if(ot=a,yt=b,ut.pickable===!1)ot=!1;else if(ft.multiply(ut.transform),yt)t:{var Pt=ot,bt=ft;if(ut.fh(Pt,bt))ot=!0;else{if(bt===void 0&&(bt=ut.transform,Pt.Re(ut.actualBounds))){ot=!0;break t}ot=Pt.left,yt=Pt.right;var Bt=Pt.top;Pt=Pt.bottom;var Jt=$t.alloc(),Gt=$t.alloc(),se=$t.alloc(),ue=Po.alloc();ue.set(bt),ue.bv(ut.transform),ue.Vj(),Gt.x=yt,Gt.y=Bt,Gt.transform(ue),Jt.x=ot,Jt.y=Bt,Jt.transform(ue),bt=!1,Kc(ut,Jt,Gt,se)?bt=!0:(Jt.x=yt,Jt.y=Pt,Jt.transform(ue),Kc(ut,Jt,Gt,se)?bt=!0:(Gt.x=ot,Gt.y=Pt,Gt.transform(ue),Kc(ut,Jt,Gt,se)?bt=!0:(Jt.x=ot,Jt.y=Bt,Jt.transform(ue),Kc(ut,Jt,Gt,se)&&(bt=!0)))),Po.free(ue),$t.free(Jt),$t.free(Gt),$t.free(se),ot=bt}}else ot=ut.fh(ot,ft)}else ot=Ja(ut,a,b,ft);ot&&(yt=ut,y!==null&&(yt=y(ut)),yt&&(x===null||x(yt))&&E.add(yt)),Po.free(ft)}}}return z===void 0&&Po.free(tt),ot||this.background!==null||this.areaBackground!==null}return z===void 0&&Po.free(tt),!1},jn.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?Xl:this.curve},jn.prototype.computeCorner=function(){if(this.curve===Xl)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},jn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if(E!==a&&!E.isPanelMain&&(E.segmentIndex===-1/0||isNaN(E.segmentIndex)))return E}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},jn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=i1;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,z=b.margin,tt=isNaN(E.width)?30:E.width*b.scale+z.left+z.right;E=isNaN(E.height)?14:E.height*b.scale+z.top+z.bottom,b=b.segmentOrientation,b===wp||b===e0||b===Jv?a=Math.max(a,E):b===bp||b===Mp||b===Cp||b===Ep?a=Math.max(a,tt):(y=y.ga(Zo).ab(x.ga(Zo))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*E)+1)),this.curve===Xl&&(a*=1.333)}}return a},jn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Js&&x.bb()}},jn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=n1;var y=this.Sf;if(y!==null){for(var x=Rn(),b=0,E=y.links,z=0;z<E.length;z++){var tt=E[z].computeSpacing();x.push(tt),b+=tt}for(b=-b/2,z=0;z<E.length;z++){if(E[z]===this){a=b+x[z]/2;break}b+=x[z]}y.Ds===this.fromNode&&(a=-a),ni(x)}}return a},jn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},jn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},jn.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===qm)return!1;E===t0&&(E=Pp)}switch(E){case qm:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(b)){E=z.x,z=z.y;var ot=tt.x-E,rt=tt.y-z,lt=Math.sqrt(ot*ot+rt*rt);if(!ke.$(lt,0)){if(ke.$(ot,0))var ut=0>rt?-Math.PI/2:Math.PI/2;else ut=Math.atan(rt/Math.abs(ot)),0>ot&&(ut=Math.PI-ut);tt=y.x;var ft=y.y;ot=b.x-tt;var yt=b.y-ft;for(rt=Math.sqrt(ot*ot+yt*yt),ke.$(ot,0)?yt=0>yt?-Math.PI/2:Math.PI/2:(yt=Math.atan(yt/Math.abs(ot)),0>ot&&(yt=Math.PI-yt)),lt=rt/lt,ut=yt-ut,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),ot=y.x-E,rt=y.y-z,y=Math.sqrt(ot*ot+rt*rt),ke.$(y,0)||(ke.$(ot,0)?rt=0>rt?-Math.PI/2:Math.PI/2:(rt=Math.atan(rt/Math.abs(ot)),0>ot&&(rt=Math.PI-rt)),ot=rt+ut,y*=lt,this.L(a,tt+y*Math.cos(ot),ft+y*Math.sin(ot)));this.dd(x,b)}}return!0;case t0:if(z=this.i(a),ft=this.i(x),!z.Xa(y)||!ft.Xa(b)){E=z.x,z=z.y,tt=ft.x,ft=ft.y,lt=(tt-E)*(tt-E)+(ft-z)*(ft-z),ot=y.x,ut=y.y,rt=b.x,yt=b.y;var Pt=1;if(rt-ot!==0){var bt=(yt-ut)/(rt-ot);Pt=Math.sqrt(1+1/(bt*bt))}else bt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Bt=y.x,Jt=y.y,Gt=.5;lt!==0&&(Gt=((E-Bt)*(E-tt)+(z-Jt)*(z-ft))/lt);var se=E+Gt*(tt-E),ue=z+Gt*(ft-z);y=Math.sqrt((Bt-se)*(Bt-se)+(Jt-ue)*(Jt-ue)),Jt<bt*(Bt-se)+ue&&(y=-y),0<bt&&(y=-y),Bt=ot+Gt*(rt-ot),Gt=ut+Gt*(yt-ut),bt!==0?(y=Bt+y/Pt,this.L(a,y,Gt-(y-Bt)/bt)):this.L(a,Bt,Gt+y)}this.dd(x,b)}return!0;case Pp:t:{if(this.isOrthogonal&&(E=this.i(a),z=this.i(a+1),tt=this.i(a+2),ot=z.x,ut=z.y,ft=ot,lt=ut,ke.B(E.y,z.y)?ke.B(z.x,tt.x)?ut=y.y:ke.B(z.y,tt.y)&&(ot=y.x):ke.B(E.x,z.x)&&(ke.B(z.y,tt.y)?ot=y.x:ke.B(z.x,tt.x)&&(ut=y.y)),this.L(a+1,ot,ut),E=this.i(x),z=this.i(x-1),tt=this.i(x-2),ot=z.x,ut=z.y,rt=ot,yt=ut,ke.B(E.y,z.y)?ke.B(z.x,tt.x)?ut=b.y:ke.B(z.y,tt.y)&&(ot=b.x):ke.B(E.x,z.x)&&(ke.B(z.y,tt.y)?ot=b.x:ke.B(z.x,tt.x)&&(ut=b.y)),this.L(x-1,ot,ut),Vv(this))){this.L(a+1,ft,lt),this.L(x-1,rt,yt),x=!1;break t}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},jn.prototype.addOrthoPoints=function(a,y,x,b,E,z){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var tt=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var ot=E.actualBounds.copy(),rt=z.actualBounds.copy();if(ot.w()&&rt.w()){ot.Bc(Lp,Lp),rt.Bc(Lp,Lp),ot.Ye(a),rt.Ye(x);var lt=$t.alloc(),ut=$t.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&rt.right>a.x||b===90&&x.y>a.y&&rt.right>a.x?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),b===180?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(lt.x=a.x<rt.left?this.computeMidOrthoPosition(a.x,a.y,rt.left,x.y,!1):a.x<rt.right&&(b===270&&a.y<rt.top||b===90&&a.y>rt.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):rt.right,ut.x=lt.x,ut.y=x.y):b===0&&a.x<rt.left&&a.y>rt.top&&a.y<rt.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,rt.top):Math.max(x.y,rt.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<ot.top||b===270&&x.y>ot.bottom)&&(b===180&&(rt.ca(a)||ot.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?lt.y=this.computeMidOrthoPosition(a.x,ot.top,x.x,Math.max(x.y,rt.bottom),!0):x.y>a.y&&(b===180||b===270)&&(lt.y=this.computeMidOrthoPosition(a.x,ot.bottom,x.x,Math.min(x.y,rt.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>ot.top&<.y<ot.bottom&&(x.x>=ot.left&&x.x<=a.x||a.x<=rt.right&&a.x>=x.x?(b===90||b===270)&&(lt.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?ot.top:Math.min(ot.top,rt.top)):Math.max(x.y,b===0?ot.bottom:Math.max(ot.bottom,rt.bottom)),ut.x=x.x,ut.y=lt.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&rt.left<a.x||b===90&&x.y>a.y&&rt.left<a.x?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),b===0?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(lt.x=a.x>rt.right?this.computeMidOrthoPosition(a.x,a.y,rt.right,x.y,!1):a.x>rt.left&&(b===270&&a.y<rt.top||b===90&&a.y>rt.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):rt.left,ut.x=lt.x,ut.y=x.y):b===180&&a.x>rt.right&&a.y>rt.top&&a.y<rt.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,rt.top):Math.max(x.y,rt.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<ot.top||b===270&&x.y>ot.bottom)&&(b===0&&(rt.ca(a)||ot.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?lt.y=this.computeMidOrthoPosition(a.x,ot.top,x.x,Math.max(x.y,rt.bottom),!0):x.y>a.y&&(b===0||b===270)&&(lt.y=this.computeMidOrthoPosition(a.x,ot.bottom,x.x,Math.min(x.y,rt.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>ot.top&<.y<ot.bottom&&(x.x<=ot.right&&x.x>=a.x||a.x>=rt.left&&a.x<=x.x?(b===90||b===270)&&(lt.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?ot.top:Math.min(ot.top,rt.top)):Math.max(x.y,b===180?ot.bottom:Math.max(ot.bottom,rt.bottom)),ut.x=x.x,ut.y=lt.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&rt.bottom>a.y||b===0&&x.x>a.x&&rt.bottom>a.y?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),b===270?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(lt.y=a.y<rt.top?this.computeMidOrthoPosition(a.x,a.y,x.x,rt.top,!0):a.y<rt.bottom&&(b===180&&a.x<rt.left||b===0&&a.x>rt.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):rt.bottom,ut.x=x.x,ut.y=lt.y):b===90&&a.y<rt.top&&a.x>rt.left&&a.x<rt.right&&(lt.x=a.x<x.x?Math.min(x.x,rt.left):Math.max(x.x,rt.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<ot.left||b===180&&x.x>ot.right)&&(b===270&&(rt.ca(a)||ot.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?lt.x=this.computeMidOrthoPosition(ot.left,a.y,Math.max(x.x,rt.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(lt.x=this.computeMidOrthoPosition(ot.right,a.y,Math.min(x.x,rt.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>ot.left&<.x<ot.right&&(x.y>=ot.top&&x.y<=a.y||a.y<=rt.bottom&&a.y>=x.y?(b===0||b===180)&&(lt.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?ot.left:Math.min(ot.left,rt.left)):Math.max(x.x,b===90?ot.right:Math.max(ot.right,rt.right)),ut.x=lt.x,ut.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&rt.top<a.y||b===0&&x.x>a.x&&rt.top<a.y?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),b===90?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(lt.y=a.y>rt.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,rt.bottom,!0):a.y>rt.top&&(b===180&&a.x<rt.left||b===0&&a.x>rt.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):rt.top,ut.x=x.x,ut.y=lt.y):b===270&&a.y>rt.bottom&&a.x>rt.left&&a.x<rt.right&&(lt.x=a.x<x.x?Math.min(x.x,rt.left):Math.max(x.x,rt.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<ot.left||b===180&&x.x>ot.right)&&(b===90&&(rt.ca(a)||ot.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?lt.x=this.computeMidOrthoPosition(ot.left,a.y,Math.max(x.x,rt.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(lt.x=this.computeMidOrthoPosition(ot.right,a.y,Math.min(x.x,rt.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>ot.left&<.x<ot.right&&(x.y<=ot.bottom&&x.y>=a.y||a.y>=rt.top&&a.y<=x.y?(b===0||b===180)&&(lt.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?ot.left:Math.min(ot.left,rt.left)):Math.max(x.x,b===270?ot.right:Math.max(ot.right,rt.right)),ut.x=lt.x,ut.y=x.y)));var ft=x;if(this.isAvoiding){var yt=this.diagram;if(yt===null||E===z||this.layer.isTemporary||!qf(yt)||ot.ca(ft)&&!z.Td(E)||rt.ca(a)&&!E.Td(z))y=!1;else{var Pt=tg(yt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Pt.Yj(Math.min(a.x,lt.x),Math.min(a.y,lt.y),Math.abs(a.x-lt.x),Math.abs(a.y-lt.y))&&Pt.Yj(Math.min(lt.x,ut.x),Math.min(lt.y,ut.y),Math.abs(lt.x-ut.x),Math.abs(lt.y-ut.y))&&Pt.Yj(Math.min(ut.x,ft.x),Math.min(ut.y,ft.y),Math.abs(ut.x-ft.x),Math.abs(ut.y-ft.y)))y=!1;else{E=a,z=ft;var bt=x=null;if(yt.isVirtualized){yt=Pt.bounds.copy(),yt.Bc(-Pt.Ho,-Pt.Go);var Bt=$t.alloc();Pg(Pt,a.x,a.y)||(ke.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,a.x,a.y,lt.x,lt.y,Bt)?(x=a=Bt.copy(),y=Bt.ab(lt)):ke.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,ut.x,ut.y,Bt)?(x=a=Bt.copy(),y=Bt.ab(ut)):ke.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ut.x,ut.y,ft.x,ft.y,Bt)&&(x=a=Bt.copy(),y=Bt.ab(ft))),Pg(Pt,ft.x,ft.y)||(ke.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ft.x,ft.y,ut.x,ut.y,Bt)?(bt=ft=Bt.copy(),b=ut.ab(Bt)):ke.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ut.x,ut.y,lt.x,lt.y,Bt)?(bt=ft=Bt.copy(),b=lt.ab(Bt)):ke.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,a.x,a.y,Bt)&&(bt=ft=Bt.copy(),b=a.ab(Bt))),$t.free(Bt)}ot=ot.copy().ed(rt),ot.Bc(Pt.Ho*Pt.Os,Pt.Go*Pt.Os),r1(Pt,a,y,ft,b,ot,!0),rt=Oh(Pt,ft.x,ft.y),!Pt.abort&&rt>=wg&&(o1(Pt),ot.Bc(Pt.Ho*Pt.Hx,Pt.Go*Pt.Ix),r1(Pt,a,y,ft,b,ot,!1),rt=Oh(Pt,ft.x,ft.y)),!Pt.abort&&rt<wg&&Oh(Pt,ft.x,ft.y)!==Nd?(Uv(this,Pt,ft.x,ft.y,b,!0,tt),ot=this.i(2),4>this.pointsCount?(y===0||y===180?(ot.x=a.x,ot.y=ft.y):(ot.x=ft.x,ot.y=a.y),this.L(2,ot.x,ot.y),this.m(3,ot.x,ot.y)):(tt=this.i(3),y===0||y===180?ke.B(ot.x,tt.x)?(ot=y===0?Math.max(ot.x,a.x):Math.min(ot.x,a.x),this.L(2,ot,a.y),this.L(3,ot,tt.y)):ke.B(ot.y,tt.y)?(Math.abs(a.y-ot.y)<=Pt.Go/2&&(this.L(2,ot.x,a.y),this.L(3,tt.x,a.y)),this.m(2,ot.x,a.y)):this.L(2,a.x,ot.y):(y===90||y===270)&&(ke.B(ot.y,tt.y)?(ot=y===90?Math.max(ot.y,a.y):Math.min(ot.y,a.y),this.L(2,a.x,ot),this.L(3,tt.x,ot)):ke.B(ot.x,tt.x)?(Math.abs(a.x-ot.x)<=Pt.Ho/2&&(this.L(2,a.x,ot.y),this.L(3,a.x,tt.y)),this.m(2,a.x,ot.y)):this.L(2,ot.x,a.y))),x!==null&&(a=this.i(1),tt=this.i(2),a.x!==tt.x&&a.y!==tt.y?y===0||y===180?this.m(2,a.x,tt.y):this.m(2,tt.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),bt!==null&&(b===0||b===180?this.yf(z.x,bt.y):this.yf(bt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(lt.copy()),this.ne(ut.copy())),$t.free(lt),$t.free(ut)}},jn.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),E?(y+b)/2+z:(a+x)/2+z};function Vv(a){if(a.diagram===null||!a.isAvoiding||!qf(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 b=1;b<x-2;b++){var E=y[b],z=y[b+1];if(!a.Yj(Math.min(E.x,z.x),Math.min(E.y,z.y),Math.abs(E.x-z.x),Math.abs(E.y-z.y)))return!0}return!1}function Uv(a,y,x,b,E,z,tt){var ot=y.Ho,rt=y.Go,lt=Oh(y,x,b),ut=x,ft=b;for(E===0?ut+=ot:E===90?ft+=rt:E===180?ut-=ot:ft-=rt,E!==tt&<>Uc&&Oh(y,ut,ft)!==lt-1&&(Oh(y,x-ot,b)===lt-1?(E=180,ut=x-ot,ft=b):Oh(y,x+ot,b)===lt-1?(E=0,ut=x+ot,ft=b):Oh(y,x,b-rt)===lt-1?(E=270,ut=x,ft=b-rt):Oh(y,x,b+rt)===lt-1&&(E=90,ut=x,ft=b+rt));lt>Uc&&Oh(y,ut,ft)===lt-1;)x=ut,b=ft,E===0?ut+=ot:E===90?ft+=rt:E===180?ut-=ot:ft-=rt,--lt;z?lt>Uc&&(E===180||E===0?x=Math.floor(x/ot)*ot+ot/2:(E===90||E===270)&&(b=Math.floor(b/rt)*rt+rt/2)):(x=Math.floor(x/ot)*ot+ot/2,b=Math.floor(b/rt)*rt+rt/2),lt>Uc&&(z=E,tt=x,ut=b,E===0?(z=90,ut+=rt):E===90?(z=180,tt-=ot):E===180?(z=270,ut-=rt):E===270&&(z=0,tt+=ot),Oh(y,tt,ut)===lt-1?Uv(a,y,tt,ut,z,!1,z):(tt=x,ut=b,E===0?(z=270,ut-=rt):E===90?(z=0,tt+=ot):E===180?(z=90,ut+=rt):E===270&&(z=180,tt-=ot),Oh(y,tt,ut)===lt-1&&Uv(a,y,tt,ut,z,!1,z))),a.yf(x,b)}jn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=lr(y,a,x.x,x.y,b.x,b.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var ot=lr(y,a,b.x,b.y,x.x,x.y);b=x,ot<E&&(z=tt,E=ot)}return z},jn.prototype.qc=function(){this.lk=!1,this.v()},jn.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E!==a&&E.isPanelMain&&E instanceof yo&&(E.ua=this.ua)}}},jn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Vc(this)&&b.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(b.animationManager.isAnimating||b.currentTool!==b.toolManager)&&(x=!0);var E=this.i(0).copy(),z=E.copy();b=this.Nb.s;var tt=this.computeCurve();if(tt===Xl&&3<=y&&!ke.$(this.smoothness,0))if(y===3){var ot=this.i(1);b=Math.min(E.x,ot.x);var rt=Math.min(E.y,ot.y);ot=this.i(2),b=Math.min(b,ot.x),rt=Math.min(rt,ot.y)}else{if(this.isOrthogonal)for(rt=0;rt<y;rt++)ot=b[rt],z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),rt=this.i(b),z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);b=z.x,rt=z.y}else{for(rt=0;rt<y;rt++)ot=b[rt],z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);b=z.x,rt=z.y}if(b-=this.su.x,rt-=this.su.y,E.x-=b,E.y-=rt,y!==2||Vc(this)){if(a.type=$n.o,ot=TS(a),this.computeShortLength(!0)!==0&&(E=Cf(this,E,!0,z)),vg(ot,E.x,E.y,!1),tt===Xl&&3<=y&&!ke.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-rt,E=this.i(2).copy(),E.x-=b,E.y-=rt,this.computeShortLength(!1)!==0&&(E=Cf(this,E,!1,z)),bd(ot,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=$t.allocAt(b,rt),x=$t.alloc(),x.assign(this.i(1)),z=$t.allocAt(b,rt),E=$t.allocAt(b,rt),tt=this.i(0);for(var lt,ut=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){lt=this.i(ft);var yt=tt,Pt=lt,bt=this.i(Yv(this,lt,ft,!1));if((!ke.$(yt.x,Pt.x)||!ke.$(Pt.x,bt.x))&&(!ke.$(yt.y,Pt.y)||!ke.$(Pt.y,bt.y))){var Bt=ut;isNaN(Bt)&&(Bt=this.smoothness/3);var Jt=yt.x;yt=yt.y;var Gt=Pt.x;Pt=Pt.y;var se=bt.x;bt=bt.y;var ue=Bt*Jm(Jt,yt,Gt,Pt);Bt*=Jm(Gt,Pt,se,bt),ke.$(yt,Pt)&&ke.$(Gt,se)&&(Gt>Jt?bt>Pt?(z.x=Gt-ue,z.y=Pt-ue,E.x=Gt+Bt,E.y=Pt+Bt):(z.x=Gt-ue,z.y=Pt+ue,E.x=Gt+Bt,E.y=Pt-Bt):bt>Pt?(z.x=Gt+ue,z.y=Pt-ue,E.x=Gt-Bt,E.y=Pt+Bt):(z.x=Gt+ue,z.y=Pt+ue,E.x=Gt-Bt,E.y=Pt-Bt)),ke.$(Jt,Gt)&&ke.$(Pt,bt)&&(Pt>yt?(se>Gt?(z.x=Gt-ue,z.y=Pt-ue,E.x=Gt+Bt):(z.x=Gt+ue,z.y=Pt-ue,E.x=Gt-Bt),E.y=Pt+Bt):(se>Gt?(z.x=Gt-ue,z.y=Pt+ue,E.x=Gt+Bt):(z.x=Gt+ue,z.y=Pt+ue,E.x=Gt-Bt),E.y=Pt-Bt)),(ke.$(Jt,Gt)&&ke.$(Gt,se)||ke.$(yt,Pt)&&ke.$(Pt,bt))&&(Jt=.5*(Jt+se),yt=.5*(yt+bt),z.x=Jt,z.y=yt,E.x=Jt,E.y=yt),(ft===1||ft===2&&ke.$(tt.x,this.i(0).x)&&ke.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+lt.x),x.y=.5*(tt.y+lt.y)),bd(ot,x.x-b,x.y-rt,z.x-b,z.y-rt,lt.x-b,lt.y-rt),y.set(z),x.set(E),tt=lt}}lt=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=Cf(this,ut.copy(),!1,Ho)),lt=.5*(lt+ut.x),tt=.5*(tt+ut.y),bd(ot,E.x-b,E.y-rt,lt-b,tt-rt,ut.x-b,ut.y-rt),$t.free(y),$t.free(x),$t.free(z),$t.free(E)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=Cf(this,tt.copy(),!1,Ho)),bd(ot,z.x-b,z.y-rt,E.x-b,E.y-rt,tt.x-b,tt.y-rt);else{for(z=$t.alloc(),z.assign(this.i(0)),E=$t.alloc(),E.assign(z),tt=this.computeCorner(),ft=1,lt=0;ft<y;){if(ft=Yv(this,z,ft,1<ft),ut=this.i(ft),ft>=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=Cf(this,ut.copy(),!1,Ho)),bf(this,ot,-b,-rt,z,ut,x);else if(lt===0)for(ft=1;ft<y;)E.assign(z),ut=this.i(ft++),bf(this,ot,-b,-rt,z,ut,x),z.assign(ut);break}if(lt=Yv(this,ut,ft+1,ft<y-3),ft=-b,Jt=-rt,yt=ut,Gt=this.i(lt),Bt=x,ke.B(z.y,yt.y)&&ke.B(yt.x,Gt.x))if(bt=Math.min(tt,Math.abs(yt.x-E.x)/2),bt=ue=Math.min(bt,Math.abs(Gt.y-yt.y)/2),ke.B(bt,0))bf(this,ot,ft,Jt,z,yt,Bt),z.assign(yt);else{var ge=yt.x,be=yt.y;Pt=ge,se=be,yt.x>z.x?ge=yt.x-bt:ge=yt.x+bt,Gt.y>yt.y?se=yt.y+ue:se=yt.y-ue,Gt=$t.allocAt(ge,be),bf(this,ot,ft,Jt,z,Gt,Bt),$t.free(Gt),Gm(ot,yt.x+ft,yt.y+Jt,Pt+ft,se+Jt),z.h(Pt,se)}else ke.B(z.x,yt.x)&&ke.B(yt.y,Gt.y)?(bt=Math.min(tt,Math.abs(yt.y-E.y)/2),bt=ue=Math.min(bt,Math.abs(Gt.x-yt.x)/2),ke.B(ue,0)?(bf(this,ot,ft,Jt,z,yt,Bt),z.assign(yt)):(ge=yt.x,be=yt.y,Pt=ge,se=be,yt.y>z.y?be=yt.y-bt:be=yt.y+bt,Gt.x>yt.x?Pt=yt.x+ue:Pt=yt.x-ue,Gt=$t.allocAt(ge,be),bf(this,ot,ft,Jt,z,Gt,Bt),$t.free(Gt),Gm(ot,yt.x+ft,yt.y+Jt,Pt+ft,se+Jt),z.h(Pt,se))):(bf(this,ot,ft,Jt,z,yt,Bt),z.assign(yt));E.assign(ut),ft=lt}$t.free(z)}$m=ot}else ot=this.i(1).copy(),ot.x-=b,ot.y-=rt,this.computeShortLength(!0)!==0&&(E=Cf(this,E,!0,z)),this.computeShortLength(!1)!==0&&(ot=Cf(this,ot,!1,z)),a.type=$n.j,a.startX=E.x,a.startY=E.y,a.endX=ot.x,a.endY=ot.y;return this.lk=!0,a};function Jm(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),ke.$(a,0)?y:ke.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Cf(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var z=a.i(1);if(x=z.x-b.x,z=z.y-b.y,b=Jm(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(z-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(z=a.i(E-2),x=z.x-b.x,z=z.y-b.y,b=Jm(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-z)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function Yv(a,y,x,b){for(var E=a.pointsCount,z=y;ke.$(y.x,z.x)&&ke.$(y.y,z.y);){if(x>=E)return E-1;z=a.i(x++)}if(!ke.$(y.x,z.x)&&!ke.$(y.y,z.y))return x-1;for(var tt=z;ke.$(y.x,z.x)&&ke.$(z.x,tt.x)&&(!b||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||ke.$(y.y,z.y)&&ke.$(z.y,tt.y)&&(!b||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=E)return E-1;tt=a.i(x++)}return x-2}jn.prototype.computeJumpLength=function(){return 10};function bf(a,y,x,b,E,z,tt){if(!tt&&Vc(a)){tt=a.computeJumpLength();var ot=tt/2,rt=[],lt=0;if(a.isVisible()&&(lt=Ex(a,E,z,rt)),0<lt){if(ke.B(E.y,z.y))if(E.x<z.x)for(var ut=0;ut<lt;){var ft=Math.max(E.x,Math.min(rt[ut++]-ot,z.x-tt));y.lineTo(ft+x,z.y+b);for(var yt=ft+x,Pt=Math.min(ft+tt,z.x);ut<lt&&(ft=rt[ut],ft<Pt+tt);)ut++,Pt=Math.min(ft+ot,z.x);ft=z.y-tt+b,Pt+=x;var bt=z.y+b;a.curve===kd?vg(y,Pt,bt,!1):bd(y,yt,ft,Pt,ft,Pt,bt)}else for(--lt;0<=lt;){for(ut=Math.min(E.x,Math.max(rt[lt--]+ot,z.x+tt)),y.lineTo(ut+x,z.y+b),yt=ut+x,ft=Math.max(ut-tt,z.x);0<=lt&&(ut=rt[lt],ut>ft-tt);)lt--,ft=Math.max(ut-ot,z.x);ut=z.y-tt+b,ft+=x,Pt=z.y+b,a.curve===kd?vg(y,ft,Pt,!1):bd(y,yt,ut,ft,ut,ft,Pt)}else if(ke.B(E.x,z.x))if(E.y<z.y)for(ut=0;ut<lt;){for(ft=Math.max(E.y,Math.min(rt[ut++]-ot,z.y-tt)),y.lineTo(z.x+x,ft+b),yt=ft+b,ft=Math.min(ft+tt,z.y);ut<lt&&(Pt=rt[ut],Pt<ft+tt);)ut++,ft=Math.min(Pt+ot,z.y);Pt=z.x-tt+x,bt=z.x+x,ft+=b,a.curve===kd?vg(y,bt,ft,!1):bd(y,Pt,yt,Pt,ft,bt,ft)}else for(--lt;0<=lt;){for(ut=Math.min(E.y,Math.max(rt[lt--]+ot,z.y+tt)),y.lineTo(z.x+x,ut+b),yt=ut+b,ut=Math.max(ut-tt,z.y);0<=lt&&(ft=rt[lt],ft>ut-tt);)lt--,ut=Math.max(ft-ot,z.y);ft=z.x-tt+x,Pt=z.x+x,ut+=b,a.curve===kd?vg(y,Pt,ut,!1):bd(y,ft,yt,ft,ut,Pt,ut)}}}y.lineTo(z.x+x,z.y+b)}function Ex(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var z=E.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,ot=0;ot<tt;ot++){var rt=z[ot];if(rt instanceof jn){if(rt===a)return 0<b.length&&b.sort(function(ut,ft){return ut-ft}),b.length;if(rt.isVisible()&&Vc(rt)){var lt=rt.routeBounds;lt.w()&&a.routeBounds.Yc(lt)&&!a.usesSamePort(rt)&&(lt=rt.path,lt!==null&<.Ed()&&Mx(y,x,b,rt))}}}}}return 0<b.length&&b.sort(function(ut,ft){return ut-ft}),b.length}function Mx(a,y,x,b){for(var E=ke.B(a.y,y.y),z=b.pointsCount,tt=b.i(0),ot=$t.alloc(),rt=1;rt<z;rt++){var lt=b.i(rt);if(rt<z-1){var ut=b.i(rt+1);if(tt.y===lt.y&<.y===ut.y){if(lt.x>tt.x&&ut.x>=lt.x||lt.x<tt.x&&ut.x<=lt.x)continue}else if(tt.x===lt.x&<.x===ut.x&&(lt.y>tt.y&&ut.y>=lt.y||lt.y<tt.y&&ut.y<=lt.y))continue}t:{ut=a.x;var ft=a.y,yt=y.x,Pt=y.y,bt=tt.x;tt=tt.y;var Bt=lt.x,Jt=lt.y;if(ke.B(ut,yt)){if(!ke.B(ft,Pt)&&ke.B(tt,Jt)&&Math.min(ft,Pt)<tt&&Math.max(ft,Pt)>tt&&Math.min(bt,Bt)<ut&&Math.max(bt,Bt)>ut&&!ke.B(bt,Bt)){ot.x=ut,ot.y=tt,ut=!0;break t}}else if(ke.B(ft,Pt)&&ke.B(bt,Bt)&&Math.min(ut,yt)<bt&&Math.max(ut,yt)>bt&&Math.min(tt,Jt)<ft&&Math.max(tt,Jt)>ft&&!ke.B(tt,Jt)){ot.x=bt,ot.y=ft,ut=!0;break t}ot.x=0,ot.y=0,ut=!1}ut&&(E?x.push(ot.x):x.push(ot.y)),tt=lt}$t.free(ot)}function Vc(a){return a=a.curve,a===xg||a===kd}function Qm(a,y){(y||Vc(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()))}jn.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var z=!1;E=E.Pa.s;for(var tt=E.length,ot=0;ot<tt;ot++){var rt=E[ot];rt instanceof jn&&(rt===this?z=!0:z&&t1(this,rt,a))}}else if(b)for(z=E.Pa.s,E=z.length,tt=0;tt<E;tt++)ot=z[tt],ot instanceof jn&&t1(this,ot,a)}}}}};function t1(a,y,x){if(y!==null&&y.lk&&y.fd&&Vc(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}jn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var b=this.i(0),E=a.i(0);if(b.Xa(E)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||b.Xa(a)||y.Xa(E)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},jn.prototype.isVisible=function(){if(!Fi.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var b=x;b!==null;){if(b.labeledLink===this)return!0;b=b.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},jn.prototype.Zb=function(a){if(Fi.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)},jn.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 b=a.ff,E=a.vf,z=a=null,tt=y.jb.s,ot=tt.length,rt=0;rt<ot;rt++){var lt=tt[rt];(lt.ef===y&<.ff===b&<.uf===x&<.vf===E||lt.ef===x&<.ff===E&<.uf===y&<.vf===b)&&(z===null?z=lt:(a===null&&(a=[],a.push(z)),a.push(lt)))}if(a!==null){for(z=$S(y,x,b,E),z===null&&(z=new i0(y,b,x,E),GS(y,z),GS(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&&(Jn(y.links,a),y.Sl()))}jn.prototype.ph=function(){return!0},Zt.Object.defineProperties(jn.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&&_m(y,this,x),xp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt)}a!==null&&(this.uf!==a&&Km(a,this,E),Sp(this),this.C(1)),this.g("fromNode",y,a),yg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Tl(x),xp(this),this.ff=a;var b=this.fromPort;b!==null&&Tl(b);var E=this.diagram;if(E!==null){var z=this.data,tt=E.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt))),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&&_m(y,this,x),xp(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,z=this.toPortChanged;if(z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt)}a!==null&&(this.ef!==a&&Km(a,this,E),Sp(this),this.C(1)),this.g("toNode",y,a),yg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Tl(x),xp(this),this.vf=a;var b=this.toPort;b!==null&&Tl(b);var E=this.diagram;if(E!==null){var z=this.data,tt=E.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt))),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:hr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&Tl(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&cn(a,">= 0",jn,"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:hr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),(y.$c()||a.$c())&&this.toNode!==null&&Tl(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&cn(a,">= 0",jn,"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?Zi: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 yo?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,b=this.pointsCount;if(b===0)a.h(NaN,NaN,0,0);else{if(b===1)b=this.i(0),y=Math.min(b.x,y),x=Math.min(b.y,x),a.h(b.x,b.y,0,0);else if(b===2){b=this.i(0);var E=this.i(1);y=Math.min(b.x,E.x),x=Math.min(b.y,E.y),a.h(b.x,b.y,0,0),a.Ye(E)}else if(this.computeCurve()===Xl&&3<=b&&!this.isOrthogonal)if(E=this.i(0),y=E.x,x=E.y,a.h(y,x,0,0),b===3){b=this.i(1),y=Math.min(b.x,y),x=Math.min(b.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),ke.Dl(E.x,E.y,b.x,b.y,b.x,b.y,z.x,z.y,.5,a)}else for(z=3;z<b;z+=3){var tt=this.i(z-2);z+3>=b&&(z=b-1);var ot=this.i(z-1),rt=this.i(z);ke.Dl(E.x,E.y,tt.x,tt.y,ot.x,ot.y,rt.x,rt.y,.5,a),y=Math.min(rt.x,y),x=Math.min(rt.y,x),E=rt}else for(E=this.i(0),z=this.i(1),y=Math.min(E.x,z.x),x=Math.min(E.y,z.y),a.h(E.x,E.y,0,0),a.Ye(z),E=2;E<b;E++)z=this.i(E),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new $t)}},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 b=this.i(x),E=this.i(x+1);ke.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):ke.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new mn,b=0;b<a.length/2;b++)E=new $t(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var z=a[E];if(!Oe(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){b=!1;break}}if(b)for(x=new mn,b=0;b<a.length;b++)E=a[b],x.add(new $t(E.x,E.y).freeze())}}else if(a instanceof mn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else _t("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&&Ir(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||!Sg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Sg(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===kd||y===xg||a===kd||a===xg),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)}}}),jn.prototype.invalidateOtherJumpOvers=jn.prototype.Xo,jn.prototype.findClosestSegment=jn.prototype.ez,jn.prototype.updateRoute=jn.prototype.vg,jn.prototype.invalidateRoute=jn.prototype.bb,jn.prototype.rollbackRoute=jn.prototype.rv,jn.prototype.commitRoute=jn.prototype.zf,jn.prototype.startRoute=jn.prototype.uh,jn.prototype.clearPoints=jn.prototype.Fj,jn.prototype.removePoint=jn.prototype.pv,jn.prototype.addPointAt=jn.prototype.yf,jn.prototype.addPoint=jn.prototype.ne,jn.prototype.insertPointAt=jn.prototype.m,jn.prototype.insertPoint=jn.prototype.Kz,jn.prototype.setPointAt=jn.prototype.L,jn.prototype.setPoint=jn.prototype.dd,jn.prototype.getPoint=jn.prototype.i,jn.prototype.getOtherPort=jn.prototype.Cz,jn.prototype.getOtherNode=jn.prototype.To;var Ef=null,Mf=null,Xv=new en(jn,"Normal",1),Lx=new en(jn,"Orthogonal",2),kx=new en(jn,"AvoidsNodes",6),e1=new en(jn,"AvoidsNodesStraight",7),Js=new en(jn,"None",0),Xl=new en(jn,"Bezier",9),kd=new en(jn,"JumpGap",10),xg=new en(jn,"JumpOver",11),Pp=new en(jn,"End",17),qm=new en(jn,"Scale",18),t0=new en(jn,"Stretch",19),wp=new en(jn,"OrientAlong",21),Cp=new en(jn,"OrientPlus90",22),bp=new en(jn,"OrientMinus90",23),Jv=new en(jn,"OrientOpposite",24),e0=new en(jn,"OrientUpright",25),Ep=new en(jn,"OrientPlus90Upright",26),Mp=new en(jn,"OrientMinus90Upright",27),n0=new en(jn,"OrientUpright45",28),n1=16,i1=14,Lp=8;jn.className="Link",jn.Normal=Xv,jn.Orthogonal=Lx,jn.AvoidsNodes=kx,jn.AvoidsNodesStraight=e1,jn.None=Js,jn.Bezier=Xl,jn.JumpGap=kd,jn.JumpOver=xg,jn.End=Pp,jn.Scale=qm,jn.Stretch=t0,jn.OrientAlong=wp,jn.OrientPlus90=Cp,jn.OrientMinus90=bp,jn.OrientOpposite=Jv,jn.OrientUpright=e0,jn.OrientPlus90Upright=Ep,jn.OrientMinus90Upright=Mp,jn.OrientUpright45=n0,jn.EndSegmentStep=8,jn.CurvinessStart=n1,jn.SpacingMin=i1,jn.OrthoShortCut=Lp;function i0(a,y,x,b){Gi(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,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 kp(a){Gi(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}kp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((b+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],b=0;b<=a;b++)x[b]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=Qv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(b=0;b<=this.ei;b++)x[b]=a}};function Pg(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Oh(a,y,x){return Pg(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):Qv}function o1(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],b=0;b<=a.ei;b++)x[b]>=Uc&&(x[b]=Qv)}kp.prototype.Yj=function(a,y,x,b){if(a>this.En||a+x<this.Nd||y>this.Fn||y+b<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var E=Math.max(0,b)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var z=y;z<=x;z++)if(E[z]===Nd)return!1}return!0};function Fh(a,y,x,b,E,z,tt,ot,rt){if(!(y<z||y>tt||x<ot||x>rt)){var lt=y|0,ut=x|0,ft=a.ac[lt][ut];if(ft>=Uc&&ft<wg)for(E?ut+=b:lt+=b,ft+=1;z<=lt&<<=tt&&ot<=ut&&ut<=rt&&!(ft>=a.ac[lt][ut]);)a.ac[lt][ut]=ft,ft+=1,E?ut+=b:lt+=b;if(lt=E?ut:lt,E)if(0<b)for(x+=b;x<lt;x+=b)Fh(a,y,x,1,!E,z,tt,ot,rt),Fh(a,y,x,-1,!E,z,tt,ot,rt);else for(x+=b;x>lt;x+=b)Fh(a,y,x,1,!E,z,tt,ot,rt),Fh(a,y,x,-1,!E,z,tt,ot,rt);else if(0<b)for(y+=b;y<lt;y+=b)Fh(a,y,x,1,!E,z,tt,ot,rt),Fh(a,y,x,-1,!E,z,tt,ot,rt);else for(y+=b;y>lt;y+=b)Fh(a,y,x,1,!E,z,tt,ot,rt),Fh(a,y,x,-1,!E,z,tt,ot,rt)}}function o0(a,y,x,b,E,z,tt,ot,rt){y|=0,x|=0;var lt=Nd,ut=Uc;for(a.ac[y][x]=ut;lt===Nd&&y>z&&y<tt&&x>ot&&x<rt;)ut+=1,a.ac[y][x]=ut,E?x+=b:y+=b,lt=a.ac[y][x]}function r0(a,y,x,b,E,z,tt,ot,rt){y|=0,x|=0;var lt=Nd,ut=wg;for(a.ac[y][x]=ut;lt===Nd&&y>z&&y<tt&&x>ot&&x<rt;)a.ac[y][x]=ut,E?x+=b:y+=b,lt=a.ac[y][x]}function r1(a,y,x,b,E,z,tt){if(a.ac!==null){a.abort=!1;var ot=y.x,rt=y.y;if(Pg(a,ot,rt)){ot-=a.Nd,ot/=a.rc,rt-=a.Od,rt/=a.sc;var lt=b.x,ut=b.y;if(Pg(a,lt,ut))if(lt-=a.Nd,lt/=a.rc,ut-=a.Od,ut/=a.sc,1>=Math.abs(ot-lt)&&1>=Math.abs(rt-ut))a.abort=!0;else{var ft=z.x;b=z.y,y=z.x+z.width;var yt=z.y+z.height;ft-=a.Nd,ft/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,yt-=a.Od,yt/=a.sc,z=Math.max(0,Math.min(a.di,ft|0)),y=Math.min(a.di,Math.max(0,y|0)),ft=Math.max(0,Math.min(a.ei,b|0)),yt=Math.min(a.ei,Math.max(0,yt|0)),b=a.ac,ot|=0,rt|=0,lt|=0,ut|=0;var Pt=x===0||x===90?1:-1;if(x=x===90||x===270,b[ot][rt]===Nd?(o0(a,ot,rt,Pt,x,z,y,ft,yt),o0(a,ot,rt,1,!x,z,y,ft,yt),o0(a,ot,rt,-1,!x,z,y,ft,yt)):o0(a,ot,rt,Pt,x,ot,rt,ot,rt),b[lt][ut]===Nd?(r0(a,lt,ut,E===0||E===90?1:-1,E===90||E===270,z,y,ft,yt),r0(a,lt,ut,1,!(E===90||E===270),z,y,ft,yt),r0(a,lt,ut,-1,!(E===90||E===270),z,y,ft,yt)):r0(a,lt,ut,Pt,x,lt,ut,lt,ut),x=Rn(),tt&&a1(a,lt,ut,E,ot,rt,x))for((x[0]!==lt||x[1]!==ut)&&(x.unshift(ut),x.unshift(lt)),(x[x.length-2]!==ot||x[x.length-1]!==rt)&&(x.push(ot),x.push(rt)),a=Uc,E=x[x.length-2],tt=x[x.length-1],b[E][tt]=a++,z=x.length-4;0<=z;z-=2)for(E=x[z+2],tt=x[z+3],y=x[z],lt=x[z+1];y>E?E++:y<E?E--:lt>tt?tt++:lt<tt&&tt--,b[E][tt]=a++,E!==y||tt!==lt;);else Fh(a,ot,rt,1,!1,z,y,ft,yt),Fh(a,ot,rt,-1,!1,z,y,ft,yt),Fh(a,ot,rt,1,!0,z,y,ft,yt),Fh(a,ot,rt,-1,!0,z,y,ft,yt);ni(x)}}}}function a1(a,y,x,b,E,z,tt){for(var ot=a.ac,rt=y,lt=x;;){if(rt===E&<===z)return!0;var ut=rt,ft=lt;if(b===0)if(ut<E)ut++;else break;else if(b===90)if(ft<z)ft++;else break;else if(b===180)if(ut>E)ut--;else break;else if(ft>z)ft--;else break;var yt=ot[ut][ft];if(yt===0||yt===qv)break;rt=ut,lt=ft}for(;;){if(ut=b,ft=rt,yt=lt,b===0?yt<z?(ut=90,yt++):yt>z&&(ut=270,yt--):b===90?ft<E?(ut=0,ft++):ft>E&&(ut=180,ft--):b===180?yt<z?(ut=90,yt++):yt>z&&(ut=270,yt--):ft<E?(ut=0,ft++):ft>E&&(ut=180,ft--),ft=ot[ft][yt],ut!==b&&ft!==0&&ft!==qv){if(tt.push(rt),tt.push(lt),a1(a,rt,lt,ut,E,z,tt))return!0;tt.pop(),tt.pop()}if(ot[rt][lt]=qv,b===0){if(rt===y)return!1;rt--}else if(b===90){if(lt===x)return!1;lt--}else if(b===180){if(rt===y)return!1;rt++}else{if(lt===x)return!1;lt++}}}Zt.Object.defineProperties(kp.prototype,{bounds:{get:function(){return new an(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 Nd=0,Uc=1,wg=999999,Qv=wg+1,qv=wg+2;kp.className="PositionArray";function Lf(){Gi(this),this.port=this.node=null,this.pe=[],this.ap=!1}Lf.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
|
|
|
`+b.toString())}return y};function Nx(a,y,x,b){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return b&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}Lf.prototype.Sl=function(){this.pe.length=0};function s1(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,z=E instanceof io?E:null;if(z===null||z.isSubGraphExpanded)var tt=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}b=z,tt=b.Lu()}z=a.pe.length=0;var ot=a.port.ga(ea,$t.alloc()),rt=a.port.ga(As,$t.alloc());for(E=an.allocAt(ot.x,ot.y,0,0),E.Ye(rt),$t.free(ot),$t.free(rt),ot=$t.allocAt(E.x+E.width/2,E.y+E.height/2),rt=a.port.li(),tt=tt.iterator;tt.next();){var lt=tt.value;if(lt.isVisible()&<.fromPort!==lt.toPort){var ut=lt.fromPort===a.port||lt.fromNode!==null&<.fromNode.Td(b),ft=lt.computeSpot(ut,a.port);if(ft.$c()&&(ut=ut?lt.toPort:lt.fromPort,ut!==null)){var yt=ut.part;if(yt!==null){var Pt=yt.findVisibleNode();Pt!==null&&Pt!==yt&&(yt=Pt,ut=yt.port),ut=lt.computeOtherPoint(yt,ut),yt=ot.ab(ut),yt-=rt,0>yt?yt+=360:360<=yt&&(yt-=360),ft=Nx(E,ft,yt,lt.isOrthogonal),ft===0?(ft=4,180<yt&&(yt-=360)):ft===90?(ft=8,270<yt&&(yt-=360)):ft===180?ft=2:(ft=1,90>yt&&(yt+=360)),Pt=a.pe[z],Pt===void 0?(Pt=new ty(lt,yt,ft),a.pe[z]=Pt):(Pt.link=lt,Pt.angle=yt,Pt.Nc=ft),Pt.hv.set(ut),z++}}}}for($t.free(ot),a.pe.sort(Lf.prototype.j),rt=a.pe.length,b=-1,z=ot=0;z<rt;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==b&&(b=tt.Nc,ot=0),tt.Uo=ot,ot++);for(b=-1,ot=0,z=rt-1;0<=z;z--)rt=a.pe[z],rt!==void 0&&(rt.Nc!==b&&(b=rt.Nc,ot=rt.Uo+1),rt.Gl=ot);if(z=a.pe,ft=a.port,b=a.node.portSpreading,ot=$t.alloc(),rt=$t.alloc(),tt=$t.alloc(),lt=$t.alloc(),ft.ga(ea,ot),ft.ga(Al,rt),ft.ga(As,tt),ft.ga(ol,lt),Pt=yt=ut=ft=0,b===Zv)for(var bt=0;bt<z.length;bt++){var Bt=z[bt];if(Bt!==null){var Jt=Bt.link.computeThickness();switch(Bt.Nc){case 8:yt+=Jt;break;case 2:Pt+=Jt;break;case 1:ft+=Jt;break;default:case 4:ut+=Jt}}}var Gt=bt=0,se=1,ue=Bt=0;for(Jt=0;Jt<z.length;Jt++){var ge=z[Jt];if(ge!==null){if(bt!==ge.Nc){switch(bt=ge.Nc,bt){case 8:var be=tt;Gt=lt;break;case 2:be=lt,Gt=ot;break;case 1:be=ot,Gt=rt;break;default:case 4:be=rt,Gt=tt}switch(Bt=Gt.x-be.x,ue=Gt.y-be.y,bt){case 8:yt>Math.abs(Bt)?(se=Math.abs(Bt)/yt,yt=Math.abs(Bt)):se=1;break;case 2:Pt>Math.abs(ue)?(se=Math.abs(ue)/Pt,Pt=Math.abs(ue)):se=1;break;case 1:ft>Math.abs(Bt)?(se=Math.abs(Bt)/ft,ft=Math.abs(Bt)):se=1;break;default:case 4:ut>Math.abs(ue)?(se=Math.abs(ue)/ut,ut=Math.abs(ue)):se=1}Gt=0}var We=ge.Zo;if(b===Zv){switch(ge=ge.link.computeThickness(),ge*=se,We.set(be),bt){case 8:We.x=be.x+Bt/2+yt/2-Gt-ge/2;break;case 2:We.y=be.y+ue/2+Pt/2-Gt-ge/2;break;case 1:We.x=be.x+Bt/2-ft/2+Gt+ge/2;break;default:case 4:We.y=be.y+ue/2-ut/2+Gt+ge/2}Gt+=ge}else{var Un=.5;b===Vm&&(Un=(ge.Uo+1)/(ge.Gl+1)),We.x=be.x+Bt*Un,We.y=be.y+ue*Un}}}for($t.free(ot),$t.free(rt),$t.free(tt),$t.free(lt),be=a.pe,z=0;z<be.length;z++)b=be[z],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,an.free(E)}x=a.pe}for(a=0;a<x.length;a++)if(E=x[a],E!==null&&E.link===y)return E;return null}Lf.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},Lf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Qr,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*b:(a?y.y===z.y:y.x===z.x)?x:x+8*(E-1-b)},Lf.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new $t,this.Gl=this.Uo=0,this.Zo=new $t,this.Ju=0}ty.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ty.className="LinkInfo";function $r(a){Gi(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new $t(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}$r.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},$r.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},$r.prototype.qb=function(){},$r.prototype.toString=function(){var a=Qn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},$r.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())}}},$r.prototype.createNetwork=function(){return new kr(this)},$r.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Ze?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof io?y.lg(a.memberParts):y.lg(a.iterator),y},$r.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")}},$r.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()}},$r.prototype.doLayout=function(a){var y=new tn;a instanceof Ze?(nc(this,y,a.nodes,!0,this.rh,!0,!1,!0),nc(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof io?nc(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},$r.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,z=0,tt=0;for(a=a.iterator;a.next();){var ot=a.value;Np(ot);var rt=ot.measuredBounds,lt=rt.width;rt=rt.height,ot.moveTo(b,E),ot instanceof io&&(ot.rh=!1),b+=Math.max(lt,50)+20,tt=Math.max(tt,Math.max(rt,50)),z>=y-1?(z=0,b=x,E+=tt+20,tt=0):z++}},$r.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,b=this.arrangementOrigin.y,E=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var ot=tt.value.node;if(!(ot===null||ot instanceof jn)&&(Np(ot),this.rh(ot))){var rt=ot.measuredBounds,lt=rt.width;rt=rt.height,ot.moveTo(x,b),ot instanceof io&&(ot.rh=!1),x+=Math.max(lt,50)+20,z=Math.max(z,Math.max(rt,50)),E>=a-1?(E=0,x=y,b+=z+20,z=0):E++}}},$r.prototype.rh=function(a){return!!(!a.location.w()||a instanceof io&&a.rh)};function nc(a,y,x,b,E,z,tt,ot){for(x=x.iterator;x.next();){var rt=x.value;b&&!rt.isTopLevel||E!==null&&!E(rt)||!rt.canLayout()||(z&&rt instanceof ei?rt.isLinkLabel||(rt instanceof io&&rt.layout===null?nc(a,y,rt.memberParts,!1,E,z,tt,ot):(Np(rt),y.add(rt))):tt&&rt instanceof jn?y.add(rt):!ot||!rt.Zc()||rt instanceof ei||(Np(rt),y.add(rt)))}}function Np(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}$r.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new an),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},$r.prototype.ex=function(a){var y=new tn;return a instanceof Ze?(nc(this,y,a.nodes,!0,null,!0,!0,!0),nc(this,y,a.links,!0,null,!0,!0,!0),nc(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof io?nc(this,y,a.memberParts,!1,null,!0,!0,!0):nc(this,y,a.iterator,!1,null,!0,!0,!0),y},$r.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(ea),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Zt.Object.defineProperties($r.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())}}}),$r.prototype.collectParts=$r.prototype.ex,$r.prototype.getLayoutBounds=$r.prototype.ni,$r.prototype.invalidateLayout=$r.prototype.C,$r.className="Layout";function kr(a){Gi(this),this.Sc=a,this.wf=new tn,this.ye=new tn,this.Es=new li,this.zs=new li}kr.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new tn,this.ye=new tn,this.Es=new li,this.zs=new li},kr.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},kr.prototype.createVertex=function(){return new _a(this)},kr.prototype.createEdge=function(){return new Ol(this)},kr.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof ei)return!tt.isLinkLabel;if(tt instanceof jn){var ot=tt.fromNode;return ot===null||ot.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof ei&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof io&&b.layout===null)this.lg(b.memberParts,!1);else if(this.ki(b)===null){var E=this.createVertex();E.node=b,this.dh(E)}}}for(a.reset();a.next();)if(b=a.value,b instanceof jn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var z=b.fromNode;E=b.toNode,z!==null&&E!==null&&z!==E&&(z=this.findGroupVertex(z),E=this.findGroupVertex(E),z!==null&&E!==null&&this.Zj(z,E,b))}}},kr.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},Ct=kr.prototype,Ct.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Ct.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},Ct.Iu=function(a){if(a!==null&&l1(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var b=y.M(x);this.Mj(b)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function l1(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}Ct.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Ct.ki=function(a){return a===null?null:this.Es.I(a)},Ct.Bo=function(a){if(a!==null){ey(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ey(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}}Ct.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,b=this.Lo(a);return b===null?(b=this.createEdge(),b.link=a,y!==null&&(b.fromVertex=this.Bl(y)),x!==null&&(b.toVertex=this.Bl(x)),this.Bo(b)):(y!==null?b.fromVertex=this.Bl(y):b.fromVertex=null,x!==null?b.toVertex=this.Bl(x):b.toVertex=null),b},Ct.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))}Ct.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Ct.Lo=function(a){return a===null?null:this.zs.I(a)},Ct.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},Ct.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))}},Ct.Ko=function(){for(var a=Rn(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);ni(a)},kr.prototype.deleteArtificialVertexes=function(){for(var a=Rn(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=Rn(),x=this.ye.iterator;x.next();){var b=x.value;b.link===null&&b.data===null&&y.push(b)}for(x=y.length,b=0;b<x;b++)this.Mj(y[b]);ni(a),ni(y)};function Tx(a){for(var y=Rn(),x=a.ye.iterator;x.next();){var b=x.value;b.fromVertex!==null&&b.toVertex!==null||y.push(b)}for(x=y.length,b=0;b<x;b++)a.Mj(y[b]);ni(y)}kr.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Tx(this),this.Ko()),a=new mn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),iy(this,y,b),y=!0;break}}}return a.sort(function(E,z){return E===null||z===null||E===z?0:z.vertexes.count-E.vertexes.count}),a};function iy(a,y,x){if(x!==null&&x.network!==y){l1(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(ny(a,E),ey(y,E),iy(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(ny(a,x),ey(y,x),iy(a,y,x.toVertex))}}kr.prototype.dz=function(){for(var a=new tn,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},Zt.Object.defineProperties(kr.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}}}),kr.prototype.findAllParts=kr.prototype.dz,kr.prototype.splitIntoSubNetworks=kr.prototype.Zx,kr.prototype.deleteSelfEdges=kr.prototype.Ko,kr.prototype.reverseEdge=kr.prototype.gm,kr.prototype.linkVertexes=kr.prototype.Zj,kr.prototype.findEdge=kr.prototype.Lo,kr.prototype.deleteLink=kr.prototype.Yy,kr.prototype.deleteEdge=kr.prototype.Mj,kr.prototype.addLink=kr.prototype.Dy,kr.prototype.addEdge=kr.prototype.Bo,kr.prototype.findVertex=kr.prototype.ki,kr.prototype.deleteNode=kr.prototype.Zy,kr.prototype.deleteVertex=kr.prototype.Iu,kr.prototype.addNode=kr.prototype.Bl,kr.prototype.addVertex=kr.prototype.dh,kr.prototype.addParts=kr.prototype.lg,kr.className="LayoutNetwork";function _a(a){Gi(this),this.ob=a,this.j=new an(0,0,10,10).freeze(),this.o=new $t(5,5).freeze(),this.Sh=this.ub=null,this.tg=new mn,this.mg=new mn}_a.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new mn,this.mg=new mn},_a.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+ji(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,b=this.tg.iterator;b.next();){var E=b.value;x?x=!1:a+=",",a+=E.toString(0)}for(E="",x=!0,b=this.mg.iterator;b.next();){var z=b.value;x?x=!1:E+=",",E+=z.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},_a.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Oe(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 io)){x=an.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Zo);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),an.free(x);return}an.free(x)}a.moveTo(y.x,y.y)}},_a.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},_a.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},_a.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},_a.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function oy(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}Zt.Object.defineProperties(_a.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=an.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,z=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,z,b),an.free(x),!(a instanceof io)&&(a=a.locationObject.ga(Zo),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(z/2,b/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new tn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new tn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new tn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new 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}}}),_a.prototype.deleteDestinationEdge=_a.prototype.Jl,_a.prototype.addDestinationEdge=_a.prototype.zl,_a.prototype.deleteSourceEdge=_a.prototype.Kl,_a.prototype.addSourceEdge=_a.prototype.Cl,_a.className="LayoutVertex",_a.standardComparer=oy,_a.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var b=parseFloat(y[x]),E=parseFloat(a[x]);if(isNaN(b))if(isNaN(E)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function Ol(a){Gi(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Ol.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Ol.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+ji(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},Ol.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Ol.prototype.commit=function(){},Ol.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Zt.Object.defineProperties(Ol.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)}}}),Ol.prototype.getOtherVertex=Ol.prototype.Ax,Ol.className="LayoutEdge";function fs(a){$r.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Zn(NaN,NaN).freeze(),this.tf=new Zn(10,10).freeze(),this.Jb=Tp,this.Rb=s0,this.nd=Op,this.hd=u1,a&&Object.assign(this,a)}Ae(fs,$r),fs.prototype.cloneProtected=function(a){$r.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},fs.prototype.qb=function(a){a.classType===fs?a===Op||a===u0||a===ry||a===l0?this.sorting=a:a===s0||a===Uu?this.arrangement=a:a===Tp||a===a0?this.alignment=a:_t("Unknown enum value: "+a):$r.prototype.qb.call(this,a)},fs.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof io)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case l0:E.reverse();break;case Op:E.sort(this.comparer);break;case u0:E.sort(this.comparer),E.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case a0:var ot=y,rt=x,lt=an.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ft=ut=0;ft<E.length;ft++){var yt=this.ni(E[ft],lt);ut=Math.max(ut,yt.width)}if(ut=Math.max(ut+ot,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(yt=ft=0;yt<E.length;yt++){var Pt=this.ni(E[yt],lt);ft=Math.max(ft,Pt.height)}ft=Math.max(ft+rt,1),yt=this.arrangement;for(var bt=Pt=this.arrangementOrigin.x,Bt=this.arrangementOrigin.y,Jt=0,Gt=0,se=0;se<E.length;se++){var ue=E[se],ge=this.ni(ue,lt),be=Math.ceil((ge.width+ot)/ut)*ut,We=Math.ceil((ge.height+rt)/ft)*ft;switch(yt){case Uu:var Un=Math.abs(bt-ge.width);break;default:Un=bt+ge.width}switch((0<z&&Jt>z-1||0<tt&&0<Jt&&Un-Pt>tt)&&(b.push(new an(0,Bt,tt+ot,Gt)),Jt=0,bt=Pt,Bt+=Gt,Gt=0),Gt=Math.max(Gt,We),yt){case Uu:ge=-ge.width;break;default:ge=0}switch(ue.moveTo(bt+ge,Bt),yt){case Uu:bt-=be;break;default:bt+=be}Jt++}b.push(new an(0,Bt,tt+ot,Gt)),an.free(lt);break;case Tp:for(rt=tt,ut=z,ft=y,yt=x,tt=an.alloc(),Pt=Math.max(this.cellSize.width,1),z=Bt=lt=0,ot=$t.alloc(),bt=0;bt<E.length;bt++)Gt=E[bt],Jt=this.ni(Gt,tt),Gt=Ed(Gt,Gt.locationObject,Gt.locationSpot,ot),lt=Math.max(lt,Gt.x),Bt=Math.max(Bt,Jt.width-Gt.x),z=Math.max(z,Gt.y);switch(bt=this.arrangement,bt){case Uu:lt+=ft;break;default:Bt+=ft}Pt=isFinite(Pt)?Math.max(Pt+ft,1):Math.max(lt+Bt,1);var pi=Gt=this.arrangementOrigin.x;for(se=this.arrangementOrigin.y,Bt=0,rt>=lt&&(rt-=lt),lt=ue=0,be=Math.max(this.cellSize.height,1),ge=z=0,We=!0,Jt=$t.alloc(),Un=0;Un<E.length;Un++){var ui=E[Un],zn=this.ni(ui,tt),xn=Ed(ui,ui.locationObject,ui.locationSpot,ot);if(0<Bt)switch(bt){case Uu:pi=(pi-Gt-(zn.width-xn.x))/Pt,pi=ke.$(Math.round(pi),pi)?Math.round(pi):Math.floor(pi),pi=pi*Pt+Gt;break;default:pi=(pi-Gt+xn.x)/Pt,pi=ke.$(Math.round(pi),pi)?Math.round(pi):Math.ceil(pi),pi=pi*Pt+Gt}else switch(bt){case Uu:ue=pi+xn.x+zn.width;break;default:ue=pi-xn.x}switch(bt){case Uu:var eo=-(pi+xn.x)+ue;break;default:eo=pi+zn.width-xn.x-ue}if(0<ut&&Bt>ut-1||0<rt&&0<Bt&&eo>rt){for(b.push(new an(0,We?se-z:se,rt+ft,ge+z+yt)),pi=0;pi<Bt&&Un!==Bt;pi++){eo=E[Un-Bt+pi];var _i=Ed(eo,eo.locationObject,eo.locationSpot,Jt);eo.moveTo(eo.position.x,eo.position.y+z-_i.y)}ge+=yt,se=We?se+ge:se+(ge+z),Bt=ge=z=0,pi=Gt,We=!1}switch(pi===Gt&&(lt=bt===Uu?Math.max(lt,zn.width-xn.x):Math.min(lt,-xn.x)),z=Math.max(z,xn.y),ge=Math.max(ge,zn.height-xn.y),isFinite(be)&&(ge=Math.max(ge,Math.max(zn.height,be)-xn.y)),We?ui.moveTo(pi-xn.x,se-xn.y):ui.moveTo(pi-xn.x,se),bt){case Uu:pi-=xn.x+ft;break;default:pi+=zn.width-xn.x+ft}Bt++}if(b.push(new an(0,se,rt+ft,(We?ge:ge+z)+yt)),E.length!==Bt)for(rt=0;rt<Bt;rt++)ut=E[E.length-Bt+rt],ft=Ed(ut,ut.locationObject,ut.locationSpot,ot),ut.moveTo(ut.position.x,ut.position.y+z-ft.y);if($t.free(ot),$t.free(Jt),bt===Uu)for(E=0;E<b.length;E++)z=b[E],z.width+=lt,z.x-=lt;else for(E=0;E<b.length;E++)z=b[E],z.x>lt&&(z.width+=z.x-lt,z.x=lt);an.free(tt)}for(ot=z=tt=E=0;ot<b.length;ot++)rt=b[ot],E=Math.min(E,rt.x),tt=Math.min(tt,rt.y),z=Math.max(z,rt.x+rt.width);this.arrangement===Uu?this.commitLayers(b,new $t(E+y/2-(z+E),tt-x/2)):this.commitLayers(b,new $t(E-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},fs.prototype.commitLayers=function(){};function u1(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Zt.Object.defineProperties(fs.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!==Tp&&a!==a0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==s0&&a!==Uu||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ry&&a!==l0&&a!==Op&&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 en(fs,"Position",0),Tp=new en(fs,"Location",1),s0=new en(fs,"LeftToRight",2),Uu=new en(fs,"RightToLeft",3),ry=new en(fs,"Forward",4),l0=new en(fs,"Reverse",5),Op=new en(fs,"Ascending",6),u0=new en(fs,"Descending",7);fs.className="GridLayout",fs.standardComparer=u1,fs.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var b=parseFloat(a[x]),E=parseFloat(y[x]);if(isNaN(b))if(isNaN(E)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},fs.Position=a0,fs.Location=Tp,fs.LeftToRight=s0,fs.RightToLeft=Uu,fs.Forward=ry,fs.Reverse=l0,fs.Ascending=Op,fs.Descending=u0;function gr(){this.On=new tn,this.Dn=new tn,this.Pa=new tn,this.cf=new li,this.bf=new li,this.aj=new li,this.H=null,this.tp=!1}Ct=gr.prototype,Ct.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Ct.Xe=function(a){this.H=a},Ct.oi=function(a){if(a instanceof ei){if(this.On.add(a),a instanceof io){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 jn?this.Dn.add(a):a instanceof Qo||this.Pa.add(a);y=a.data,y===null||a instanceof Qo||(a instanceof jn?this.bf.add(y,a):this.cf.add(y,a))},Ct.pc=function(a){if(a.Ej(),a instanceof ei){if(this.On.remove(a),a instanceof io){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 jn?this.Dn.remove(a):a instanceof Qo||this.Pa.remove(a);y=a.data,y===null||a instanceof Qo||(a instanceof jn?this.bf.remove(y):this.cf.remove(y))},Ct.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof io)&&_t('Invalid node template in Diagram.nodeTemplateMap: template for "'+b+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof io||_t('Invalid group template in Diagram.groupTemplateMap: template for "'+b+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof jn||_t('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Rn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Rn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Rn(),b=this.nodes.iterator;b.next();){var E=b.value;E.data!==null&&(a.push(E.data),a.push(E.location))}for(b=this.links.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(b=this.parts.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),b=0;b<y.length;b++)E=this.Lc(y[b]),E!==null&&(E.isSelected=!0);for(b=0;b<x.length;b++)E=this.Lc(x[b]),E!==null&&(E.isHighlighted=!0);for(b=0;b<a.length;b+=2)E=this.Lc(a[b]),E!==null&&(E.location=a[b+1]);ni(y),ni(x),ni(a)}},gr.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},gr.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&h1(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&Jf(this.diagram,!1)};function h1(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=d1(a,y,b);if(E!==null&&(yu(E),E=E.copy(),E!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=b,E.ub=y,a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=z,b=E;break t}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}gr.prototype.insertLink=function(){return null},gr.prototype.resolveReferencesForData=function(){},gr.prototype.Ro=function(a){return this.H.model.Ro(a)};function d1(a,y,x){a=a.H;var b=a.model;return b.Xj()&&b.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(g1||(g1=!0,Bn('No Group template found for category "'+x+'"'),Bn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(f1||(f1=!0,Bn('No Node template found for category "'+x+'"'),Bn(" Using default node template")),y=a.ny))),y}gr.prototype.getLinkCategoryForData=function(){return""},gr.prototype.setLinkCategoryForData=function(){},gr.prototype.setFromNodeForLink=function(){},gr.prototype.setToNodeForLink=function(){},gr.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(p1||(p1=!0,Bn('No Link template found for category "'+a+'"'),Bn(" Using default link template")),x=y.my)),x},gr.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},gr.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},gr.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Vd(this.diagram,a,!1),this.unresolveReferencesForPart(a))},gr.prototype.unresolveReferencesForPart=function(){},gr.prototype.removeDataForLink=function(){},gr.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},gr.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof ei?a:null)},gr.prototype.findLinkForKey=function(){return null},Ct=gr.prototype,Ct.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Ct.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof ei?a:null)},Ct.Kc=function(a){return a===null?null:this.bf.I(a)},Ct.ms=function(a){for(var y=0;y<arguments.length;++y);y=new tn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Oe(tt)&&ay(this,E,tt)){y.add(b);break}}}return y.iterator},Ct.ls=function(a){for(var y=0;y<arguments.length;++y);y=new tn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Oe(tt)&&ay(this,E,tt)){y.add(b);break}}}return y.iterator};function ay(a,y,x){for(var b in x){var E=y[b],z=x[b];if(Xe(z)){if(!Xe(E)||E.length<z.length)return!1;for(var tt=0;tt<E.length;tt++){var ot=z[tt];if(ot!==void 0&&!c1(a,E[tt],ot))return!1}}else if(!c1(a,E,z))return!1}return!0}function c1(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(Oe(y)&&Oe(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}gr.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var b=a.modelChange;if(b!=="")if(x===Wr){if(b==="nodeCategory"){var E=this.Lc(a.object),z=a.newValue;E!==null&&typeof z=="string"&&(E.category=z)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===pa){var tt=a.newValue;b==="nodeDataArray"&&Oe(tt)&&h1(this,tt),y.isModified=!0}else if(x===Ba){var ot=a.oldValue;b==="nodeDataArray"&&Oe(ot)&&this.ip(ot),y.isModified=!0}else x===sl&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===Wr){var rt=a.propertyName,lt=a.object;lt===y.model?(rt==="nodeKeyProperty"||rt==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(lt,rt),y.isModified=!0}else if(x===pa||x===Ba){var ut=a.change===pa,ft=ut?a.newParam:a.oldParam,yt=ut?a.newValue:a.oldValue,Pt=this.aj.I(a.object);if(Array.isArray(Pt))for(a=0;a<Pt.length;a++){var bt=Pt[a];if(ut)km(bt,yt,ft,!0);else if(!(0>ft)){var Bt=ft+cp(bt);bt.pc(Bt,!0),xv(bt,Bt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},gr.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)},gr.prototype.rp=function(){for(var a=this.H.model,y=new tn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||E.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||E.push(tt.data)}),E.forEach(function(tt){b1(a,tt,!1)}),b=0;b<x.length;b++){var z=x[b];this.Lc(z)===null&&C1(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()},gr.prototype.refreshDataBoundLinks=function(){},gr.prototype.updateRelationshipsFromData=function(){},gr.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var b=this.aj.iterator;b.next();){for(var E=b.value,z=0;z<E.length;z++){var tt=E[z].sx(a);tt!==null&&(x===null&&(x=Rn()),x.push(tt))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);ni(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function sy(a,y){var x=y.Hh;if(Xe(x)){var b=a.aj.I(x);if(b===null)b=[],b.push(y),a.aj.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}function ly(a,y,x){Zc(y,function(tt){tt=tt.O.s;for(var ot=tt.length,rt=0;rt<ot;rt++)Xg(x,tt[rt])});var b=y.Hh;if(Xe(b)){var E=a.aj.I(b);if(E!==null){for(var z=0;z<E.length;z++)if(E[z]===y){E.splice(z,1),E.length===0&&a.aj.remove(b);break}}}}gr.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new li;if(Xe(a))for(var E=0;E<a.length;E++)h0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)h0(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new tn;for(var z=new li,tt=b.iterator;tt.next();){var ot=tt.value;if(ot instanceof jn)a||ot.fromNode!==null&&ot.toNode!==null||E.add(ot);else if(ot instanceof ei&&ot.data!==null&&x.Tl()){var rt=ot;ot=tt.key;var lt=ot.pg();lt!==null&&(lt=b.I(lt),lt!==null?(x.qe(rt.data,x.wa(lt.data)),rt=y.Kc(rt.data),ot=ot.kh(),ot!==null&&rt!==null&&z.add(ot,rt)):x.qe(rt.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<z.count)for(x=z.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ut=new li;b.each(function(ft){ft.key.data!==null&&ut.add(ft.key.data,ft.value.data)}),x(ut,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function h0(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var z=a.copyPartData(y,x);if(!(z instanceof Fi))return null;if(z.isSelected=!1,z.isHighlighted=!1,b.add(y,z),y instanceof ei){for(var tt=y.linksConnected;tt.next();){var ot=tt.value;if(ot.fromNode===y){var rt=b.I(ot);rt!==null&&(rt.fromNode=z)}ot.toNode===y&&(ot=b.I(ot),ot!==null&&(ot.toNode=z))}if(y instanceof io&&z instanceof io)for(y=y.memberParts;y.next();)tt=h0(a,y.value,x,b,E),tt instanceof jn||tt===null||(tt.containingGroup=z)}else if(y instanceof jn&&z instanceof jn)for(tt=y.fromNode,tt!==null&&(tt=b.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=b.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=h0(a,y.value,x,b,E),tt!==null&&tt instanceof ei&&(tt.labeledLink=z);return z}gr.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof jn||(b=E.copyNodeData(b),Oe(b)&&(E.xf(b),x=y.Lc(b)))}else yu(a),x=a.copy(),x!==null&&(E=this.H,y!==null?y.add(x):b!==null&&E!==null&&E.commandHandler!==null&&E.commandHandler.copiesClipboardData&&(y=E.model,E=null,x instanceof jn||(E=y.copyNodeData(b)),Oe(E)&&(x.data=E)));return x},Zt.Object.defineProperties(gr.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}}}),gr.prototype.updateAllRelationshipsFromData=gr.prototype.rp,gr.prototype.findLinksByExample=gr.prototype.ls,gr.prototype.findNodesByExample=gr.prototype.ms,gr.prototype.findLinkForData=gr.prototype.Kc,gr.prototype.findNodeForData=gr.prototype.ii,gr.prototype.findPartForData=gr.prototype.Lc,gr.prototype.findNodeForKey=gr.prototype.Vb,gr.prototype.removeModeledPart=gr.prototype.ip,gr.prototype.removeModeledParts=gr.prototype.Gs,gr.prototype.rebuildParts=gr.prototype.Wd;var f1=!1,g1=!1,p1=!1;gr.className="PartManager";function ns(a){gr.apply(this,arguments)}Ae(ns,gr),ns.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),m1(this,a.linkDataArray)},ns.prototype.addModeledParts=function(a){for(gr.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)yg(a.value);Jf(this.diagram,!1)};function m1(a,y){y.forEach(function(x){v1(a,x)}),Jf(a.diagram,!1)}function v1(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),b=a.findLinkTemplateForCategory(x);if(b!==null){yu(b);var E=b.copy();if(E!==null){b=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,E.Tf=x,E.ub=y,x=a.diagram.model;var z=g0(x,y,!0);z!==""&&(E.fromPortId=z),z=Jl(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof ei&&(E.fromNode=z)),z=g0(x,y,!1),z!==""&&(E.toPortId=z),z=Jl(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof ei&&(E.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}ns.prototype.removeAllModeledParts=function(){var a=this.diagram.model;y1(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function y1(a,y){y.forEach(function(x){a.ip(x)})}ns.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ns.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ns.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ns.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ns.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ns.prototype.findPartForKey=function(a){var y=gr.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ns.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ns.prototype.doModelChanged=function(a){var y=this;if(gr.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===Wr){if(E==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(E==="linkToKey"){var ot=this.Kc(a.object);if(ot!==null){var rt=this.Vb(a.newValue);ot.toNode=rt}}else if(E==="linkFromPortId"){var lt=this.Kc(a.object);if(lt!==null){var ut=a.newValue;typeof ut=="string"&&(lt.fromPortId=ut)}}else if(E==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var yt=a.newValue;typeof yt=="string"&&(ft.toPortId=yt)}}else if(E==="nodeGroupKey"){var Pt=this.Lc(a.object);if(Pt!==null){var bt=a.newValue;if(bt!==void 0){var Bt=this.Vb(bt);Bt instanceof io?Pt.containingGroup=Bt:Pt.containingGroup=null}else Pt.containingGroup=null}}else if(E==="linkLabelKeys"){var Jt=this.Kc(a.object);if(Jt!==null){var Gt=a.oldValue,se=a.newValue;Array.isArray(Gt)&&Gt.forEach(function(xn){0<=se.indexOf(xn)||(xn=y.Vb(xn),xn!==null&&(xn.labeledLink=null))}),Array.isArray(se)&&se.forEach(function(xn){xn=y.Vb(xn),xn!==null&&(xn.labeledLink=Jt)})}}else if(E==="linkCategory"){var ue=this.Kc(a.object),ge=a.newValue;ue!==null&&typeof ge=="string"&&(ue.category=ge)}else E==="linkDataArray"&&(y1(this,a.oldValue),m1(this,a.newValue));x.isModified=!0}else if(b===pa){var be=a.newValue;if(E==="linkDataArray"&&typeof be=="object"&&be!==null)v1(this,be);else if(E==="linkLabelKeys"&&oc(be)){var We=this.Kc(a.object),Un=this.Vb(be);We!==null&&Un!==null&&(Un.labeledLink=We)}x.isModified=!0}else if(b===Ba){var pi=a.oldValue;if(E==="linkDataArray"&&typeof pi=="object"&&pi!==null)this.ip(pi);else if(E==="linkLabelKeys"&&oc(pi)){var ui=this.Vb(pi);ui!==null&&(ui.labeledLink=null)}x.isModified=!0}}else if(b===Wr){var zn=a.propertyName;a.object!==x.model||zn!=="linkFromKeyProperty"&&zn!=="linkToKeyProperty"&&zn!=="linkFromPortIdProperty"&&zn!=="linkToPortIdProperty"&&zn!=="linkLabelKeysProperty"&&zn!=="nodeIsGroupProperty"&&zn!=="nodeGroupKeyProperty"&&zn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ns.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new tn,b=y.linkDataArray;b.forEach(function(z){x.add(z)});var E=[];this.links.each(function(z){z.data===null||x.contains(z.data)||E.push(z.data)}),E.forEach(function(z){T1(y,z,!1)}),b.forEach(function(z){a.Kc(z)===null&&N1(y,z,!1)})},ns.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof jn){var E=Jl(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Jl(b,y,!1),E=x.Vb(E),a.toNode=E,y=b.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){E=y[0];var z=a.labelNodes.first();if(b.wa(z.data)===E)return}E=new tn().addAll(y);var tt=new tn;a.labelNodes.each(function(ot){ot.data!==null&&(ot=b.wa(ot.data),ot!==void 0&&tt.add(ot))}),y=tt.copy(),y.hp(E),E=E.copy(),E.hp(tt),(0<y.count||0<E.count)&&(y.each(function(ot){ot=x.Vb(ot),ot!==null&&ot.labeledLink===a&&(ot.labeledLink=null)}),E.each(function(ot){ot=x.Vb(ot),ot!==null&&ot.labeledLink!==a&&(ot.labeledLink=a)}))}}else!(a instanceof Qo)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof io)&&(a.containingGroup=y)}}},ns.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Fp(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var z={};b.next();){var tt=b.value;y.lb(tt)?E instanceof io&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=E)):(z.link=this.Kc(tt),z.link!==null&&E instanceof ei&&(Jl(y,tt,!0)===x&&(z.link.fromNode=E),Jl(y,tt,!1)===x&&(z.link.toNode=E),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(ot){return function(rt){return rt===x?(E.labeledLink=ot.link,!0):!1}}(z)))),z={link:z.link}}Xu(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof io&&(E.containingGroup=a))}},ns.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ei){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Yu(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Yu(y,x,b.data)),a instanceof io)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Yu(y,x,b)}}},ns.prototype.copyPartData=function(a,y){var x=gr.prototype.copyPartData.call(this,a,y);if(a instanceof jn)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},ns.prototype.insertLink=function(a,y,x,b){var E=this.diagram,z=E.model,tt=E.toolManager.findTool("Linking"),ot="";if(a!==null&&(y===null&&(y=a),ot=y.portId,ot===null&&(ot="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=tt.archetypeLinkData,b instanceof jn){if(yu(b),z=b.copy(),z!==null)return z.fromNode=a,z.fromPortId=ot,z.toNode=x,z.toPortId=y,E.add(z),a=tt.archetypeLabelNodeData,a instanceof ei&&(yu(a),a=a.copy(),a!==null&&(a.labeledLink=z,E.add(a))),z}else if(b!==null&&(b=z.Jo(b),typeof b=="object"&&b!==null))return a!==null&&bg(z,b,z.wa(a.data),!0),Eg(z,b,ot,!0),x!==null&&bg(z,b,z.wa(x.data),!1),Eg(z,b,y,!1),z.fi(b),a=tt.archetypeLabelNodeData,a===null||a instanceof ei||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(b,a))),E.Kc(b);return null},ns.prototype.findLinkForKey=ns.prototype.findLinkForKey,ns.prototype.findPartForKey=ns.prototype.findPartForKey,ns.prototype.removeAllModeledParts=ns.prototype.removeAllModeledParts,ns.prototype.addModeledParts=ns.prototype.addModeledParts,ns.prototype.addAllModeledParts=ns.prototype.addAllModeledParts,ns.className="GraphLinksPartManager";function uu(){gr.apply(this,arguments),this.Sg=null}Ae(uu,gr);function d0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,z=x;if(a.diagram.isTreePathToChildren||(E=x,z=y),(b===null||!kn(b,E,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(yu(b),b=b.copy(),b!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=z,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}uu.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},uu.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},uu.prototype.setFromNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)b.qe(a.data,b.wa(y));else{var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=E}},uu.prototype.setToNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=E}else b.qe(a.data,b.wa(y))},uu.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},uu.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},uu.prototype.doModelChanged=function(a){if(gr.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var b=a.modelChange;if(b!==""){if(x===Wr){if(b==="nodeParentKey"){var E=a.object,z=this.Vb(a.newValue),tt=this.ii(E);if(this.Sg!==null)z!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(tt!==null){var ot=tt.kh();ot!==null?z===null?y.remove(ot):y.isTreePathToChildren?ot.fromNode=z:ot.toNode=z:d0(this,z,tt)}}else if(b==="parentLinkCategory"){var rt=this.ii(a.object),lt=a.newValue;if(rt!==null&&typeof lt=="string"){var ut=rt.kh();ut!==null&&(ut.category=lt)}}y.isModified=!0}}else if(x===Wr){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},uu.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof ei&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:d0(this,y,a):b!==null&&Vd(x,b,!1)))}}},uu.prototype.updateDataBindings=function(a,y){gr.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},uu.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Fp(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var z=b.value;y.lb(z)&&E instanceof ei&&y.mh(z)===x&&d0(this,E,this.ii(z))}Xu(y,x)}a=y.mh(a),a!==void 0&&E instanceof ei&&(a=this.Vb(a),d0(this,a,E))}},uu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ei){var x=y.wa(a.data),b=this.Kc(a.data);if(b!==null){b.isSelected=!1,b.isHighlighted=!1;var E=b.layer;if(E!==null){var z=E.pc(-1,b,!1);0<=z&&this.diagram.cb(Ba,"parts",E,b,null,z,null),z=b.layerChanged,z!==null&&z(b,E,null)}}for(b=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)E=a.value,E=(b?E.toNode:E.fromNode).data,y.lb(E)&&Yu(y,x,E)}},uu.prototype.insertLink=function(a,y,x){y=this.diagram.model;var b=a,E=x;return this.diagram.isTreePathToChildren||(b=x,E=a),b!==null&&E!==null?(y.qe(E.data,y.wa(b.data)),E.kh()):null},uu.prototype.findLinkForKey=uu.prototype.findLinkForKey,uu.className="TreePartManager";function Ei(a,y){this.kl=new tn,this.il=new tn,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,Gi(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new li,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 li,this.Lt=new mn,this.Wg=!1,this.o=null,this.undoManager=new Vr,a!==void 0&&(Xe(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ei.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},Ei.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Ei.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Ei.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+qn(E)}}return y},Ei.prototype.xA=function(a){a.change!==sl&&_t("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Ua?(x1(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Ei.prototype.Qv=function(a,y){var x=this,b=!1,E=new tn,z=new tn,tt=new tn,ot=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===pa?E.add(ft.newValue):ft.change===Ba&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==Wr||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(ot&&ot.contains(ft.object)?ot.get(ft.object).each(function(yt){x.lb(yt)&&z.add(yt)}):ft.object instanceof Ei||x.ri()&&x.Jc(ft.object)||P1(x,ft.object).each(function(yt){z.add(yt)})):b=!0)});var rt=this.il;rt.clear(),E.each(function(ft){rt.add(x.wa(ft)),y||z.add(ft)});var lt=this.kl;lt.clear(),tt.each(function(ft){lt.add(x.wa(ft)),y&&z.add(ft)}),a=x.cloneDeep(z.Fa());var ut=null;return b&&(ut===null&&(ut={}),ut.modelData=this.cloneDeep(this.modelData)),0<rt.count&&(ut===null&&(ut={}),y?ut.removedNodeKeys=rt.Fa():ut.insertedNodeKeys=rt.Fa()),0<a.length&&(ut===null&&(ut={}),ut.modifiedNodeData=a),0<lt.count&&(ut===null&&(ut={}),y?ut.insertedNodeKeys=lt.Fa():ut.removedNodeKeys=lt.Fa()),lt.clear(),rt.clear(),ut},Ei.prototype.cloneDeep=function(a){return Cg(this,a,!0)};function Cg(a,y,x,b,E,z){function tt(ft,yt){ot?(ft.__gohashid===void 0&&z.push(ft),b.set(ft,yt)):(ft=No++,b.set(ft,yt),E.set(ft,y))}if(!Oe(y))return y;z||(z=[]);var ot=Object.isExtensible(y);if(b||(b=new li),ot){var rt=b.get(y);if(rt)return rt}else for(E||(E=new li),rt=E.iterator;rt.next();){var lt=rt.key;if(rt.value===y&&(lt=b.get(lt)))return lt}if(Array.isArray(y)){rt=[],tt(y,rt);for(var ut=0;ut<y.length;ut++)rt.push(Cg(a,y[ut],!1,b,E,z))}else if(y instanceof $t||y instanceof Zn||y instanceof an||y instanceof vi||y instanceof xi)rt=y.copy(),tt(y,rt);else{if(y instanceof dr||y instanceof $n||y instanceof en)return y;if(y instanceof mn)rt=new mn().addAll(Cg(a,y.Fa(),!1,b,E,z)),tt(y,rt);else if(y instanceof tn)rt=new tn().addAll(Cg(a,y.Fa(),!1,b,E,z)),tt(y,rt);else if(y instanceof li)rt=new li().addAll(Cg(a,y.Fa(),!1,b,E,z)),tt(y,rt);else if(y instanceof Date)rt=new Date(y.getTime()),tt(y,rt);else if(y instanceof RegExp)rt=new RegExp(y),tt(y,rt),rt.lastIndex=y.lastIndex;else if(typeof y.copy=="function")rt=y.copy(),tt(y,rt);else for(ut in rt={},tt(y,rt),y)ut!=="__gohashid"&&(rt[ut]=Cg(a,y[ut],!1,b,E,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),rt}Ct=Ei.prototype,Ct.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Ct.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},Ct.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 S1(a,y){y=y.modelData,Oe(y)&&(a.dm(y),a.modelData=y)}Ct.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!w1(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+uy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+ic(this,this.nodeDataArray,!0)},Ct.kv=function(a){S1(this,a),a=a.nodeDataArray,Xe(a)&&(this.dm(a),this.nodeDataArray=a)};function x1(a,y){function x(E,z){if((z=z.part)&&(z=z.data,E!==z)){var tt=b.get(E);tt===null?(tt=new tn,tt.add(z),b.add(E,tt)):tt.add(z)}}var b=a.vh;b===null&&(b=new li,y.changes.each(function(E){if(E.diagram!==null){var z=E.change;z===Wr?(E=E.object.panel)&&(z=E.data)&&x(z,E):(z===pa||z===Ba)&&(E=E.object,(z=E.itemArray)&&x(z,E))}}),a.vh=b)}function P1(a,y){for(var x=new tn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];c0(a,y,E,E,x)}return x}function c0(a,y,x,b,E){if(Array.isArray(x))for(var z=0;z<x.length;z++){var tt=x[z];if(tt===y)return E.add(b),!0;if(c0(a,y,tt,b,E))return!0}else if(Oe(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return E.add(b),!0;if(c0(a,y,tt,b,E))return!0}return!1}Ct.Pv=function(a,y){var x=this,b=!1,E=new tn,z=new tn,tt=new tn,ot=this.vh;a.changes.each(function(ut){ut.model===x&&(ut.modelChange==="nodeDataArray"?ut.change===pa?E.add(ut.newValue):ut.change===Ba&&tt.add(ut.oldValue):x.lb(ut.object)?z.add(ut.object):ut.change!==Wr||x.modelData!==ut.object&&ut.propertyName!=="modelData"?ut.object!==null&&(ot&&ot.contains(ut.object)?ot.get(ut.object).each(function(ft){x.lb(ft)&&z.add(ft)}):ut.object instanceof Ei||x.ri()&&x.Jc(ut.object)||P1(x,ut.object).each(function(ft){z.add(ft)})):b=!0)});var rt=this.il;rt.clear(),E.each(function(ut){rt.add(x.wa(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(x.wa(ut)),y&&z.add(ut)}),a="",b&&(a+=`,
|
|
|
"modelData": `+uy(this,this.modelData)),0<rt.count&&(a+=(y?this.Yv:this.Wv)+ic(this,rt.Fa(),!0)),0<z.count&&(a+=this.jy+ic(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Wv:this.Yv)+ic(this,lt.Fa(),!0)),lt.clear(),rt.clear(),a},Ct.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)&&_t("applyIncrementalJson cannot change Model properties"),S1(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new li;if(Array.isArray(x))for(var E=0;E<x.length;E++){var z=x[E],tt=this.wa(z);tt!=null&&b.set(tt,z)}if(Array.isArray(y))for(E=y.length,z=0;z<E;z++){tt=y[z];var ot=this.hc(tt);ot===null&&(ot=(ot=b.get(tt))?ot:this.copyNodeData({}),this.km(ot,tt),this.xf(ot))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],z=this.wa(E),z=this.hc(z),z!==null){for(var rt in E)rt==="__gohashid"||rt===this.nodeKeyProperty||this.Wj()&&rt===this.nodeIsGroupProperty||this.setDataProperty(z,rt,E[rt]);this.lm(E,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,rt=0;rt<x;rt++)y=this.hc(a[rt]),y!==null&&this.cm(y)},Ct.$x=function(a,y){a.change!==sl&&_t("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Ua?(y===void 0&&(y=Ip(this,this)),x1(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 }'},Ct.yA=function(a,y){return this.$x(a,y)},Ct.np=function(a){return a===void 0&&(a=Ip(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Ct.toJSON=function(a){return this.np(a)},Ct.Zw=function(a){var y=null;if(typeof a=="string")try{y=ae.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:_t("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&_t("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Ct.Ky=function(a){return this.Zw(a)},Ei.constructGraphLinksModel=function(){return new Ei},Ct=Ei.prototype,Ct.dm=function(a){if(Xe(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(Oe(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:_t("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(Oe(a)){for(y in a)if(x=a[y],Oe(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new mn,b=0;b<x.length/2;b++)E.add(new $t(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Ox(a)}return a},Ct.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()):Xe(a)?ic(this,a):Oe(a)?uy(this,a):typeof a=="function"?"null":a.toString()};function ic(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new gi;E.add("["),x&&1<b&&E.add(`
|
|
|
`);for(var z=0;z<b;z++){var tt=y[z];tt!==void 0&&(0<z&&(E.add(","),x&&E.add(`
|
|
|
`)),E.add(a.sm(tt)))}return x&&1<b&&E.add(`
|
|
|
`),E.add("]"),E.toString()}function w1(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function Qs(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function uy(a,y){var x=y;if(x instanceof $t)y={class:"go.Point",x:Qs(x.x),y:Qs(x.y)};else if(x instanceof Zn)y={class:"go.Size",width:Qs(x.width),height:Qs(x.height)};else if(x instanceof an)y={class:"go.Rect",x:Qs(x.x),y:Qs(x.y),width:Qs(x.width),height:Qs(x.height)};else if(x instanceof vi)y={class:"go.Margin",top:Qs(x.top),right:Qs(x.right),bottom:Qs(x.bottom),left:Qs(x.left)};else if(x instanceof xi)x.sb()?y={class:"go.Spot",x:Qs(x.x),y:Qs(x.y),offsetX:Qs(x.offsetX),offsetY:Qs(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof dr){if(y={class:"go.Brush",type:x.type.name},x.type===wd?y.color=x.color:(x.type===td||x.type===su)&&(y.start=x.start,y.end=x.end,x.type===su&&(x.startRadius!==0&&(y.startRadius=Qs(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Qs(x.endRadius)))),x.colorStops!==null){var b={};for(x=x.colorStops.iterator;x.next();)b[x.key]=x.value;y.colorStops=b}}else x instanceof $n?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Qs(x.startX)),x.startY!==0&&(y.startY=Qs(x.startY)),x.endX!==0&&(y.endX=Qs(x.endX)),x.endY!==0&&(y.endY=Qs(x.endY)),x.spot1.D(ea)||(y.spot1=x.spot1),x.spot2.D(As)||(y.spot2=x.spot2),x.type===$n.o&&(y.path=$n.ia(x))):x instanceof en&&(y={class:"go.EnumValue",classType:Ip(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var z=Pa(y,E);if(!w1(E,z))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&z instanceof mn){var tt="[";for(z=z.iterator;z.next();){var ot=z.value;1<tt.length&&(tt+=","),tt+=a.sm(ot.x),tt+=",",tt+=a.sm(ot.y)}tt+="]",b+=tt}else b+=a.sm(z)}return b+"}"}function qs(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Ox(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 $t(qs(a.x),qs(a.y));else if(y==="Size")x=new Zn(qs(a.width),qs(a.height));else if(y==="Rect")x=new an(qs(a.x),qs(a.y),qs(a.width),qs(a.height));else if(y==="Margin")x=new vi(qs(a.top),qs(a.right),qs(a.bottom),qs(a.left));else if(y==="Spot")typeof a.enum=="string"?x=xc(a.enum):x=new xi(qs(a.x),qs(a.y),qs(a.offsetX),qs(a.offsetY));else if(y==="Brush"){if(x=new dr,x.type=Dn(dr,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof xi&&(x.start=a.start),a.end instanceof xi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=qs(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=qs(a.endRadius)),a=a.colorStops,Oe(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=$n.parse(a.path):x=new $n,x.type=Dn($n,a.type),typeof a.startX=="number"&&(x.startX=qs(a.startX)),typeof a.startY=="number"&&(x.startY=qs(a.startY)),typeof a.endX=="number"&&(x.endX=qs(a.endX)),typeof a.endY=="number"&&(x.endY=qs(a.endY)),a.spot1 instanceof xi&&(x.spot1=a.spot1),a.spot2 instanceof xi&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=Dn(b,a.name)));return x}Ct.Pe=function(a){return this.Lt.add(a),this},Ct.ik=function(a){this.Lt.remove(a)},Ct.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},Ct.cb=function(a,y,x,b,E,z,tt){Ha(this,"",a,y,x,b,E,z,tt)},Ct.g=function(a,y,x,b,E){Ha(this,"",Wr,a,this,y,x,b,E)},Ct.Fs=function(a,y,x,b,E,z){Ha(this,"",Wr,y,a,x,b,E,z)};function Ha(a,y,x,b,E,z,tt,ot,rt){ot===void 0&&(ot=null),rt===void 0&&(rt=null);var lt=new Zr;lt.model=a,lt.change=x,lt.modelChange=y,lt.propertyName=b,lt.object=E,lt.oldValue=z,lt.oldParam=ot,lt.newValue=tt,lt.newParam=rt,a.ds(lt)}Ei.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Wr){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),Rr(x,b,E)}else a.change===pa?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Oe(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&Jn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&Xn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Xe(b)&&a.propertyName&&(b=Pa(a.object,a.propertyName)),Xe(b)&&typeof x=="number"&&(a=a.newValue,y?Jn(b,x):Xn(b,x,a))):_t("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Ba?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Oe(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&Xn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&Jn(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!Xe(b)&&a.propertyName&&(b=Pa(a.object,a.propertyName)),Xe(b)&&typeof x=="number"&&(a=a.oldValue,y?Xn(b,x,a):Jn(b,x))):_t("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==sl&&_t("unknown ChangedEvent: "+a.toString())},Ei.prototype.Ea=function(a){return this.undoManager.Ea(a)},Ei.prototype.eb=function(a){return this.undoManager.eb(a)},Ei.prototype.Kf=function(){return this.undoManager.Kf()},Ei.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Ct=Ei.prototype,Ct.La=function(a,y){y===void 0&&(y=""),Ha(this,"SourceChanged",sl,y,a,null,null)},Ct.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Pa(a,y),y!==void 0)){if(oc(y))return y;_t("Key value for node data "+a+" is not a number or a string: "+y)}}},Ct.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Pa(a,x);b!==y&&this.hc(y)===null&&(Rr(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Ha(this,"nodeKey",Wr,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else Rr(a,x,y)}};function oc(a){return typeof a=="number"||typeof a=="string"}Ct.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Ct.hc=function(a){return a===null&&_t("Model.findNodeDataForKey:key must not be null"),a!==void 0&&oc(a)?this.kb.I(a):null},Ct.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){Rr(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;Rr(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Rr(a,y,x)}}}}},Ct.xf=function(a){a!==null&&(Yi(a),this.lb(a)||C1(this,a,!0))};function C1(a,y,x){var b=a.wa(y);(b===void 0||a.kb.I(b)!==y)&&(a.$u(y),b=a.wa(y),b===void 0&&_t("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,Xn(a.Tc,b,y)),Ha(a,"nodeDataArray",pa,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}Ct.Fy=function(a){if(Xe(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)},Ct.cm=function(a){a!==null&&b1(this,a,!0)};function b1(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){t:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break t}b=-1}if(0>b)return;Jn(a.Tc,b)}Ha(a,"nodeDataArray",Ba,"nodeDataArray",a,y,null,b,null),a.qp(y)}Ct.nA=function(a){if(Xe(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)},Ct.$z=function(a){if(a!==this.nodeDataArray&&Xe(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var z=a[E],tt=this.wa(z);if(tt!==void 0){x.add(tt);var ot=this.hc(tt);ot!==z&&(ot!==null?(this.Do(ot,z),this.lm(z,ot)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},Ct.jp=function(a,y){y!==void 0&&(a=Fp(this,a),a instanceof tn&&this.Vf.add(y,a))},Ct.Lv=function(){},Ct.fm=function(){},Ct.em=function(){},Ct.qp=function(){};function Yu(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new tn,a.Vf.add(y,b)),b.add(x)}}function Xu(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof tn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function Fp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof tn?a:null)}Ct.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Ei.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):f0(this,a,!0),Oe(a)&&Gi(a),a};function f0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=f0(a,y[x],a.copiesArrayObjects);b.push(E)}return Gi(b),b}if(x&&Oe(y)){x=(x=y.constructor)?new x:{},E=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(b in y)if(b==="__gohashid")x.__gohashid=void 0;else if(b===E)x[E]=void 0;else{var z=Pa(y,b),tt=Ip(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof Ei||z instanceof Vr||z instanceof Ua||z instanceof Zr||(z=f0(a,z,!1)),Rr(x,b,z)}return Gi(x),x}return y instanceof $t||y instanceof Zn||y instanceof an||y instanceof xi||y instanceof vi?y.copy():y}Ei.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!E1&&a instanceof Ee&&(E1=!0,Bn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Bn(" Is that really your intent?"));var b=Pa(a,y);b!==x&&(Rr(a,y,x),this.Fs(a,y,b,x))},Ct=Ei.prototype,Ct.set=function(a,y,x){this.setDataProperty(a,y,x)},Ct.Do=function(a,y){if(y){var x=this.lb(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||this.setDataProperty(a,b,y[b])}},Ct.Ay=function(a,y){this.ts(a,-1,y)},Ct.ts=function(a,y,x){0>y&&(y=a.length),Xn(a,y,x),Ha(this,"",pa,"",a,null,x,null,y)},Ct.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&_t("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Jn(a,y),Ha(this,"",Ba,"",a,x,null,y,null)},Ct.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Pa(a,y),y===void 0))return"";if(typeof y=="string")return y;_t("getCategoryForNodeData found a non-string category for "+a+": "+y)},Ct.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Pa(a,x);b===void 0&&(b=""),b!==y&&(Rr(a,x,y),Ha(this,"nodeCategory",Wr,x,a,b,y))}else Rr(a,x,y)}},Ct.lm=function(a,y){this.jm(y,this.Ro(a))},Ct.Tl=function(){return!1},Ct.Wj=function(){return!1},Ct.ri=function(){return!1},Ct.xs=function(){return!1},Ct.Xj=function(){return!1};function hy(){return new Ei}function Ip(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 Ip(a,y.constructor);return typeof y}function dy(a){return Ou[a]?Ou[a]:ae.go!==void 0&&ae.go[a]?ae.go[a]:null}function Pa(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(b){}return x}function Rr(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(b){}}Zt.Object.defineProperties(Ei.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===""&&_t("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&_t("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,b=0;b<x;b++){var E=a[b];Oe(E)||_t("Model.nodeDataArray must only contain Objects, not: "+E),Yi(E)}for(this.Tc=a,b=new mn,E=0;E<x;E++){var z=a[E],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?b.add(z):this.kb.add(tt,z)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),z=this.wa(E),z!==void 0&&this.kb.add(z,E);for(Ha(this,"nodeDataArray",Wr,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),Ei.prototype.setCategoryForNodeData=Ei.prototype.jm,Ei.prototype.getCategoryForNodeData=Ei.prototype.Ro,Ei.prototype.removeArrayItem=Ei.prototype.ov,Ei.prototype.insertArrayItem=Ei.prototype.ts,Ei.prototype.addArrayItem=Ei.prototype.Ay,Ei.prototype.assignAllDataProperties=Ei.prototype.Do,Ei.prototype.set=Ei.prototype.set,Ei.prototype.clearUnresolvedReferences=Ei.prototype.Qy,Ei.prototype.mergeNodeDataArray=Ei.prototype.$z,Ei.prototype.removeNodeDataCollection=Ei.prototype.nA,Ei.prototype.removeNodeData=Ei.prototype.cm,Ei.prototype.addNodeDataCollection=Ei.prototype.Fy,Ei.prototype.addNodeData=Ei.prototype.xf,Ei.prototype.makeNodeDataKeyUnique=Ei.prototype.$u,Ei.prototype.findNodeDataForKey=Ei.prototype.hc,Ei.prototype.containsNodeData=Ei.prototype.lb,Ei.prototype.setKeyForNodeData=Ei.prototype.km,Ei.prototype.getKeyForNodeData=Ei.prototype.wa,Ei.prototype.updateTargetBindings=Ei.prototype.La,Ei.prototype.commit=Ei.prototype.commit,Ei.prototype.rollbackTransaction=Ei.prototype.Kf,Ei.prototype.commitTransaction=Ei.prototype.eb,Ei.prototype.startTransaction=Ei.prototype.Ea,Ei.prototype.raiseDataChanged=Ei.prototype.Fs,Ei.prototype.raiseChanged=Ei.prototype.g,Ei.prototype.raiseChangedEvent=Ei.prototype.cb,Ei.prototype.removeChangedListener=Ei.prototype.ik,Ei.prototype.addChangedListener=Ei.prototype.Pe,Ei.prototype.writeJsonValue=Ei.prototype.sm,Ei.prototype.replaceJsonObjects=Ei.prototype.dm,Ei.prototype.applyIncrementalJSON=Ei.prototype.Ky,Ei.prototype.applyIncrementalJson=Ei.prototype.Zw,Ei.prototype.toJSON=Ei.prototype.toJSON,Ei.prototype.toJson=Ei.prototype.np,Ei.prototype.toIncrementalJSON=Ei.prototype.yA,Ei.prototype.toIncrementalJson=Ei.prototype.$x,Ei.prototype.toIncrementalData=Ei.prototype.xA,Ei.prototype.clear=Ei.prototype.clear;var E1=!1,Ou={};Ei.className="Model",Ei.fromJSON=Ei.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=ae.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:_t("Unable to construct a Model from: "+a);if(y===null){a=null;var b=x.class;if(typeof b=="string")try{var E=null;b.indexOf("go.")===0?(b=b.substr(3),E=dy(b)):(E=dy(b),E===null&&(E=ae[b])),typeof E=="function"&&(a=new E)}catch(z){}a===null||a instanceof Ei?y=a:_t("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Ei.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Ei.safePropertyValue=Pa,Ei.safePropertySet=Rr,Ou.Brush=dr,Ou.ChangedEvent=Zr,Ou.Geometry=$n,Ou.Margin=vi,Ou.Panel=Fn,Ou.Point=$t,Ou.Rect=an,Ou.Size=Zn,Ou.Spot=xi,Ou.Transaction=Ua,Ou.UndoManager=Vr;function La(a,y,x,b){Gi(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,b===void 0?(this.el=L1,this.wk=null):(this.el=Bp,this.wk=b),this.st=new tn}La.prototype.copy=function(){var a=new La;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},Ct=La.prototype,Ct.qb=function(a){a.classType===La&&(this.mode=a)},Ct.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Ct.freeze=function(){return this._isFrozen=!0,this},Ct.ka=function(){return this._isFrozen=!1,this},Ct.Kx=function(a){return a===void 0&&(a=null),this.mode=Bp,this.backConverter=a,this},Ct.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Ct.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function M1(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Ct.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")Bn("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(b!==""&&(z=Pa(y,b)),z!==void 0)if(E===null)x!==""&&Rr(a,x,z);else try{if(x!==""){var tt=E(z,a);Rr(a,x,tt)}else E(z,a)}catch(ot){}}}},Ct.sp=function(a,y,x,b){if(this.el===Bp){var E=this.xl;if(x===void 0||E===x){x=this.sl;var z=this.wk,tt=a;if(E!==""&&(tt=Pa(a,E)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var ot=b!==null?b.diagram:null,rt=ot!==null?ot.model:null;if(z===null){if(x!=="")rt!==null?rt.setDataProperty(y,x,tt):Rr(y,x,tt);else if(rt!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var lt=b.itemIndex,ut=b.panel.itemArray;rt.ov(ut,lt),rt.ts(ut,lt,tt)}}else try{if(x!==""){var ft=z(tt,y,rt);rt!==null?rt.setDataProperty(y,x,ft):Rr(y,x,ft)}else{var yt=z(tt,y,rt);if(yt!==void 0&&rt!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Pt=b.itemIndex,bt=b.panel.itemArray;rt.ov(bt,Pt),rt.ts(bt,Pt,yt)}}}catch(Bt){}}finally{this.st.remove(a)}}}},Zt.Object.defineProperties(La.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&nn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&nn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&nn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&nn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&nn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&nn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&nn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&nn(this),this.el=a}}}),La.prototype.updateSource=La.prototype.sp,La.prototype.updateTarget=La.prototype.Mv,La.prototype.ofModel=La.prototype.dA,La.prototype.ofObject=La.prototype.cp,La.prototype.makeTwoWay=La.prototype.Kx;var Fx="Binding",L1=new en(La,"OneWay",1),Bp=new en(La,"TwoWay",2);La.className="Binding",La.parseEnum=function(a,y){return function(x){return x=Dn(a,x),x===null?y:x}},La.toString=qn,La.OneWay=L1,La.TwoWay=Bp;function jo(a,y,x){Ei.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new tn,this.wb=new li,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&&(Xe(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Ae(jo,Ei),jo.constructGraphLinksModel=Ei.constructGraphLinksModel,jo.prototype.cloneProtected=function(a){Ei.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},Ct=jo.prototype,Ct.clear=function(){Ei.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Ct.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;var x=a.length,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+qn(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Jl(this,E,!0)+"-->"+Jl(this,E,!1)}return y},Ct.Qv=function(a,y){this.linkKeyProperty===""&&_t("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Ei.prototype.Qv.call(this,a,y),b=this,E=new tn,z=new tn,tt=new tn,ot=this.vh;a.changes.each(function(ut){ut.model===b&&(ut.modelChange==="linkDataArray"?ut.change===pa?E.add(ut.newValue):ut.change===Ba&&tt.add(ut.oldValue):b.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&ot&&ot.contains(ut.object)?ot.get(ut.object).each(function(ft){b.Jc(ft)&&z.add(ft)}):ut.object instanceof Ei||b.lb(ut.object)||k1(b,ut.object).each(function(ft){z.add(ft)})))});var rt=this.il;rt.clear(),E.each(function(ut){rt.add(b.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(b.Ac(ut)),y&&z.add(ut)}),a=b.cloneDeep(z.Fa()),0<rt.count&&(x===null&&(x={}),y?x.removedLinkKeys=rt.Fa():x.insertedLinkKeys=rt.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<lt.count&&(x===null&&(x={}),y?x.insertedLinkKeys=lt.Fa():x.removedLinkKeys=lt.Fa()),lt.clear(),rt.clear(),x},Ct.rm=function(){var a=Ei.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},Ct.gp=function(a){Ei.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)},Ct.Rv=function(){var a=Ei.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+ic(this,this.linkDataArray,!0);return a+y},Ct.kv=function(a){Ei.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function k1(a,y){for(var x=new tn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];c0(a,y,E,E,x)}return x}Ct.Pv=function(a,y){this.linkKeyProperty===""&&_t("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Ei.prototype.Pv.call(this,a,y),b=this,E=new tn,z=new tn,tt=new tn,ot=this.vh;a.changes.each(function(ut){ut.model===b&&(ut.modelChange==="linkDataArray"?ut.change===pa?E.add(ut.newValue):ut.change===Ba&&tt.add(ut.oldValue):b.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&ot&&ot.contains(ut.object)?ot.get(ut.object).each(function(ft){b.Jc(ft)&&z.add(ft)}):ut.object instanceof Ei||b.lb(ut.object)||k1(b,ut.object).each(function(ft){z.add(ft)})))});var rt=this.il;rt.clear(),E.each(function(ut){rt.add(b.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(b.Ac(ut)),y&&z.add(ut)}),a=x,0<rt.count&&(a+=(y?this.Xv:this.Vv)+ic(this,rt.Fa(),!0)),0<z.count&&(a+=this.iy+ic(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Vv:this.Xv)+ic(this,lt.Fa(),!0)),lt.clear(),rt.clear(),a},Ct.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)&&_t("applyIncrementalJson cannot change Model properties"),Ei.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,b=0;b<x;b++){var E=y[b],z=this.jh(E);z===null&&(z=this.Jo({}),this.Ks(z,E),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],z=this.Ac(E),z=this.jh(z),z!==null){for(var tt in E)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,E[tt]);O1(this,E,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},jo.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Wr){var x=a.object,b=a.propertyName;if(b===this.linkKeyProperty&&this.Jc(x)){var E=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),E!==void 0&&this.wb.add(E,x),Rr(x,b,E);return}}else if(a.change===pa){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Oe(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===Ba){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Oe(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}Ei.prototype.changeState.call(this,a,y)}},Ct=jo.prototype,Ct.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),Rr(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Ct.yx=function(a){return Jl(this,a,!0)},Ct.wv=function(a,y){bg(this,a,y,!0)},Ct.Bx=function(a){return Jl(this,a,!1)},Ct.Bv=function(a,y){bg(this,a,y,!1)};function Jl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Pa(y,a),a!==void 0))){if(oc(a))return a;_t((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function bg(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var z=Pa(y,E);z!==x&&(Xu(a,z,y),Rr(y,E,x),a.hc(x)===null&&Yu(a,x,y),Ha(a,b?"linkFromKey":"linkToKey",Wr,E,y,z,x),typeof E=="string"&&a.La(y,E))}else Rr(y,E,x)}}Ct.zx=function(a){return g0(this,a,!0)},Ct.xv=function(a,y){Eg(this,a,y,!0)},Ct.Cx=function(a){return g0(this,a,!1)},Ct.Cv=function(a,y){Eg(this,a,y,!1)};function g0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Pa(y,a),y===void 0?"":y)}function Eg(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var z=Pa(y,E);z===void 0&&(z=""),z!==x&&(Rr(y,E,x),Ha(a,b?"linkFromPortId":"linkToPortId",Wr,E,y,z,x),typeof E=="string"&&a.La(y,E))}else Rr(y,E,x)}}Ct.Ef=function(a){if(a===null)return p0;var y=this.je;return y===""?p0:(a=Pa(a,y),a===void 0?p0:a)},Ct.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Pa(a,x);if(b===void 0&&(b=p0),b!==y){if(Array.isArray(b))for(var E=b.length,z=0;z<E;z++)Xu(this,b[z],a);for(Rr(a,x,y),E=y.length,z=0;z<E;z++){var tt=y[z];this.hc(tt)===null&&Yu(this,tt,a)}Ha(this,"linkLabelKeys",Wr,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else Rr(a,x,y)}},Ct.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Pa(a,x);if(b===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(b)){var E=b.indexOf(y);0<=E||(E=b.length,b.push(y),this.Jc(a)&&(this.hc(y)===null&&Yu(this,y,a),Ha(this,"linkLabelKeys",pa,x,a,null,y,null,E)))}else _t(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Ct.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Pa(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Xu(this,y,a),Ha(this,"linkLabelKeys",Ba,x,a,y,null,E,null)))}else b!==void 0&&_t(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Ct.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Pa(a,y),y!==void 0)){if(oc(y))return y;_t("Key value for link data "+a+" is not a number or a string: "+y)}}},Ct.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Pa(a,x);b!==y&&this.jh(y)===null&&(Rr(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Ha(this,"linkKey",Wr,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Rr(a,x,y)}},Ct.jh=function(a){return a===null&&_t("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&oc(a)?this.wb.I(a):null},Ct.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){Rr(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;Rr(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Rr(a,y,x)}}}}},Ct.Jc=function(a){return a===null?!1:this.$f.contains(a)},Ct.fi=function(a){a!==null&&(Yi(a),this.Jc(a)||N1(this,a,!0))};function N1(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&_t("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),Ha(a,"linkDataArray",pa,"linkDataArray",a,null,y,null,b),cy(a,y)}Ct.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)},Ct.bm=function(a){a!==null&&T1(this,a,!0)};function T1(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(Ha(a,"linkDataArray",Ba,"linkDataArray",a,y,null,b,null),x=Jl(a,y,!0),Xu(a,x,y),x=Jl(a,y,!1),Xu(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,z=0;z<E;z++)x=b[z],Xu(a,x,y)}Ct.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)},Ct.Zz=function(a){if(this.linkKeyProperty===""&&_t("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Xe(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var z=a[E],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var ot=this.jh(tt);ot!==z&&(ot!==null?(this.Do(ot,z),O1(this,z,ot)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function cy(a,y){var x=Jl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Yu(a,x,y),x=Jl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Yu(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,z=0;z<E;z++)x=b[z],a.hc(x)===null&&Yu(a,x,y)}Ct.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):f0(this,a,!0),Oe(a)&&(Gi(a),this.lf!==""&&Rr(a,this.lf,void 0),this.mf!==""&&Rr(a,this.mf,void 0),this.je!==""&&Rr(a,this.je,[])),a},Ct.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Pa(a,y)},Ct.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Pa(a,y),y!==void 0)){if(oc(y))return y;_t("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Ct.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Pa(a,x);b!==y&&(Xu(this,b,a),Rr(a,x,y),this.hc(y)===null&&Yu(this,y,a),Ha(this,"nodeGroupKey",Wr,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Rr(a,x,y)}},jo.prototype.copyNodeData=function(a){return a===null?null:(a=Ei.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Pa(a,this.Je)===void 0||Rr(a,this.Je,void 0),a)},jo.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){Eg(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Eg(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var b=Pa(a,y);b!==x&&(Rr(a,y,x),this.Fs(a,y,b,x))},Ct=jo.prototype,Ct.Do=function(a,y){if(y){var x=this.lb(a),b=this.Jc(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||x&&E===this.nodeIsGroupProperty&&Pa(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},Ct.jp=function(a,y){Ei.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var b=x.value,E=a,z=y;if(Jl(this,b,!0)===E){var tt=this.lf;Rr(b,tt,z),Ha(this,"linkFromKey",Wr,tt,b,E,z),typeof tt=="string"&&this.La(b,tt)}if(Jl(this,b,!1)===E&&(tt=this.mf,Rr(b,tt,z),Ha(this,"linkToKey",Wr,tt,b,E,z),typeof tt=="string"&&this.La(b,tt)),tt=this.Ef(b),Array.isArray(tt))for(var ot=tt.length,rt=this.je,lt=0;lt<ot;lt++)tt[lt]===E&&(tt[lt]=z,Ha(this,"linkLabelKeys",pa,rt,b,E,z,lt,lt))}},Ct.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Rr(a,b,x),Ha(this,"nodeGroupKey",Wr,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Ct.Lv=function(){Ei.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)cy(this,a[x])},Ct.fm=function(a){Ei.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=Rn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Ha(this,"nodeGroupKey",Wr,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Jl(this,b,!0)===a&&(E=this.lf,Ha(this,"linkFromKey",Wr,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Jl(this,b,!1)===a&&(E=this.mf,Ha(this,"linkToKey",Wr,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var z=E.length,tt=this.je,ot=0;ot<z;ot++)E[ot]===a&&(Ha(this,"linkLabelKeys",pa,tt,b,a,a,ot,ot),x.push(b))}for(y=0;y<x.length;y++)Xu(this,a,x[y]);ni(x)}},Ct.em=function(a){Ei.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Yu(this,y,a)},Ct.qp=function(a){Ei.prototype.qp.call(this,a);var y=this.lh(a);Xu(this,y,a)},Ct.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Pa(a,y),y===void 0))return"";if(typeof y=="string")return y;_t("getCategoryForLinkData found a non-string category for "+a+": "+y)},jo.prototype.getLinkCategoryForData=function(a){return this.ps(a)},jo.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Pa(a,x);b===void 0&&(b=""),b!==y&&(Rr(a,x,y),Ha(this,"linkCategory",Wr,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Rr(a,x,y)}},jo.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Ct=jo.prototype,Ct.lm=function(a,y){Ei.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function O1(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))}Ct.Wj=function(){return!0},Ct.ri=function(){return!0},Ct.xs=function(){return!0},Ct.Xj=function(){return!0},Zt.Object.defineProperties(jo.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,b=0;b<x;b++){var E=a[b];Oe(E)||_t("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Yi(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new mn,E=0;E<x;E++){var z=a[E],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?b.add(z):this.wb.add(tt,z)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),z=this.Ac(E),z!==void 0&&this.wb.add(z,E)}for(b=new tn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Ha(this,"linkDataArray",Wr,"linkDataArray",this,y,a),y=0;y<x;y++)cy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,b=0;b<x;b++){var E=this.linkDataArray[b],z=this.Ac(E);z===void 0&&(this.Bs(E),z=this.Ac(E)),z!==void 0&&this.wb.add(z,E)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),jo.prototype.setCategoryForLinkData=jo.prototype.lp,jo.prototype.getCategoryForLinkData=jo.prototype.ps,jo.prototype.assignAllDataProperties=jo.prototype.Do,jo.prototype.setGroupKeyForNodeData=jo.prototype.mp,jo.prototype.getGroupKeyForNodeData=jo.prototype.lh,jo.prototype.isGroupForNodeData=jo.prototype.Yu,jo.prototype.copyLinkData=jo.prototype.Jo,jo.prototype.mergeLinkDataArray=jo.prototype.Zz,jo.prototype.removeLinkDataCollection=jo.prototype.lA,jo.prototype.removeLinkData=jo.prototype.bm,jo.prototype.addLinkDataCollection=jo.prototype.Ey,jo.prototype.addLinkData=jo.prototype.fi,jo.prototype.containsLinkData=jo.prototype.Jc,jo.prototype.makeLinkDataKeyUnique=jo.prototype.Bs,jo.prototype.findLinkDataForKey=jo.prototype.jh,jo.prototype.setKeyForLinkData=jo.prototype.Ks,jo.prototype.getKeyForLinkData=jo.prototype.Ac,jo.prototype.removeLabelKeyForLinkData=jo.prototype.Qx,jo.prototype.addLabelKeyForLinkData=jo.prototype.Bu,jo.prototype.setLabelKeysForLinkData=jo.prototype.Ls,jo.prototype.getLabelKeysForLinkData=jo.prototype.Ef,jo.prototype.setToPortIdForLinkData=jo.prototype.Cv,jo.prototype.getToPortIdForLinkData=jo.prototype.Cx,jo.prototype.setFromPortIdForLinkData=jo.prototype.xv,jo.prototype.getFromPortIdForLinkData=jo.prototype.zx,jo.prototype.setToKeyForLinkData=jo.prototype.Bv,jo.prototype.getToKeyForLinkData=jo.prototype.Bx,jo.prototype.setFromKeyForLinkData=jo.prototype.wv,jo.prototype.getFromKeyForLinkData=jo.prototype.yx,jo.prototype.clear=jo.prototype.clear;var p0=Object.freeze([]);jo.className="GraphLinksModel",Ou.GraphLinksModel=jo,Ei.constructGraphLinksModel=Ei.constructGraphLinksModel=function(){return new jo},Ei.initDiagramModel=hy=function(){return new jo};function tl(a,y){Ei.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Xe(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ae(tl,Ei),tl.constructGraphLinksModel=Ei.constructGraphLinksModel,tl.prototype.cloneProtected=function(a){Ei.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Ct=tl.prototype,Ct.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+qn(E)}}return y},Ct.rm=function(){var a=Ei.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Ct.gp=function(a){Ei.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Ct.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&_t("applyIncrementalJson cannot change Model properties"),Ei.prototype.fp.call(this,a)},Ct.Vl=function(a){return a},Ct.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Pa(a,y),y!==void 0)){if(oc(y))return y;_t("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Ct.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var b=Pa(a,x);b!==y&&(Xu(this,b,a),Rr(a,x,y),this.hc(y)===null&&Yu(this,y,a),Ha(this,"nodeParentKey",Wr,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Rr(a,x,y)}},Ct.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Pa(a,y),y===void 0)?"":typeof y=="string"?y:(_t("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},tl.prototype.getLinkCategoryForData=function(a){return this.ss(a)},tl.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Pa(a,x);b===void 0&&(b=""),b!==y&&(Rr(a,x,y),Ha(this,"parentLinkCategory",Wr,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Rr(a,x,y)}},tl.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},tl.prototype.copyNodeData=function(a){return a===null?null:(a=Ei.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Pa(a,this.Ke)===void 0||Rr(a,this.Ke,void 0),a)},tl.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var b=Pa(a,y);b!==x&&(Rr(a,y,x),this.Fs(a,y,b,x))},Ct=tl.prototype,Ct.jp=function(a,y){Ei.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Ct.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;Rr(a,b,x),Ha(this,"nodeParentKey",Wr,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Ct.fm=function(a){Ei.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=Rn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Ha(this,"nodeParentKey",Wr,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)Xu(this,a,x[y]);ni(x)}},Ct.em=function(a){Ei.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Yu(this,y,a)},Ct.qp=function(a){Ei.prototype.qp.call(this,a);var y=this.mh(a);Xu(this,y,a)},Ct.lm=function(a,y){Ei.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Ct.Tl=function(){return!0},Ct.xs=function(){return!0},Zt.Object.defineProperties(tl.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"}}}),tl.prototype.setParentLinkCategoryForNodeData=tl.prototype.Ms,tl.prototype.getParentLinkCategoryForNodeData=tl.prototype.ss,tl.prototype.setParentKeyForNodeData=tl.prototype.qe,tl.prototype.getParentKeyForNodeData=tl.prototype.mh,tl.className="TreeModel",Ou.TreeModel=tl;function qr(a){$r.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Fu,this.Ti=0,this.Zv=new $t,this.Jp=this.me=0,this.Xr=new zp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Fu,this.K=el,this.nd=Lg,this.hd=oy,this.tf=6,this.Nn=w0,a&&Object.assign(this,a)}Ae(qr,$r),qr.prototype.cloneProtected=function(a){$r.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},qr.prototype.qb=function(a){a.classType===qr?a===x0||a===P0||a===y0||a===S0||a===Lg?this.sorting=a:a===Yc||a===Mg||a===el||a===ac?this.direction=a:a===Td||a===rc||a===Fu||a===Iu?this.arrangement=a:(a===kf||a===w0)&&(this.nodeDiameterFormula=a):$r.prototype.qb.call(this,a)},qr.prototype.createNetwork=function(){return new kg(this)},qr.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,b=this.sort(y),E,z,tt=this.Jp,ot=this.arrangement,rt=this.nodeDiameterFormula,lt=this.radius;(!isFinite(lt)||0>=lt)&&(lt=NaN);var ut=this.aspectRatio;(!isFinite(ut)||0>=ut)&&(ut=1);var ft=this.startAngle;isFinite(ft)||(ft=0);var yt=this.sweepAngle;if((!isFinite(yt)||360<yt||1>yt)&&(yt=360),y=this.spacing,isFinite(y)||(y=NaN),ot===Iu&&rt===kf?ot=Fu:ot===Iu&&rt!==kf&&(ot=this.arrangement),(this.direction===Yc||this.direction===Mg)&&this.sorting!==Lg){for(rt=0;!(rt>=b.length)&&(a.add(b.M(rt)),!(rt+1>=b.length));rt+=2)x.add(b.M(rt+1));this.direction===Yc?(this.arrangement===Iu&&a.reverse(),b=new mn,b.addAll(a),b.addAll(x)):(this.arrangement===Iu&&x.reverse(),b=new mn,b.addAll(x),b.addAll(a))}rt=b.length;for(var Pt=z=E=0;Pt<b.length;Pt++){var bt=ft+yt*z*(this.direction===el?1:-1)/rt,Bt=b.M(Pt).diameter;isNaN(Bt)&&(Bt=sc(b.M(Pt),bt)),360>yt&&(Pt===0||Pt===b.length-1)&&(Bt/=2),E+=Bt,z++}if(isNaN(lt)||ot===Iu){if(isNaN(y)&&(y=6),ot!==Fu&&ot!==Iu){for(z=-1/0,tt=0;tt<rt;tt++)Pt=b.M(tt),E=b.M(tt===rt-1?0:tt+1),isNaN(Pt.diameter)&&sc(Pt,0),isNaN(E.diameter)&&sc(E,0),z=Math.max(z,(Pt.diameter+E.diameter)/2);tt=z+y,ot===Td?lt=(z+y)/(2*Math.PI/rt):lt=m0(this,tt*(360<=yt?rt:rt-1),ut,ft*Math.PI/180,yt*Math.PI/180)}else lt=m0(this,E+(360<=yt?rt:rt-1)*(ot!==Iu?y:1.6*y),ut,ft*Math.PI/180,yt*Math.PI/180);z=lt*ut}else if(z=lt*ut,Pt=fy(this,lt,z,ft*Math.PI/180,yt*Math.PI/180),isNaN(y))(ot===Fu||ot===Iu)&&(y=(Pt-E)/(360<=yt?rt:rt-1));else if(ot===Fu||ot===Iu)Pt=(Pt-E)/(360<=yt?rt:rt-1),Pt<y?(lt=m0(this,E+y*(360<=yt?rt:rt-1),ut,ft*Math.PI/180,yt*Math.PI/180),z=lt*ut):y=Pt;else{for(tt=-1/0,E=0;E<rt;E++)bt=b.M(E),Bt=b.M(E===rt-1?0:E+1),isNaN(bt.diameter)&&sc(bt,0),isNaN(Bt.diameter)&&sc(Bt,0),tt=Math.max(tt,(bt.diameter+Bt.diameter)/2);tt+=y,E=m0(this,tt*(360<=yt?rt:rt-1),ut,ft*Math.PI/180,yt*Math.PI/180),E>lt?(lt=E,z=lt*ut):tt=Pt/(360<=yt?rt:rt-1)}if(this.kw=ot,this.lc=lt,this.Zm=ut,this.lw=ft,this.Wp=yt,this.Ti=y,this.me=z,this.Jp=tt,y=b,b=this.kw,ot=this.lc,lt=this.lw,ut=this.Wp,ft=this.Ti,yt=this.me,rt=this.Jp,this.direction!==Yc&&this.direction!==Mg||b!==Iu)if(this.direction===Yc||this.direction===Mg){switch(tt=0,b){case rc:tt=180*v0(this,ot,yt,lt,rt)/Math.PI;break;case Fu:rt=y=0,tt=a.first(),tt!==null&&(y=sc(tt,Math.PI/2)),tt=x.first(),tt!==null&&(rt=sc(tt,Math.PI/2)),tt=180*v0(this,ot,yt,lt,ft+(y+rt)/2)/Math.PI;break;case Td:tt=ut/y.length}if(this.direction===Yc){switch(b){case rc:Rp(this,a,lt,ac);break;case Fu:Ap(this,a,lt,ac);break;case Td:Dp(this,a,ut/2,lt,ac)}switch(b){case rc:Rp(this,x,lt+tt,el);break;case Fu:Ap(this,x,lt+tt,el);break;case Td:Dp(this,x,ut/2,lt+tt,el)}}else{switch(b){case rc:Rp(this,x,lt,ac);break;case Fu:Ap(this,x,lt,ac);break;case Td:Dp(this,x,ut/2,lt,ac)}switch(b){case rc:Rp(this,a,lt+tt,el);break;case Fu:Ap(this,a,lt+tt,el);break;case Td:Dp(this,a,ut/2,lt+tt,el)}}}else switch(b){case rc:Rp(this,y,lt,this.direction);break;case Fu:Ap(this,y,lt,this.direction);break;case Td:Dp(this,y,ut,lt,this.direction);break;case Iu:F1(this,y,ut,lt,this.direction)}else F1(this,y,ut,lt-ut/2,el)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Dp(a,y,x,b,E){var z=a.Wp,tt=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var ot=y.length,rt=0;rt<ot;rt++){var lt=b+(E===el?rt*x/(360<=z?ot:ot-1):-(rt*x)/ot),ut=y.M(rt),ft=tt*Math.tan(lt)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),ut.centerX=ft*Math.cos(lt),ut.centerY=ft*Math.sin(lt),ut.actualAngle=180*lt/Math.PI}}function Ap(a,y,x,b){var E=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var ot=y.length,rt=0;rt<ot;rt++){var lt=y.M(rt),ut=y.M(rt===ot-1?0:rt+1),ft=z*Math.sin(x);lt.centerX=E*Math.cos(x),lt.centerY=ft,lt.actualAngle=180*x/Math.PI,isNaN(lt.diameter)&&sc(lt,0),isNaN(ut.diameter)&&sc(ut,0),lt=v0(a,E,z,b===el?x:-x,(lt.diameter+ut.diameter)/2+tt),x+=b===el?lt:-lt}}function Rp(a,y,x,b){var E=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var ot=y.length,rt=0;rt<ot;rt++){var lt=y.M(rt);lt.centerX=E*Math.cos(x),lt.centerY=z*Math.sin(x),lt.actualAngle=180*x/Math.PI,lt=v0(a,E,z,b===el?x:-x,tt),x+=b===el?lt:-lt}}function F1(a,y,x,b,E){var z=a.Wp;if(a.mj=0,a.Xr=new zp,360>x){for(z=b+(E===el?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,B1(a,y,x,b,E)}else I1(a,y,x,b,E);a.Xr.commit(y)}function I1(a,y,x,b,E){var z=a.lc,tt=a.Ti,ot=a.Zm,rt=z*Math.cos(b*Math.PI/180),lt=a.me*Math.sin(b*Math.PI/180),ut=y.Fa();if(ut.length===3)ut[0].centerX=z,ut[0].centerY=0,ut[1].centerX=ut[0].centerX-ut[0].width/2-ut[1].width/2-tt,ut[1].y=ut[0].y,ut[2].centerX=(ut[0].centerX+ut[1].centerX)/2,ut[2].y=ut[0].y-ut[2].height-tt;else if(ut.length===4)ut[0].centerX=z,ut[0].centerY=0,ut[2].centerX=-ut[0].centerX,ut[2].centerY=ut[0].centerY,ut[1].centerX=0,ut[1].y=Math.min(ut[0].y,ut[2].y)-ut[1].height-tt,ut[3].centerX=0,ut[3].y=Math.max(ut[0].y+ut[0].height+tt,ut[2].y+ut[2].height+tt);else{z=$t.alloc();for(var ft=0;ft<ut.length&&(ut[ft].centerX=rt,ut[ft].centerY=lt,!(ft>=ut.length-1));ft++)D1(a,rt,lt,ut,ft,E,z)||A1(a,rt,lt,ut,ft,E,z),rt=z.x,lt=z.y;if($t.free(z),a.mj++,!(23<a.mj)){rt=ut[0].centerX,lt=ut[0].centerY,z=ut[ut.length-1].centerX,ft=ut[ut.length-1].centerY;var yt=Math.abs(rt-z)-((ut[0].width+ut[ut.length-1].width)/2+tt),Pt=Math.abs(lt-ft)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(Pt)?Math.abs(rt-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0<Pt?Pt:1>Math.abs(yt)?0:yt,rt=Math.abs(z)>Math.abs(ft)?0<z!=lt>ft:0<ft!=rt<z,(rt=E===el?rt:!rt)&&(tt=-Math.abs(tt),tt=Math.min(tt,-ut[ut.length-1].width),tt=Math.min(tt,-ut[ut.length-1].height)),a.Xr.compare(tt,ut),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>ut.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*ot,I1(a,y,x,b,E))}}}function B1(a,y,x,b,E){for(var z=a.lc,tt=a.me,ot=a.Zm,rt=z*Math.cos(b*Math.PI/180),lt=tt*Math.sin(b*Math.PI/180),ut=$t.alloc(),ft=y.Fa(),yt=0;yt<ft.length&&(ft[yt].centerX=rt,ft[yt].centerY=lt,!(yt>=ft.length-1));yt++)D1(a,rt,lt,ft,yt,E,ut)||A1(a,rt,lt,ft,yt,E,ut),rt=ut.x,lt=ut.y;if($t.free(ut),a.mj++,!(23<a.mj)){if(rt=Math.atan2(lt,rt),rt=E===el?a.gt-rt:rt-a.gt,rt=Math.abs(rt)<Math.abs(rt-2*Math.PI)?rt:rt-2*Math.PI,z=rt*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],rt=0;rt<ft.length;rt++)tt.mk[rt]=ft[rt].bounds.x,tt.tm[rt]=ft[rt].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*ot,B1(a,y,x,b,E))}}function D1(a,y,x,b,E,z,tt){var ot=a.lc,rt=a.me,lt=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ut=!1;if(0<=x!=(z===el)){if(z=y+a,z>ot){if(z=y-a,z<-ot)return tt.x=z,tt.y=lt,!1;ut=!0}}else if(z=y-a,z<-ot){if(z=y+a,z>ot)return tt.x=z,tt.y=lt,!1;ut=!0}return lt=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>x!==ut&&(lt=-lt),Math.abs(x-lt)>(b[E].height+b[E+1].height)/2?(tt.x=z,tt.y=lt,!1):(tt.x=z,tt.y=lt,!0)}function A1(a,y,x,b,E,z,tt){var ot=a.lc,rt=a.me,lt=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(z===el)){if(z=x-a,z<-rt){if(z=x+a,z>rt){tt.x=lt,tt.y=z;return}b=!0}}else if(z=x+a,z>rt){if(z=x-a,z<-rt){tt.x=lt,tt.y=z;return}b=!0}lt=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>y!==b&&(lt=-lt),tt.x=lt,tt.y=z}qr.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},qr.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 $t(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},qr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function fy(a,y,x,b,E){var z=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,ot=b!==void 0&&E!==void 0?E/(z+1):Math.PI/(2*(z+1)),rt=0,lt=0;lt<=z;lt++){b!==void 0&&E!==void 0?rt=b+lt*E/z:rt=lt*Math.PI/(2*z);var ut=Math.sin(rt);tt+=Math.sqrt(1-a*a*ut*ut)*ot}return b!==void 0&&E!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function m0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?fy(a,1,x,b,E):fy(a,1,x))}function v0(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var ot=0;;ot++){var rt=Math.sin(b+ot*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*rt*rt)*a,tt>=E)return ot*a}}qr.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 Lg:return this.ak(Ix(a));default:_t("Invalid sorting type.")}return a};function Ix(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new mn;for(var b=0;b<a.length;b++){var E=-1,z=-1;if(b===0)for(var tt=0;tt<a.length;tt++){var ot=a.M(tt).edgesCount;ot>E&&(E=ot,z=tt)}else for(tt=0;tt<a.length;tt++)ot=y[tt],ot>E&&(E=ot,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)E=a.indexOf(tt.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(z=z.destinationEdges;z.next();)E=a.indexOf(z.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}qr.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,z=b.destinationEdges;z.next();)E=a.indexOf(z.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var tt=[],ot=[];b=[],E=new mn;for(var rt=0,lt=0;lt<y.length;lt++){var ut=y[lt].length;if(ut===1)b.push(lt);else if(ut===0)E.add(a.M(lt));else{if(rt===0)x.push(lt);else{for(var ft=ut=1/0,yt=-1,Pt=[],bt=0;bt<x.length;bt++)0>y[x[bt]].indexOf(x[bt===x.length-1?0:bt+1])&&Pt.push(bt===x.length-1?0:bt+1);if(Pt.length===0)for(bt=0;bt<x.length;bt++)Pt.push(bt);for(bt=0;bt<Pt.length;bt++){for(var Bt=Pt[bt],Jt=y[lt],Gt=0,se=0;se<tt.length;se++){var ue=z[tt[se]],ge=z[ot[se]];if(ue<ge){var be=ue;ue=ge}else be=ge;if(be<Bt&&Bt<=ue)for(ge=0;ge<Jt.length;ge++){var We=Jt[ge];0>x.indexOf(We)||be<z[We]&&z[We]<ue||be===z[We]||ue===z[We]||Gt++}else for(ge=0;ge<Jt.length;ge++)We=Jt[ge],0>x.indexOf(We)||be<z[We]&&z[We]<ue&&be!==z[We]&&ue!==z[We]&&Gt++}for(Jt=Gt,se=Gt=0;se<y[lt].length;se++)be=x.indexOf(y[lt][se]),0<=be&&(be=Math.abs(Bt-(be>=Bt?be+1:be)),Gt+=be<x.length+1-be?be:x.length+1-be);for(se=0;se<tt.length;se++)be=z[tt[se]],ue=z[ot[se]],be>=Bt&&be++,ue>=Bt&&ue++,be>ue&&(ge=ue,ue=be,be=ge),ue-be<(x.length+2)/2==(be<Bt&&Bt<=ue)&&Gt++;(Jt<ut||Jt===ut&&Gt<ft)&&(ut=Jt,ft=Gt,yt=Bt)}for(x.splice(yt,0,lt),ut=0;ut<x.length;ut++)z[x[ut]]=ut;for(ut=0;ut<y[lt].length;ut++)ft=y[lt][ut],0<=x.indexOf(ft)&&(tt.push(lt),ot.push(ft))}rt++}}for(tt=x.length;;){for(z=!0,ot=0;ot<b.length;ot++)if(rt=b[ot],lt=y[rt][0],ut=x.indexOf(lt),0<=ut){for(yt=ft=0;yt<y[lt].length;yt++)Pt=x.indexOf(y[lt][yt]),0>Pt||Pt===ut||(bt=Pt>ut?Pt-ut:ut-Pt,ft+=Pt<ut!=bt>tt-bt?1:-1);x.splice(0>ft?ut:ut+1,0,rt),b.splice(ot,1),ot--}else z=!1;if(z)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},Zt.Object.defineProperties(qr.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!==Iu&&a!==Fu&&a!==rc&&a!==Td||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==el&&a!==ac&&a!==Yc&&a!==Mg||(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!==Lg||(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!==kf||(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 Fu=new en(qr,"ConstantSpacing",0),rc=new en(qr,"ConstantDistance",1),Td=new en(qr,"ConstantAngle",2),Iu=new en(qr,"Packed",3),el=new en(qr,"Clockwise",4),ac=new en(qr,"Counterclockwise",5),Yc=new en(qr,"BidirectionalLeft",6),Mg=new en(qr,"BidirectionalRight",7),y0=new en(qr,"Forwards",8),S0=new en(qr,"Reverse",9),x0=new en(qr,"Ascending",10),P0=new en(qr,"Descending",11),Lg=new en(qr,"Optimized",12),w0=new en(qr,"Pythagorean",13),kf=new en(qr,"Circular",14);qr.className="CircularLayout",qr.ConstantSpacing=Fu,qr.ConstantDistance=rc,qr.ConstantAngle=Td,qr.Packed=Iu,qr.Clockwise=el,qr.Counterclockwise=ac,qr.BidirectionalLeft=Yc,qr.BidirectionalRight=Mg,qr.Forwards=y0,qr.Reverse=S0,qr.Ascending=x0,qr.Descending=P0,qr.Optimized=Lg,qr.Pythagorean=w0,qr.Circular=kf;function zp(){this.Pl=-1/0,this.tm=this.mk=null}zp.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},zp.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]}},zp.className="VertexArrangement";function kg(a){kr.call(this,a)}Ae(kg,kr),kg.prototype.createVertex=function(){return new jp(this)},kg.prototype.createEdge=function(){return new C0(this)},kg.className="CircularNetwork";function jp(a){_a.call(this,a),this.u=this.Si=NaN}Ae(jp,_a);function sc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Iu)if(x.nodeDiameterFormula===kf)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===kf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Zt.Object.defineProperties(jp.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)}}}),jp.className="CircularVertex";function C0(a){Ol.call(this,a)}Ae(C0,Ol),C0.className="CircularEdge";function Ps(a){$r.call(this),this.ah=null,this.An=0,this.$d=new Zn(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)}Ae(Ps,$r),Ps.prototype.cloneProtected=function(a){$r.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},Ps.prototype.createNetwork=function(){return new Nf(this)},Ps.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var b=x.iterator;b.next();){this.network=b.value;for(var E=this.network.vertexes.iterator;E.next();){var z=E.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}R1(this,0,a)}this.network=y;var tt=b=x.iterator;b=this.arrangementSpacing;var ot=tt.count,rt=!0;z=E=0;for(var lt=Rn(),ut=0;ut<ot+y.vertexes.count+2;ut++)lt[ut]=null;ot=0,tt.reset();for(var ft=an.alloc();tt.next();)if(ut=tt.value,this.computeBounds(ut,ft),rt)rt=!1,E=ft.x+ft.width/2,z=ft.y+ft.height/2,lt[0]=new $t(ft.x+ft.width+b.width,ft.y),lt[1]=new $t(ft.x,ft.y+ft.height+b.height),ot=2;else{var yt=z1(lt,ot,E,z,ft.width,ft.height,b),Pt=lt[yt],bt=new $t(Pt.x+ft.width+b.width,Pt.y),Bt=new $t(Pt.x,Pt.y+ft.height+b.height);for(yt+1<ot&<.splice(yt+1,0,null),lt[yt]=bt,lt[yt+1]=Bt,ot++,yt=Pt.x-ft.x,Pt=Pt.y-ft.y,ut=ut.vertexes.iterator;ut.next();)bt=ut.value,bt.centerX+=yt,bt.centerY+=Pt}for(an.free(ft),ut=y.vertexes.iterator;ut.next();)tt=ut.value,yt=tt.bounds,2>ot?(E=yt.x+yt.width/2,z=yt.y+yt.height/2,lt[0]=new $t(yt.x+yt.width+b.width,yt.y),lt[1]=new $t(yt.x,yt.y+yt.height+b.height),ot=2):(rt=z1(lt,ot,E,z,yt.width,yt.height,b),ft=lt[rt],Pt=new $t(ft.x+yt.width+b.width,ft.y),yt=new $t(ft.x,ft.y+yt.height+b.height),rt+1<ot&<.splice(rt+1,0,null),lt[rt]=Pt,lt[rt+1]=yt,ot++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(ni(lt),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}H1(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Ps.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},Ps.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function R1(a,y,x){if(Bx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Dx(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,R1(a,y+1,x),H1(a,z),Ax(a,E),y=E.vertexes.Fa(),y.sort(function(tt,ot){return tt===null||ot===null||tt===ot?0:ot.Vd-tt.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=b}}function Bx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Dx(a,y){for(var x=a.network,b=new Nf(a),E=0;E<a.ah.length;E++){var z=a.ah[E];if(1<z.Vd){b.dh(z);var tt=new G1;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new mn),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var ot=z.value;E=ot.fromVertex,tt=ot.toVertex,E.network===b&&tt.network===b?b.Bo(ot):E.network===b?(ot=E.Hj,ot===null&&(ot=new mn,E.Hj=ot),ot.add(tt),E.Vd--,E.sh+=tt.sh):tt.network===b&&(ot=tt.Hj,ot===null&&(ot=new mn,tt.Hj=ot),ot.add(E),tt.Vd--,tt.sh+=E.sh)}for(E=b.edges.iterator;E.next();)z=E.value,z.length*=Math.max(1,ke.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var rt=E.Hj;if(rt!==null&&0<rt.count&&(tt=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=tt))){for(var lt=ot=0,ut=rt.count-tt;ut<rt.count;ut++){var ft=rt.M(ut),yt=null;for(z=ft.edges.iterator;z.next();){var Pt=z.value;if(Pt.Ax(ft)===E){yt=Pt;break}}yt!==null&&(lt+=yt.length,ot+=ft.width*ft.height)}z=E.centerX,rt=E.centerY,ut=E.width,ft=E.height,yt=E.focus,Pt=ut*ft,1>Pt&&(Pt=1),ot=ke.sqrt((ot+Pt+lt*lt*4/(tt*tt))/Pt),tt=(ot-1)*ut/2,ot=(ot-1)*ft/2,E.bounds=new an(z-yt.x-tt,rt-yt.y-ot,ut+2*tt,ft+2*ot),E.focus=new $t(yt.x+tt,yt.y+ot)}}return a.network=b,x}function Ax(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var z=E.Sv,tt=E.Tv;b.bounds=new an(b.centerX-z,b.centerY-tt,E.Ss,E.Qs),b.focus=new $t(z,tt),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,z=y.width,tt=y.height;y.We!==null&&0<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=ke.sqrt(z*z+tt*tt)/2;for(var ot=!1,rt=tt=0,lt=0,ut=y.vertexes.iterator;ut.next();){var ft=ut.value;1>=ft.Vd?rt++:(ot=!0,lt++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(rt!==0){for(0<lt&&(tt/=lt),lt=y=0,y=ot?2*Math.PI/(rt+1):2*Math.PI/rt,rt%2===0&&(lt=y/2),1<x.count&&x.sort(function(Pt,bt){return Pt===null||bt===null||Pt===bt?0:bt.width*bt.height-Pt.width*Pt.height}),ot=rt%2===0?0:1,x=x.iterator;x.next();)if(rt=x.value,!(1<rt.Vd||a.isFixed(rt))){for(ut=null,ft=rt.edges.iterator;ft.next();){ut=ft.value;break}ft=rt.width;var yt=rt.height;ft=ke.sqrt(ft*ft+yt*yt)/2,ut=z+ut.length+ft,ft=tt+(y*(ot/2>>1)+lt)*(ot%2===0?1:-1),rt.centerX=b+ut*Math.cos(ft),rt.centerY=E+ut*Math.sin(ft),ot++}}}}function z1(a,y,x,b,E,z,tt){var ot=9e19,rt=-1,lt=0;t:for(;lt<y;lt++){var ut=a[lt],ft=ut.x-x,yt=ut.y-b;if(ft=ft*ft+yt*yt,ft<ot){for(yt=lt-1;0<=yt;yt--)if(a[yt].y>ut.y&&a[yt].x-ut.x<E+tt.width)continue t;for(yt=lt+1;yt<y;yt++)if(a[yt].x>ut.x&&a[yt].y-ut.y<z+tt.height)continue t;rt=lt,ot=ft}}return rt}Ps.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ps.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var z=E.value;if(z.toVertex===a){x=z;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(z=E.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function j1(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var ot=z.width;return z=z.height,b+E<tt?a>y+z?(x=b+E-tt,a=a-y-z,ke.sqrt(x*x+a*a)):a+x<y?(b=b+E-tt,a=a+x-y,ke.sqrt(b*b+a*a)):tt-(b+E):b>tt+ot?a>y+z?(x=b-tt-ot,a=a-y-z,ke.sqrt(x*x+a*a)):a+x<y?(b=b-tt-ot,a=a+x-y,ke.sqrt(b*b+a*a)):b-(tt+ot):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function H1(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,zx(a)););a.ah=null}function zx(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var b=x.centerX,E=b,z=x=x.centerY,tt=1;tt<y.length;tt++){var ot=y[tt];ot.forceX=0,ot.forceY=0;var rt=ot.centerX;ot=ot.centerY,b=Math.min(b,rt),E=Math.max(E,rt),x=Math.min(x,ot),z=Math.max(z,ot)}(E=E-b>z-x)?y.sort(function(Bt,Jt){return Bt===null||Jt===null||Bt===Jt?0:Bt.centerX-Jt.centerX}):y.sort(function(Bt,Jt){return Bt===null||Jt===null||Bt===Jt?0:Bt.centerY-Jt.centerY}),x=a.Zf;var lt=b=ot=0;for(z=0;z<y.length;z++){tt=y[z],b=tt.bounds,ot=tt.focus,rt=b.x+ot.x;var ut=b.y+ot.y;b=tt.charge*a.electricalFieldX(rt,ut),lt=tt.charge*a.electricalFieldY(rt,ut),b+=tt.mass*a.gravitationalFieldX(rt,ut),lt+=tt.mass*a.gravitationalFieldY(rt,ut),tt.forceX+=b,tt.forceY+=lt;for(var ft=z+1;ft<y.length;ft++){var yt=y[ft];if(yt!==tt){b=yt.bounds,ot=yt.focus,lt=b.x+ot.x;var Pt=b.y+ot.y;if(rt-lt>x||lt-rt>x){if(E)break}else if(ut-Pt>x||Pt-ut>x){if(!E)break}else{var bt=j1(tt,yt);1>bt?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new b0),bt=b.random(),ot=b.random(),rt>lt?(b=Math.abs(yt.bounds.right-tt.bounds.x),b=(1+b)*bt):rt<lt?(b=Math.abs(yt.bounds.x-tt.bounds.right),b=-(1+b)*bt):(b=Math.max(yt.width,tt.width),b=(1+b)*bt-b/2),ut>Pt?(lt=Math.abs(yt.bounds.bottom-tt.bounds.y),lt=(1+lt)*ot):rt<lt?(lt=Math.abs(yt.bounds.y-tt.bounds.bottom),lt=-(1+lt)*ot):(lt=Math.max(yt.height,tt.height),lt=(1+lt)*ot-lt/2)):(ot=-(tt.charge*yt.charge)/(bt*bt),b=(lt-rt)/bt*ot,lt=(Pt-ut)/bt*ot),tt.forceX+=b,tt.forceY+=lt,yt.forceX-=b,yt.forceY-=lt}}}}for(E=a.network.edges.iterator;E.next();)ot=E.value,x=ot.fromVertex,z=ot.toVertex,tt=x.bounds,rt=x.focus,b=tt.x+rt.x,tt=tt.y+rt.y,ut=z.bounds,ft=z.focus,rt=ut.x+ft.x,ut=ut.y+ft.y,ft=j1(x,z),1>ft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new b0),ot=ft.random(),ft=ft.random(),b=(b>rt?1:-1)*(1+(z.width>x.width?z.width:x.width))*ot,lt=(tt>ut?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(ot=ot.stiffness*(ft-ot.length),b=(rt-b)/ft*ot,lt=(ut-tt)/ft*ot),x.forceX+=b,x.forceY+=lt,z.forceX-=b,z.forceY-=lt;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}Ps.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},Ps.prototype.moveFixedVertex=function(){},Ps.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ps.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=hr,y.toSpot=hr)}},Ps.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=an.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,an.free(x)}x=an.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}an.free(x)},Ps.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ps.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ps.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ps.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ps.prototype.electricalFieldX=function(){return 0},Ps.prototype.electricalFieldY=function(){return 0},Ps.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ps.prototype.gravitationalFieldX=function(){return 0},Ps.prototype.gravitationalFieldY=function(){return 0},Ps.prototype.isFixed=function(a){return a.isFixed},Zt.Object.defineProperties(Ps.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"&&_t('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())}}}),Ps.className="ForceDirectedLayout";function G1(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}G1.className="ForceDirectedSubnet";function Nf(a){kr.call(this,a)}Ae(Nf,kr),Nf.prototype.createVertex=function(){return new Hp(this)},Nf.prototype.createEdge=function(){return new Gp(this)},Nf.className="ForceDirectedNetwork";function Hp(a){_a.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}Ae(Hp,_a),Zt.Object.defineProperties(Hp.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)}}}),Hp.className="ForceDirectedVertex";function Gp(a){Ol.call(this,a),this.j=this.o=NaN}Ae(Gp,Ol),Zt.Object.defineProperties(Gp.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)}}}),Gp.className="ForceDirectedEdge";function b0(){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()}b0.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},b0.className="RandomNumberGenerator";function pr(a){$r.call(this),this.kc=this.ie=25,this.K=0,this.Dk=N0,this.Zk=T0,this.Qk=O0,this.bj=4,this.rk=F0,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 $t,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Ae(pr,$r),pr.prototype.cloneProtected=function(a){$r.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},pr.prototype.qb=function(a){a.classType===pr?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:_t("Unknown enum value: "+a):$r.prototype.qb.call(this,a)},pr.prototype.createNetwork=function(){return new Tg(this)},pr.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!==Zp&&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===Zp&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,z=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||z.node===null&&z.data===null)&&E.layer===z.layer)){var tt=0,ot=0,rt=0,lt=0;if(b.link!==null){if(ot=b.link,ot===null)continue;var ut=E.node;if(tt=z.node,ut===null||tt===null)continue;var ft=ot.fromNode;rt=ot.toNode;for(var yt=ot.fromPort;yt!==null&&!yt.Ed();)yt=yt.panel;for(ot=ot.toPort;ot!==null&&!ot.Ed();)ot=ot.panel;if(b.rev){lt=ft;var Pt=yt;ft=rt,yt=ot,rt=lt,ot=Pt}var bt=E.focus;lt=z.focus;var Bt=b.rev?z.bounds:E.bounds;Pt=$t.alloc(),ut!==ft?Bt.w()&&ft.isVisible()?ft.actualBounds.w()?(Ed(ft,yt,Zo,Pt),Pt.x+=ft.actualBounds.x-Bt.x,Pt.y+=ft.actualBounds.y-Bt.y):(Ed(ft,yt,Zo,Pt),Pt.w()||Pt.assign(bt)):Pt.assign(bt):Bt.w()?(Ed(ft,yt,Zo,Pt),Pt.w()||Pt.assign(bt)):Pt.assign(bt),ft=b.rev?E.bounds:z.bounds,ut=$t.alloc(),tt!==rt?ft.w()&&rt.isVisible()?rt.actualBounds.w()?(Ed(rt,ot,Zo,ut),ut.x+=rt.actualBounds.x-ft.x,ut.y+=rt.actualBounds.y-ft.y):(Ed(rt,ot,Zo,ut),ut.w()||ut.assign(lt)):ut.assign(lt):ft.w()?(Ed(rt,ot,Zo,ut),ut.w()||ut.assign(lt)):ut.assign(lt),this.K===90||this.K===270?(tt=Math.round((Pt.x-bt.x)/this.kc),rt=Pt.x,ot=Math.round((ut.x-lt.x)/this.kc),lt=ut.x):(tt=Math.round((Pt.y-bt.y)/this.kc),rt=Pt.y,ot=Math.round((ut.y-lt.y)/this.kc),lt=ut.y),$t.free(Pt),$t.free(ut),b.portFromColOffset=tt,b.portFromPos=rt,b.portToColOffset=ot,b.portToPos=lt}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Pt=E.layer,ut=z.layer,ft=0,Bt=b.link,Bt!==null){var Jt=Bt.fromPort,Gt=Bt.toPort;if(Jt!==null&&Gt!==null){var se=Bt.fromNode;if(yt=Bt.toNode,se!==null&&yt!==null){var ue=k0(this,!0),ge=k0(this,!1),be=this.setsPortSpots?ue:Bt.computeSpot(!0,Jt);bt=this.setsPortSpots?ge:Bt.computeSpot(!1,Gt);var We=Bt.isOrthogonal;be.$c()&&be.Hf(ge)&&bt.$c()&&bt.Hf(ue)?ft=0:(ue=Bt.getLinkPoint(se,Jt,be,!0,We,yt,Gt,$t.alloc()),ge=Bt.getLinkDirection(se,Jt,ue,be,!0,We,yt,Gt),$t.free(ue),be.ys()||ge!==X1(this,b,!0)?this.setsPortSpots&&se!==null&&se.ports.count===1&&b.rev&&(ft+=1):ft+=1,be=Bt.getLinkPoint(yt,Gt,bt,!1,We,se,Jt,$t.alloc()),Bt=Bt.getLinkDirection(yt,Gt,be,bt,!1,We,se,Jt),$t.free(be),bt.ys()||Bt!==X1(this,b,!1)?this.setsPortSpots&&yt!==null&&yt.ports.count===1&&b.rev&&(ft+=2):ft+=2)}}}if(yt=ft,ft=yt===1||yt===3,(yt=yt===2||yt===3)&&(bt=a.createVertex(),bt.node=null,bt.Dj=1,bt.layer=Pt,bt.near=E,a.dh(bt),E=a.Zj(E,bt,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=tt,E.portToColOffset=0,E.portFromPos=rt,E.portToPos=0,E=bt),Bt=1,ft&&Bt--,Pt-ut>Bt&&0<Pt){for(b.valid=!1,bt=a.createVertex(),bt.node=null,bt.Dj=2,bt.layer=Pt-1,a.dh(bt),E=a.Zj(E,bt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=yt?0:tt,E.portToColOffset=0,E.portFromPos=yt?0:rt,E.portToPos=0,E=bt,Pt--;Pt-ut>Bt&&0<Pt;)bt=a.createVertex(),bt.node=null,bt.Dj=3,bt.layer=Pt-1,a.dh(bt),E=a.Zj(E,bt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=bt,Pt--;E=a.Zj(bt,z,b.link),E.valid=!ft,ft&&(bt.near=z),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=ot,E.portFromPos=0,E.portToPos=lt}else b.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=lc(this,a),x=0,b=this.tc[a],z=0;z<b;z++)E=y[z],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),uc(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},pr.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}pr.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},pr.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 gl(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var b=x.value;a.kj[y]=b.layer,y++,a.kj[y]=b.column,y++,a.kj[y]=b.index,y++}return a.kj}function hu(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var b=a.value;b.layer=y[x],x++,b.column=y[x],x++,b.index=y[x],x++}}function $1(a,y,x){var b=lc(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<E;tt++){var ot=0,rt=b[tt],lt=rt.near;if(lt!==null&<.layer===rt.layer)if(rt=lt.index,rt>tt)for(var ut=tt+1;ut<rt;ut++){var ft=b[ut];ft.near===lt&&ft.Dj===lt.Dj||ot++}else for(ut=tt-1;ut>rt;ut--)ft=b[ut],ft.near===lt&&ft.Dj===lt.Dj||ot++;var yt;if(0<=x)for(rt=b[tt].sourceEdgesArrayAccess,lt=0;lt<rt.length;lt++){var Pt=rt[lt];if(Pt.valid&&Pt.fromVertex.layer!==y)for(ft=Pt.fromVertex.index,ut=Pt.portToPos,Pt=Pt.portFromPos,yt=lt+1;yt<rt.length;yt++){var bt=rt[yt];if(bt.valid&&bt.fromVertex.layer!==y){var Bt=bt.fromVertex.index,Jt=bt.portToPos;bt=bt.portFromPos,ut<Jt&&(ft>Bt||ft===Bt&&Pt>bt)&&ot++,Jt<ut&&(Bt>ft||Bt===ft&&bt>Pt)&&ot++}}}if(0>=x){for(rt=b[tt].destinationEdgesArrayAccess,lt=0;lt<rt.length;lt++)if(Pt=rt[lt],Pt.valid&&Pt.toVertex.layer!==y)for(ft=Pt.toVertex.index,ut=Pt.portToPos,Pt=Pt.portFromPos,yt=lt+1;yt<rt.length;yt++)bt=rt[yt],bt.valid&&bt.toVertex.layer!==y&&(Bt=bt.toVertex.index,Jt=bt.portToPos,bt=bt.portFromPos,Pt<bt&&(ft>Bt||ft===Bt&&ut>Jt)&&ot++,bt<Pt&&(Bt>ft||Bt===ft&&Jt>ut)&&ot++)}for(z[tt*E+tt]=ot,rt=tt+1;rt<E;rt++){var Gt=0,se=0;if(0<=x){ot=b[tt].sourceEdgesArrayAccess;var ue=b[rt].sourceEdgesArrayAccess;for(lt=0;lt<ot.length;lt++)if(Pt=ot[lt],Pt.valid&&Pt.fromVertex.layer!==y)for(ft=Pt.fromVertex.index,Pt=Pt.portFromPos,yt=0;yt<ue.length;yt++)bt=ue[yt],bt.valid&&bt.fromVertex.layer!==y&&(Bt=bt.fromVertex.index,bt=bt.portFromPos,(ft<Bt||ft===Bt&&Pt<bt)&&se++,(Bt<ft||Bt===ft&&bt<Pt)&&Gt++)}if(0>=x){for(ot=b[tt].destinationEdgesArrayAccess,ue=b[rt].destinationEdgesArrayAccess,lt=0;lt<ot.length;lt++)if(Pt=ot[lt],Pt.valid&&Pt.toVertex.layer!==y)for(ft=Pt.toVertex.index,ut=Pt.portToPos,yt=0;yt<ue.length;yt++)bt=ue[yt],bt.valid&&bt.toVertex.layer!==y&&(Bt=bt.toVertex.index,Jt=bt.portToPos,(ft<Bt||ft===Bt&&ut<Jt)&&se++,(Bt<ft||Bt===ft&&Jt<ut)&&Gt++)}z[tt*E+rt]=Gt,z[rt*E+tt]=se}}return uc(a,y,b),z}pr.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=$1(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var z=E;z<b;z++)a+=x[E*b+z];return a};function E0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,z=lc(b,E),tt=b.tc[E],ot=0,rt=0;rt<tt;rt++){var lt=z[rt].destinationEdgesArrayAccess;if(lt!==null)for(var ut=0;ut<lt.length;ut++){var ft=lt[ut];if(ft.valid&&ft.toVertex.layer!==E){var yt=ft.fromVertex.column+ft.portFromColOffset,Pt=ft.toVertex.column+ft.portToColOffset;ot+=(Math.abs(yt-Pt)+1)*gy(ft)}}}uc(b,E,z),y+=ot}return y}pr.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 b=lc(a,y),E=a.tc[y],z=[],tt=0;tt<E;tt++){var ot=b[tt],rt=null;0>=x&&(rt=ot.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=ot.destinationEdgesArrayAccess);var ut=0,ft=0,yt=ot.near;if(yt!==null&&yt.layer===ot.layer&&(ut+=yt.column-1,ft++),rt!==null)for(yt=0;yt<rt.length;yt++){ot=rt[yt];var Pt=ot.fromVertex;ot.valid&&!ot.rev&&Pt.layer!==y&&(ut+=Pt.column,ft++)}if(lt!==null)for(rt=0;rt<lt.length;rt++)ot=lt[rt],yt=ot.toVertex,ot.valid&&!ot.rev&&yt.layer!==y&&(ut+=yt.column,ft++);z[tt]=ft===0?-1:ut/ft}return uc(a,y,b),z}function Z1(a,y,x){for(var b=lc(a,y),E=a.tc[y],z=[],tt=0;tt<E;tt++){var ot=b[tt],rt=null;0>=x&&(rt=ot.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=ot.destinationEdgesArrayAccess);var ut=0,ft=[],yt=ot.near;if(yt!==null&&yt.layer===ot.layer&&(ft[ut]=yt.column-1,ut++),ot=void 0,rt!==null)for(yt=0;yt<rt.length;yt++){ot=rt[yt];var Pt=ot.fromVertex;ot.valid&&!ot.rev&&Pt.layer!==y&&(ft[ut]=Pt.column+ot.portFromColOffset,ut++)}if(lt!==null)for(rt=0;rt<lt.length;rt++)ot=lt[rt],yt=ot.toVertex,ot.valid&&!ot.rev&&yt.layer!==y&&(ft[ut]=yt.column+ot.portToColOffset,ut++);ut===0?z[tt]=-1:(ft.sort(function(bt,Bt){return bt-Bt}),lt=ut>>1,z[tt]=ut&1?ft[lt]:ft[lt-1]+ft[lt]>>1)}return uc(a,y,b),z}function $p(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var tt=y.destinationEdges;tt.next();){var ot=tt.value,rt=ot.toVertex,lt=y.layer-rt.layer;ot=a.linkMinLength(ot),lt===ot&&$p(a,rt,x,b,E,z)}if(z)for(tt=y.sourceEdges;tt.next();)ot=tt.value,rt=ot.fromVertex,lt=rt.layer-y.layer,ot=a.linkMinLength(ot),lt===ot&&$p(a,rt,x,b,E,z)}}function my(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var tt=y.destinationEdges;tt.next();)my(a,tt.value.toVertex,x,b,E,z);if(z)for(y=y.sourceEdges;y.next();)my(a,y.value.fromVertex,x,b,E,z)}}pr.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,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;jx(a)!==null;){for(E=W1(a);E!==null;)b[x]=E,x--,E.valid=!1,E=W1(a);for(E=K1(a);E!==null;)b[y]=E,y++,E.valid=!1,E=K1(a);E=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var ot=tt.value;if(ot.valid){for(var rt=0,lt=ot.destinationEdges;lt.next();)lt.value.toVertex.valid&&rt++;lt=0;for(var ut=ot.sourceEdges;ut.next();)ut.value.fromVertex.valid&<++;(E===null||z<rt-lt)&&(E=ot,z=rt-lt)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case N0:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&vy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&vy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,z=E.finish,E.Ll<y.Ll&&x<z&&(this.network.gm(b),b.rev=!0));break;case Zp:for(a=this.network,y=a.vertexes.iterator,b=1/0;y.next();)b=Math.min(b,y.value.layer);if(1/0>b){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;x<b.length;x++)if(E=b[x],!E||E.length===0)y++;else if(0<x)for(z=0;z<E.length;z++)E[z].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function jx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function W1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function K1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function vy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,vy(a,E))}y.finish=a.Kn,a.Kn++}pr.prototype.assignLayers=function(){switch(this.Zk){case xy:_1(this);break;case Py:for(var a,y=this.network.vertexes.iterator;y.next();)a=U1(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 T0:for(_1(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&Y1(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 _1(a){for(var y=a.network.vertexes.iterator;y.next();){var x=V1(a,y.value);a.Ia=Math.max(x,a.Ia)}}function V1(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,z=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,V1(a,z)+E)}y.layer=x}else x=y.layer;return x}function U1(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,z=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,U1(a,z)+E)}y.layer=x}else x=y.layer;return x}function Y1(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)Y1(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,z=0;z<E;z++){var tt=b[z],ot=tt.fromVertex,rt=tt.toVertex;tt=a.linkMinLength(tt),ot.layer-rt.layer>tt&&$p(a,ot,0,-1,!0,!1)}for($p(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,b=1/0,ot=0,rt=null,tt=a.network.vertexes.iterator;tt.next();){var lt=tt.value;if(lt.component===1){var ut=0,ft=!1,yt=lt.sourceEdgesArrayAccess;E=yt.length;for(var Pt=0;Pt<E;Pt++){var bt=yt[Pt],Bt=bt.fromVertex;ut+=1,Bt.component!==1&&(z+=1,Bt=Bt.layer-lt.layer,bt=a.linkMinLength(bt),b=Math.min(b,Bt-bt))}for(yt=lt.destinationEdgesArrayAccess,E=yt.length,Pt=0;Pt<E;Pt++)bt=yt[Pt].toVertex,--ut,bt.component!==1?--z:ft=!0;(rt===null||ut<ot)&&!ft&&(rt=lt,ot=ut)}}if(0<z){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else rt.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for($p(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,z=0,ot=null,rt=a.network.vertexes.iterator;rt.next();)if(tt=rt.value,tt.component===1){for(lt=0,ut=!1,yt=tt.sourceEdgesArrayAccess,ft=yt.length,Pt=0;Pt<ft;Pt++)bt=yt[Pt].fromVertex,lt+=1,bt.component!==1?b+=1:ut=!0;for(yt=tt.destinationEdgesArrayAccess,ft=yt.length,Pt=0;Pt<ft;Pt++)bt=yt[Pt],Bt=bt.toVertex,--lt,Bt.component!==1&&(--b,Bt=tt.layer-Bt.layer,bt=a.linkMinLength(bt),E=Math.min(E,Bt-bt));(ot===null||lt>z)&&!ut&&(ot=tt,z=lt)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else ot.component=0}}}function X1(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}pr.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 O0: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&&J1(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&&Q1(this,x)}};function J1(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var b=0;b<y.length-1;b++){var E=y[b],z=y[b+1];E.portFromColOffset>z.portFromColOffset&&(x=!0,y[b]=z,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&J1(a,b))}function Q1(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var b=!0;b;)for(b=!1,x=0;x<y.length-1;x++){var E=y[x],z=y[x+1];E.portToColOffset>z.portToColOffset&&(b=!0,y[x]=z,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&Q1(a,b))}pr.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=gl(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)M0(this,b,1),Su(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=gl(this)),b=this.Ia;0<=b;b--)M0(this,b,-1),Su(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=gl(this))}for(hu(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)M0(this,b,0),Su(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=gl(this)),b=this.Ia;0<=b;b--)M0(this,b,0),Su(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=gl(this))}hu(this,y);var z,tt,ot;switch(this.rk){case by:break;case Ey:for(ot=a+1;(b=this.countCrossings())<ot;)for(ot=b,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=Su(this,b,-1)||z;for(E=this.countCrossings(),E>=a?hu(this,y):(a=E,y=gl(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=Su(this,b,1)||z;for(E=this.countCrossings(),E>=a?hu(this,y):(a=E,y=gl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Su(this,b,1)||z;for(E>=a?hu(this,y):(a=E,y=gl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Su(this,b,-1)||z;for(E>=a?hu(this,y):(a=E,y=gl(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=Su(this,b,0)||z;for(E>=a?hu(this,y):(a=E,y=gl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Su(this,b,0)||z;E>=a?hu(this,y):(a=E,y=gl(this))}break;default:case F0:for(x=this.Ia,tt=0,ot=a+1;(b=this.countCrossings())<ot;){for(ot=b,z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=Su(this,b,-1)||z;for(E=this.countCrossings(),E>=a?hu(this,y):(a=E,y=gl(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=Su(this,b,1)||z;for(E=this.countCrossings(),E>=a?hu(this,y):(a=E,y=gl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Su(this,b,1)||z;for(E>=a?hu(this,y):(a=E,y=gl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Su(this,b,-1)||z;for(E>=a?hu(this,y):(a=E,y=gl(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=Su(this,b,0)||z;for(E>=a?hu(this,y):(a=E,y=gl(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=Su(this,b,0)||z;E>=a?hu(this,y):(a=E,y=gl(this))}}hu(this,y)};function M0(a,y,x){var b=lc(a,y),E=a.tc[y],z=Z1(a,y,x),tt=py(a,y,x);for(x=0;x<E;x++)tt[x]===-1&&(tt[x]=b[x].column),z[x]===-1&&(z[x]=b[x].column);for(var ot=!0,rt;ot;)for(ot=!1,x=0;x<E-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(ot=!0,rt=z[x],z[x]=z[x+1],z[x+1]=rt,rt=tt[x],tt[x]=tt[x+1],tt[x+1]=rt,rt=b[x],b[x]=b[x+1],b[x+1]=rt);for(x=z=0;x<E;x++)rt=b[x],rt.index=x,z+=a.nodeMinColumnSpace(rt,!0),rt.column=z,z+=1,z+=a.nodeMinColumnSpace(rt,!1);uc(a,y,b)}function Su(a,y,x){var b=lc(a,y),E=a.tc[y];x=$1(a,y,x);var z,tt=[];for(z=0;z<E;z++)tt[z]=-1;var ot=[];for(z=0;z<E;z++)ot[z]=-1;for(var rt=!1,lt=!0;lt;)for(lt=!1,z=0;z<E-1;z++){var ut=x[b[z].index*E+b[z+1].index],ft=x[b[z+1].index*E+b[z].index],yt=0,Pt=0,bt=b[z].column,Bt=b[z+1].column,Jt=a.nodeMinColumnSpace(b[z],!0),Gt=a.nodeMinColumnSpace(b[z],!1),se=a.nodeMinColumnSpace(b[z+1],!0),ue=a.nodeMinColumnSpace(b[z+1],!1);Jt=bt-Jt+se,Gt=Bt-Gt+ue;var ge=b[z].sourceEdges.iterator;for(ge.reset();ge.next();)if(se=ge.value,ue=se.fromVertex,se.valid&&ue.layer===y){for(se=0;b[se]!==ue;)se++;se<z&&(yt+=2*(z-se),Pt+=2*(z+1-se)),se===z+1&&(yt+=1),se>z+1&&(yt+=4*(se-z),Pt+=4*(se-(z+1)))}for(ge=b[z].destinationEdges.iterator,ge.reset();ge.next();)if(se=ge.value,ue=se.toVertex,se.valid&&ue.layer===y){for(se=0;b[se]!==ue;)se++;se===z+1&&(Pt+=1)}for(ge=b[z+1].sourceEdges.iterator,ge.reset();ge.next();)if(se=ge.value,ue=se.fromVertex,se.valid&&ue.layer===y){for(se=0;b[se]!==ue;)se++;se<z&&(yt+=2*(z+1-se),Pt+=2*(z-se)),se===z&&(Pt+=1),se>z+1&&(yt+=4*(se-(z+1)),Pt+=4*(se-z))}for(ge=b[z+1].destinationEdges.iterator,ge.reset();ge.next();)if(se=ge.value,ue=se.toVertex,se.valid&&ue.layer===y){for(se=0;b[se]!==ue;)se++;se===z&&(yt+=1)}se=ue=0,ge=tt[b[z].index];var be=ot[b[z].index],We=tt[b[z+1].index],Un=ot[b[z+1].index];ge!==-1&&(ue+=Math.abs(ge-bt),se+=Math.abs(ge-Gt)),be!==-1&&(ue+=Math.abs(be-bt),se+=Math.abs(be-Gt)),We!==-1&&(ue+=Math.abs(We-Bt),se+=Math.abs(We-Jt)),Un!==-1&&(ue+=Math.abs(Un-Bt),se+=Math.abs(Un-Jt)),(Pt<yt-.5||Pt===yt&&ft<ut-.5||Pt===yt&&ft===ut&&se<ue-.5)&&(lt=rt=!0,b[z].column=Gt,b[z+1].column=Jt,ut=b[z],b[z]=b[z+1],b[z+1]=ut)}for(z=0;z<E;z++)b[z].index=z;return uc(a,y,b),rt}pr.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 b,E=this.network.vertexes.iterator;E.next();){var z=E.value;y=z.layer,b=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],b+z)}for(E.reset();E.next();)z=E.value,y=z.layer,b=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=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&&(q1(this,-1),q1(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 Zx(this)};function Ng(a,y,x){for(var b=!1;Hx(a,y,x);)b=!0;return b}function Hx(a,y,x){var b,E=lc(a,y),z=a.tc[y],tt=py(a,y,-1);if(0<x)for(b=0;b<z;b++)tt[b]=-1;var ot=py(a,y,1);if(0>x)for(b=0;b<z;b++)ot[b]=-1;for(var rt=!1,lt=!0;lt;)for(lt=!1,b=0;b<z;b++){var ut=E[b].column,ft=a.nodeMinColumnSpace(E[b],!0),yt=a.nodeMinColumnSpace(E[b],!1),Pt=0;0>b-1||ut-E[b-1].column-1>ft+a.nodeMinColumnSpace(E[b-1],!1)?Pt=ut-1:Pt=ut,ft=b+1>=z||E[b+1].column-ut-1>yt+a.nodeMinColumnSpace(E[b+1],!0)?ut+1:ut;var bt=yt=0,Bt=0;if(0>=x)for(var Jt=E[b].sourceEdges.iterator;Jt.next();){var Gt=Jt.value,se=Gt.fromVertex;if(Gt.valid&&se.layer!==y){var ue=gy(Gt),ge=Gt.portFromColOffset;Gt=Gt.portToColOffset,se=se.column,yt+=(Math.abs(ut+Gt-(se+ge))+1)*ue,bt+=(Math.abs(Pt+Gt-(se+ge))+1)*ue,Bt+=(Math.abs(ft+Gt-(se+ge))+1)*ue}}if(0<=x)for(Jt=E[b].destinationEdges.iterator;Jt.next();)Gt=Jt.value,se=Gt.toVertex,Gt.valid&&se.layer!==y&&(ue=gy(Gt),ge=Gt.portFromColOffset,Gt=Gt.portToColOffset,se=se.column,yt+=(Math.abs(ut+ge-(se+Gt))+1)*ue,bt+=(Math.abs(Pt+ge-(se+Gt))+1)*ue,Bt+=(Math.abs(ft+ge-(se+Gt))+1)*ue);Gt=ge=ue=0,Jt=tt[E[b].index],se=ot[E[b].index],Jt!==-1&&(ue+=Math.abs(Jt-ut),ge+=Math.abs(Jt-Pt),Gt+=Math.abs(Jt-ft)),se!==-1&&(ue+=Math.abs(se-ut),ge+=Math.abs(se-Pt),Gt+=Math.abs(se-ft)),bt<yt||bt===yt&&ge<ue?(lt=rt=!0,E[b].column=Pt):(Bt<yt||Bt===yt&&Gt<ue)&&(lt=rt=!0,E[b].column=ft)}return uc(a,y,E),a.normalize(),rt}function yy(a,y,x){var b=lc(a,y),E=a.tc[y],z=Z1(a,y,x),tt=[];for(x=0;x<E;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<E;x++){var ot=b[x].column,rt=a.nodeMinColumnSpace(b[x],!0),lt=a.nodeMinColumnSpace(b[x],!1),ut=0;if(tt[x]===-1)if(x===0&&x===E-1)ut=ot;else if(x===0){var ft=b[x+1].column;ft-ot===lt+a.nodeMinColumnSpace(b[x+1],!0)?ut=ot-1:ut=ot}else x===E-1?(ft=b[x-1].column,ut=ot-ft===rt+a.nodeMinColumnSpace(b[x-1],!1)?ot+1:ot):(ft=b[x-1].column,rt=ft+a.nodeMinColumnSpace(b[x-1],!1)+rt+1,ft=b[x+1].column,lt=ft-a.nodeMinColumnSpace(b[x+1],!0)-lt-1,ut=(rt+lt)/2|0);else x===0&&x===E-1?ut=tt[x]:x===0?(ft=b[x+1].column,lt=ft-a.nodeMinColumnSpace(b[x+1],!0)-lt-1,ut=Math.min(tt[x],lt)):x===E-1?(ft=b[x-1].column,rt=ft+a.nodeMinColumnSpace(b[x-1],!1)+rt+1,ut=Math.max(tt[x],rt)):(ft=b[x-1].column,rt=ft+a.nodeMinColumnSpace(b[x-1],!1)+rt+1,ft=b[x+1].column,lt=ft-a.nodeMinColumnSpace(b[x+1],!0)-lt-1,rt<tt[x]&&tt[x]<lt?ut=tt[x]:rt>=tt[x]?ut=rt:lt<=tt[x]&&(ut=lt));ut!==ot&&(z=!0,b[x].column=ut)}uc(a,y,b),a.normalize()}function Gx(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,z=a.nodeMinColumnSpace(E,!0),tt=a.nodeMinColumnSpace(E,!1);if(E.column-z<=y&&E.column+tt>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function $x(a,y){var x=y+1,b,E=[],z=[];for(b=0;b<=a.Ia;b++)E[b]=!1,z[b]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){b=tt.value;var ot=b.column-a.nodeMinColumnSpace(b,!0),rt=b.column+a.nodeMinColumnSpace(b,!1);ot<=y&&rt>=y&&(E[b.layer]=!0),ot<=x&&rt>=x&&(z[b.layer]=!0)}for(ot=!0,x=!1,b=0;b<=a.Ia;b++)ot=ot&&!(E[b]&&z[b]);if(ot)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function q1(a,y){for(var x=0;x<=a.Ra;x++)for(;Gx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;$x(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=gl(a),z=E0(a);for(b=z+1;z<b;){b=z,tx(a,x,1);var tt=E0(a);tt>z?hu(a,E):tt<z&&(z=tt,E=gl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=gl(a),z=E0(a),b=z+1;z<b;)b=z,tx(a,x,-1),tt=E0(a),tt>z?hu(a,E):tt<z&&(z=tt,E=gl(a));a.normalize()}function tx(a,y,x){a.le=0;for(var b=a.network.vertexes.iterator;b.next();)b.value.component=-1;if(0<x)for(b.reset();b.next();){var E=b.value;E.column-a.nodeMinColumnSpace(E,!0)<=y&&(E.component=a.le)}if(0>x)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(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(E=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)E[z]=-1;for(b.reset();b.next();){z=b.value;for(var tt=z.layer,ot=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),rt=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));ot<=rt;ot++)E[tt*(a.Ra+1)+ot]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)E[z*(a.Ra+1)+tt]!==-1&&E[z*(a.Ra+1)+tt+1]!==-1&&E[z*(a.Ra+1)+tt]!==E[z*(a.Ra+1)+tt+1]&&(y[E[z*(a.Ra+1)+tt]*a.le+E[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)E[z*(a.Ra+1)+tt]!==-1&&E[z*(a.Ra+1)+tt-1]!==-1&&E[z*(a.Ra+1)+tt]!==E[z*(a.Ra+1)+tt-1]&&(y[E[z*(a.Ra+1)+tt]*a.le+E[z*(a.Ra+1)+tt-1]]=!0)}for(E=[],z=0;z<a.le;z++)E[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(rt=tt[tt.length-1],tt.pop(),E[rt])for(E[rt]=!1,z=0;z<a.le;z++)y[rt*a.le+z]&&tt.splice(0,0,z);if(0<x)for(b.reset();b.next();)a=b.value,E[a.component]&&--a.column;if(0>x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Zx(a){for(var y=Rn(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new tn,Wx(y,x);var z=null,tt=null,ot=null,rt=null,lt=(a.ve&1)!==0,ut=(a.ve&2)!==0,ft=(a.ve&4)!==0,yt=(a.ve&8)!==0;for(lt&&(a.verticalAlignment(y,x,!0),z=L0(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),ot=L0(a,y,!1,!1)),b=yi(y),E=b.next();!E.done;E=b.next())E.value.reverse();yt&&(a.verticalAlignment(y,x,!1),rt=L0(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=L0(a,y,!0,!0)),ni(y),a.u(z,tt,ot,rt),a.network.vertexes.each(function(Pt){var bt=Rn();lt&&bt.push(z.get(Pt)),ut&&bt.push(tt.get(Pt)),ft&&bt.push(ot.get(Pt)),yt&&bt.push(rt.get(Pt)),bt.sort(function(Jt,Gt){return Jt-Gt});var Bt=bt.length;Bt=(bt[Math.floor((Bt-1)/2)]+bt[Math.ceil((Bt-1)/2)])/2,ni(bt),Pt.zc=Bt})}function Wx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,z=0,tt=a[b],ot=a[b+1],rt=0;z<ot.length;rt++){var lt=ot[rt];t:{if(lt.node===null){var ut=My(lt);if(0<ut.length){ut=ut[0].node===null;break t}}ut=!1}var ft=ut;if(rt===ot.length-1||ft){for(ut=tt.length-1,ft&&(ut=My(lt)[0].index);z<=rt;){if(lt=ot[z],!lt.bo){ft=[];for(var yt=yi(lt.sourceEdgesArrayAccess),Pt=yt.next();!Pt.done;Pt=yt.next())Pt=Pt.value,Pt.valid&&ft.push(Pt);lt.bo=ft}for(lt=yi(lt.bo),ft=lt.next();!ft.done;ft=lt.next())ft=ft.value,yt=ft.fromVertex.index,(yt<E||yt>ut)&&y.add(ft);z++}E=ut}}}pr.prototype.verticalAlignment=function(a,y,x){Kx(a),a=yi(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=yi(b.value);for(var z=b.next();!z.done;z=b.next()){z=z.value;var tt=x?My(z):Ux(z),ot=tt.length;if(0<ot){tt.sort(function(ft,yt){return ft.vi-yt.vi});var rt=(ot-1)/2;for(ot=Math.floor(rt),rt=Math.ceil(rt);ot<=rt;ot++)if(z.align===z){var lt=tt[ot],ut=void 0;ut=x?I0(lt,z):I0(z,lt),!y.contains(ut)&&E<lt.vi&&(lt.align=z,z.root=lt.root,z.align=lt.root,E=lt.vi)}}}}};function Kx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function L0(a,y,x,b){for(var E=a.K===90||a.K===270,z=yi(y),tt=z.next();!tt.done;tt=z.next()){var ot=yi(tt.value);for(tt=ot.next();!tt.done;tt=ot.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=yi(y),ot=z.next();!ot.done;ot=z.next()){ot=yi(ot.value);for(var rt=ot.next();!rt.done;rt=ot.next())if(rt=rt.value,rt.root===rt){for(var lt=0,ut=rt;ut.align!==rt;){var ft=ut.align,yt=tt?ut.width:ut.height,Pt=tt?ft.width:ft.height;if(x){var bt=I0(ut,ft),Bt=bt.portFromPos,Jt=bt.portToPos;bt.link!==null&&(ut.node&&ut.node!==bt.link.fromNode&&(Bt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==bt.link.toNode&&(Jt=tt?ft.focusX:ft.focusY))}else bt=I0(ft,ut),Bt=bt.portToPos,Jt=bt.portFromPos,bt.link!==null&&(ut.node&&ut.node!==bt.link.toNode&&(Bt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==bt.link.fromNode&&(Jt=tt?ft.focusX:ft.focusY));yt=b?ut.qg+(yt-Bt)-(Pt-Jt):ut.qg+Bt-Jt,ft.qg=yt,lt=Math.min(lt,yt),ut=ut.align}ut=rt;do ut.qg=ut.qg-lt,ut=ut.align;while(ut!==rt)}}for(x=yi(y),tt=x.next();!tt.done;tt=x.next())for(z=yi(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&ex(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,ot=0;do{for(z=y[tt][ot];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(ot=nx(z,y),ot.sd.shift=Math.min(ot.sd.shift,z.sd.shift+z.zc+z.qg-(ot.zc+ot.qg+(E?ot.width:ot.height)+a.columnSpacing)));ot=z.vi+1}while(tt<y.length&&ot<y[tt].length&&z.sd===y[tt][ot].sd)}for(a=new li,y=yi(y),tt=y.next();!tt.done;tt=y.next())for(x=yi(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=E?tt.width:tt.height,a.add(tt,b?-tt.zc-z:tt.zc);return a}function ex(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=nx(b,x),z=E.root;ex(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?E.width:E.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+E.qg+tt-b.qg+a.columnSpacing))}b=b.align}while(b!==y);for(;b.align!==y;)b=b.align,b.zc=y.zc,b.sd=y.sd}}function nx(a,y){var x=a.Tz;return a=a.vi,1>a&&_t("Could not determine previous vertex in layer"),y[x][a-1]}pr.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Rn(),E=Rn(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var ot=_x(this,y[tt],b,E,tt);ot<z&&(x=tt,z=ot)}for(z={},tt=0;4>tt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?b[x]-b[tt]:E[x]-E[tt],z.delta!==0&&y[tt].each(function(rt){return function(lt){lt.value+=rt.delta}}(z)));ni(b),ni(E)};function _x(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(ot){var rt=ot.key;ot=ot.value,rt=a.K===90||a.K===270?rt.width:rt.height,ot<z&&(z=ot),ot+rt>tt&&(tt=ot+rt)}),x[E]=z,b[E]=tt,tt-z}pr.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=k0(this,!0),y=k0(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function k0(a,y){return a.K===270?y?va:$a:a.K===90?y?$a:va:a.K===180?y?Ta:Va:y?Va:Ta}pr.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0<b&&(y+=E/2),this.K===90||this.K===0?(y+=this.Ld[b],this.Kd[b]=y,y+=this.he[b]):(y+=this.he[b],this.Kd[b]=y,y+=this.Ld[b]),b<this.Ia&&(y+=E/2),this.Ta[b]=y}for(x=y,y=this.arrangementOrigin,b=0;b<=this.Ia;b++)this.K===270?this.Kd[b]=y.y+this.Kd[b]:this.K===90?(this.Kd[b]=y.y+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]):this.K===180?this.Kd[b]=y.x+this.Kd[b]:(this.Kd[b]=y.x+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]);x=this.ve!==0,a.reset(),b=this.K===270||this.K===90;for(var z=1/0,tt=E=1/0,ot=-1/0;a.next();){var rt=a.value,lt=rt.layer,ut=rt.column|0;b?(tt=y.x+this.kc*ut,lt=this.Kd[lt]):(tt=this.Kd[lt],lt=y.y+this.kc*ut),rt.centerX=tt,rt.centerY=lt,x&&isFinite(rt.zc)&&(b?rt.node?rt.x=y.x+rt.zc:rt.centerX=y.x+rt.zc:rt.node?rt.y=y.y+rt.zc:rt.centerY=y.y+rt.zc),z=Math.min(rt.x,z),E=Math.min(rt.y,E),b?(tt=z,ot=Math.max(ot,rt.bounds.right)):(tt=E,ot=Math.max(ot,rt.bounds.bottom))}for(this.xw=ot-tt,z=y.x-z,y=y.y-E,this.Rf=new $t(x&&b?0:z,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},pr.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var b=this.maxLayer;0<=b;b--)this.K===270?b===0?y.push(new an(0,0,x,Math.abs(this.Ta[0]))):y.push(new an(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new an(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new an(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new an(0,0,Math.abs(this.Ta[0]),x)):y.push(new an(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new an(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new an(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},pr.prototype.commitLayers=function(){},pr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var b=y,E=b.fromNode,z=b.toNode,tt=b.fromPort,ot=b.toPort;if(E!==null){var rt=E.findVisibleNode();rt!==null&&rt!==E&&(E=rt,tt=rt.port)}z!==null&&(rt=z.findVisibleNode(),rt!==null&&rt!==z&&(z=rt,ot=rt.port));var lt=y.computeSpot(!0,tt);rt=y.computeSpot(!1,ot);var ut=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===Xl&&y.pointsCount===4&&(ut.column===ft.column&&this.alignOption===0?(x=y.getLinkPoint(E,tt,lt,!0,!1,z,ot),ot=y.getLinkPoint(z,ot,rt,!1,!1,E,tt),x.w()||x.set(E.actualBounds.center),ot.w()||ot.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+ot.x)/3,(2*x.y+ot.y)/3),y.yf((x.x+2*ot.x)/3,(x.y+2*ot.y)/3),y.yf(ot.x,ot.y)):(x=b=!1,tt!==null&<===Qr&&(b=!0),ot!==null&&rt===Qr&&(x=!0),(b||x)&&(rt=null,b&&(rt=y.getLinkPointFromPoint(E,tt,tt.ga(Zo),y.i(3),!0),rt.w()||rt.set(E.actualBounds.center),y.L(0,rt.x,rt.y)),E=null,x&&(E=y.getLinkPointFromPoint(z,ot,ot.ga(Zo),y.i(0),!1),E.w()||E.set(z.actualBounds.center),y.L(3,E.x,E.y)),rt&&(z=y.i(2),y.L(1,(2*rt.x+z.x)/3,(2*rt.y+z.y)/3)),E&&(z=y.i(1),y.L(2,(2*E.x+z.x)/3,(2*E.y+z.y)/3))))),y.zf();else if(ut.layer===ft.layer)y.zf();else{var yt=!1,Pt=!1,bt=this.ie,Bt=y.firstPickIndex+1;if(y.isOrthogonal){Pt=!0;var Jt=y.pointsCount;4<Jt&&y.points.removeRange(2,Jt-3)}else if(y.curve===Xl)yt=!0,Jt=y.pointsCount,4<Jt&&y.points.removeRange(2,Jt-3),Jt===4&&(Bt=2);else{Jt=y.pointsCount;var Gt=lt===Qr,se=rt===Qr;2<Jt&&Gt&&se?y.points.removeRange(1,Jt-2):3<Jt&&Gt&&!se?y.points.removeRange(1,Jt-3):3<Jt&&!Gt&&se?y.points.removeRange(2,Jt-2):4<Jt&&!Gt&&!se&&y.points.removeRange(2,Jt-3)}if(x.rev){for(;ft!==null&&ut!==ft;){var ue=Jt=null;for(Gt=ft.sourceEdges.iterator;Gt.next()&&(se=Gt.value,se.link!==x.link||(Jt=se.fromVertex,ue=se.toVertex,Jt.node!==null)););if(Jt===null)break;if(Jt!==ut){Gt=y.i(Bt-1).x,se=y.i(Bt-1).y;var ge=Jt.centerX,be=Jt.centerY;if(Pt)this.K===180||this.K===0?Bt===y.firstPickIndex+1?(y.m(Bt++,Gt,se),y.m(Bt++,Gt,be)):(ue!==null?ue.centerY:se)!==be&&(ue=this.Ta[Jt.layer-1]+this.Rf.x,y.m(Bt++,ue,se),y.m(Bt++,ue,be)):Bt===y.firstPickIndex+1?(y.m(Bt++,Gt,se),y.m(Bt++,ge,se)):(ue!==null?ue.centerX:Gt)!==ge&&(ue=this.Ta[Jt.layer-1]+this.Rf.y,y.m(Bt++,Gt,ue),y.m(Bt++,ge,ue));else if(Bt===y.firstPickIndex+1){ue=Math.max(10,this.he[ft.layer]);var We=Math.max(10,this.Ld[ft.layer]);if(yt)this.K===180?ge<=ft.bounds.x?(ft=ft.bounds.x,y.m(Bt++,ft-ue,be),y.m(Bt++,ft,be),y.m(Bt++,ft+We,be)):(y.m(Bt++,ge-ue,be),y.m(Bt++,ge,be),y.m(Bt++,ge+We,be)):this.K===90?be>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Bt++,ge,ft+We),y.m(Bt++,ge,ft),y.m(Bt++,ge,ft-ue)):(y.m(Bt++,ge,be+We),y.m(Bt++,ge,be),y.m(Bt++,ge,be-ue)):this.K===270?be<=ft.bounds.y?(ft=ft.bounds.y,y.m(Bt++,ge,ft-ue),y.m(Bt++,ge,ft),y.m(Bt++,ge,ft+We)):(y.m(Bt++,ge,be-ue),y.m(Bt++,ge,be),y.m(Bt++,ge,be+We)):this.K===0&&(ge>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Bt++,ft+We,be),y.m(Bt++,ft,be),y.m(Bt++,ft-ue,be)):(y.m(Bt++,ge+We,be),y.m(Bt++,ge,be),y.m(Bt++,ge-ue,be)));else{y.m(Bt++,Gt,se);var Un=0;this.K===180||this.K===0?((this.K===180?ge>=ft.bounds.right:ge<=ft.bounds.x)&&(Un=(this.K===0?-ue:We)/2),y.m(Bt++,Gt+Un,be)):((this.K===270?be>=ft.bounds.bottom:be<=ft.bounds.y)&&(Un=(this.K===90?-ue:We)/2),y.m(Bt++,ge,se+Un)),y.m(Bt++,ge,be)}}else ue=Math.max(10,this.he[Jt.layer]),We=Math.max(10,this.Ld[Jt.layer]),yt?this.K===180?(y.m(Bt++,ge-ue-bt,be),y.m(Bt++,Math.min(ge-ue+bt/2,ge),be),y.m(Bt++,ge,be),y.m(Bt++,ge,be),y.m(Bt++,Math.max(ge+We-bt/2,ge),be),y.m(Bt++,ge+We+bt,be)):this.K===90?(y.m(Bt++,ge,be+We+bt),y.m(Bt++,ge,Math.max(be+We-bt/2,be)),y.m(Bt++,ge,be),y.m(Bt++,ge,be),y.m(Bt++,ge,Math.min(be-ue+bt/2,be)),y.m(Bt++,ge,be-ue-bt)):this.K===270?(y.m(Bt++,ge,be-ue-bt),y.m(Bt++,ge,Math.min(be-ue+bt/2,be)),y.m(Bt++,ge,be),y.m(Bt++,ge,be),y.m(Bt++,ge,Math.max(be+We-bt/2,be)),y.m(Bt++,ge,be+We+bt)):(y.m(Bt++,ge+We+bt,be),y.m(Bt++,Math.max(ge+We-bt/2,ge),be),y.m(Bt++,ge,be),y.m(Bt++,ge,be),y.m(Bt++,Math.min(ge-ue+bt/2,ge),be),y.m(Bt++,ge-ue-bt,be)):y.m(Bt++,ge,be)}ft=Jt}(ot===null||lt!==Qr||Pt)&&(Gt=y.i(Bt-1).x,se=y.i(Bt-1).y,ge=y.i(Bt).x,be=y.i(Bt).y,Pt?(bt=this.Ld[ut.layer],this.K===180||this.K===0?(Pt=se,Pt>=ut.bounds.y&&Pt<=ut.bounds.bottom&&(this.K===180?ge>=ut.bounds.x:ge<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-bt:bt),Pt<ut.bounds.y+ut.bounds.height/2?Pt=ut.bounds.y-this.kc/2:Pt=ut.bounds.bottom+this.kc/2,y.m(Bt++,ft,se),y.m(Bt++,ft,Pt)),y.m(Bt++,ge,Pt)):(Pt=Gt,Pt>=ut.bounds.x&&Pt<=ut.bounds.right&&(this.K===270?be>=ut.bounds.y:be<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-bt:bt),Pt<ut.bounds.x+ut.bounds.width/2?Pt=ut.bounds.x-this.kc/2:Pt=ut.bounds.right+this.kc/2,y.m(Bt++,Gt,ft),y.m(Bt++,Pt,ft)),y.m(Bt++,Pt,be)),y.m(Bt++,ge,be)):yt?(ue=Math.max(10,this.he[ut.layer]),We=Math.max(10,this.Ld[ut.layer]),this.K===180&&ge>=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(Bt-2,ft,se),y.L(Bt-1,ft+We,se)):this.K===90&&be<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(Bt-2,Gt,ft),y.L(Bt-1,Gt,ft-ue)):this.K===270&&be>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(Bt-2,Gt,ft),y.L(Bt-1,Gt,ft+We)):this.K===0&&ge<=ut.bounds.right&&(ft=ut.bounds.x,y.L(Bt-2,ft,se),y.L(Bt-1,ft-ue,se))):(ue=Math.max(10,this.he[ut.layer]),We=Math.max(10,this.Ld[ut.layer]),Pt=0,this.K===180||this.K===0?((this.K===180?ge<=ut.bounds.x:ge>=ut.bounds.right)&&(Pt=(this.K===0?We:-ue)/2),y.m(Bt++,ge+Pt,se)):((this.K===270?be<=ut.bounds.y:be>=ut.bounds.bottom)&&(Pt=(this.K===90?We:-ue)/2),y.m(Bt++,Gt,be+Pt)),y.m(Bt++,ge,be)))}else{for(;ut!==null&&ut!==ft;){for(ue=Jt=null,ut=ut.destinationEdges.iterator;ut.next()&&(Gt=ut.value,Gt.link!==x.link||(Jt=Gt.toVertex,ue=Gt.fromVertex,ue.node!==null&&(ue=null),Jt.node!==null)););if(Jt===null)break;Jt!==ft&&(Gt=y.i(Bt-1).x,se=y.i(Bt-1).y,ge=Jt.centerX,be=Jt.centerY,Pt?this.K===180||this.K===0?(ue!==null?ue.centerY:se)!==be&&(ue=this.Ta[Jt.layer]+this.Rf.x,Bt===y.firstPickIndex+1&&(ue=this.K===0?Math.max(ue,Gt):Math.min(ue,Gt)),y.m(Bt++,ue,se),y.m(Bt++,ue,be)):(ue!==null?ue.centerX:Gt)!==ge&&(ue=this.Ta[Jt.layer]+this.Rf.y,Bt===y.firstPickIndex+1&&(ue=this.K===90?Math.max(ue,se):Math.min(ue,se)),y.m(Bt++,Gt,ue),y.m(Bt++,ge,ue)):(ue=Math.max(10,this.he[Jt.layer]),We=Math.max(10,this.Ld[Jt.layer]),yt?this.K===180?(y.m(Bt++,ge+We+bt,be),y.m(Bt++,Math.max(ge+We-bt/2,ge),be),y.m(Bt++,ge,be),y.m(Bt++,ge,be),y.m(Bt++,Math.min(ge-ue+bt/2,ge),be),y.m(Bt++,ge-ue-bt,be)):this.K===90?(y.m(Bt++,ge,be-ue-bt),y.m(Bt++,ge,Math.min(be-ue+bt/2,be)),y.m(Bt++,ge,be),y.m(Bt++,ge,be),y.m(Bt++,ge,Math.max(be+We-bt/2,be)),y.m(Bt++,ge,be+We+bt)):this.K===270?(y.m(Bt++,ge,be+We+bt),y.m(Bt++,ge,Math.max(be+We-bt/2,be)),y.m(Bt++,ge,be),y.m(Bt++,ge,be),y.m(Bt++,ge,Math.min(be-ue+bt/2,be)),y.m(Bt++,ge,be-ue-bt)):(y.m(Bt++,ge-ue-bt,be),y.m(Bt++,Math.min(ge-ue+bt/2,ge),be),y.m(Bt++,ge,be),y.m(Bt++,ge,be),y.m(Bt++,Math.max(ge+We-bt/2,ge),be),y.m(Bt++,ge+We+bt,be)):this.K===180?(y.m(Bt++,ge+We,be),y.m(Bt++,ge-ue,be)):this.K===90?(y.m(Bt++,ge,be-ue),y.m(Bt++,ge,be+We)):this.K===270?(y.m(Bt++,ge,be+We),y.m(Bt++,ge,be-ue)):(y.m(Bt++,ge-ue,be),y.m(Bt++,ge+We,be)))),ut=Jt}Pt&&(Gt=y.i(Bt-1).x,se=y.i(Bt-1).y,ge=y.i(Bt).x,be=y.i(Bt).y,this.K===180||this.K===0?se!==be&&(ue=this.K===0?Math.min(Math.max((ge+Gt)/2,this.Ta[ft.layer]+this.Rf.x),ge):Math.max(Math.min((ge+Gt)/2,this.Ta[ft.layer]+this.Rf.x),ge),y.m(Bt++,ue,se),y.m(Bt++,ue,be)):Gt!==ge&&(ue=this.K===90?Math.min(Math.max((be+se)/2,this.Ta[ft.layer]+this.Rf.y),be):Math.max(Math.min((be+se)/2,this.Ta[ft.layer]+this.Rf.y),be),y.m(Bt++,Gt,ue),y.m(Bt++,ge,ue)))}b!==null&&yt&&4<=y.pointsCount&&(tt!==null&&(tt=lt===Qr?y.getLinkPointFromPoint(E,tt,tt.ga(Zo),y.i(3),!0):y.i(0),lt===Qr&&(lt=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+lt.x)/2,lt.y),y.L(2,b.x,(lt.y+b.y)/2)):(y.L(1,lt.x,(tt.y+lt.y)/2),y.L(2,(lt.x+b.x)/2,b.y))),tt.w()||tt.set(E.actualBounds.center),y.L(0,tt.x,tt.y)),ot!==null&&(E=rt===Qr?y.getLinkPointFromPoint(z,ot,ot.ga(Zo),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),rt===Qr&&(ot=y.i(y.pointsCount-3),rt=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+ot.x)/2,ot.y),y.L(y.pointsCount-2,rt.x,(ot.y+rt.y)/2)):(y.L(y.pointsCount-2,ot.x,(E.y+ot.y)/2),y.L(y.pointsCount-3,(ot.x+rt.x)/2,rt.y))),E.w()||E.set(z.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},pr.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 b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var z=b.i(E),tt=b.i(E+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var ot=new hc;ot.layer=Math.floor(z.y/2);var rt=b.i(0),lt=b.i(b.pointsCount-1);if(ot.first=rt.x*rt.x+rt.y,ot.jc=lt.x*lt.x+lt.y,ot.rd=Math.min(z.x,tt.x),ot.Ic=Math.max(z.x,tt.x),ot.index=E,ot.link=b,E+2<b.pointsCount){rt=b.i(E-1),lt=b.i(E+2);var ut=0;rt.y<z.y?ut=lt.y<z.y?3:z.x<tt.x?2:1:rt.y>z.y&&(ut=lt.y>z.y?0:tt.x<z.x?2:1),ot.j=ut}x.push(ot)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(tt=x[z].Ic,E=a+1;E<b&&x[E].rd<tt;)tt=Math.max(tt,x[E].Ic),E++;if(tt=E-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,ot=x[z].jc,rt=z;rt<E;rt++)lt=x[rt],lt.jc!==ot&&(ut++,ot=lt.jc);this.zi(x,this.Ux,z,z+tt);var ft=1;for(ot=x[z].first,rt=z;rt<E;rt++)lt=x[rt],lt.first!==ot&&(ft++,ot=lt.first);for(rt=!0,lt=ft,ut<ft?(rt=!1,lt=ut,ot=x[z].jc,this.zi(x,this.Js,z,z+tt)):ot=x[z].first,ut=0,ft=z;ft<E;ft++){var yt=x[ft];(rt?yt.first:yt.jc)!==ot&&(ut++,ot=rt?yt.first:yt.jc);var Pt=yt.link;z=Pt.i(yt.index),tt=Pt.i(yt.index+1);var bt=this.linkSpacing*(ut-(lt-1)/2);y++,Pt.uh(),Pt.L(yt.index,z.x,z.y+bt),Pt.L(yt.index+1,tt.x,tt.y+bt),Pt.zf()}}z=E}a=b}}else{for(y=0,x=[],a=a.iterator;a.next();)if(b=a.value,b!==null&&b.isOrthogonal)for(E=2;E<b.pointsCount-3;E++)z=b.i(E),tt=b.i(E+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(ot=new hc,ot.layer=Math.floor(z.x/2),rt=b.i(0),lt=b.i(b.pointsCount-1),ot.first=rt.x+rt.y*rt.y,ot.jc=lt.x+lt.y*lt.y,ot.rd=Math.min(z.y,tt.y),ot.Ic=Math.max(z.y,tt.y),ot.index=E,ot.link=b,E+2<b.pointsCount&&(rt=b.i(E-1),lt=b.i(E+2),ut=0,rt.x<z.x?ut=lt.x<z.x?3:z.y<tt.y?2:1:rt.x>z.x&&(ut=lt.x>z.x?0:tt.y<z.y?2:1),ot.j=ut),x.push(ot));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(tt=x[z].Ic,E=a+1;E<b&&x[E].rd<tt;)tt=Math.max(tt,x[E].Ic),E++;if(tt=E-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,ot=x[z].jc,rt=z;rt<E;rt++)lt=x[rt],lt.jc!==ot&&(ut++,ot=lt.jc);for(this.zi(x,this.Ux,z,z+tt),ft=1,ot=x[z].first,rt=z;rt<E;rt++)lt=x[rt],lt.first!==ot&&(ft++,ot=lt.first);for(rt=!0,lt=ft,ut<ft?(rt=!1,lt=ut,ot=x[z].jc,this.zi(x,this.Js,z,z+tt)):ot=x[z].first,ut=0,ft=z;ft<E;ft++)yt=x[ft],(rt?yt.first:yt.jc)!==ot&&(ut++,ot=rt?yt.first:yt.jc),Pt=yt.link,z=Pt.i(yt.index),tt=Pt.i(yt.index+1),bt=this.linkSpacing*(ut-(lt-1)/2),y++,Pt.uh(),Pt.L(yt.index,z.x+bt,z.y),Pt.L(yt.index+1,tt.x+bt,tt.y),Pt.zf()}z=E}a=b}}}},Ct=pr.prototype,Ct.Vx=function(a,y){return a instanceof hc&&y instanceof hc&&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},Ct.Ux=function(a,y){return a instanceof hc&&y instanceof hc&&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},Ct.Js=function(a,y){return a instanceof hc&&y instanceof hc&&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},Ct.B=function(a,y){return a-=y,-1<a&&1>a},Ct.zi=function(a,y,x,b){var E=a.length,z=b-x;if(!(1>=z))if((0>x||x>=E-1)&&_t("not in range 0 <= from < length: "+x),z===2)b=a[x],E=a[x+1],0<y(b,E)&&(a[x]=E,a[x+1]=b);else if(x===0)if(b>=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y<b;y++)a[y]=x[y];else if(b>=E)for(b=a.slice(x),b.sort(y),y=x;y<E;y++)a[y]=b[y-x];else for(E=a.slice(x,b),E.sort(y),y=x;y<b;y++)a[y]=E[y-x]};function lc(a,y){var x=a.tc[y];if(x>=a.He.length){for(var b=[],E=0;E<a.He.length;E++)b[E]=a.He[E];a.He=b}for(a.He[x]===void 0||a.He[x]===null?b=[]:(b=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],b[x.index]=x;return b}function uc(a,y,x){a.He[a.tc[y]]=x}Zt.Object.defineProperties(pr.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()):_t("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Sy&&a!==N0&&a!==Zp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==T0&&a!==xy&&a!==Py||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==O0&&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!==by&&a!==F0&&a!==Ey||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var N0=new en(pr,"CycleDepthFirst",0),Sy=new en(pr,"CycleGreedy",1),Zp=new en(pr,"CycleFromLayers",2),T0=new en(pr,"LayerOptimalLinkLength",0),xy=new en(pr,"LayerLongestPathSink",1),Py=new en(pr,"LayerLongestPathSource",2),O0=new en(pr,"InitDepthFirstOut",0),wy=new en(pr,"InitDepthFirstIn",1),Cy=new en(pr,"InitNaive",2),by=new en(pr,"AggressiveNone",0),F0=new en(pr,"AggressiveLess",1),Ey=new en(pr,"AggressiveMore",2),Vx=8;pr.className="LayeredDigraphLayout",pr.CycleDepthFirst=N0,pr.CycleGreedy=Sy,pr.CycleFromLayers=Zp,pr.LayerOptimalLinkLength=T0,pr.LayerLongestPathSink=xy,pr.LayerLongestPathSource=Py,pr.InitDepthFirstOut=O0,pr.InitDepthFirstIn=wy,pr.InitNaive=Cy,pr.AggressiveNone=by,pr.AggressiveLess=F0,pr.AggressiveMore=Ey,pr.PackNone=0,pr.PackExpand=1,pr.PackStraighten=2,pr.PackMedian=4,pr.PackAll=15,pr.AlignNone=0,pr.AlignUpperLeft=1,pr.AlignUpperRight=2,pr.AlignLowerLeft=4,pr.AlignLowerRight=8,pr.AlignAll=15;function hc(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}hc.className="SegInfo";function Tg(a){kr.call(this,a)}Ae(Tg,kr),Tg.prototype.createVertex=function(){return new du(this)},Tg.prototype.createEdge=function(){return new Wp(this)},Tg.className="LayeredDigraphNetwork";function du(a){_a.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}Ae(du,_a);function ix(a,y){return a.index-y.index}function I0(a,y){if(!a.$n){for(var x=[],b=yi(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=yi(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;_t("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=yi(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(ix),a.co=y}return a.co}function Ux(a){if(!a.ao){for(var y=[],x=yi(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(ix),a.ao=y}return a.ao}du.prototype.Cl=function(a){_a.prototype.Cl.call(this,a),this.bo=this.co=null},du.prototype.Kl=function(a){_a.prototype.Kl.call(this,a),this.bo=this.co=null},du.prototype.zl=function(a){_a.prototype.zl.call(this,a),this.$n=this.ao=null},du.prototype.Jl=function(a){_a.prototype.Jl.call(this,a),this.$n=this.ao=null},Zt.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 Wp(a){Ol.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Ae(Wp,Ol),Zt.Object.defineProperties(Wp.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)}}}),Wp.className="LayeredDigraphEdge";function Oo(a){$r.call(this),this.Ub=new tn,this.Wn=R0,this.ud=Ih,this.vo=j0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=H0,this.$d=new Zn(10,10).freeze();var y=new If(this);this.W=new xu(y),this.Y=new xu(y),this.ru=[],a&&Object.assign(this,a)}Ae(Oo,$r),Oo.prototype.cloneProtected=function(a){$r.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)},Oo.prototype.qb=function(a){a.classType===Oo?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:_t("Unknown enum value: "+a):$r.prototype.qb.call(this,a)},Oo.prototype.createNetwork=function(){return new If(this)},Oo.prototype.makeNetwork=function(a){function y(b){if(b instanceof ei)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof jn){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Ze?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof io?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Oo.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==G0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Ze&&(y=a),this.path===R0&&y!==null?this.ud=y.isTreePathToChildren?Ih:Of:this.ud=this.path===R0?Ih:this.path,0<this.network.vertexes.count){for(this.network.Ko(),a=this.network.vertexes.iterator;a.next();)y=a.value,y.initialized=!1,y.level=0,y.parent=null,y.children=[];if(0<this.Ub.count){for(a=new tn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof ei?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof xu&&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=ox(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 xu&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof xu&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof xu&&lx(this,y);if(this.Cu(),this.layerStyle===$0){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===zy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,b=-1,E=0;E<y.children.length;E++){var z=y.children[E];b=Math.max(b,x?z.width:z.height)}if(0<=b)for(E=0;E<y.children.length;E++)z=y.children[E],x?(y.angle===180&&(z.focusX+=b-z.width),z.width=b):(y.angle===270&&(z.focusY+=b-z.height),z.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof xu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new tn,this.isValidLayout=!0};function Yx(a){var y=new tn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Oo.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Ih:x.sourceEdges.count===0&&this.Ub.add(x);break;case Of:x.destinationEdges.count===0&&this.Ub.add(x);break;default:_t("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ox(this,a),a!==null&&this.Ub.add(a))};function ox(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case Ih:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Of:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:_t("Unhandled path value "+a.ud.toString())}}return b}function Ly(a,y){if(y!==null){switch(a.ud){case Ih:if(0<y.destinationEdges.count){for(var x=new mn,b=y.destinationVertexes;b.next();){var E=b.value;rx(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case Of:if(0<y.sourceEdges.count){for(x=new mn,b=y.sourceVertexes;b.next();)E=b.value,rx(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:_t("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var z=x[E];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<b;y++)Ly(a,x[y])}}function rx(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}Oo.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var z=E=0;z<x.length;z++)x[z]!==y&&(b[E++]=x[z]);a.children=b}}};function ax(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Ah&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,z=y.children,tt=z.length,ot=0;ot<tt;ot++){var rt=z[ot];ax(a,rt),x+=rt.descendantCount+1,b=Math.max(b,rt.maxChildrenCount),E=Math.max(E,rt.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function Xx(a,y){switch(a.vo){default:case j0:return y.parent!==null?y.parent:a.W;case Dy:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case By:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Iy:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,z=0;z<E;z++)if(0<b[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Oo.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Xx(this,a)),a.parent!==null&&a.parent.alignment===Ah){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function sx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)sx(a,y[b])}}Oo.prototype.assignTreeVertexValues=function(){};function lx(a,y){if(y!==null){y.alignment!==Ah&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lx(a,y[b])}}Oo.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Og:break;case _p:a.children.reverse();break;case Vp:a.children.sort(a.comparer);break;case Up:a.children.sort(a.comparer),a.children.reverse();break;default:_t("Unhandled sorting value "+a.sorting.toString())}},Oo.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Oo.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=dc(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var z=0,tt=0,ot=0,rt=a.commentSpacing;if(a.node!==null)for(var lt=a.node.Mu();lt.next();){var ut=lt.value;ut.category==="Comment"&&ut.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ut),ut.Va(),ut=ut.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(z=Math.max(z,ut.width),tt+=ut.height+Math.abs(ot)):(z+=ut.width+Math.abs(ot),tt=Math.max(tt,ut.height)),ot=rt)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),E=an.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=E,an.free(E))};function dc(a){return a===Od||a===Ah||a===Fd||a===id}function Kp(a){return a===Od||a===Ah}function ky(a){var y=a.parent;if(y!==null){var x=y.alignment;if(dc(x)){if(Kp(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Fd)return!0}}return!1}Oo.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,z=!1;x!==null&&(E=x.angle,z=x.alignment,z=dc(z)),b=b===90||b===270,x=E===90||E===270;for(var tt=a.childrenCount===0,ot=ky(a),rt=0,lt=a.comments,ut=lt.length,ft=$t.alloc(),yt=0;yt<ut;yt++){var Pt=lt[yt],bt=Pt.measuredBounds;if(b&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<E&&!z||x&&ot)if(0<=a.commentMargin)for(ft.h(a.bounds.x-a.commentMargin-bt.width,a.bounds.y+rt),Pt.move(ft),Pt=Pt.Sd();Pt.next();){var Bt=Pt.value;Bt.fromSpot=Ta,Bt.toSpot=Va}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+rt),Pt.move(ft),Pt=Pt.Sd();Pt.next();)Bt=Pt.value,Bt.fromSpot=Va,Bt.toSpot=Ta;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+rt),Pt.move(ft),Pt=Pt.Sd();Pt.next();)Bt=Pt.value,Bt.fromSpot=Va,Bt.toSpot=Ta;else for(ft.h(a.bounds.x+a.commentMargin-bt.width,a.bounds.y+rt),Pt.move(ft),Pt=Pt.Sd();Pt.next();)Bt=Pt.value,Bt.fromSpot=Ta,Bt.toSpot=Va;rt=0<=a.commentSpacing?rt+(bt.height+a.commentSpacing):rt+(a.commentSpacing-bt.height)}else{if(135<E&&!z||!x&&ot)if(0<=a.commentMargin)for(ft.h(a.bounds.x+rt,a.bounds.y-a.commentMargin-bt.height),Pt.move(ft),Pt=Pt.Sd();Pt.next();)Bt=Pt.value,Bt.fromSpot=va,Bt.toSpot=$a;else for(ft.h(a.bounds.x+rt,a.bounds.y+2*a.focus.y-a.commentMargin),Pt.move(ft),Pt=Pt.Sd();Pt.next();)Bt=Pt.value,Bt.fromSpot=$a,Bt.toSpot=va;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+rt,a.bounds.y+2*a.focus.y+a.commentMargin),Pt.move(ft),Pt=Pt.Sd();Pt.next();)Bt=Pt.value,Bt.fromSpot=$a,Bt.toSpot=va;else for(ft.h(a.bounds.x+rt,a.bounds.y+a.commentMargin-bt.height),Pt.move(ft),Pt=Pt.Sd();Pt.next();)Bt=Pt.value,Bt.fromSpot=va,Bt.toSpot=$a;rt=0<=a.commentSpacing?rt+(bt.width+a.commentSpacing):rt+(a.commentSpacing-bt.width)}}if($t.free(ft),y=rt-a.commentSpacing-(b?y.height:y.width),this.ud===Ih)for(a=a.destinationEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.toEndSegmentLength=0<y?y:NaN)}},Oo.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case z0:ux(this,a);break;case Yp:if(a.alignment===Ah)ux(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=dc(x)),b=ky(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!b?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&b?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var E=Bu(a);y=E===90||E===270;var z=0,tt=a.children,ot=tt.length;for(x=0;x<ot;x++)b=tt[x],z=Math.max(z,y?b.Da.width:b.Da.height);var rt=a.alignment;b=rt===Bh;var lt=rt===Dh,ut=dc(rt),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var yt=a.nodeSpacing,Pt=this.computeNodeIndent(a),bt=a.rowSpacing,Bt=0;(b||lt||a.hm||a.im&&a.maxGenerationCount===1)&&(Bt=Math.max(0,a.rowIndent)),b=a.width;var Jt=a.height,Gt=0,se=0,ue=0,ge=null,be=null,We=0,Un=0,pi=0,ui=0,zn=0,xn=0,eo=0,_i=0;if(ut&&!Kp(rt)&&135<E&&tt.reverse(),Kp(rt))if(1<ot)for(var nr=0;nr<ot;nr++)nr%2===0&&nr!==ot-1&&(_i=Math.max(_i,y?tt[nr].Da.width:tt[nr].Da.height));else ot===1&&(_i=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(rt){case Od:se=135>E?hx(this,a,tt,_i,Gt,se):dx(this,a,tt,_i,Gt,se),_i=se.x,Gt=se.width,se=se.height;break;case Fd:for(ge=0;ge<ot;ge++)be=tt[ge],ft=be.Da,ue=xn===0?0:bt,y?(be.S.h(z-ft.width,ui+ue),Gt=Math.max(Gt,ft.width),se=Math.max(se,ui+ue+ft.height),ui+=ue+ft.height):(be.S.h(pi+ue,z-ft.height),Gt=Math.max(Gt,pi+ue+ft.width),se=Math.max(se,ft.height),pi+=ue+ft.width),xn++;break;case id:for(ge=0;ge<ot;ge++)be=tt[ge],z=be.Da,ft=xn===0?0:bt,y?(be.S.h(yt/2+a.focus.x,ui+ft),Gt=Math.max(Gt,z.width),se=Math.max(se,ui+ft+z.height),ui+=ft+z.height):(be.S.h(pi+ft,yt/2+a.focus.y),Gt=Math.max(Gt,pi+ft+z.width),se=Math.max(se,z.height),pi+=ft+z.width),xn++}ge=Pl(this,2),be=Pl(this,2),y?(ge[0].h(0,0),ge[1].h(0,se),be[0].h(Gt,0)):(ge[0].h(0,0),ge[1].h(Gt,0),be[0].h(0,se)),be[1].h(Gt,se)}else for(nr=0;nr<ot;nr++){var Er=tt[nr],Qa=Er.Da;if(y){0<ft&&0<xn&&pi+yt+Qa.width>ft&&(pi<z&&Xc(a,rt,z-pi,0,eo,nr-1),zn++,xn=0,eo=nr,ue=se,pi=0,ui=135<E?-se-bt:se+bt),D0(this,Er,0,ui);var is=0;if(xn===0)ge=Er.Yo,be=Er.kp,We=Qa.width,Un=Qa.height,(ge===null||be===null||E!==Bu(Er))&&(ge=Pl(this,2),be=Pl(this,2),ge[0].h(0,0),ge[1].h(0,Un),be[0].h(We,0),be[1].h(We,Un));else{var Hs=Rn();Un=cx(this,a,Er,ge,be,We,Un,Hs),is=Un.x,ge=Hs[0],be=Hs[1],We=Un.width,Un=Un.height,ni(Hs),pi<Qa.width&&0>is&&(Tf(a,-is,0,eo,nr-1),A0(ge,-is,0),A0(be,-is,0),is=0)}Er.S.h(is,ui),Gt=Math.max(Gt,We),se=Math.max(se,ue+(zn===0?0:bt)+Qa.height),pi=We}else 0<ft&&0<xn&&ui+yt+Qa.height>ft&&(ui<z&&Xc(a,rt,0,z-ui,eo,nr-1),zn++,xn=0,eo=nr,ue=Gt,ui=0,pi=135<E?-Gt-bt:Gt+bt),D0(this,Er,pi,0),is=0,xn===0?(ge=Er.Yo,be=Er.kp,We=Qa.width,Un=Qa.height,(ge===null||be===null||E!==Bu(Er))&&(ge=Pl(this,2),be=Pl(this,2),ge[0].h(0,0),ge[1].h(We,0),be[0].h(0,Un),be[1].h(We,Un))):(Hs=Rn(),Un=cx(this,a,Er,ge,be,We,Un,Hs),is=Un.x,ge=Hs[0],be=Hs[1],We=Un.width,Un=Un.height,ni(Hs),ui<Qa.height&&0>is&&(Tf(a,0,-is,eo,nr-1),A0(ge,0,-is),A0(be,0,-is),is=0)),Er.S.h(pi,is),se=Math.max(se,Un),Gt=Math.max(Gt,ue+(zn===0?0:bt)+Qa.width),ui=Un;xn++}switch(0<zn&&(y?(se+=Math.max(0,x),pi<Gt&&Xc(a,rt,Gt-pi,0,eo,ot-1),0<Bt&&(lt||Tf(a,Bt,0,0,ot-1),Gt+=Bt)):(Gt+=Math.max(0,x),ui<se&&Xc(a,rt,0,se-ui,eo,ot-1),0<Bt&&(lt||Tf(a,0,Bt,0,ot-1),se+=Bt))),Bt=lt=0,rt){case Fg:y?lt+=Gt/2-a.focus.x-Pt/2:Bt+=se/2-a.focus.y-Pt/2;break;case Ff:0<zn?y?lt+=Gt/2-a.focus.x-Pt/2:Bt+=se/2-a.focus.y-Pt/2:y?(_i=tt[0].S.x+tt[0].la.x,lt+=_i+(tt[ot-1].S.x+tt[ot-1].la.x+2*tt[ot-1].focus.x-_i)/2-a.focus.x-Pt/2):(_i=tt[0].S.y+tt[0].la.y,Bt+=_i+(tt[ot-1].S.y+tt[ot-1].la.y+2*tt[ot-1].focus.y-_i)/2-a.focus.y-Pt/2);break;case Bh:y?(lt-=Pt,Gt+=Pt):(Bt-=Pt,se+=Pt);break;case Dh:y?(lt+=Gt-a.width+Pt,Gt+=Pt):(Bt+=se-a.height+Pt,se+=Pt);break;case Od:y?1<ot?lt+=_i+yt/2-a.focus.x:lt+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<ot?Bt+=_i+yt/2-a.focus.y:Bt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Fd:y?lt+=Gt+yt/2-a.focus.x:Bt+=se+yt/2-a.focus.y;break;case id:break;default:se=this.customAlignment(a,lt,Bt,Gt,se),lt=se[0],Bt=se[1],Gt=se[2],se=se[3]}for(Pt=0;Pt<ot;Pt++)_i=tt[Pt],y?_i.S.h(_i.S.x+_i.la.x-lt,_i.S.y+(135<E?(ut?-se:-_i.Da.height)+_i.la.y-x:Jt+x+_i.la.y)):_i.S.h(_i.S.x+(135<E?(ut?-Gt:-_i.Da.width)+_i.la.x-x:b+x+_i.la.x),_i.S.y+_i.la.y-Bt);if(ot=tt=0,ut?y?(Gt=Ny(a,Gt,lt),0>lt&&(lt=0),135<E&&(Bt+=se+x),se+=Jt+x,rt===id&&(tt+=yt/2+a.focus.x),ot+=Jt+x):(135<E&&(lt+=Gt+x),Gt+=b+x,se=Ty(a,se,Bt),0>Bt&&(Bt=0),rt===id&&(ot+=yt/2+a.focus.y),tt+=b+x):y?(a.comments===null?b>Gt&&(Gt=Oy(rt,b-Gt,0),tt=Gt.x,ot=Gt.y,Gt=b,lt=0):Gt=Ny(a,Gt,lt),0>lt&&(tt-=lt,lt=0),135<E&&(Bt+=se+x),se=Math.max(Math.max(se,Jt),se+Jt+x),ot+=Jt+x):(135<E&&(lt+=Gt+x),Gt=Math.max(Math.max(Gt,b),Gt+b+x),a.comments===null?Jt>se&&(se=Oy(rt,0,Jt-se),tt=se.x,ot=se.y,se=Jt,Bt=0):se=Ty(a,se,Bt),0>Bt&&(ot-=Bt,Bt=0),tt+=b+x),0<zn)E=Pl(this,4),zn=Pl(this,4),y?(E[2].h(0,Jt+x),E[3].h(E[2].x,se),zn[2].h(Gt,E[2].y),zn[3].h(zn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Gt,E[2].y),zn[2].h(E[2].x,se),zn[3].h(E[3].x,zn[2].y));else{for(E=Pl(this,ge.length+2),zn=Pl(this,be.length+2),rt=0;rt<ge.length;rt++)ut=ge[rt],E[rt+2].h(ut.x+tt,ut.y+ot);for(rt=0;rt<be.length;rt++)ut=be[rt],zn[rt+2].h(ut.x+tt,ut.y+ot)}y?(E[0].h(lt,0),E[1].h(E[0].x,Jt),E[2].y<E[1].y&&(E[2].x>E[0].x?E[2].assign(E[1]):E[1].assign(E[2])),E[3].y<E[2].y&&(E[3].x>E[0].x?E[3].assign(E[2]):E[2].assign(E[3])),zn[0].h(lt+b,0),zn[1].h(zn[0].x,Jt),zn[2].y<zn[1].y&&(zn[2].x<zn[0].x?zn[2].assign(zn[1]):zn[1].assign(zn[2])),zn[3].y<zn[2].y&&(zn[3].x<zn[0].x?zn[3].assign(zn[2]):zn[2].assign(zn[3])),E[2].y-=x/2,zn[2].y-=x/2):(E[0].h(0,Bt),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),zn[0].h(0,Bt+Jt),zn[1].h(b,zn[0].y),zn[2].x<zn[1].x&&(zn[2].y<zn[0].y?zn[2].assign(zn[1]):zn[1].assign(zn[2])),zn[3].x<zn[2].x&&(zn[3].y<zn[0].y?zn[3].assign(zn[2]):zn[2].assign(zn[3])),E[2].x-=x/2,zn[2].x-=x/2),Ju(this,ge),Ju(this,be),a.Yo=E,a.kp=zn,a.la.h(lt,Bt),a.Da.h(Gt,se)}break;default:_t("Unhandled compaction value "+a.compaction.toString())}}};function ux(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=dc(x));var E=ky(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(b!==180&&b!==270||x)&&!E?y.la.h(0,0):b===180&&!x||(b===90||b===270)&&E?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{b=Bu(y),x=b===90||b===270;var z=0;E=y.children;for(var tt=E.length,ot=0;ot<tt;ot++){var rt=E[ot];z=Math.max(z,x?rt.Da.width:rt.Da.height)}var lt=y.alignment,ut=lt===Bh,ft=lt===Dh;ot=dc(lt);var yt=Math.max(0,y.breadthLimit);rt=a.computeLayerSpacing(y);var Pt=y.nodeSpacing,bt=a.computeNodeIndent(y),Bt=ut||ft?0:bt/2,Jt=y.rowSpacing,Gt=0;(ut||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(Gt=Math.max(0,y.rowIndent)),ut=y.width;var se=y.height,ue=0,ge=0,be=0,We=0,Un=0,pi=0,ui=0,zn=0,xn=0,eo=0;if(ot&&!Kp(lt)&&135<b&&E.reverse(),Kp(lt))if(1<tt)for(var _i=0;_i<tt;_i++){var nr=E[_i],Er=nr.Da;_i%2===0&&_i!==tt-1?xn=Math.max(xn,(x?Er.width:Er.height)+a.computeBusNodeSpacing(nr)-Pt):_i%2!==0&&(eo=Math.max(eo,(x?Er.width:Er.height)+a.computeBusNodeSpacing(nr)-Pt))}else tt===1&&(xn=x?E[0].Da.width:E[0].Da.height);if(ot)switch(lt){case Od:case Ah:ge=135>b?hx(a,y,E,xn,ue,ge):dx(a,y,E,xn,ue,ge),xn=ge.x,ue=ge.width,ge=ge.height;break;case Fd:for(yt=0;yt<tt;yt++)Bt=E[yt],be=Bt.Da,eo=ui===0?0:Jt,x?(Bt.S.h(z-be.width,Un+eo),ue=Math.max(ue,be.width),ge=Math.max(ge,Un+eo+be.height),Un+=eo+be.height):(Bt.S.h(We+eo,z-be.height),ue=Math.max(ue,We+eo+be.width),ge=Math.max(ge,be.height),We+=eo+be.width),ui++;break;case id:for(z=0;z<tt;z++)yt=E[z],Bt=yt.Da,be=ui===0?0:Jt,x?(yt.S.h(Pt/2+y.focus.x,Un+be),ue=Math.max(ue,Bt.width),ge=Math.max(ge,Un+be+Bt.height),Un+=be+Bt.height):(yt.S.h(We+be,Pt/2+y.focus.y),ue=Math.max(ue,We+be+Bt.width),ge=Math.max(ge,Bt.height),We+=be+Bt.width),ui++}else for(eo=0;eo<tt;eo++)_i=E[eo],nr=_i.Da,x?(0<yt&&0<ui&&We+Pt+nr.width>yt&&(We<z&&Xc(y,lt,z-We,0,zn,eo-1),pi++,ui=0,zn=eo,be=ge,We=0,Un=135<b?-ge-Jt:ge+Jt),Er=ui===0?Bt:Pt,D0(a,_i,0,Un),_i.S.h(We+Er,Un),ue=Math.max(ue,We+Er+nr.width),ge=Math.max(ge,be+(pi===0?0:Jt)+nr.height),We+=Er+nr.width):(0<yt&&0<ui&&Un+Pt+nr.height>yt&&(Un<z&&Xc(y,lt,0,z-Un,zn,eo-1),pi++,ui=0,zn=eo,be=ue,Un=0,We=135<b?-ue-Jt:ue+Jt),Er=ui===0?Bt:Pt,D0(a,_i,We,0),_i.S.h(We,Un+Er),ge=Math.max(ge,Un+Er+nr.height),ue=Math.max(ue,be+(pi===0?0:Jt)+nr.width),Un+=Er+nr.height),ui++;switch(0<pi&&(x?(ge+=Math.max(0,rt),We<ue&&Xc(y,lt,ue-We,0,zn,tt-1),0<Gt&&(ft||Tf(y,Gt,0,0,tt-1),ue+=Gt)):(ue+=Math.max(0,rt),Un<ge&&Xc(y,lt,0,ge-Un,zn,tt-1),0<Gt&&(ft||Tf(y,0,Gt,0,tt-1),ge+=Gt))),Gt=ft=0,lt){case Fg:x?ft+=ue/2-y.focus.x-bt/2:Gt+=ge/2-y.focus.y-bt/2;break;case Ff:0<pi?x?ft+=ue/2-y.focus.x-bt/2:Gt+=ge/2-y.focus.y-bt/2:x?(a=E[0].S.x+E[0].la.x,ft+=a+(E[tt-1].S.x+E[tt-1].la.x+2*E[tt-1].focus.x-a)/2-y.focus.x-bt/2):(a=E[0].S.y+E[0].la.y,Gt+=a+(E[tt-1].S.y+E[tt-1].la.y+2*E[tt-1].focus.y-a)/2-y.focus.y-bt/2);break;case Bh:x?(ft-=bt,ue+=bt):(Gt-=bt,ge+=bt);break;case Dh:x?(ft+=ue-y.width+bt,ue+=bt):(Gt+=ge-y.height+bt,ge+=bt);break;case Od:case Ah:x?1<tt?ft+=xn+Pt/2-y.focus.x:ft+=E[0].focus.x-y.focus.x+E[0].la.x:1<tt?Gt+=xn+Pt/2-y.focus.y:Gt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Fd:x?ft+=ue+Pt/2-y.focus.x:Gt+=ge+Pt/2-y.focus.y;break;case id:break;default:a=a.customAlignment(y,ft,Gt,ue,ge),ft=a[0],Gt=a[1],ue=a[2],ge=a[3]}for(a=0;a<tt;a++)bt=E[a],x?bt.S.h(bt.S.x+bt.la.x-ft,bt.S.y+(135<b?(ot?-ge:-bt.Da.height)+bt.la.y-rt:se+rt+bt.la.y)):bt.S.h(bt.S.x+(135<b?(ot?-ue:-bt.Da.width)+bt.la.x-rt:ut+rt+bt.la.x),bt.S.y+bt.la.y-Gt);x?(ue=Ny(y,ue,ft),0>ft&&(ft=0),135<b&&(Gt+=ge+rt),ge=Math.max(Math.max(ge,se),ge+se+rt)):(135<b&&(ft+=ue+rt),ue=Math.max(Math.max(ue,ut),ue+ut+rt),ge=Ty(y,ge,Gt),0>Gt&&(Gt=0)),y.la.h(ft,Gt),y.Da.h(ue,ge)}}Oo.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function hx(a,y,x,b,E,z){var tt=x.length;if(tt===0)return new an(b,0,E,z);if(tt===1)return y=x[0],E=y.Da.width,z=y.Da.height,new an(b,0,E,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,lt=Bu(y)===90,ut=0,ft=0,yt=0,Pt=0;Pt<tt;Pt++)if(!(Pt%2!==0||1<tt&&Pt===tt-1)){var bt=x[Pt],Bt=bt.Da,Jt=ut===0?0:rt;if(lt){var Gt=a.computeBusNodeSpacing(bt)-ot;bt.S.h(b-(Bt.width+Gt),yt+Jt),E=Math.max(E,Bt.width+Gt),z=Math.max(z,yt+Jt+Bt.height),yt+=Jt+Bt.height}else Gt=a.computeBusNodeSpacing(bt)-ot,bt.S.h(ft+Jt,b-(Bt.height+Gt)),z=Math.max(z,Bt.height+Gt),E=Math.max(E,ft+Jt+Bt.width),ft+=Jt+Bt.width;ut++}for(ut=0,bt=ft,Pt=yt,lt?(ft=b+ot,yt=0):(ft=0,yt=b+ot),Bt=0;Bt<tt;Bt++)if(Bt%2!==0){Jt=x[Bt],Gt=Jt.Da;var se=ut===0?0:rt;if(lt){var ue=a.computeBusNodeSpacing(Jt)-ot;Jt.S.h(ft+ue,yt+se),E=Math.max(E,ft+Gt.width+ue),z=Math.max(z,yt+se+Gt.height),yt+=se+Gt.height}else ue=a.computeBusNodeSpacing(Jt)-ot,Jt.S.h(ft+se,yt+ue),E=Math.max(E,ft+se+Gt.width),z=Math.max(z,yt+Gt.height+ue),ft+=se+Gt.width;ut++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,lt?Math.max(Math.abs(Pt),Math.abs(yt)):Math.max(Math.abs(bt),Math.abs(ft))),lt?(x.S.h(b+ot/2-x.focus.x-x.la.x,z+a),lt=b+ot/2-x.focus.x-x.la.x,E=Math.max(E,lt+tt.width),0>lt&&(E-=lt),z=Math.max(z,Math.max(Pt,yt)+a+tt.height),0>x.S.x&&(b=B0(y,x.S.x,!1,b,ot))):(x.S.h(E+a,b+ot/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(bt,ft)+a+tt.width),yt=b+ot/2-x.focus.y-x.la.y,z=Math.max(z,yt+tt.height),0>yt&&(z-=yt),0>x.S.y&&(b=B0(y,x.S.y,!0,b,ot)))),new an(b,0,E,z)}function dx(a,y,x,b,E,z){var tt=x.length;if(tt===0)return new an(b,0,E,z);if(tt===1)return x=x[0],E=x.Da.width,z=x.Da.height,new an(b,0,E,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,lt=Bu(y)===270,ut=0,ft=0,yt=0,Pt=0;Pt<tt;Pt++)if(!(Pt%2!==0||1<tt&&Pt===tt-1)){var bt=x[Pt],Bt=bt.Da,Jt=ut===0?0:rt;if(lt){var Gt=a.computeBusNodeSpacing(bt)-ot;yt-=Jt+Bt.height,bt.S.h(b-(Bt.width+Gt),yt),E=Math.max(E,Bt.width+Gt),z=Math.max(z,Math.abs(yt))}else Gt=a.computeBusNodeSpacing(bt)-ot,ft-=Jt+Bt.width,bt.S.h(ft,b-(Bt.height+Gt)),z=Math.max(z,Bt.height+Gt),E=Math.max(E,Math.abs(ft));ut++}for(ut=0,bt=ft,Pt=yt,lt?(ft=b+ot,yt=0):(ft=0,yt=b+ot),Bt=0;Bt<tt;Bt++)if(Bt%2!==0){Jt=x[Bt],Gt=Jt.Da;var se=ut===0?0:rt;if(lt){var ue=a.computeBusNodeSpacing(Jt)-ot;yt-=se+Gt.height,Jt.S.h(ft+ue,yt),E=Math.max(E,ft+Gt.width+ue),z=Math.max(z,Math.abs(yt))}else ue=a.computeBusNodeSpacing(Jt)-ot,ft-=se+Gt.width,Jt.S.h(ft,yt+ue),z=Math.max(z,yt+Gt.height+ue),E=Math.max(E,Math.abs(ft));ut++}for(1<tt&&tt%2===1&&(rt=x[tt-1],ut=rt.Da,a=a.computeBusLastRowSpacing(rt,lt?Math.max(Math.abs(Pt),Math.abs(yt)):Math.max(Math.abs(bt),Math.abs(ft))),lt?(rt.S.h(b+ot/2-rt.focus.x-rt.la.x,-z-ut.height-a),ft=b+ot/2-rt.focus.x-rt.la.x,E=Math.max(E,ft+ut.width),0>ft&&(E-=ft),z=Math.max(z,Math.abs(Math.min(Pt,yt))+a+ut.height),0>rt.S.x&&(b=B0(y,rt.S.x,!1,b,ot))):(rt.S.h(-E-ut.width-a,b+ot/2-rt.focus.y-rt.la.y),E=Math.max(E,Math.abs(Math.min(bt,ft))+a+ut.width),yt=b+ot/2-rt.focus.y-rt.la.y,z=Math.max(z,yt+ut.height),0>yt&&(z-=yt),0>rt.S.y&&(b=B0(y,rt.S.y,!0,b,ot)))),y=0;y<tt;y++)ot=x[y],lt?ot.S.h(ot.S.x,ot.S.y+z):ot.S.h(ot.S.x+E,ot.S.y);return new an(b,0,E,z)}Oo.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Oo.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function B0(a,y,x,b,E){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Ny(a,y,x){switch(a.alignment){case Ff:case Fg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Bh:return a.width>y?a.width:y;case Dh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Od:case Ah:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Fd:return a.width-a.focus.x+a.nodeSpacing/2+y;case id:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ty(a,y,x){switch(a.alignment){case Ff:case Fg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Bh:return a.height>y?a.height:y;case Dh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Od:case Ah:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Fd:return a.height-a.focus.y+a.nodeSpacing/2+y;case id:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Oy(a,y,x){switch(a){case Fg:y/=2,x/=2;break;case Ff:y/=2,x/=2;break;case Bh:x=y=0;break;case Dh:break;default:_t("Unhandled alignment value "+a.toString())}return new $t(y,x)}function Xc(a,y,x,b,E,z){y=Oy(y,x,b),Tf(a,y.x,y.y,E,z)}function Tf(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var z=a[b].S;z.x+=y,z.y+=x}}function D0(a,y,x,b){var E=y.parent;switch(a.ud){case Ih:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Of:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:_t("Unhandled path value "+a.ud.toString())}}function A0(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function cx(a,y,x,b,E,z,tt,ot){var rt=Bu(y),lt=rt===90||rt===270,ut=y.nodeSpacing;y=b;var ft=E;b=z;var yt=tt,Pt=x.Yo,bt=x.kp;tt=x.Da;var Bt=lt?Math.max(yt,tt.height):Math.max(b,tt.width);if((Pt===null||rt!==Bu(x))&&(Pt=Pl(a,2),bt=Pl(a,2),lt?(Pt[0].h(0,0),Pt[1].h(0,tt.height),bt[0].h(tt.width,0),bt[1].h(bt[0].x,Pt[1].y)):(Pt[0].h(0,0),Pt[1].h(tt.width,0),bt[0].h(0,tt.height),bt[1].h(Pt[1].x,bt[0].y))),lt){if(yt=9999999,!(ft===null||2>ft.length||Pt===null||2>Pt.length))for(E=x=0;x<ft.length&&E<Pt.length;){z=ft[x];var Jt=Pt[E];rt=Jt.x,lt=Jt.y,rt+=b;var Gt=z;x+1<ft.length&&(Gt=ft[x+1]);var se=Jt;Jt=se.x,se=se.y,E+1<Pt.length&&(se=Pt[E+1],Jt=se.x,se=se.y,Jt+=b);var ue=yt;z.y===lt?ue=rt-z.x:z.y>lt&&z.y<se?ue=rt+(z.y-lt)/(se-lt)*(Jt-rt)-z.x:lt>z.y&<<Gt.y&&(ue=rt-(z.x+(lt-z.y)/(Gt.y-z.y)*(Gt.x-z.x))),ue<yt&&(yt=ue),Gt.y<=z.y?x++:se<=lt?E++:(Gt.y<=se&&x++,se<=Gt.y&&E++)}if(yt=b-yt,yt+=ut,x=Pt,E=yt,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ut=Pl(a,y.length+x.length),b=z=rt=0;z<x.length&&x[z].y<y[0].y;)lt=x[z++],ut[b++].h(lt.x+E,lt.y);for(;rt<y.length;)lt=y[rt++],ut[b++].h(lt.x,lt.y);for(rt=y[y.length-1].y;z<x.length&&x[z].y<=rt;)z++;for(;z<x.length&&x[z].y>rt;)lt=x[z++],ut[b++].h(lt.x+E,lt.y);for(x=Pl(a,b),rt=0;rt<b;rt++)x[rt].assign(ut[rt]);Ju(a,ut),b=x}if(z=bt,rt=yt,ft===null||2>ft.length||z===null||2>z.length)E=null;else{for(ut=Pl(a,ft.length+z.length),E=lt=x=0;x<ft.length&&ft[x].y<z[0].y;)Gt=ft[x++],ut[E++].h(Gt.x,Gt.y);for(;lt<z.length;)Gt=z[lt++],ut[E++].h(Gt.x+rt,Gt.y);for(z=z[z.length-1].y;x<ft.length&&ft[x].y<=z;)x++;for(;x<ft.length&&ft[x].y>z;)rt=ft[x++],ut[E++].h(rt.x,rt.y);for(z=Pl(a,E),x=0;x<E;x++)z[x].assign(ut[x]);Ju(a,ut),E=z}return z=Math.max(0,yt)+tt.width,tt=Bt,Ju(a,y),Ju(a,Pt),Ju(a,ft),Ju(a,bt),ot[0]=b,ot[1]=E,new an(yt,0,z,tt)}if(b=9999999,!(ft===null||2>ft.length||Pt===null||2>Pt.length))for(E=x=0;x<ft.length&&E<Pt.length;)z=ft[x],Jt=Pt[E],rt=Jt.x,lt=Jt.y,lt+=yt,Gt=z,x+1<ft.length&&(Gt=ft[x+1]),se=Jt,Jt=se.x,se=se.y,E+1<Pt.length&&(se=Pt[E+1],Jt=se.x,se=se.y,se+=yt),ue=b,z.x===rt?ue=lt-z.y:z.x>rt&&z.x<Jt?ue=lt+(z.x-rt)/(Jt-rt)*(se-lt)-z.y:rt>z.x&&rt<Gt.x&&(ue=lt-(z.y+(rt-z.x)/(Gt.x-z.x)*(Gt.y-z.y))),ue<b&&(b=ue),Gt.x<=z.x?x++:Jt<=rt?E++:(Gt.x<=Jt&&x++,Jt<=Gt.x&&E++);if(yt-=b,yt+=ut,x=Pt,E=yt,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ut=Pl(a,y.length+x.length),b=z=rt=0;z<x.length&&x[z].x<y[0].x;)lt=x[z++],ut[b++].h(lt.x,lt.y+E);for(;rt<y.length;)lt=y[rt++],ut[b++].h(lt.x,lt.y);for(rt=y[y.length-1].x;z<x.length&&x[z].x<=rt;)z++;for(;z<x.length&&x[z].x>rt;)lt=x[z++],ut[b++].h(lt.x,lt.y+E);for(x=Pl(a,b),rt=0;rt<b;rt++)x[rt].assign(ut[rt]);Ju(a,ut),b=x}if(z=bt,rt=yt,ft===null||2>ft.length||z===null||2>z.length)E=null;else{for(ut=Pl(a,ft.length+z.length),E=lt=x=0;x<ft.length&&ft[x].x<z[0].x;)Gt=ft[x++],ut[E++].h(Gt.x,Gt.y);for(;lt<z.length;)Gt=z[lt++],ut[E++].h(Gt.x,Gt.y+rt);for(z=z[z.length-1].x;x<ft.length&&ft[x].x<=z;)x++;for(;x<ft.length&&ft[x].x>z;)rt=ft[x++],ut[E++].h(rt.x,rt.y);for(z=Pl(a,E),x=0;x<E;x++)z[x].assign(ut[x]);Ju(a,ut),E=z}return z=Bt,tt=Math.max(0,yt)+tt.height,Ju(a,y),Ju(a,Pt),Ju(a,ft),Ju(a,bt),ot[0]=b,ot[1]=E,new an(yt,0,z,tt)}function Pl(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 $t;return a}function Ju(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Oo.prototype.arrangeTrees=function(){if(this.Rb===G0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof xu){var x=y.node;if(x!==null){var b=x.position;x=b.x,b=b.y,isFinite(x)||(x=0),isFinite(b)||(b=0),Fy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof xu&&a.push(x);switch(this.sorting){case Og:break;case _p:a.reverse();break;case Vp:a.sort(this.comparer);break;case Up:a.sort(this.comparer),a.reverse();break;default:_t("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(Fy(this,E,y+E.la.x,x+E.la.y),this.Rb){case H0:x+=E.Da.height+this.$d.height;break;case Ay:y+=E.Da.width+this.$d.width;break;default:_t("Unhandled arrangement value "+this.Rb.toString())}}}};function Fy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,z=0;z<E;z++){var tt=y[z];Fy(a,tt,x+tt.S.x,b+tt.S.y)}}}Oo.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Oo.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Oo.prototype.Gu=function(){if(this.layerStyle===$0){for(var a=this.$v,y=[],x=null,b=this.network.vertexes.iterator;b.next();){var E=b.value;x===null?x=E.bounds.copy():x.ed(E.bounds);var z=y[E.level];z===void 0?z=this.computeLayerSpacing(E):z=Math.max(z,this.computeLayerSpacing(E)),y[E.level]=z}for(b=0;b<y.length;b++)y[b]===void 0&&(y[b]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),b=new $t(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new $t(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var ot=a[tt]+y[tt];this.angle===270?(z-=ot,E.push(new an(0,z,x,ot))):this.angle===90?(E.push(new an(0,z,x,ot)),z+=ot):this.angle===180?(z-=ot,E.push(new an(z,0,ot,x))):(E.push(new an(z,0,ot,x)),z+=ot)}this.commitLayers(E,b)}},Oo.prototype.commitLayers=function(){},Oo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Oo.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof xu&&fx(this,y)}};function fx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)fx(a,y[b])}}Oo.prototype.setPortSpots=function(a){var y=a.alignment;if(dc(y)){var x=this.ud===Ih,b=Bu(a);switch(b){case 0:var E=Va;break;case 90:E=$a;break;case 180:E=Ta;break;default:E=va}var z=a.children,tt=z.length;switch(y){case Od:case Ah:for(y=0;y<tt;y++){var ot=z[y];if(ot=(x?ot.sourceEdges:ot.destinationEdges).first(),ot!==null&&(ot=ot.link,ot!==null)){var rt=b===90||b===270?Ta:va;if(tt===1||y===tt-1&&tt%2===1)switch(b){case 0:rt=Ta;break;case 90:rt=va;break;case 180:rt=Va;break;default:rt=$a}else y%2===0&&(rt=b===90||b===270?Va:$a);x?(a.setsPortSpot&&(ot.fromSpot=E),a.setsChildPortSpot&&(ot.toSpot=rt)):(a.setsPortSpot&&(ot.fromSpot=rt),a.setsChildPortSpot&&(ot.toSpot=E))}}break;case Fd:for(b=b===90||b===270?Va:$a,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)):(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)));break;case id:for(b=b===90||b===270?Ta:va,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)):(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)))}}else if(x=Bu(a),this.ud===Ih){for(E=a.destinationEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.fromSpot=Va;break;case 90:b.fromSpot=$a;break;case 180:b.fromSpot=Ta;break;default:b.fromSpot=va}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Ta;break;case 90:b.toSpot=va;break;case 180:b.toSpot=Va;break;default:b.toSpot=$a}else b.toSpot=a.childPortSpot}}else for(E=a.sourceEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.toSpot=Va;break;case 90:b.toSpot=$a;break;case 180:b.toSpot=Ta;break;default:b.toSpot=va}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Ta;break;case 90:b.fromSpot=va;break;case 180:b.fromSpot=Va;break;default:b.fromSpot=$a}else b.fromSpot=a.childPortSpot}};function Bu(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Oo.prototype.computeLayerSpacing=function(a){var y=Bu(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},Oo.prototype.computeNodeIndent=function(a){var y=Bu(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var b=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*b:a.height*b}return x=Math.max(0,x)},Zt.Object.defineProperties(Oo.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!==j0&&a!==By&&a!==Iy&&a!==Dy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==zy&&a!==$0||(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!==H0&&a!==Ay&&a!==G0||(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!==Og&&a!==_p&&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()):_t("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!==z0&&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!==Og&&a!==_p&&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!==z0&&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 en(Oo,"PathDefault",-1),Ih=new en(Oo,"PathDestination",0),Of=new en(Oo,"PathSource",1),Og=new en(Oo,"SortingForwards",10),_p=new en(Oo,"SortingReverse",11),Vp=new en(Oo,"SortingAscending",12),Up=new en(Oo,"SortingDescending",13),Fg=new en(Oo,"AlignmentCenterSubtrees",20),Ff=new en(Oo,"AlignmentCenterChildren",21),Bh=new en(Oo,"AlignmentStart",22),Dh=new en(Oo,"AlignmentEnd",23),Od=new en(Oo,"AlignmentBus",24),Ah=new en(Oo,"AlignmentBusBranching",25),Fd=new en(Oo,"AlignmentTopLeftBus",26),id=new en(Oo,"AlignmentBottomRightBus",27),z0=new en(Oo,"CompactionNone",30),Yp=new en(Oo,"CompactionBlock",31),j0=new en(Oo,"StyleLayered",40),Iy=new en(Oo,"StyleLastParents",41),By=new en(Oo,"StyleAlternating",42),Dy=new en(Oo,"StyleRootOnly",43),H0=new en(Oo,"ArrangementVertical",50),Ay=new en(Oo,"ArrangementHorizontal",51),G0=new en(Oo,"ArrangementFixedRoots",52),Ry=new en(Oo,"LayerIndividual",60),zy=new en(Oo,"LayerSiblings",61),$0=new en(Oo,"LayerUniform",62);Oo.className="TreeLayout",Oo.PathDefault=R0,Oo.PathDestination=Ih,Oo.PathSource=Of,Oo.SortingForwards=Og,Oo.SortingReverse=_p,Oo.SortingAscending=Vp,Oo.SortingDescending=Up,Oo.AlignmentCenterSubtrees=Fg,Oo.AlignmentCenterChildren=Ff,Oo.AlignmentStart=Bh,Oo.AlignmentEnd=Dh,Oo.AlignmentBus=Od,Oo.AlignmentBusBranching=Ah,Oo.AlignmentTopLeftBus=Fd,Oo.AlignmentBottomRightBus=id,Oo.CompactionNone=z0,Oo.CompactionBlock=Yp,Oo.StyleLayered=j0,Oo.StyleLastParents=Iy,Oo.StyleAlternating=By,Oo.StyleRootOnly=Dy,Oo.ArrangementVertical=H0,Oo.ArrangementHorizontal=Ay,Oo.ArrangementFixedRoots=G0,Oo.LayerIndividual=Ry,Oo.LayerSiblings=zy,Oo.LayerUniform=$0;function If(a){kr.call(this,a)}Ae(If,kr),If.prototype.createVertex=function(){return new xu(this)},If.prototype.createEdge=function(){return new Ig(this)},If.className="TreeNetwork";function xu(a){_a.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 $t(0,0),this.Da=new Zn(0,0),this.la=new $t(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Og,this.hd=oy,this.Kb=0,this.Jb=Ff,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=hr,this.wr=!0,this.Dp=hr}Ae(xu,_a),xu.prototype.copyInheritedPropertiesFrom=function(a){a!==null&&(this.nd=a.sorting,this.hd=a.comparer,this.Kb=a.angle,this.Jb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)},Zt.Object.defineProperties(xu.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)}}}),xu.className="TreeVertex";function Ig(a){Ol.call(this,a),this.$t=new $t(0,0)}Ae(Ig,Ol),Ig.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,b=null;switch(y.ud){case Ih:x=this.fromVertex,b=this.toVertex;break;case Of:x=this.toVertex,b=this.fromVertex;break;default:_t("Unhandled path value "+y.ud.toString())}if(x!==null&&b!==null){var E=this.$t;if(E.x!==0||E.y!==0||x.qA){b=x.bounds;var z=Bu(x),tt=y.computeLayerSpacing(x),ot=x.rowSpacing;a.vg();var rt=a.curve===Xl,lt=a.isOrthogonal,ut;if(a.uh(),lt||rt){for(ut=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),yt=a.i(2)}else{for(ut=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),yt=a.i(a.pointsCount-1)}var Pt=a.i(a.pointsCount-1);z===0?(x.alignment===Dh?(z=b.bottom+E.y,E.y===0&&ft.y>Pt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Bh?(z=b.top+E.y,E.y===0&&ft.y<Pt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,rt?(a.m(ut,ft.x,z),ut++,a.m(ut,b.right+tt,z),ut++,a.m(ut,b.right+tt+(E.x-ot)/3,z),ut++,a.m(ut,b.right+tt+2*(E.x-ot)/3,z),ut++,a.m(ut,b.right+tt+(E.x-ot),z),ut++,a.m(ut,yt.x,z)):(lt&&(a.m(ut,b.right+tt/2,ft.y),ut++),a.m(ut,b.right+tt/2,z),ut++,a.m(ut,b.right+tt+E.x-(lt?ot/2:ot),z),ut++,lt&&a.m(ut,a.i(ut-1).x,yt.y))):z===90?(x.alignment===Dh?(z=b.right+E.x,E.x===0&&ft.x>Pt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Bh?(z=b.left+E.x,E.x===0&&ft.x<Pt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,rt?(a.m(ut,z,ft.y),ut++,a.m(ut,z,b.bottom+tt),ut++,a.m(ut,z,b.bottom+tt+(E.y-ot)/3),ut++,a.m(ut,z,b.bottom+tt+2*(E.y-ot)/3),ut++,a.m(ut,z,b.bottom+tt+(E.y-ot)),ut++,a.m(ut,z,yt.y)):(lt&&(a.m(ut,ft.x,b.bottom+tt/2),ut++),a.m(ut,z,b.bottom+tt/2),ut++,a.m(ut,z,b.bottom+tt+E.y-(lt?ot/2:ot)),ut++,lt&&a.m(ut,yt.x,a.i(ut-1).y))):z===180?(x.alignment===Dh?(z=b.bottom+E.y,E.y===0&&ft.y>Pt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Bh?(z=b.top+E.y,E.y===0&&ft.y<Pt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,rt?(a.m(ut,ft.x,z),ut++,a.m(ut,b.left-tt,z),ut++,a.m(ut,b.left-tt+(E.x+ot)/3,z),ut++,a.m(ut,b.left-tt+2*(E.x+ot)/3,z),ut++,a.m(ut,b.left-tt+(E.x+ot),z),ut++,a.m(ut,yt.x,z)):(lt&&(a.m(ut,b.left-tt/2,ft.y),ut++),a.m(ut,b.left-tt/2,z),ut++,a.m(ut,b.left-tt+E.x+(lt?ot/2:ot),z),ut++,lt&&a.m(ut,a.i(ut-1).x,yt.y))):z===270?(x.alignment===Dh?(z=b.right+E.x,E.x===0&&ft.x>Pt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Bh?(z=b.left+E.x,E.x===0&&ft.x<Pt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,rt?(a.m(ut,z,ft.y),ut++,a.m(ut,z,b.top-tt),ut++,a.m(ut,z,b.top-tt+(E.y+ot)/3),ut++,a.m(ut,z,b.top-tt+2*(E.y+ot)/3),ut++,a.m(ut,z,b.top-tt+(E.y+ot)),ut++,a.m(ut,z,yt.y)):(lt&&(a.m(ut,ft.x,b.top-tt/2),ut++),a.m(ut,z,b.top-tt/2),ut++,a.m(ut,z,b.top-tt+E.y+(lt?ot/2:ot)),ut++,lt&&a.m(ut,yt.x,a.i(ut-1).y))):_t("Invalid angle "+z),a.zf()}else E=b,a=this.link,b=this.network.layout,y=Bu(x),y!==Bu(E)&&(tt=b.computeLayerSpacing(x),ot=x.bounds,x=E.bounds,y===0&&x.left-ot.right<tt+1||y===90&&x.top-ot.bottom<tt+1||y===180&&ot.left-x.right<tt+1||y===270&&ot.top-x.bottom<tt+1||(a.vg(),x=a.curve===Xl,E=a.isOrthogonal,b=dc(this.fromVertex.alignment),a.uh(),y===0?(y=ot.right+tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=ot.bottom+tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=ot.left-tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=ot.top-tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},Zt.Object.defineProperties(Ig.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)}}}),Ig.className="TreeEdge",jr.prototype.initializeStandardTools=function(){this.gb("Action",new po,this.mouseDownTools),this.gb("Relinking",new bi,this.mouseDownTools),this.gb("LinkReshaping",new Mi,this.mouseDownTools),this.gb("Rotating",new Io,this.mouseDownTools),this.gb("Resizing",new ro,this.mouseDownTools),this.gb("Linking",new ii,this.mouseMoveTools),this.gb("Dragging",new Ur,this.mouseMoveTools),this.gb("DragSelecting",new ho,this.mouseMoveTools),this.gb("Panning",new Hi,this.mouseMoveTools),this.gb("ContextMenu",new ir,this.mouseUpTools),this.gb("TextEditing",new Uo,this.mouseUpTools),this.gb("ClickCreating",new To,this.mouseUpTools),this.gb("ClickSelecting",new mr,this.mouseUpTools)},uh("Horizontal",new vm),uh("Spot",new Sm),uh("Table",new Pm),uh("Viewbox",new bm),uh("TableRow",new wm),uh("TableColumn",new Cm),uh("Graduated",new dp),uh("Grid",new hp),ng.add("GraphLinksModel",ns),ng.add("TreeModel",uu);var Z0=ae.go,jy={get licenseKey(){return Ze.licenseKey},set licenseKey(a){Ze.licenseKey=a},get version(){return Ze.version},Group:io,EnumValue:en,List:mn,Set:tn,Map:li,Point:$t,Size:Zn,Rect:an,Margin:vi,Spot:xi,Geometry:$n,PathFigure:Za,PathSegment:Xo,InputEvent:Cs,DiagramEvent:Kh,ChangedEvent:Zr,Model:Ei,GraphLinksModel:jo,TreeModel:tl,Binding:La,Transaction:Ua,UndoManager:Vr,CommandHandler:Xt,Tool:Vo,DraggingTool:Ur,DraggingInfo:Jh,DraggingOptions:at,LinkingBaseTool:Ue,LinkingTool:ii,RelinkingTool:bi,LinkReshapingTool:Mi,ResizingTool:ro,RotatingTool:Io,ClickSelectingTool:mr,ActionTool:po,ClickCreatingTool:To,HTMLInfo:bo,ContextMenuTool:ir,DragSelectingTool:ho,PanningTool:Hi,TextEditingTool:Uo,ToolManager:jr,Animation:la,AnimationManager:ia,AnimationTrigger:kl,Layer:Kr,Diagram:Ze,Palette:ct,Overview:pt,Brush:dr,GraphObject:Ee,Panel:Fn,RowColumnDefinition:ja,Shape:yo,TextBlock:Lr,Picture:cl,Part:Fi,Adornment:Qo,Node:ei,Link:jn,Placeholder:Xs,Layout:$r,LayoutNetwork:kr,LayoutVertex:_a,LayoutEdge:Ol,GridLayout:fs,PanelLayout:Ka,CircularLayout:qr,CircularNetwork:kg,CircularVertex:jp,CircularEdge:C0,ForceDirectedLayout:Ps,ForceDirectedNetwork:Nf,ForceDirectedVertex:Hp,ForceDirectedEdge:Gp,LayeredDigraphLayout:pr,LayeredDigraphNetwork:Tg,LayeredDigraphVertex:du,LayeredDigraphEdge:Wp,TreeLayout:Oo,TreeNetwork:If,TreeVertex:xu,TreeEdge:Ig};typeof Z0=="object"&&Z0.version&&Bn("WARNING: a `go` object on the root object is already defined. "+("Debug"in Z0?"debug ":"")+"version: "+Z0.version+", replaced with version: "+jy.version),Ze.prototype.go=jy,ae.go=jy,typeof En.exports=="object"&&(En.exports=typeof xt.g!="undefined"?xt.g.go:self.go)}();var Ot=typeof xt.g!="undefined"?xt.g.go:self.go;const jt=typeof xt.g!="undefined"?xt.g.go:self.go,Qt=jt.Group,Me=jt.EnumValue,Ut=jt.List,pe=jt.Set,Nt=jt.Map,Ie=jt.Point,we=jt.Size,qt=jt.Rect,ce=jt.Margin,Ce=jt.Spot,Be=jt.Geometry,Tt=jt.PathFigure,et=jt.PathSegment,nt=jt.InputEvent,ht=jt.DiagramEvent,st=jt.ChangedEvent,gt=jt.Model,vt=jt.GraphLinksModel,wt=jt.TreeModel,Ft=jt.Binding,It=jt.Transaction,At=jt.UndoManager,Wt=jt.CommandHandler,re=jt.Tool,ne=jt.DraggingTool,me=jt.DraggingInfo,Vt=jt.LinkingBaseTool,Le=jt.LinkingTool,he=jt.RelinkingTool,Ge=jt.LinkReshapingTool,Ke=jt.ResizingTool,Ve=jt.RotatingTool,sn=jt.ClickSelectingTool,Mn=jt.ActionTool,xe=jt.ClickCreatingTool,Ht=jt.HTMLInfo,Je=jt.ContextMenuTool,Tn=jt.DragSelectingTool,An=jt.PanningTool,ze=jt.TextEditingTool,Te=jt.ToolManager,dn=jt.Animation,Hn=jt.AnimationManager,hn=jt.AnimationTrigger,pn=jt.Layer,de=jt.Diagram,vn=jt.Palette,bn=jt.Overview,Qe=jt.Brush,Pn=jt.GraphObject,Ne=jt.Panel,Pe=jt.RowColumnDefinition,ie=jt.Shape,Dt=jt.TextBlock,fe=jt.TextBlockMetrics,Se=jt.Picture,ee=jt.Part,Kt=jt.Adornment,kt=jt.Node,St=jt.Link,mt=jt.Placeholder,Lt=jt.Layout,zt=jt.LayoutNetwork,Et=jt.LayoutVertex,Yt=jt.LayoutEdge,$e=jt.GridLayout,ln=jt.PanelLayout,qe=jt.CircularLayout,Nn=jt.CircularNetwork,ai=jt.CircularVertex,Kn=jt.CircularEdge,ci=jt.ForceDirectedLayout,Ci=jt.ForceDirectedNetwork,Wi=jt.ForceDirectedVertex,Oi=jt.ForceDirectedEdge,mo=jt.LayeredDigraphLayout,Bo=jt.LayeredDigraphNetwork,Ao=jt.LayeredDigraphVertex,oi=jt.LayeredDigraphEdge,fi=jt.TreeLayout,di=jt.TreeNetwork,mi=jt.TreeVertex,co=jt.TreeEdge,Sn=jt.version},24334:function(En,yn,xt){var Ot,jt;(function(Qt,Me){En.exports=Me(Qt)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof xt.g!="undefined"?xt.g:this,function(Qt){"use strict";Qt=Qt||{};var Me=Qt.Base64,Ut="2.6.4",pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Nt=function(he){for(var Ge={},Ke=0,Ve=he.length;Ke<Ve;Ke++)Ge[he.charAt(Ke)]=Ke;return Ge}(pe),Ie=String.fromCharCode,we=function(he){if(he.length<2){var Ge=he.charCodeAt(0);return Ge<128?he:Ge<2048?Ie(192|Ge>>>6)+Ie(128|Ge&63):Ie(224|Ge>>>12&15)+Ie(128|Ge>>>6&63)+Ie(128|Ge&63)}else{var Ge=65536+(he.charCodeAt(0)-55296)*1024+(he.charCodeAt(1)-56320);return Ie(240|Ge>>>18&7)+Ie(128|Ge>>>12&63)+Ie(128|Ge>>>6&63)+Ie(128|Ge&63)}},qt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ce=function(he){return he.replace(qt,we)},Ce=function(he){var Ge=[0,2,1][he.length%3],Ke=he.charCodeAt(0)<<16|(he.length>1?he.charCodeAt(1):0)<<8|(he.length>2?he.charCodeAt(2):0),Ve=[pe.charAt(Ke>>>18),pe.charAt(Ke>>>12&63),Ge>=2?"=":pe.charAt(Ke>>>6&63),Ge>=1?"=":pe.charAt(Ke&63)];return Ve.join("")},Be=Qt.btoa&&typeof Qt.btoa=="function"?function(he){return Qt.btoa(he)}:function(he){if(he.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return he.replace(/[\s\S]{1,3}/g,Ce)},Tt=function(he){return Be(ce(String(he)))},et=function(he){return he.replace(/[+\/]/g,function(Ge){return Ge=="+"?"-":"_"}).replace(/=/g,"")},nt=function(he,Ge){return Ge?et(Tt(he)):Tt(he)},ht=function(he){return nt(he,!0)},st;Qt.Uint8Array&&(st=function(he,Ge){for(var Ke="",Ve=0,sn=he.length;Ve<sn;Ve+=3){var Mn=he[Ve],xe=he[Ve+1],Ht=he[Ve+2],Je=Mn<<16|xe<<8|Ht;Ke+=pe.charAt(Je>>>18)+pe.charAt(Je>>>12&63)+(typeof xe!="undefined"?pe.charAt(Je>>>6&63):"=")+(typeof Ht!="undefined"?pe.charAt(Je&63):"=")}return Ge?et(Ke):Ke});var gt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,vt=function(he){switch(he.length){case 4:var Ge=(7&he.charCodeAt(0))<<18|(63&he.charCodeAt(1))<<12|(63&he.charCodeAt(2))<<6|63&he.charCodeAt(3),Ke=Ge-65536;return Ie((Ke>>>10)+55296)+Ie((Ke&1023)+56320);case 3:return Ie((15&he.charCodeAt(0))<<12|(63&he.charCodeAt(1))<<6|63&he.charCodeAt(2));default:return Ie((31&he.charCodeAt(0))<<6|63&he.charCodeAt(1))}},wt=function(he){return he.replace(gt,vt)},Ft=function(he){var Ge=he.length,Ke=Ge%4,Ve=(Ge>0?Nt[he.charAt(0)]<<18:0)|(Ge>1?Nt[he.charAt(1)]<<12:0)|(Ge>2?Nt[he.charAt(2)]<<6:0)|(Ge>3?Nt[he.charAt(3)]:0),sn=[Ie(Ve>>>16),Ie(Ve>>>8&255),Ie(Ve&255)];return sn.length-=[0,0,2,1][Ke],sn.join("")},It=Qt.atob&&typeof Qt.atob=="function"?function(he){return Qt.atob(he)}:function(he){return he.replace(/\S{1,4}/g,Ft)},At=function(he){return It(String(he).replace(/[^A-Za-z0-9\+\/]/g,""))},Wt=function(he){return wt(It(he))},re=function(he){return String(he).replace(/[-_]/g,function(Ge){return Ge=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},ne=function(he){return Wt(re(he))},me;Qt.Uint8Array&&(me=function(he){return Uint8Array.from(At(re(he)),function(Ge){return Ge.charCodeAt(0)})});var Vt=function(){var he=Qt.Base64;return Qt.Base64=Me,he};if(Qt.Base64={VERSION:Ut,atob:At,btoa:Be,fromBase64:ne,toBase64:nt,utob:ce,encode:nt,encodeURI:ht,btou:wt,decode:ne,noConflict:Vt,fromUint8Array:st,toUint8Array:me},typeof Object.defineProperty=="function"){var Le=function(he){return{value:he,enumerable:!1,writable:!0,configurable:!0}};Qt.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Le(function(){return ne(this)})),Object.defineProperty(String.prototype,"toBase64",Le(function(he){return nt(this,he)})),Object.defineProperty(String.prototype,"toBase64URI",Le(function(){return nt(this,!0)}))}}return Qt.Meteor&&(Base64=Qt.Base64),En.exports?En.exports.Base64=Qt.Base64:(Ot=[],jt=function(){return Qt.Base64}.apply(yn,Ot),jt!==void 0&&(En.exports=jt)),{Base64:Qt.Base64}})},17115:function(En,yn,xt){"use strict";xt.d(yn,{ZP:function(){return Nt}});var Ot=xt(52487),jt=xt(59301),Qt=xt(47273),Me=0,Ut=(0,Qt.Z)();function pe(){var Ie;return Ut?(Ie=Me,Me+=1):Ie="TEST_OR_SSR",Ie}function Nt(Ie){var we=jt.useState(),qt=(0,Ot.Z)(we,2),ce=qt[0],Ce=qt[1];return jt.useEffect(function(){Ce("rc_select_".concat(pe()))},[]),Ie||ce}},77861:function(En,yn,xt){"use strict";xt.d(yn,{Ac:function(){return Lt},Xo:function(){return Oi},Wx:function(){return Bo},ZP:function(){return fn},lk:function(){return wt}});var Ot=xt(72308),jt=xt(80702),Qt=xt(49618),Me=xt(77321),Ut=xt(52487),pe=xt(74416),Nt=xt(62853),Ie=xt(18929),we=xt(48736),qt=xt(59301),ce=xt(92310),Ce=xt.n(ce),Be=xt(34280),Tt=xt(49658),et=xt(10228),nt=xt(8654),ht=function(ae){var Ye=ae.className,gn=ae.customizeIcon,In=ae.customizeIconProps,Re=ae.onMouseDown,_t=ae.onClick,nn=ae.children,cn;return typeof gn=="function"?cn=gn(In):cn=gn,qt.createElement("span",{className:Ye,onMouseDown:function(Oe){Oe.preventDefault(),Re&&Re(Oe)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:_t,"aria-hidden":!0},cn!==void 0?cn:qt.createElement("span",{className:Ce()(Ye.split(/\s+/).map(function(Bn){return"".concat(Bn,"-icon")}))},nn))},st=ht;function gt(ye,ae,Ye,gn,In){var Re=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,_t=arguments.length>6?arguments[6]:void 0,nn=arguments.length>7?arguments[7]:void 0,cn=qt.useMemo(function(){if((0,Nt.Z)(gn)==="object")return gn.clearIcon;if(In)return In},[gn,In]),Bn=qt.useMemo(function(){return!!(!Re&&gn&&(Ye.length||_t)&&!(nn==="combobox"&&_t===""))},[gn,Re,Ye.length,_t,nn]);return{allowClear:Bn,clearIcon:qt.createElement(st,{className:"".concat(ye,"-clear"),onMouseDown:ae,customizeIcon:cn},"\xD7")}}var vt=qt.createContext(null);function wt(){return qt.useContext(vt)}function Ft(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,ae=qt.useState(!1),Ye=(0,Ut.Z)(ae,2),gn=Ye[0],In=Ye[1],Re=qt.useRef(null),_t=function(){window.clearTimeout(Re.current)};qt.useEffect(function(){return _t},[]);var nn=function(Bn,Oe){_t(),Re.current=window.setTimeout(function(){In(Bn),Oe&&Oe()},ye)};return[gn,nn,_t]}function It(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,ae=qt.useRef(null),Ye=qt.useRef(null);qt.useEffect(function(){return function(){window.clearTimeout(Ye.current)}},[]);function gn(In){(In||ae.current===null)&&(ae.current=In),window.clearTimeout(Ye.current),Ye.current=window.setTimeout(function(){ae.current=null},ye)}return[function(){return ae.current},gn]}function At(ye,ae,Ye,gn){var In=qt.useRef(null);In.current={open:ae,triggerOpen:Ye,customizedTrigger:gn},qt.useEffect(function(){function Re(_t){var nn;if(!((nn=In.current)!==null&&nn!==void 0&&nn.customizedTrigger)){var cn=_t.target;cn.shadowRoot&&_t.composed&&(cn=_t.composedPath()[0]||cn),In.current.open&&ye().filter(function(Bn){return Bn}).every(function(Bn){return!Bn.contains(cn)&&Bn!==cn})&&In.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Re),function(){return window.removeEventListener("mousedown",Re)}},[])}var Wt=xt(26112),re=xt(11780),ne=function(ae,Ye){var gn,In,Re=ae.prefixCls,_t=ae.id,nn=ae.inputElement,cn=ae.disabled,Bn=ae.tabIndex,Oe=ae.autoFocus,Xe=ae.autoComplete,Gn=ae.editable,Xn=ae.activeDescendantId,Jn=ae.value,Rn=ae.maxLength,ni=ae.onKeyDown,Qn=ae.onMouseDown,qn=ae.onChange,Si=ae.onPaste,Vi=ae.onCompositionStart,un=ae.onCompositionEnd,lo=ae.open,to=ae.attrs,Ki=nn||qt.createElement("input",null),en=Ki,Dn=en.ref,gi=en.props,ki=gi.onKeyDown,Pi=gi.onChange,Di=gi.onMouseDown,Zi=gi.onCompositionStart,Ri=gi.onCompositionEnd,$i=gi.style;return(0,we.Kp)(!("maxLength"in Ki.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Ki=qt.cloneElement(Ki,(0,Me.Z)((0,Me.Z)((0,Me.Z)({type:"search"},gi),{},{id:_t,ref:(0,nt.sQ)(Ye,Dn),disabled:cn,tabIndex:Bn,autoComplete:Xe||"off",autoFocus:Oe,className:Ce()("".concat(Re,"-selection-search-input"),(gn=Ki)===null||gn===void 0||(In=gn.props)===null||In===void 0?void 0:In.className),role:"combobox","aria-label":"Search","aria-expanded":lo||!1,"aria-haspopup":"listbox","aria-owns":"".concat(_t,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(_t,"_list"),"aria-activedescendant":lo?Xn:void 0},to),{},{value:Gn?Jn:"",maxLength:Rn,readOnly:!Gn,unselectable:Gn?null:"on",style:(0,Me.Z)((0,Me.Z)({},$i),{},{opacity:Gn?null:0}),onKeyDown:function(mn){ni(mn),ki&&ki(mn)},onMouseDown:function(mn){Qn(mn),Di&&Di(mn)},onChange:function(mn){qn(mn),Pi&&Pi(mn)},onCompositionStart:function(mn){Vi(mn),Zi&&Zi(mn)},onCompositionEnd:function(mn){un(mn),Ri&&Ri(mn)},onPaste:Si})),Ki},me=qt.forwardRef(ne);me.displayName="Input";var Vt=me;function Le(ye){return Array.isArray(ye)?ye:ye!==void 0?[ye]:[]}var he=typeof window!="undefined"&&window.document&&window.document.documentElement,Ge=he;function Ke(ye){return ye!=null}function Ve(ye){return!ye&&ye!==0}function sn(ye){return["string","number"].includes((0,Nt.Z)(ye))}function Mn(ye){var ae=void 0;return ye&&(sn(ye.title)?ae=ye.title.toString():sn(ye.label)&&(ae=ye.label.toString())),ae}function xe(ye,ae){Ge?qt.useLayoutEffect(ye,ae):qt.useEffect(ye,ae)}function Ht(ye){var ae;return(ae=ye.key)!==null&&ae!==void 0?ae:ye.value}var Je=function(ae){ae.preventDefault(),ae.stopPropagation()},Tn=function(ae){var Ye=ae.id,gn=ae.prefixCls,In=ae.values,Re=ae.open,_t=ae.searchValue,nn=ae.autoClearSearchValue,cn=ae.inputRef,Bn=ae.placeholder,Oe=ae.disabled,Xe=ae.mode,Gn=ae.showSearch,Xn=ae.autoFocus,Jn=ae.autoComplete,Rn=ae.activeDescendantId,ni=ae.tabIndex,Qn=ae.removeIcon,qn=ae.maxTagCount,Si=ae.maxTagTextLength,Vi=ae.maxTagPlaceholder,un=Vi===void 0?function(Ho){return"+ ".concat(Ho.length," ...")}:Vi,lo=ae.tagRender,to=ae.onToggleOpen,Ki=ae.onRemove,en=ae.onInputChange,Dn=ae.onInputPaste,gi=ae.onInputKeyDown,ki=ae.onInputMouseDown,Pi=ae.onInputCompositionStart,Di=ae.onInputCompositionEnd,Zi=qt.useRef(null),Ri=(0,qt.useState)(0),$i=(0,Ut.Z)(Ri,2),qi=$i[0],mn=$i[1],Lo=(0,qt.useState)(!1),tn=(0,Ut.Z)(Lo,2),Gi=tn[0],Yi=tn[1],ji="".concat(gn,"-selection"),No=Re||Xe==="multiple"&&nn===!1||Xe==="tags"?_t:"",Mo=Xe==="tags"||Xe==="multiple"&&nn===!1||Gn&&(Re||Gi);xe(function(){mn(Zi.current.scrollWidth)},[No]);function Ii(Ho,or,Cr,Fr,cr){return qt.createElement("span",{className:Ce()("".concat(ji,"-item"),(0,Qt.Z)({},"".concat(ji,"-item-disabled"),Cr)),title:Mn(Ho)},qt.createElement("span",{className:"".concat(ji,"-item-content")},or),Fr&&qt.createElement(st,{className:"".concat(ji,"-item-remove"),onMouseDown:Je,onClick:cr,customizeIcon:Qn},"\xD7"))}function Ni(Ho,or,Cr,Fr,cr){var oo=function(_o){Je(_o),to(!Re)};return qt.createElement("span",{onMouseDown:oo},lo({label:or,value:Ho,disabled:Cr,closable:Fr,onClose:cr}))}function zi(Ho){var or=Ho.disabled,Cr=Ho.label,Fr=Ho.value,cr=!Oe&&!or,oo=Cr;if(typeof Si=="number"&&(typeof Cr=="string"||typeof Cr=="number")){var fo=String(oo);fo.length>Si&&(oo="".concat(fo.slice(0,Si),"..."))}var _o=function(lr){lr&&lr.stopPropagation(),Ki(Ho)};return typeof lo=="function"?Ni(Fr,oo,or,cr,_o):Ii(Ho,oo,or,cr,_o)}function uo(Ho){var or=typeof un=="function"?un(Ho):un;return Ii({title:or},or,!1)}var li=qt.createElement("div",{className:"".concat(ji,"-search"),style:{width:qi},onFocus:function(){Yi(!0)},onBlur:function(){Yi(!1)}},qt.createElement(Vt,{ref:cn,open:Re,prefixCls:gn,id:Ye,inputElement:null,disabled:Oe,autoFocus:Xn,autoComplete:Jn,editable:Mo,activeDescendantId:Rn,value:No,onKeyDown:gi,onMouseDown:ki,onChange:en,onPaste:Dn,onCompositionStart:Pi,onCompositionEnd:Di,tabIndex:ni,attrs:(0,Wt.Z)(ae,!0)}),qt.createElement("span",{ref:Zi,className:"".concat(ji,"-search-mirror"),"aria-hidden":!0},No,"\xA0")),$t=qt.createElement(re.Z,{prefixCls:"".concat(ji,"-overflow"),data:In,renderItem:zi,renderRest:uo,suffix:li,itemKey:Ht,maxCount:qn});return qt.createElement(qt.Fragment,null,$t,!In.length&&!No&&qt.createElement("span",{className:"".concat(ji,"-placeholder")},Bn))},An=Tn,ze=function(ae){var Ye=ae.inputElement,gn=ae.prefixCls,In=ae.id,Re=ae.inputRef,_t=ae.disabled,nn=ae.autoFocus,cn=ae.autoComplete,Bn=ae.activeDescendantId,Oe=ae.mode,Xe=ae.open,Gn=ae.values,Xn=ae.placeholder,Jn=ae.tabIndex,Rn=ae.showSearch,ni=ae.searchValue,Qn=ae.activeValue,qn=ae.maxLength,Si=ae.onInputKeyDown,Vi=ae.onInputMouseDown,un=ae.onInputChange,lo=ae.onInputPaste,to=ae.onInputCompositionStart,Ki=ae.onInputCompositionEnd,en=ae.title,Dn=qt.useState(!1),gi=(0,Ut.Z)(Dn,2),ki=gi[0],Pi=gi[1],Di=Oe==="combobox",Zi=Di||Rn,Ri=Gn[0],$i=ni||"";Di&&Qn&&!ki&&($i=Qn),qt.useEffect(function(){Di&&Pi(!1)},[Di,Qn]);var qi=Oe!=="combobox"&&!Xe&&!Rn?!1:!!$i,mn=en===void 0?Mn(Ri):en,Lo=function(){if(Ri)return null;var Gi=qi?{visibility:"hidden"}:void 0;return qt.createElement("span",{className:"".concat(gn,"-selection-placeholder"),style:Gi},Xn)};return qt.createElement(qt.Fragment,null,qt.createElement("span",{className:"".concat(gn,"-selection-search")},qt.createElement(Vt,{ref:Re,prefixCls:gn,id:In,open:Xe,inputElement:Ye,disabled:_t,autoFocus:nn,autoComplete:cn,editable:Zi,activeDescendantId:Bn,value:$i,onKeyDown:Si,onMouseDown:Vi,onChange:function(Gi){Pi(!0),un(Gi)},onPaste:lo,onCompositionStart:to,onCompositionEnd:Ki,tabIndex:Jn,attrs:(0,Wt.Z)(ae,!0),maxLength:Di?qn:void 0})),!Di&&Ri?qt.createElement("span",{className:"".concat(gn,"-selection-item"),title:mn,style:qi?{visibility:"hidden"}:void 0},Ri.label):null,Lo())},Te=ze;function dn(ye){return![et.Z.ESC,et.Z.SHIFT,et.Z.BACKSPACE,et.Z.TAB,et.Z.WIN_KEY,et.Z.ALT,et.Z.META,et.Z.WIN_KEY_RIGHT,et.Z.CTRL,et.Z.SEMICOLON,et.Z.EQUALS,et.Z.CAPS_LOCK,et.Z.CONTEXT_MENU,et.Z.F1,et.Z.F2,et.Z.F3,et.Z.F4,et.Z.F5,et.Z.F6,et.Z.F7,et.Z.F8,et.Z.F9,et.Z.F10,et.Z.F11,et.Z.F12].includes(ye)}var Hn=function(ae,Ye){var gn=(0,qt.useRef)(null),In=(0,qt.useRef)(!1),Re=ae.prefixCls,_t=ae.open,nn=ae.mode,cn=ae.showSearch,Bn=ae.tokenWithEnter,Oe=ae.autoClearSearchValue,Xe=ae.onSearch,Gn=ae.onSearchSubmit,Xn=ae.onToggleOpen,Jn=ae.onInputKeyDown,Rn=ae.domRef;qt.useImperativeHandle(Ye,function(){return{focus:function(){gn.current.focus()},blur:function(){gn.current.blur()}}});var ni=It(0),Qn=(0,Ut.Z)(ni,2),qn=Qn[0],Si=Qn[1],Vi=function($i){var qi=$i.which;(qi===et.Z.UP||qi===et.Z.DOWN)&&$i.preventDefault(),Jn&&Jn($i),qi===et.Z.ENTER&&nn==="tags"&&!In.current&&!_t&&(Gn==null||Gn($i.target.value)),dn(qi)&&Xn(!0)},un=function(){Si(!0)},lo=(0,qt.useRef)(null),to=function($i){Xe($i,!0,In.current)!==!1&&Xn(!0)},Ki=function(){In.current=!0},en=function($i){In.current=!1,nn!=="combobox"&&to($i.target.value)},Dn=function($i){var qi=$i.target.value;if(Bn&&lo.current&&/[\r\n]/.test(lo.current)){var mn=lo.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");qi=qi.replace(mn,lo.current)}lo.current=null,to(qi)},gi=function($i){var qi=$i.clipboardData,mn=qi.getData("text");lo.current=mn},ki=function($i){var qi=$i.target;if(qi!==gn.current){var mn=document.body.style.msTouchAction!==void 0;mn?setTimeout(function(){gn.current.focus()}):gn.current.focus()}},Pi=function($i){var qi=qn();$i.target!==gn.current&&!qi&&nn!=="combobox"&&$i.preventDefault(),(nn!=="combobox"&&(!cn||!qi)||!_t)&&(_t&&Oe!==!1&&Xe("",!0,!1),Xn())},Di={inputRef:gn,onInputKeyDown:Vi,onInputMouseDown:un,onInputChange:Dn,onInputPaste:gi,onInputCompositionStart:Ki,onInputCompositionEnd:en},Zi=nn==="multiple"||nn==="tags"?qt.createElement(An,(0,Ot.Z)({},ae,Di)):qt.createElement(Te,(0,Ot.Z)({},ae,Di));return qt.createElement("div",{ref:Rn,className:"".concat(Re,"-selector"),onClick:ki,onMouseDown:Pi},Zi)},hn=qt.forwardRef(Hn);hn.displayName="Selector";var pn=hn,de=xt(35593),vn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],bn=function(ae){var Ye=ae===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Ye,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Ye,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Ye,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Ye,adjustY:1},htmlRegion:"scroll"}}},Qe=function(ae,Ye){var gn=ae.prefixCls,In=ae.disabled,Re=ae.visible,_t=ae.children,nn=ae.popupElement,cn=ae.animation,Bn=ae.transitionName,Oe=ae.dropdownStyle,Xe=ae.dropdownClassName,Gn=ae.direction,Xn=Gn===void 0?"ltr":Gn,Jn=ae.placement,Rn=ae.builtinPlacements,ni=ae.dropdownMatchSelectWidth,Qn=ae.dropdownRender,qn=ae.dropdownAlign,Si=ae.getPopupContainer,Vi=ae.empty,un=ae.getTriggerDOMNode,lo=ae.onPopupVisibleChange,to=ae.onPopupMouseEnter,Ki=(0,pe.Z)(ae,vn),en="".concat(gn,"-dropdown"),Dn=nn;Qn&&(Dn=Qn(nn));var gi=qt.useMemo(function(){return Rn||bn(ni)},[Rn,ni]),ki=cn?"".concat(en,"-").concat(cn):Bn,Pi=typeof ni=="number",Di=qt.useMemo(function(){return Pi?null:ni===!1?"minWidth":"width"},[ni,Pi]),Zi=Oe;Pi&&(Zi=(0,Me.Z)((0,Me.Z)({},Zi),{},{width:ni}));var Ri=qt.useRef(null);return qt.useImperativeHandle(Ye,function(){return{getPopupElement:function(){return Ri.current}}}),qt.createElement(de.Z,(0,Ot.Z)({},Ki,{showAction:lo?["click"]:[],hideAction:lo?["click"]:[],popupPlacement:Jn||(Xn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:gi,prefixCls:en,popupTransitionName:ki,popup:qt.createElement("div",{ref:Ri,onMouseEnter:to},Dn),stretch:Di,popupAlign:qn,popupVisible:Re,getPopupContainer:Si,popupClassName:Ce()(Xe,(0,Qt.Z)({},"".concat(en,"-empty"),Vi)),popupStyle:Zi,getTriggerDOMNode:un,onPopupVisibleChange:lo}),_t)},Pn=qt.forwardRef(Qe);Pn.displayName="SelectTrigger";var Ne=Pn,Pe=xt(68413);function ie(ye,ae){var Ye=ye.key,gn;return"value"in ye&&(gn=ye.value),Ye!=null?Ye:gn!==void 0?gn:"rc-index-key-".concat(ae)}function Dt(ye,ae){var Ye=ye||{},gn=Ye.label,In=Ye.value,Re=Ye.options,_t=Ye.groupLabel,nn=gn||(ae?"children":"label");return{label:nn,value:In||"value",options:Re||"options",groupLabel:_t||nn}}function fe(ye){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ye=ae.fieldNames,gn=ae.childrenAsData,In=[],Re=Dt(Ye,!1),_t=Re.label,nn=Re.value,cn=Re.options,Bn=Re.groupLabel;function Oe(Xe,Gn){Xe.forEach(function(Xn){if(Gn||!(cn in Xn)){var Jn=Xn[nn];In.push({key:ie(Xn,In.length),groupOption:Gn,data:Xn,label:Xn[_t],value:Jn})}else{var Rn=Xn[Bn];Rn===void 0&&gn&&(Rn=Xn.label),In.push({key:ie(Xn,In.length),group:!0,data:Xn,label:Rn}),Oe(Xn[cn],!0)}})}return Oe(ye,!1),In}function Se(ye){var ae=(0,Me.Z)({},ye);return"props"in ae||Object.defineProperty(ae,"props",{get:function(){return(0,we.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),ae}}),ae}function ee(ye,ae){if(!ae||!ae.length)return null;var Ye=!1;function gn(Re,_t){var nn=(0,Pe.Z)(_t),cn=nn[0],Bn=nn.slice(1);if(!cn)return[Re];var Oe=Re.split(cn);return Ye=Ye||Oe.length>1,Oe.reduce(function(Xe,Gn){return[].concat((0,jt.Z)(Xe),(0,jt.Z)(gn(Gn,Bn)))},[]).filter(function(Xe){return Xe})}var In=gn(ye,ae);return Ye?In:null}var Kt=["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"],kt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function St(ye){return ye==="tags"||ye==="multiple"}var mt=qt.forwardRef(function(ye,ae){var Ye,gn,In=ye.id,Re=ye.prefixCls,_t=ye.className,nn=ye.showSearch,cn=ye.tagRender,Bn=ye.direction,Oe=ye.omitDomProps,Xe=ye.displayValues,Gn=ye.onDisplayValuesChange,Xn=ye.emptyOptions,Jn=ye.notFoundContent,Rn=Jn===void 0?"Not Found":Jn,ni=ye.onClear,Qn=ye.mode,qn=ye.disabled,Si=ye.loading,Vi=ye.getInputElement,un=ye.getRawInputElement,lo=ye.open,to=ye.defaultOpen,Ki=ye.onDropdownVisibleChange,en=ye.activeValue,Dn=ye.onActiveValueChange,gi=ye.activeDescendantId,ki=ye.searchValue,Pi=ye.autoClearSearchValue,Di=ye.onSearch,Zi=ye.onSearchSplit,Ri=ye.tokenSeparators,$i=ye.allowClear,qi=ye.suffixIcon,mn=ye.clearIcon,Lo=ye.OptionList,tn=ye.animation,Gi=ye.transitionName,Yi=ye.dropdownStyle,ji=ye.dropdownClassName,No=ye.dropdownMatchSelectWidth,Mo=ye.dropdownRender,Ii=ye.dropdownAlign,Ni=ye.placement,zi=ye.builtinPlacements,uo=ye.getPopupContainer,li=ye.showAction,$t=li===void 0?[]:li,Ho=ye.onFocus,or=ye.onBlur,Cr=ye.onKeyUp,Fr=ye.onKeyDown,cr=ye.onMouseDown,oo=(0,pe.Z)(ye,Kt),fo=St(Qn),_o=(nn!==void 0?nn:fo)||Qn==="combobox",Co=(0,Me.Z)({},oo);kt.forEach(function(hr){delete Co[hr]}),Oe==null||Oe.forEach(function(hr){delete Co[hr]});var lr=qt.useState(!1),ha=(0,Ut.Z)(lr,2),So=ha[0],Xi=ha[1];qt.useEffect(function(){Xi((0,Tt.Z)())},[]);var Zn=qt.useRef(null),Ji=qt.useRef(null),qo=qt.useRef(null),Or=qt.useRef(null),ur=qt.useRef(null),Yo=Ft(),xr=(0,Ut.Z)(Yo,3),wr=xr[0],ta=xr[1],da=xr[2];qt.useImperativeHandle(ae,function(){var hr,zr;return{focus:(hr=Or.current)===null||hr===void 0?void 0:hr.focus,blur:(zr=Or.current)===null||zr===void 0?void 0:zr.blur,scrollTo:function(Xa){var Ga;return(Ga=ur.current)===null||Ga===void 0?void 0:Ga.scrollTo(Xa)}}});var wa=qt.useMemo(function(){var hr;if(Qn!=="combobox")return ki;var zr=(hr=Xe[0])===null||hr===void 0?void 0:hr.value;return typeof zr=="string"||typeof zr=="number"?String(zr):""},[ki,Qn,Xe]),an=Qn==="combobox"&&typeof Vi=="function"&&Vi()||null,Jr=typeof un=="function"&&un(),Zs=(0,nt.x1)(Ji,Jr==null||(Ye=Jr.props)===null||Ye===void 0?void 0:Ye.ref),ps=qt.useState(!1),Ds=(0,Ut.Z)(ps,2),$o=Ds[0],Ms=Ds[1];(0,Be.Z)(function(){Ms(!0)},[]);var Nr=(0,Ie.Z)(!1,{defaultValue:to,value:lo}),Go=(0,Ut.Z)(Nr,2),fr=Go[0],aa=Go[1],xo=$o?fr:!1,tr=!Rn&&Xn;(qn||tr&&xo&&Qn==="combobox")&&(xo=!1);var ko=tr?!1:xo,vi=qt.useCallback(function(hr){var zr=hr!==void 0?hr:!xo;qn||(aa(zr),xo!==zr&&(Ki==null||Ki(zr)))},[qn,xo,aa,Ki]),Dr=qt.useMemo(function(){return(Ri||[]).some(function(hr){return[`
|
|
|
`,`\r
|
|
|
`].includes(hr)})},[Ri]),sa=function(zr,ks,Xa){var Ga=!0,va=zr;Dn==null||Dn(null);var Ta=Xa?null:ee(zr,Ri);return Qn!=="combobox"&&Ta&&(va="",Zi==null||Zi(Ta),vi(!1),Ga=!1),Di&&wa!==va&&Di(va,{source:ks?"typing":"effect"}),Ga},ts=function(zr){!zr||!zr.trim()||Di(zr,{source:"submit"})};qt.useEffect(function(){!xo&&!fo&&Qn!=="combobox"&&sa("",!1,!1)},[xo]),qt.useEffect(function(){fr&&qn&&aa(!1),qn&&ta(!1)},[qn]);var Ls=It(),ws=(0,Ut.Z)(Ls,2),xi=ws[0],Qr=ws[1],ea=function(zr){var ks=xi(),Xa=zr.which;if(Xa===et.Z.ENTER&&(Qn!=="combobox"&&zr.preventDefault(),xo||vi(!0)),Qr(!!wa),Xa===et.Z.BACKSPACE&&!ks&&fo&&!wa&&Xe.length){for(var Ga=(0,jt.Z)(Xe),va=null,Ta=Ga.length-1;Ta>=0;Ta-=1){var Va=Ga[Ta];if(!Va.disabled){Ga.splice(Ta,1),va=Va;break}}va&&Gn(Ga,{type:"remove",values:[va]})}for(var $a=arguments.length,ju=new Array($a>1?$a-1:0),jl=1;jl<$a;jl++)ju[jl-1]=arguments[jl];if(xo&&ur.current){var Ia;(Ia=ur.current).onKeyDown.apply(Ia,[zr].concat(ju))}Fr==null||Fr.apply(void 0,[zr].concat(ju))},ss=function(zr){for(var ks=arguments.length,Xa=new Array(ks>1?ks-1:0),Ga=1;Ga<ks;Ga++)Xa[Ga-1]=arguments[Ga];if(xo&&ur.current){var va;(va=ur.current).onKeyUp.apply(va,[zr].concat(Xa))}Cr==null||Cr.apply(void 0,[zr].concat(Xa))},Al=function(zr){var ks=Xe.filter(function(Xa){return Xa!==zr});Gn(ks,{type:"remove",values:[zr]})},Rl=qt.useRef(!1),Zo=function(){ta(!0),qn||(Ho&&!Rl.current&&Ho.apply(void 0,arguments),$t.includes("focus")&&vi(!0)),Rl.current=!0},ph=function(){ta(!1,function(){Rl.current=!1,vi(!1)}),!qn&&(wa&&(Qn==="tags"?Di(wa,{source:"submit"}):Qn==="multiple"&&Di("",{source:"blur"})),or&&or.apply(void 0,arguments))},ol=[];qt.useEffect(function(){return function(){ol.forEach(function(hr){return clearTimeout(hr)}),ol.splice(0,ol.length)}},[]);var rl=function(zr){var ks,Xa=zr.target,Ga=(ks=qo.current)===null||ks===void 0?void 0:ks.getPopupElement();if(Ga&&Ga.contains(Xa)){var va=setTimeout(function(){var ju=ol.indexOf(va);if(ju!==-1&&ol.splice(ju,1),da(),!So&&!Ga.contains(document.activeElement)){var jl;(jl=Or.current)===null||jl===void 0||jl.focus()}});ol.push(va)}for(var Ta=arguments.length,Va=new Array(Ta>1?Ta-1:0),$a=1;$a<Ta;$a++)Va[$a-1]=arguments[$a];cr==null||cr.apply(void 0,[zr].concat(Va))},As=qt.useState({}),bu=(0,Ut.Z)(As,2),Ru=bu[1];function Ws(){Ru({})}var pl;Jr&&(pl=function(zr){vi(zr)}),At(function(){var hr;return[Zn.current,(hr=qo.current)===null||hr===void 0?void 0:hr.getPopupElement()]},ko,vi,!!Jr);var Hh=qt.useMemo(function(){return(0,Me.Z)((0,Me.Z)({},ye),{},{notFoundContent:Rn,open:xo,triggerOpen:ko,id:In,showSearch:_o,multiple:fo,toggleOpen:vi})},[ye,Rn,ko,xo,In,_o,fo,vi]),hd=!!qi||Si,Gh;hd&&(Gh=qt.createElement(st,{className:Ce()("".concat(Re,"-arrow"),(0,Qt.Z)({},"".concat(Re,"-arrow-loading"),Si)),customizeIcon:qi,customizeIconProps:{loading:Si,searchValue:wa,open:xo,focused:wr,showSearch:_o}}));var $d=function(){var zr;ni==null||ni(),(zr=Or.current)===null||zr===void 0||zr.focus(),Gn([],{type:"clear",values:Xe}),sa("",!1,!1)},$h=gt(Re,$d,Xe,$i,mn,qn,wa,Qn),mh=$h.allowClear,zu=$h.clearIcon,zl=qt.createElement(Lo,{ref:ur}),dd=Ce()(Re,_t,(gn={},(0,Qt.Z)(gn,"".concat(Re,"-focused"),wr),(0,Qt.Z)(gn,"".concat(Re,"-multiple"),fo),(0,Qt.Z)(gn,"".concat(Re,"-single"),!fo),(0,Qt.Z)(gn,"".concat(Re,"-allow-clear"),$i),(0,Qt.Z)(gn,"".concat(Re,"-show-arrow"),hd),(0,Qt.Z)(gn,"".concat(Re,"-disabled"),qn),(0,Qt.Z)(gn,"".concat(Re,"-loading"),Si),(0,Qt.Z)(gn,"".concat(Re,"-open"),xo),(0,Qt.Z)(gn,"".concat(Re,"-customize-input"),an),(0,Qt.Z)(gn,"".concat(Re,"-show-search"),_o),gn)),Zh=qt.createElement(Ne,{ref:qo,disabled:qn,prefixCls:Re,visible:ko,popupElement:zl,animation:tn,transitionName:Gi,dropdownStyle:Yi,dropdownClassName:ji,direction:Bn,dropdownMatchSelectWidth:No,dropdownRender:Mo,dropdownAlign:Ii,placement:Ni,builtinPlacements:zi,getPopupContainer:uo,empty:Xn,getTriggerDOMNode:function(){return Ji.current},onPopupVisibleChange:pl,onPopupMouseEnter:Ws},Jr?qt.cloneElement(Jr,{ref:Zs}):qt.createElement(pn,(0,Ot.Z)({},ye,{domRef:Ji,prefixCls:Re,inputElement:an,ref:Or,id:In,showSearch:_o,autoClearSearchValue:Pi,mode:Qn,activeDescendantId:gi,tagRender:cn,values:Xe,open:xo,onToggleOpen:vi,activeValue:en,searchValue:wa,onSearch:sa,onSearchSubmit:ts,onRemove:Al,tokenWithEnter:Dr}))),vh;return Jr?vh=Zh:vh=qt.createElement("div",(0,Ot.Z)({className:dd},Co,{ref:Zn,onMouseDown:rl,onKeyDown:ea,onKeyUp:ss,onFocus:Zo,onBlur:ph}),wr&&!xo&&qt.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Xe.map(function(hr){var zr=hr.label,ks=hr.value;return["number","string"].includes((0,Nt.Z)(zr))?zr:ks}).join(", "))),Zh,Gh,mh&&zu),qt.createElement(vt.Provider,{value:Hh},vh)}),Lt=mt,zt=function(ye,ae){var Ye=qt.useRef({values:new Map,options:new Map}),gn=qt.useMemo(function(){var Re=Ye.current,_t=Re.values,nn=Re.options,cn=ye.map(function(Xe){if(Xe.label===void 0){var Gn;return(0,Me.Z)((0,Me.Z)({},Xe),{},{label:(Gn=_t.get(Xe.value))===null||Gn===void 0?void 0:Gn.label})}return Xe}),Bn=new Map,Oe=new Map;return cn.forEach(function(Xe){Bn.set(Xe.value,Xe),Oe.set(Xe.value,ae.get(Xe.value)||nn.get(Xe.value))}),Ye.current.values=Bn,Ye.current.options=Oe,cn},[ye,ae]),In=qt.useCallback(function(Re){return ae.get(Re)||Ye.current.options.get(Re)},[ae]);return[gn,In]};function Et(ye,ae){return Le(ye).join("").toUpperCase().includes(ae)}var Yt=function(ye,ae,Ye,gn,In){return qt.useMemo(function(){if(!Ye||gn===!1)return ye;var Re=ae.options,_t=ae.label,nn=ae.value,cn=[],Bn=typeof gn=="function",Oe=Ye.toUpperCase(),Xe=Bn?gn:function(Xn,Jn){return In?Et(Jn[In],Oe):Jn[Re]?Et(Jn[_t!=="children"?_t:"label"],Oe):Et(Jn[nn],Oe)},Gn=Bn?function(Xn){return Se(Xn)}:function(Xn){return Xn};return ye.forEach(function(Xn){if(Xn[Re]){var Jn=Xe(Ye,Gn(Xn));if(Jn)cn.push(Xn);else{var Rn=Xn[Re].filter(function(ni){return Xe(Ye,Gn(ni))});Rn.length&&cn.push((0,Me.Z)((0,Me.Z)({},Xn),{},(0,Qt.Z)({},Re,Rn)))}return}Xe(Ye,Gn(Xn))&&cn.push(Xn)}),cn},[ye,gn,In,Ye,ae])},$e=xt(17115),ln=xt(11592),qe=["children","value"],Nn=["children"];function ai(ye){var ae=ye,Ye=ae.key,gn=ae.props,In=gn.children,Re=gn.value,_t=(0,pe.Z)(gn,qe);return(0,Me.Z)({key:Ye,value:Re!==void 0?Re:Ye,children:In},_t)}function Kn(ye){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,ln.Z)(ye).map(function(Ye,gn){if(!qt.isValidElement(Ye)||!Ye.type)return null;var In=Ye,Re=In.type.isSelectOptGroup,_t=In.key,nn=In.props,cn=nn.children,Bn=(0,pe.Z)(nn,Nn);return ae||!Re?ai(Ye):(0,Me.Z)((0,Me.Z)({key:"__RC_SELECT_GRP__".concat(_t===null?gn:_t,"__"),label:_t},Bn),{},{options:Kn(cn)})}).filter(function(Ye){return Ye})}function ci(ye,ae,Ye,gn,In){return qt.useMemo(function(){var Re=ye,_t=!ye;_t&&(Re=Kn(ae));var nn=new Map,cn=new Map,Bn=function(Gn,Xn,Jn){Jn&&typeof Jn=="string"&&Gn.set(Xn[Jn],Xn)};function Oe(Xe){for(var Gn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xn=0;Xn<Xe.length;Xn+=1){var Jn=Xe[Xn];!Jn[Ye.options]||Gn?(nn.set(Jn[Ye.value],Jn),Bn(cn,Jn,Ye.label),Bn(cn,Jn,gn),Bn(cn,Jn,In)):Oe(Jn[Ye.options],!0)}}return Oe(Re),{options:Re,valueOptions:nn,labelOptions:cn}},[ye,ae,Ye,gn,In])}function Ci(ye){var ae=qt.useRef();ae.current=ye;var Ye=qt.useCallback(function(){return ae.current.apply(ae,arguments)},[]);return Ye}var Wi=function(){return null};Wi.isSelectOptGroup=!0;var Oi=Wi,mo=function(){return null};mo.isSelectOption=!0;var Bo=mo,Ao=xt(80547),oi=xt(2738),fi=xt(45680),di=qt.createContext(null),mi=di;function co(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Sn=["disabled","title","children","style","className"];function Ct(ye){return typeof ye=="string"||typeof ye=="number"}var Yn=function(ae,Ye){var gn=wt(),In=gn.prefixCls,Re=gn.id,_t=gn.open,nn=gn.multiple,cn=gn.mode,Bn=gn.searchValue,Oe=gn.toggleOpen,Xe=gn.notFoundContent,Gn=gn.onPopupScroll,Xn=qt.useContext(mi),Jn=Xn.flattenOptions,Rn=Xn.onActiveValue,ni=Xn.defaultActiveFirstOption,Qn=Xn.onSelect,qn=Xn.menuItemSelectedIcon,Si=Xn.rawValues,Vi=Xn.fieldNames,un=Xn.virtual,lo=Xn.direction,to=Xn.listHeight,Ki=Xn.listItemHeight,en="".concat(In,"-item"),Dn=(0,Ao.Z)(function(){return Jn},[_t,Jn],function(Ii,Ni){return Ni[0]&&Ii[1]!==Ni[1]}),gi=qt.useRef(null),ki=function(Ni){Ni.preventDefault()},Pi=function(Ni){gi.current&&gi.current.scrollTo(typeof Ni=="number"?{index:Ni}:Ni)},Di=function(Ni){for(var zi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,uo=Dn.length,li=0;li<uo;li+=1){var $t=(Ni+li*zi+uo)%uo,Ho=Dn[$t],or=Ho.group,Cr=Ho.data;if(!or&&!Cr.disabled)return $t}return-1},Zi=qt.useState(function(){return Di(0)}),Ri=(0,Ut.Z)(Zi,2),$i=Ri[0],qi=Ri[1],mn=function(Ni){var zi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;qi(Ni);var uo={source:zi?"keyboard":"mouse"},li=Dn[Ni];if(!li){Rn(null,-1,uo);return}Rn(li.value,Ni,uo)};(0,qt.useEffect)(function(){mn(ni!==!1?Di(0):-1)},[Dn.length,Bn]);var Lo=qt.useCallback(function(Ii){return Si.has(Ii)&&cn!=="combobox"},[cn,(0,jt.Z)(Si).toString(),Si.size]);(0,qt.useEffect)(function(){var Ii=setTimeout(function(){if(!nn&&_t&&Si.size===1){var zi=Array.from(Si)[0],uo=Dn.findIndex(function(li){var $t=li.data;return $t.value===zi});uo!==-1&&(mn(uo),Pi(uo))}});if(_t){var Ni;(Ni=gi.current)===null||Ni===void 0||Ni.scrollTo(void 0)}return function(){return clearTimeout(Ii)}},[_t,Bn,Jn.length]);var tn=function(Ni){Ni!==void 0&&Qn(Ni,{selected:!Si.has(Ni)}),nn||Oe(!1)};if(qt.useImperativeHandle(Ye,function(){return{onKeyDown:function(Ni){var zi=Ni.which,uo=Ni.ctrlKey;switch(zi){case et.Z.N:case et.Z.P:case et.Z.UP:case et.Z.DOWN:{var li=0;if(zi===et.Z.UP?li=-1:zi===et.Z.DOWN?li=1:co()&&uo&&(zi===et.Z.N?li=1:zi===et.Z.P&&(li=-1)),li!==0){var $t=Di($i+li,li);Pi($t),mn($t,!0)}break}case et.Z.ENTER:{var Ho=Dn[$i];Ho&&!Ho.data.disabled?tn(Ho.value):tn(void 0),_t&&Ni.preventDefault();break}case et.Z.ESC:Oe(!1),_t&&Ni.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ni){Pi(Ni)}}}),Dn.length===0)return qt.createElement("div",{role:"listbox",id:"".concat(Re,"_list"),className:"".concat(en,"-empty"),onMouseDown:ki},Xe);var Gi=Object.keys(Vi).map(function(Ii){return Vi[Ii]}),Yi=function(Ni){return Ni.label};function ji(Ii,Ni){var zi=Ii.group;return{role:zi?"presentation":"option",id:"".concat(Re,"_list_").concat(Ni)}}var No=function(Ni){var zi=Dn[Ni];if(!zi)return null;var uo=zi.data||{},li=uo.value,$t=zi.group,Ho=(0,Wt.Z)(uo,!0),or=Yi(zi);return zi?qt.createElement("div",(0,Ot.Z)({"aria-label":typeof or=="string"&&!$t?or:null},Ho,{key:Ni},ji(zi,Ni),{"aria-selected":Lo(li)}),li):null},Mo={role:"listbox",id:"".concat(Re,"_list")};return qt.createElement(qt.Fragment,null,un&&qt.createElement("div",(0,Ot.Z)({},Mo,{style:{height:0,width:0,overflow:"hidden"}}),No($i-1),No($i),No($i+1)),qt.createElement(fi.Z,{itemKey:"key",ref:gi,data:Dn,height:to,itemHeight:Ki,fullHeight:!1,onMouseDown:ki,onScroll:Gn,virtual:un,direction:lo,innerProps:un?null:Mo},function(Ii,Ni){var zi,uo=Ii.group,li=Ii.groupOption,$t=Ii.data,Ho=Ii.label,or=Ii.value,Cr=$t.key;if(uo){var Fr,cr=(Fr=$t.title)!==null&&Fr!==void 0?Fr:Ct(Ho)?Ho.toString():void 0;return qt.createElement("div",{className:Ce()(en,"".concat(en,"-group")),title:cr},Ho!==void 0?Ho:Cr)}var oo=$t.disabled,fo=$t.title,_o=$t.children,Co=$t.style,lr=$t.className,ha=(0,pe.Z)($t,Sn),So=(0,oi.Z)(ha,Gi),Xi=Lo(or),Zn="".concat(en,"-option"),Ji=Ce()(en,Zn,lr,(zi={},(0,Qt.Z)(zi,"".concat(Zn,"-grouped"),li),(0,Qt.Z)(zi,"".concat(Zn,"-active"),$i===Ni&&!oo),(0,Qt.Z)(zi,"".concat(Zn,"-disabled"),oo),(0,Qt.Z)(zi,"".concat(Zn,"-selected"),Xi),zi)),qo=Yi(Ii),Or=!qn||typeof qn=="function"||Xi,ur=typeof qo=="number"?qo:qo||or,Yo=Ct(ur)?ur.toString():void 0;return fo!==void 0&&(Yo=fo),qt.createElement("div",(0,Ot.Z)({},(0,Wt.Z)(So),un?{}:ji(Ii,Ni),{"aria-selected":Xi,className:Ji,title:Yo,onMouseMove:function(){$i===Ni||oo||mn(Ni)},onClick:function(){oo||tn(or)},style:Co}),qt.createElement("div",{className:"".concat(Zn,"-content")},ur),qt.isValidElement(qn)||Xi,Or&&qt.createElement(st,{className:"".concat(en,"-option-state"),customizeIcon:qn,customizeIconProps:{isSelected:Xi}},Xi?"\u2713":null))}))},yi=qt.forwardRef(Yn);yi.displayName="OptionList";var _e=yi;function Wn(ye){var ae=ye.mode,Ye=ye.options,gn=ye.children,In=ye.backfill,Re=ye.allowClear,_t=ye.placeholder,nn=ye.getInputElement,cn=ye.showSearch,Bn=ye.onSearch,Oe=ye.defaultOpen,Xe=ye.autoFocus,Gn=ye.labelInValue,Xn=ye.value,Jn=ye.inputValue,Rn=ye.optionLabelProp,ni=isMultiple(ae),Qn=cn!==void 0?cn:ni||ae==="combobox",qn=Ye||convertChildrenToData(gn);if(warning(ae!=="tags"||qn.every(function(lo){return!lo.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ae==="tags"||ae==="combobox"){var Si=qn.some(function(lo){return lo.options?lo.options.some(function(to){return typeof("value"in to?to.value:to.key)=="number"}):typeof("value"in lo?lo.value:lo.key)=="number"});warning(!Si,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(ae!=="combobox"||!Rn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(ae==="combobox"||!In,"`backfill` only works with `combobox` mode."),warning(ae==="combobox"||!nn,"`getInputElement` only work with `combobox` mode."),noteOnce(ae!=="combobox"||!nn||!Re||!_t,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Bn&&!Qn&&ae!=="combobox"&&ae!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Oe||Xe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Xn!=null){var Vi=toArray(Xn);warning(!Gn||Vi.every(function(lo){return _typeof(lo)==="object"&&("key"in lo||"value"in lo)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ni||Array.isArray(Xn),"`value` should be array when `mode` is `multiple` or `tags`")}if(gn){var un=null;toNodeArray(gn).some(function(lo){if(!React.isValidElement(lo)||!lo.type)return!1;var to=lo,Ki=to.type;if(Ki.isSelectOption)return!1;if(Ki.isSelectOptGroup){var en=toNodeArray(lo.props.children).every(function(Dn){return!React.isValidElement(Dn)||!lo.type||Dn.type.isSelectOption?!0:(un=Dn.type,!1)});return!en}return un=Ki,!0}),un&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(un.displayName||un.name||un,"`.")),warning(Jn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function _n(ye,ae){if(ye){var Ye=function gn(In){for(var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_t=0;_t<In.length;_t++){var nn=In[_t];if(nn[ae==null?void 0:ae.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Re&&Array.isArray(nn[ae==null?void 0:ae.options])&&gn(nn[ae==null?void 0:ae.options],!0))break}};Ye(ye)}}var si=null,ri=["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"],hi=["inputValue"];function Fe(ye){return!ye||(0,Nt.Z)(ye)!=="object"}var Ae=qt.forwardRef(function(ye,ae){var Ye=ye.id,gn=ye.mode,In=ye.prefixCls,Re=In===void 0?"rc-select":In,_t=ye.backfill,nn=ye.fieldNames,cn=ye.inputValue,Bn=ye.searchValue,Oe=ye.onSearch,Xe=ye.autoClearSearchValue,Gn=Xe===void 0?!0:Xe,Xn=ye.onSelect,Jn=ye.onDeselect,Rn=ye.dropdownMatchSelectWidth,ni=Rn===void 0?!0:Rn,Qn=ye.filterOption,qn=ye.filterSort,Si=ye.optionFilterProp,Vi=ye.optionLabelProp,un=ye.options,lo=ye.children,to=ye.defaultActiveFirstOption,Ki=ye.menuItemSelectedIcon,en=ye.virtual,Dn=ye.direction,gi=ye.listHeight,ki=gi===void 0?200:gi,Pi=ye.listItemHeight,Di=Pi===void 0?20:Pi,Zi=ye.value,Ri=ye.defaultValue,$i=ye.labelInValue,qi=ye.onChange,mn=(0,pe.Z)(ye,ri),Lo=(0,$e.ZP)(Ye),tn=St(gn),Gi=!!(!un&&lo),Yi=qt.useMemo(function(){return Qn===void 0&&gn==="combobox"?!1:Qn},[Qn,gn]),ji=qt.useMemo(function(){return Dt(nn,Gi)},[JSON.stringify(nn),Gi]),No=(0,Ie.Z)("",{value:Bn!==void 0?Bn:cn,postState:function(tr){return tr||""}}),Mo=(0,Ut.Z)(No,2),Ii=Mo[0],Ni=Mo[1],zi=ci(un,lo,ji,Si,Vi),uo=zi.valueOptions,li=zi.labelOptions,$t=zi.options,Ho=qt.useCallback(function(xo){var tr=Le(xo);return tr.map(function(ko){var vi,Dr,sa,ts,Ls;if(Fe(ko))vi=ko;else{var ws;sa=ko.key,Dr=ko.label,vi=(ws=ko.value)!==null&&ws!==void 0?ws:sa}var xi=uo.get(vi);if(xi){var Qr;if(Dr===void 0&&(Dr=xi==null?void 0:xi[Vi||ji.label]),sa===void 0&&(sa=(Qr=xi==null?void 0:xi.key)!==null&&Qr!==void 0?Qr:vi),ts=xi==null?void 0:xi.disabled,Ls=xi==null?void 0:xi.title,0)var ea}return{label:Dr,value:vi,key:sa,disabled:ts,title:Ls}})},[ji,Vi,uo]),or=(0,Ie.Z)(Ri,{value:Zi}),Cr=(0,Ut.Z)(or,2),Fr=Cr[0],cr=Cr[1],oo=qt.useMemo(function(){var xo,tr=Ho(Fr);return gn==="combobox"&&Ve((xo=tr[0])===null||xo===void 0?void 0:xo.value)?[]:tr},[Fr,Ho,gn]),fo=zt(oo,uo),_o=(0,Ut.Z)(fo,2),Co=_o[0],lr=_o[1],ha=qt.useMemo(function(){if(!gn&&Co.length===1){var xo=Co[0];if(xo.value===null&&(xo.label===null||xo.label===void 0))return[]}return Co.map(function(tr){var ko;return(0,Me.Z)((0,Me.Z)({},tr),{},{label:(ko=tr.label)!==null&&ko!==void 0?ko:tr.value})})},[gn,Co]),So=qt.useMemo(function(){return new Set(Co.map(function(xo){return xo.value}))},[Co]);qt.useEffect(function(){if(gn==="combobox"){var xo,tr=(xo=Co[0])===null||xo===void 0?void 0:xo.value;Ni(Ke(tr)?String(tr):"")}},[Co]);var Xi=Ci(function(xo,tr){var ko,vi=tr!=null?tr:xo;return ko={},(0,Qt.Z)(ko,ji.value,xo),(0,Qt.Z)(ko,ji.label,vi),ko}),Zn=qt.useMemo(function(){if(gn!=="tags")return $t;var xo=(0,jt.Z)($t),tr=function(vi){return uo.has(vi)};return(0,jt.Z)(Co).sort(function(ko,vi){return ko.value<vi.value?-1:1}).forEach(function(ko){var vi=ko.value;tr(vi)||xo.push(Xi(vi,ko.label))}),xo},[Xi,$t,uo,Co,gn]),Ji=Yt(Zn,ji,Ii,Yi,Si),qo=qt.useMemo(function(){return gn!=="tags"||!Ii||Ji.some(function(xo){return xo[Si||"value"]===Ii})||Ji.some(function(xo){return xo[ji.value]===Ii})?Ji:[Xi(Ii)].concat((0,jt.Z)(Ji))},[Xi,Si,gn,Ji,Ii,ji]),Or=qt.useMemo(function(){return qn?(0,jt.Z)(qo).sort(function(xo,tr){return qn(xo,tr)}):qo},[qo,qn]),ur=qt.useMemo(function(){return fe(Or,{fieldNames:ji,childrenAsData:Gi})},[Or,ji,Gi]),Yo=function(tr){var ko=Ho(tr);if(cr(ko),qi&&(ko.length!==Co.length||ko.some(function(sa,ts){var Ls;return((Ls=Co[ts])===null||Ls===void 0?void 0:Ls.value)!==(sa==null?void 0:sa.value)}))){var vi=$i?ko:ko.map(function(sa){return sa.value}),Dr=ko.map(function(sa){return Se(lr(sa.value))});qi(tn?vi:vi[0],tn?Dr:Dr[0])}},xr=qt.useState(null),wr=(0,Ut.Z)(xr,2),ta=wr[0],da=wr[1],wa=qt.useState(0),an=(0,Ut.Z)(wa,2),Jr=an[0],Zs=an[1],ps=to!==void 0?to:gn!=="combobox",Ds=qt.useCallback(function(xo,tr){var ko=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},vi=ko.source,Dr=vi===void 0?"keyboard":vi;Zs(tr),_t&&gn==="combobox"&&xo!==null&&Dr==="keyboard"&&da(String(xo))},[_t,gn]),$o=function(tr,ko,vi){var Dr=function(){var Rl,Zo=lr(tr);return[$i?{label:Zo==null?void 0:Zo[ji.label],value:tr,key:(Rl=Zo==null?void 0:Zo.key)!==null&&Rl!==void 0?Rl:tr}:tr,Se(Zo)]};if(ko&&Xn){var sa=Dr(),ts=(0,Ut.Z)(sa,2),Ls=ts[0],ws=ts[1];Xn(Ls,ws)}else if(!ko&&Jn&&vi!=="clear"){var xi=Dr(),Qr=(0,Ut.Z)(xi,2),ea=Qr[0],ss=Qr[1];Jn(ea,ss)}},Ms=Ci(function(xo,tr){var ko,vi=tn?tr.selected:!0;vi?ko=tn?[].concat((0,jt.Z)(Co),[xo]):[xo]:ko=Co.filter(function(Dr){return Dr.value!==xo}),Yo(ko),$o(xo,vi),gn==="combobox"?da(""):(!St||Gn)&&(Ni(""),da(""))}),Nr=function(tr,ko){Yo(tr);var vi=ko.type,Dr=ko.values;(vi==="remove"||vi==="clear")&&Dr.forEach(function(sa){$o(sa.value,!1,vi)})},Go=function(tr,ko){if(Ni(tr),da(null),ko.source==="submit"){var vi=(tr||"").trim();if(vi){var Dr=Array.from(new Set([].concat((0,jt.Z)(So),[vi])));Yo(Dr),$o(vi,!0),Ni("")}return}ko.source!=="blur"&&(gn==="combobox"&&Yo(tr),Oe==null||Oe(tr))},fr=function(tr){var ko=tr;gn!=="tags"&&(ko=tr.map(function(Dr){var sa=li.get(Dr);return sa==null?void 0:sa.value}).filter(function(Dr){return Dr!==void 0}));var vi=Array.from(new Set([].concat((0,jt.Z)(So),(0,jt.Z)(ko))));Yo(vi),vi.forEach(function(Dr){$o(Dr,!0)})},aa=qt.useMemo(function(){var xo=en!==!1&&ni!==!1;return(0,Me.Z)((0,Me.Z)({},zi),{},{flattenOptions:ur,onActiveValue:Ds,defaultActiveFirstOption:ps,onSelect:Ms,menuItemSelectedIcon:Ki,rawValues:So,fieldNames:ji,virtual:xo,direction:Dn,listHeight:ki,listItemHeight:Di,childrenAsData:Gi})},[zi,ur,Ds,ps,Ms,Ki,So,ji,en,ni,ki,Di,Gi]);return qt.createElement(mi.Provider,{value:aa},qt.createElement(Lt,(0,Ot.Z)({},mn,{id:Lo,prefixCls:Re,ref:ae,omitDomProps:hi,mode:gn,displayValues:ha,onDisplayValuesChange:Nr,direction:Dn,searchValue:Ii,onSearch:Go,autoClearSearchValue:Gn,onSearchSplit:fr,dropdownMatchSelectWidth:ni,OptionList:_e,emptyOptions:!ur.length,activeValue:ta,activeDescendantId:"".concat(Lo,"_list_").concat(Jr)})))}),Zt=Ae;Zt.Option=Bo,Zt.OptGroup=Oi;var He=Zt,fn=He},9296:function(En,yn,xt){"use strict";xt.r(yn),xt.d(yn,{ResizableTextArea:function(){return me},default:function(){return Ve}});var Ot=xt(72308),jt=xt(77321),Qt=xt(49618),Me=xt(62853),Ut=xt(52487),pe=xt(74416),Nt=xt(80702),Ie=xt(92310),we=xt.n(Ie),qt=xt(93681),ce=xt(5643),Ce=xt(18929),Be=xt(59301),Tt=xt(29301),et=xt(34280),nt=xt(16089),ht=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,st=["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"],gt={},vt;function wt(sn){var Mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=sn.getAttribute("id")||sn.getAttribute("data-reactid")||sn.getAttribute("name");if(Mn&>[xe])return gt[xe];var Ht=window.getComputedStyle(sn),Je=Ht.getPropertyValue("box-sizing")||Ht.getPropertyValue("-moz-box-sizing")||Ht.getPropertyValue("-webkit-box-sizing"),Tn=parseFloat(Ht.getPropertyValue("padding-bottom"))+parseFloat(Ht.getPropertyValue("padding-top")),An=parseFloat(Ht.getPropertyValue("border-bottom-width"))+parseFloat(Ht.getPropertyValue("border-top-width")),ze=st.map(function(dn){return"".concat(dn,":").concat(Ht.getPropertyValue(dn))}).join(";"),Te={sizingStyle:ze,paddingSize:Tn,borderSize:An,boxSizing:Je};return Mn&&xe&&(gt[xe]=Te),Te}function Ft(sn){var Mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ht=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;vt||(vt=document.createElement("textarea"),vt.setAttribute("tab-index","-1"),vt.setAttribute("aria-hidden","true"),document.body.appendChild(vt)),sn.getAttribute("wrap")?vt.setAttribute("wrap",sn.getAttribute("wrap")):vt.removeAttribute("wrap");var Je=wt(sn,Mn),Tn=Je.paddingSize,An=Je.borderSize,ze=Je.boxSizing,Te=Je.sizingStyle;vt.setAttribute("style","".concat(Te,";").concat(ht)),vt.value=sn.value||sn.placeholder||"";var dn=void 0,Hn=void 0,hn,pn=vt.scrollHeight;if(ze==="border-box"?pn+=An:ze==="content-box"&&(pn-=Tn),xe!==null||Ht!==null){vt.value=" ";var de=vt.scrollHeight-Tn;xe!==null&&(dn=de*xe,ze==="border-box"&&(dn=dn+Tn+An),pn=Math.max(dn,pn)),Ht!==null&&(Hn=de*Ht,ze==="border-box"&&(Hn=Hn+Tn+An),hn=pn>Hn?"":"hidden",pn=Math.min(Hn,pn))}var vn={height:pn,overflowY:hn,resize:"none"};return dn&&(vn.minHeight=dn),Hn&&(vn.maxHeight=Hn),vn}var It=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],At=0,Wt=1,re=2,ne=Be.forwardRef(function(sn,Mn){var xe=sn,Ht=xe.prefixCls,Je=xe.onPressEnter,Tn=xe.defaultValue,An=xe.value,ze=xe.autoSize,Te=xe.onResize,dn=xe.className,Hn=xe.style,hn=xe.disabled,pn=xe.onChange,de=xe.onInternalAutoSize,vn=(0,pe.Z)(xe,It),bn=(0,Ce.Z)(Tn,{value:An,postState:function(Oi){return Oi!=null?Oi:""}}),Qe=(0,Ut.Z)(bn,2),Pn=Qe[0],Ne=Qe[1],Pe=function(Oi){Ne(Oi.target.value),pn==null||pn(Oi)},ie=Be.useRef();Be.useImperativeHandle(Mn,function(){return{textArea:ie.current}});var Dt=Be.useMemo(function(){return ze&&(0,Me.Z)(ze)==="object"?[ze.minRows,ze.maxRows]:[]},[ze]),fe=(0,Ut.Z)(Dt,2),Se=fe[0],ee=fe[1],Kt=!!ze,kt=function(){try{if(document.activeElement===ie.current){var Oi=ie.current,mo=Oi.selectionStart,Bo=Oi.selectionEnd,Ao=Oi.scrollTop;ie.current.setSelectionRange(mo,Bo),ie.current.scrollTop=Ao}}catch(oi){}},St=Be.useState(re),mt=(0,Ut.Z)(St,2),Lt=mt[0],zt=mt[1],Et=Be.useState(),Yt=(0,Ut.Z)(Et,2),$e=Yt[0],ln=Yt[1],qe=function(){zt(At)};(0,et.Z)(function(){Kt&&qe()},[An,Se,ee,Kt]),(0,et.Z)(function(){if(Lt===At)zt(Wt);else if(Lt===Wt){var Wi=Ft(ie.current,!1,Se,ee);zt(re),ln(Wi)}else kt()},[Lt]);var Nn=Be.useRef(),ai=function(){nt.Z.cancel(Nn.current)},Kn=function(Oi){Lt===re&&(Te==null||Te(Oi),ze&&(ai(),Nn.current=(0,nt.Z)(function(){qe()})))};Be.useEffect(function(){return ai},[]);var ci=Kt?$e:null,Ci=(0,jt.Z)((0,jt.Z)({},Hn),ci);return(Lt===At||Lt===Wt)&&(Ci.overflowY="hidden",Ci.overflowX="hidden"),Be.createElement(Tt.Z,{onResize:Kn,disabled:!(ze||Te)},Be.createElement("textarea",(0,Ot.Z)({},vn,{ref:ie,style:Ci,className:we()(Ht,dn,(0,Qt.Z)({},"".concat(Ht,"-disabled"),hn)),disabled:hn,value:Pn,onChange:Pe})))}),me=ne,Vt=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Le(sn,Mn){return(0,Nt.Z)(sn||"").slice(0,Mn).join("")}function he(sn,Mn,xe,Ht){var Je=xe;return sn?Je=Le(xe,Ht):(0,Nt.Z)(Mn||"").length<xe.length&&(0,Nt.Z)(xe||"").length>Ht&&(Je=Mn),Je}var Ge=Be.forwardRef(function(sn,Mn){var xe,Ht=sn.defaultValue,Je=sn.value,Tn=sn.onFocus,An=sn.onBlur,ze=sn.onChange,Te=sn.allowClear,dn=sn.maxLength,Hn=sn.onCompositionStart,hn=sn.onCompositionEnd,pn=sn.suffix,de=sn.prefixCls,vn=de===void 0?"rc-textarea":de,bn=sn.classes,Qe=sn.showCount,Pn=sn.className,Ne=sn.style,Pe=sn.disabled,ie=sn.hidden,Dt=sn.classNames,fe=sn.styles,Se=sn.onResize,ee=(0,pe.Z)(sn,Vt),Kt=(0,Ce.Z)(Ht,{value:Je,defaultValue:Ht}),kt=(0,Ut.Z)(Kt,2),St=kt[0],mt=kt[1],Lt=(0,Be.useRef)(null),zt=Be.useState(!1),Et=(0,Ut.Z)(zt,2),Yt=Et[0],$e=Et[1],ln=Be.useState(!1),qe=(0,Ut.Z)(ln,2),Nn=qe[0],ai=qe[1],Kn=Be.useRef(),ci=Be.useRef(0),Ci=Be.useState(null),Wi=(0,Ut.Z)(Ci,2),Oi=Wi[0],mo=Wi[1],Bo=function(){var Fe;(Fe=Lt.current)===null||Fe===void 0||Fe.textArea.focus()};(0,Be.useImperativeHandle)(Mn,function(){return{resizableTextArea:Lt.current,focus:Bo,blur:function(){var Fe;(Fe=Lt.current)===null||Fe===void 0||Fe.textArea.blur()}}}),(0,Be.useEffect)(function(){$e(function(hi){return!Pe&&hi})},[Pe]);var Ao=Number(dn)>0,oi=function(Fe){ai(!0),Kn.current=St,ci.current=Fe.currentTarget.selectionStart,Hn==null||Hn(Fe)},fi=function(Fe){ai(!1);var Ae=Fe.currentTarget.value;if(Ao){var Zt,He=ci.current>=dn+1||ci.current===((Zt=Kn.current)===null||Zt===void 0?void 0:Zt.length);Ae=he(He,Kn.current,Ae,dn)}Ae!==St&&(mt(Ae),(0,ce.rJ)(Fe.currentTarget,Fe,ze,Ae)),hn==null||hn(Fe)},di=function(Fe){var Ae=Fe.target.value;if(!Nn&&Ao){var Zt=Fe.target.selectionStart>=dn+1||Fe.target.selectionStart===Ae.length||!Fe.target.selectionStart;Ae=he(Zt,St,Ae,dn)}mt(Ae),(0,ce.rJ)(Fe.currentTarget,Fe,ze,Ae)},mi=function(Fe){var Ae=ee.onPressEnter,Zt=ee.onKeyDown;Fe.key==="Enter"&&Ae&&Ae(Fe),Zt==null||Zt(Fe)},co=function(Fe){$e(!0),Tn==null||Tn(Fe)},Sn=function(Fe){$e(!1),An==null||An(Fe)},Ct=function(Fe){var Ae;mt(""),Bo(),(0,ce.rJ)((Ae=Lt.current)===null||Ae===void 0?void 0:Ae.textArea,Fe,ze)},Yn=(0,ce.D7)(St);!Nn&&Ao&&Je==null&&(Yn=Le(Yn,dn));var yi=pn,_e;if(Qe){var Wn=(0,Nt.Z)(Yn).length;(0,Me.Z)(Qe)==="object"?_e=Qe.formatter({value:Yn,count:Wn,maxLength:dn}):_e="".concat(Wn).concat(Ao?" / ".concat(dn):""),yi=Be.createElement(Be.Fragment,null,yi,Be.createElement("span",{className:we()("".concat(vn,"-data-count"),Dt==null?void 0:Dt.count),style:fe==null?void 0:fe.count},_e))}var _n=function(Fe){var Ae;Se==null||Se(Fe),(Ae=Lt.current)!==null&&Ae!==void 0&&Ae.textArea.style.height&&mo(!0)},si=!ee.autoSize&&!Qe&&!Te,ri=Be.createElement(qt.BaseInput,{value:Yn,allowClear:Te,handleReset:Ct,suffix:yi,prefixCls:vn,classes:{affixWrapper:we()(bn==null?void 0:bn.affixWrapper,(xe={},(0,Qt.Z)(xe,"".concat(vn,"-show-count"),Qe),(0,Qt.Z)(xe,"".concat(vn,"-textarea-allow-clear"),Te),xe))},disabled:Pe,focused:Yt,className:Pn,style:(0,jt.Z)((0,jt.Z)({},Ne),Oi&&!si?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof _e=="string"?_e:void 0}},hidden:ie,inputElement:Be.createElement(me,(0,Ot.Z)({},ee,{onKeyDown:mi,onChange:di,onFocus:co,onBlur:Sn,onCompositionStart:oi,onCompositionEnd:fi,className:Dt==null?void 0:Dt.textarea,style:(0,jt.Z)((0,jt.Z)({},fe==null?void 0:fe.textarea),{},{resize:Ne==null?void 0:Ne.resize}),disabled:Pe,prefixCls:vn,onResize:_n,ref:Lt}))});return ri}),Ke=Ge,Ve=Ke},39417:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Wt}});var Ot=xt(72308),jt=xt(49618),Qt=xt(74416),Me=xt(77321),Ut=xt(96949),pe=xt(55090),Nt=xt(80237),Ie=xt(77205),we=xt(38793),qt=xt(92310),ce=xt.n(qt),Ce=xt(26112),Be=xt(59301),Tt=xt(39378),et=function(ne){for(var me=ne.prefixCls,Vt=ne.level,Le=ne.isStart,he=ne.isEnd,Ge="".concat(me,"-indent-unit"),Ke=[],Ve=0;Ve<Vt;Ve+=1){var sn;Ke.push(Be.createElement("span",{key:Ve,className:ce()(Ge,(sn={},(0,jt.Z)(sn,"".concat(Ge,"-start"),Le[Ve]),(0,jt.Z)(sn,"".concat(Ge,"-end"),he[Ve]),sn))}))}return Be.createElement("span",{"aria-hidden":"true",className:"".concat(me,"-indent")},Ke)},nt=Be.memo(et),ht=xt(67841),st=xt(71430),gt=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],vt="open",wt="close",Ft="---",It=function(re){(0,Ie.Z)(me,re);var ne=(0,we.Z)(me);function me(){var Vt;(0,Ut.Z)(this,me);for(var Le=arguments.length,he=new Array(Le),Ge=0;Ge<Le;Ge++)he[Ge]=arguments[Ge];return Vt=ne.call.apply(ne,[this].concat(he)),Vt.state={dragNodeHighlight:!1},Vt.selectHandle=void 0,Vt.cacheIndent=void 0,Vt.onSelectorClick=function(Ke){var Ve=Vt.props.context.onNodeClick;Ve(Ke,(0,st.F)(Vt.props)),Vt.isSelectable()?Vt.onSelect(Ke):Vt.onCheck(Ke)},Vt.onSelectorDoubleClick=function(Ke){var Ve=Vt.props.context.onNodeDoubleClick;Ve(Ke,(0,st.F)(Vt.props))},Vt.onSelect=function(Ke){if(!Vt.isDisabled()){var Ve=Vt.props.context.onNodeSelect;Ve(Ke,(0,st.F)(Vt.props))}},Vt.onCheck=function(Ke){if(!Vt.isDisabled()){var Ve=Vt.props,sn=Ve.disableCheckbox,Mn=Ve.checked,xe=Vt.props.context.onNodeCheck;if(!(!Vt.isCheckable()||sn)){var Ht=!Mn;xe(Ke,(0,st.F)(Vt.props),Ht)}}},Vt.onMouseEnter=function(Ke){var Ve=Vt.props.context.onNodeMouseEnter;Ve(Ke,(0,st.F)(Vt.props))},Vt.onMouseLeave=function(Ke){var Ve=Vt.props.context.onNodeMouseLeave;Ve(Ke,(0,st.F)(Vt.props))},Vt.onContextMenu=function(Ke){var Ve=Vt.props.context.onNodeContextMenu;Ve(Ke,(0,st.F)(Vt.props))},Vt.onDragStart=function(Ke){var Ve=Vt.props.context.onNodeDragStart;Ke.stopPropagation(),Vt.setState({dragNodeHighlight:!0}),Ve(Ke,(0,Nt.Z)(Vt));try{Ke.dataTransfer.setData("text/plain","")}catch(sn){}},Vt.onDragEnter=function(Ke){var Ve=Vt.props.context.onNodeDragEnter;Ke.preventDefault(),Ke.stopPropagation(),Ve(Ke,(0,Nt.Z)(Vt))},Vt.onDragOver=function(Ke){var Ve=Vt.props.context.onNodeDragOver;Ke.preventDefault(),Ke.stopPropagation(),Ve(Ke,(0,Nt.Z)(Vt))},Vt.onDragLeave=function(Ke){var Ve=Vt.props.context.onNodeDragLeave;Ke.stopPropagation(),Ve(Ke,(0,Nt.Z)(Vt))},Vt.onDragEnd=function(Ke){var Ve=Vt.props.context.onNodeDragEnd;Ke.stopPropagation(),Vt.setState({dragNodeHighlight:!1}),Ve(Ke,(0,Nt.Z)(Vt))},Vt.onDrop=function(Ke){var Ve=Vt.props.context.onNodeDrop;Ke.preventDefault(),Ke.stopPropagation(),Vt.setState({dragNodeHighlight:!1}),Ve(Ke,(0,Nt.Z)(Vt))},Vt.onExpand=function(Ke){var Ve=Vt.props,sn=Ve.loading,Mn=Ve.context.onNodeExpand;sn||Mn(Ke,(0,st.F)(Vt.props))},Vt.setSelectHandle=function(Ke){Vt.selectHandle=Ke},Vt.getNodeState=function(){var Ke=Vt.props.expanded;return Vt.isLeaf()?null:Ke?vt:wt},Vt.hasChildren=function(){var Ke=Vt.props.eventKey,Ve=Vt.props.context.keyEntities,sn=(0,ht.Z)(Ve,Ke)||{},Mn=sn.children;return!!(Mn||[]).length},Vt.isLeaf=function(){var Ke=Vt.props,Ve=Ke.isLeaf,sn=Ke.loaded,Mn=Vt.props.context.loadData,xe=Vt.hasChildren();return Ve===!1?!1:Ve||!Mn&&!xe||Mn&&sn&&!xe},Vt.isDisabled=function(){var Ke=Vt.props.disabled,Ve=Vt.props.context.disabled;return!!(Ve||Ke)},Vt.isCheckable=function(){var Ke=Vt.props.checkable,Ve=Vt.props.context.checkable;return!Ve||Ke===!1?!1:Ve},Vt.syncLoadData=function(Ke){var Ve=Ke.expanded,sn=Ke.loading,Mn=Ke.loaded,xe=Vt.props.context,Ht=xe.loadData,Je=xe.onNodeLoad;sn||Ht&&Ve&&!Vt.isLeaf()&&!Vt.hasChildren()&&!Mn&&Je((0,st.F)(Vt.props))},Vt.isDraggable=function(){var Ke=Vt.props,Ve=Ke.data,sn=Ke.context.draggable;return!!(sn&&(!sn.nodeDraggable||sn.nodeDraggable(Ve)))},Vt.renderDragHandler=function(){var Ke=Vt.props.context,Ve=Ke.draggable,sn=Ke.prefixCls;return Ve!=null&&Ve.icon?Be.createElement("span",{className:"".concat(sn,"-draggable-icon")},Ve.icon):null},Vt.renderSwitcherIconDom=function(Ke){var Ve=Vt.props.switcherIcon,sn=Vt.props.context.switcherIcon,Mn=Ve||sn;return typeof Mn=="function"?Mn((0,Me.Z)((0,Me.Z)({},Vt.props),{},{isLeaf:Ke})):Mn},Vt.renderSwitcher=function(){var Ke=Vt.props.expanded,Ve=Vt.props.context.prefixCls;if(Vt.isLeaf()){var sn=Vt.renderSwitcherIconDom(!0);return sn!==!1?Be.createElement("span",{className:ce()("".concat(Ve,"-switcher"),"".concat(Ve,"-switcher-noop"))},sn):null}var Mn=ce()("".concat(Ve,"-switcher"),"".concat(Ve,"-switcher_").concat(Ke?vt:wt)),xe=Vt.renderSwitcherIconDom(!1);return xe!==!1?Be.createElement("span",{onClick:Vt.onExpand,className:Mn},xe):null},Vt.renderCheckbox=function(){var Ke=Vt.props,Ve=Ke.checked,sn=Ke.halfChecked,Mn=Ke.disableCheckbox,xe=Vt.props.context.prefixCls,Ht=Vt.isDisabled(),Je=Vt.isCheckable();if(!Je)return null;var Tn=typeof Je!="boolean"?Je:null;return Be.createElement("span",{className:ce()("".concat(xe,"-checkbox"),Ve&&"".concat(xe,"-checkbox-checked"),!Ve&&sn&&"".concat(xe,"-checkbox-indeterminate"),(Ht||Mn)&&"".concat(xe,"-checkbox-disabled")),onClick:Vt.onCheck},Tn)},Vt.renderIcon=function(){var Ke=Vt.props.loading,Ve=Vt.props.context.prefixCls;return Be.createElement("span",{className:ce()("".concat(Ve,"-iconEle"),"".concat(Ve,"-icon__").concat(Vt.getNodeState()||"docu"),Ke&&"".concat(Ve,"-icon_loading"))})},Vt.renderSelector=function(){var Ke=Vt.state.dragNodeHighlight,Ve=Vt.props,sn=Ve.title,Mn=sn===void 0?Ft:sn,xe=Ve.selected,Ht=Ve.icon,Je=Ve.loading,Tn=Ve.data,An=Vt.props.context,ze=An.prefixCls,Te=An.showIcon,dn=An.icon,Hn=An.loadData,hn=An.titleRender,pn=Vt.isDisabled(),de="".concat(ze,"-node-content-wrapper"),vn;if(Te){var bn=Ht||dn;vn=bn?Be.createElement("span",{className:ce()("".concat(ze,"-iconEle"),"".concat(ze,"-icon__customize"))},typeof bn=="function"?bn(Vt.props):bn):Vt.renderIcon()}else Hn&&Je&&(vn=Vt.renderIcon());var Qe;typeof Mn=="function"?Qe=Mn(Tn):hn?Qe=hn(Tn):Qe=Mn;var Pn=Be.createElement("span",{className:"".concat(ze,"-title")},Qe);return Be.createElement("span",{ref:Vt.setSelectHandle,title:typeof Mn=="string"?Mn:"",className:ce()("".concat(de),"".concat(de,"-").concat(Vt.getNodeState()||"normal"),!pn&&(xe||Ke)&&"".concat(ze,"-node-selected")),onMouseEnter:Vt.onMouseEnter,onMouseLeave:Vt.onMouseLeave,onContextMenu:Vt.onContextMenu,onClick:Vt.onSelectorClick,onDoubleClick:Vt.onSelectorDoubleClick},vn,Pn,Vt.renderDropIndicator())},Vt.renderDropIndicator=function(){var Ke=Vt.props,Ve=Ke.disabled,sn=Ke.eventKey,Mn=Vt.props.context,xe=Mn.draggable,Ht=Mn.dropLevelOffset,Je=Mn.dropPosition,Tn=Mn.prefixCls,An=Mn.indent,ze=Mn.dropIndicatorRender,Te=Mn.dragOverNodeKey,dn=Mn.direction,Hn=!!xe,hn=!Ve&&Hn&&Te===sn,pn=An!=null?An:Vt.cacheIndent;return Vt.cacheIndent=An,hn?ze({dropPosition:Je,dropLevelOffset:Ht,indent:pn,prefixCls:Tn,direction:dn}):null},Vt}return(0,pe.Z)(me,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Le=this.props.selectable,he=this.props.context.selectable;return typeof Le=="boolean"?Le:he}},{key:"render",value:function(){var Le,he=this.props,Ge=he.eventKey,Ke=he.className,Ve=he.style,sn=he.dragOver,Mn=he.dragOverGapTop,xe=he.dragOverGapBottom,Ht=he.isLeaf,Je=he.isStart,Tn=he.isEnd,An=he.expanded,ze=he.selected,Te=he.checked,dn=he.halfChecked,Hn=he.loading,hn=he.domRef,pn=he.active,de=he.data,vn=he.onMouseMove,bn=he.selectable,Qe=(0,Qt.Z)(he,gt),Pn=this.props.context,Ne=Pn.prefixCls,Pe=Pn.filterTreeNode,ie=Pn.keyEntities,Dt=Pn.dropContainerKey,fe=Pn.dropTargetKey,Se=Pn.draggingNodeKey,ee=this.isDisabled(),Kt=(0,Ce.Z)(Qe,{aria:!0,data:!0}),kt=(0,ht.Z)(ie,Ge)||{},St=kt.level,mt=Tn[Tn.length-1],Lt=this.isDraggable(),zt=!ee&&Lt,Et=Se===Ge,Yt=bn!==void 0?{"aria-selected":!!bn}:void 0;return Be.createElement("div",(0,Ot.Z)({ref:hn,className:ce()(Ke,"".concat(Ne,"-treenode"),(Le={},(0,jt.Z)(Le,"".concat(Ne,"-treenode-disabled"),ee),(0,jt.Z)(Le,"".concat(Ne,"-treenode-switcher-").concat(An?"open":"close"),!Ht),(0,jt.Z)(Le,"".concat(Ne,"-treenode-checkbox-checked"),Te),(0,jt.Z)(Le,"".concat(Ne,"-treenode-checkbox-indeterminate"),dn),(0,jt.Z)(Le,"".concat(Ne,"-treenode-selected"),ze),(0,jt.Z)(Le,"".concat(Ne,"-treenode-loading"),Hn),(0,jt.Z)(Le,"".concat(Ne,"-treenode-active"),pn),(0,jt.Z)(Le,"".concat(Ne,"-treenode-leaf-last"),mt),(0,jt.Z)(Le,"".concat(Ne,"-treenode-draggable"),Lt),(0,jt.Z)(Le,"dragging",Et),(0,jt.Z)(Le,"drop-target",fe===Ge),(0,jt.Z)(Le,"drop-container",Dt===Ge),(0,jt.Z)(Le,"drag-over",!ee&&sn),(0,jt.Z)(Le,"drag-over-gap-top",!ee&&Mn),(0,jt.Z)(Le,"drag-over-gap-bottom",!ee&&xe),(0,jt.Z)(Le,"filter-node",Pe&&Pe((0,st.F)(this.props))),Le)),style:Ve,draggable:zt,"aria-grabbed":Et,onDragStart:zt?this.onDragStart:void 0,onDragEnter:Lt?this.onDragEnter:void 0,onDragOver:Lt?this.onDragOver:void 0,onDragLeave:Lt?this.onDragLeave:void 0,onDrop:Lt?this.onDrop:void 0,onDragEnd:Lt?this.onDragEnd:void 0,onMouseMove:vn},Yt,Kt),Be.createElement(nt,{prefixCls:Ne,level:St,isStart:Je,isEnd:Tn}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),me}(Be.Component),At=function(ne){return Be.createElement(Tt.k.Consumer,null,function(me){return Be.createElement(It,(0,Ot.Z)({},ne,{context:me}))})};At.displayName="TreeNode",At.isTreeNode=1;var Wt=At},39378:function(En,yn,xt){"use strict";xt.d(yn,{k:function(){return jt}});var Ot=xt(59301),jt=Ot.createContext(null)},54844:function(En,yn,xt){"use strict";xt.d(yn,{O:function(){return Wt.Z},Z:function(){return Pn}});var Ot=xt(72308),jt=xt(49618),Qt=xt(62853),Me=xt(77321),Ut=xt(80702),pe=xt(96949),Nt=xt(55090),Ie=xt(80237),we=xt(77205),qt=xt(38793),ce=xt(92310),Ce=xt.n(ce),Be=xt(10228),Tt=xt(26112),et=xt(48736),nt=xt(59301),ht=xt(39378);function st(Ne){var Pe=Ne.dropPosition,ie=Ne.dropLevelOffset,Dt=Ne.indent,fe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Pe){case-1:fe.top=0,fe.left=-ie*Dt;break;case 1:fe.bottom=0,fe.left=-ie*Dt;break;case 0:fe.bottom=0,fe.left=Dt;break}return nt.createElement("div",{style:fe})}function gt(Ne){if(Ne==null)throw new TypeError("Cannot destructure "+Ne)}var vt=xt(52487),wt=xt(74416),Ft=xt(34280),It=xt(45680),At=xt(77900),Wt=xt(39417);function re(Ne,Pe){var ie=nt.useState(!1),Dt=(0,vt.Z)(ie,2),fe=Dt[0],Se=Dt[1];nt.useLayoutEffect(function(){if(fe)return Ne(),function(){Pe()}},[fe]),nt.useLayoutEffect(function(){return Se(!0),function(){Se(!1)}},[])}var ne=xt(71430),me=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Vt=function(Pe,ie){var Dt=Pe.className,fe=Pe.style,Se=Pe.motion,ee=Pe.motionNodes,Kt=Pe.motionType,kt=Pe.onMotionStart,St=Pe.onMotionEnd,mt=Pe.active,Lt=Pe.treeNodeRequiredProps,zt=(0,wt.Z)(Pe,me),Et=nt.useState(!0),Yt=(0,vt.Z)(Et,2),$e=Yt[0],ln=Yt[1],qe=nt.useContext(ht.k),Nn=qe.prefixCls,ai=ee&&Kt!=="hide";(0,Ft.Z)(function(){ee&&ai!==$e&&ln(ai)},[ee]);var Kn=function(){ee&&kt()},ci=nt.useRef(!1),Ci=function(){ee&&!ci.current&&(ci.current=!0,St())};re(Kn,Ci);var Wi=function(mo){ai===mo&&Ci()};return ee?nt.createElement(At.default,(0,Ot.Z)({ref:ie,visible:$e},Se,{motionAppear:Kt==="show",onVisibleChanged:Wi}),function(Oi,mo){var Bo=Oi.className,Ao=Oi.style;return nt.createElement("div",{ref:mo,className:Ce()("".concat(Nn,"-treenode-motion"),Bo),style:Ao},ee.map(function(oi){var fi=(0,Ot.Z)({},(gt(oi.data),oi.data)),di=oi.title,mi=oi.key,co=oi.isStart,Sn=oi.isEnd;delete fi.children;var Ct=(0,ne.H8)(mi,Lt);return nt.createElement(Wt.Z,(0,Ot.Z)({},fi,Ct,{title:di,active:mt,data:oi.data,key:mi,isStart:co,isEnd:Sn}))}))}):nt.createElement(Wt.Z,(0,Ot.Z)({domRef:ie,className:Dt,style:fe},zt,{active:mt}))};Vt.displayName="MotionTreeNode";var Le=nt.forwardRef(Vt),he=Le;function Ge(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ie=Ne.length,Dt=Pe.length;if(Math.abs(ie-Dt)!==1)return{add:!1,key:null};function fe(Se,ee){var Kt=new Map;Se.forEach(function(St){Kt.set(St,!0)});var kt=ee.filter(function(St){return!Kt.has(St)});return kt.length===1?kt[0]:null}return ie<Dt?{add:!0,key:fe(Ne,Pe)}:{add:!1,key:fe(Pe,Ne)}}function Ke(Ne,Pe,ie){var Dt=Ne.findIndex(function(Kt){return Kt.key===ie}),fe=Ne[Dt+1],Se=Pe.findIndex(function(Kt){return Kt.key===ie});if(fe){var ee=Pe.findIndex(function(Kt){return Kt.key===fe.key});return Pe.slice(Se+1,ee)}return Pe.slice(Se+1)}var Ve=["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"],sn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Mn=function(){},xe="RC_TREE_MOTION_".concat(Math.random()),Ht={key:xe},Je={key:xe,level:0,index:0,pos:"0",node:Ht,nodes:[Ht]},Tn={parent:null,children:[],pos:Je.pos,data:Ht,title:null,key:xe,isStart:[],isEnd:[]};function An(Ne,Pe,ie,Dt){return Pe===!1||!ie?Ne:Ne.slice(0,Math.ceil(ie/Dt)+1)}function ze(Ne){var Pe=Ne.key,ie=Ne.pos;return(0,ne.km)(Pe,ie)}function Te(Ne){for(var Pe=String(Ne.data.key),ie=Ne;ie.parent;)ie=ie.parent,Pe="".concat(ie.data.key," > ").concat(Pe);return Pe}var dn=nt.forwardRef(function(Ne,Pe){var ie=Ne.prefixCls,Dt=Ne.data,fe=Ne.selectable,Se=Ne.checkable,ee=Ne.expandedKeys,Kt=Ne.selectedKeys,kt=Ne.checkedKeys,St=Ne.loadedKeys,mt=Ne.loadingKeys,Lt=Ne.halfCheckedKeys,zt=Ne.keyEntities,Et=Ne.disabled,Yt=Ne.dragging,$e=Ne.dragOverNodeKey,ln=Ne.dropPosition,qe=Ne.motion,Nn=Ne.height,ai=Ne.itemHeight,Kn=Ne.virtual,ci=Ne.focusable,Ci=Ne.activeItem,Wi=Ne.focused,Oi=Ne.tabIndex,mo=Ne.onKeyDown,Bo=Ne.onFocus,Ao=Ne.onBlur,oi=Ne.onActiveChange,fi=Ne.onListChangeStart,di=Ne.onListChangeEnd,mi=(0,wt.Z)(Ne,Ve),co=nt.useRef(null),Sn=nt.useRef(null);nt.useImperativeHandle(Pe,function(){return{scrollTo:function(Xe){co.current.scrollTo(Xe)},getIndentWidth:function(){return Sn.current.offsetWidth}}});var Ct=nt.useState(ee),Yn=(0,vt.Z)(Ct,2),yi=Yn[0],_e=Yn[1],Wn=nt.useState(Dt),_n=(0,vt.Z)(Wn,2),si=_n[0],ri=_n[1],hi=nt.useState(Dt),Fe=(0,vt.Z)(hi,2),Ae=Fe[0],Zt=Fe[1],He=nt.useState([]),fn=(0,vt.Z)(He,2),ye=fn[0],ae=fn[1],Ye=nt.useState(null),gn=(0,vt.Z)(Ye,2),In=gn[0],Re=gn[1],_t=nt.useRef(Dt);_t.current=Dt;function nn(){var Oe=_t.current;ri(Oe),Zt(Oe),ae([]),Re(null),di()}(0,Ft.Z)(function(){_e(ee);var Oe=Ge(yi,ee);if(Oe.key!==null)if(Oe.add){var Xe=si.findIndex(function(Qn){var qn=Qn.key;return qn===Oe.key}),Gn=An(Ke(si,Dt,Oe.key),Kn,Nn,ai),Xn=si.slice();Xn.splice(Xe+1,0,Tn),Zt(Xn),ae(Gn),Re("show")}else{var Jn=Dt.findIndex(function(Qn){var qn=Qn.key;return qn===Oe.key}),Rn=An(Ke(Dt,si,Oe.key),Kn,Nn,ai),ni=Dt.slice();ni.splice(Jn+1,0,Tn),Zt(ni),ae(Rn),Re("hide")}else si!==Dt&&(ri(Dt),Zt(Dt))},[ee,Dt]),nt.useEffect(function(){Yt||nn()},[Yt]);var cn=qe?Ae:Dt,Bn={expandedKeys:ee,selectedKeys:Kt,loadedKeys:St,loadingKeys:mt,checkedKeys:kt,halfCheckedKeys:Lt,dragOverNodeKey:$e,dropPosition:ln,keyEntities:zt};return nt.createElement(nt.Fragment,null,Wi&&Ci&&nt.createElement("span",{style:sn,"aria-live":"assertive"},Te(Ci)),nt.createElement("div",null,nt.createElement("input",{style:sn,disabled:ci===!1||Et,tabIndex:ci!==!1?Oi:null,onKeyDown:mo,onFocus:Bo,onBlur:Ao,value:"",onChange:Mn,"aria-label":"for screen reader"})),nt.createElement("div",{className:"".concat(ie,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},nt.createElement("div",{className:"".concat(ie,"-indent")},nt.createElement("div",{ref:Sn,className:"".concat(ie,"-indent-unit")}))),nt.createElement(It.Z,(0,Ot.Z)({},mi,{data:cn,itemKey:ze,height:Nn,fullHeight:!1,virtual:Kn,itemHeight:ai,prefixCls:"".concat(ie,"-list"),ref:co,onVisibleChange:function(Xe,Gn){var Xn=new Set(Xe),Jn=Gn.filter(function(Rn){return!Xn.has(Rn)});Jn.some(function(Rn){return ze(Rn)===xe})&&nn()}}),function(Oe){var Xe=Oe.pos,Gn=(0,Ot.Z)({},(gt(Oe.data),Oe.data)),Xn=Oe.title,Jn=Oe.key,Rn=Oe.isStart,ni=Oe.isEnd,Qn=(0,ne.km)(Jn,Xe);delete Gn.key,delete Gn.children;var qn=(0,ne.H8)(Qn,Bn);return nt.createElement(he,(0,Ot.Z)({},Gn,qn,{title:Xn,active:!!Ci&&Jn===Ci.key,pos:Xe,data:Oe.data,isStart:Rn,isEnd:ni,motion:qe,motionNodes:Jn===xe?ye:null,motionType:In,onMotionStart:fi,onMotionEnd:nn,treeNodeRequiredProps:Bn,onMouseMove:function(){oi(null)}}))}))});dn.displayName="NodeList";var Hn=dn,hn=xt(35654),pn=xt(90782),de=xt(67841),vn=10,bn=function(Ne){(0,we.Z)(ie,Ne);var Pe=(0,qt.Z)(ie);function ie(){var Dt;(0,pe.Z)(this,ie);for(var fe=arguments.length,Se=new Array(fe),ee=0;ee<fe;ee++)Se[ee]=arguments[ee];return Dt=Pe.call.apply(Pe,[this].concat(Se)),Dt.destroyed=!1,Dt.delayedDragEnterLogic=void 0,Dt.loadingRetryTimes={},Dt.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,ne.w$)()},Dt.dragStartMousePosition=null,Dt.dragNode=void 0,Dt.currentMouseOverDroppableNodeKey=null,Dt.listRef=nt.createRef(),Dt.onNodeDragStart=function(Kt,kt){var St=Dt.state,mt=St.expandedKeys,Lt=St.keyEntities,zt=Dt.props.onDragStart,Et=kt.props.eventKey;Dt.dragNode=kt,Dt.dragStartMousePosition={x:Kt.clientX,y:Kt.clientY};var Yt=(0,hn._5)(mt,Et);Dt.setState({draggingNodeKey:Et,dragChildrenKeys:(0,hn.wA)(Et,Lt),indent:Dt.listRef.current.getIndentWidth()}),Dt.setExpandedKeys(Yt),window.addEventListener("dragend",Dt.onWindowDragEnd),zt==null||zt({event:Kt,node:(0,ne.F)(kt.props)})},Dt.onNodeDragEnter=function(Kt,kt){var St=Dt.state,mt=St.expandedKeys,Lt=St.keyEntities,zt=St.dragChildrenKeys,Et=St.flattenNodes,Yt=St.indent,$e=Dt.props,ln=$e.onDragEnter,qe=$e.onExpand,Nn=$e.allowDrop,ai=$e.direction,Kn=kt.props,ci=Kn.pos,Ci=Kn.eventKey,Wi=(0,Ie.Z)(Dt),Oi=Wi.dragNode;if(Dt.currentMouseOverDroppableNodeKey!==Ci&&(Dt.currentMouseOverDroppableNodeKey=Ci),!Oi){Dt.resetDragState();return}var mo=(0,hn.OM)(Kt,Oi,kt,Yt,Dt.dragStartMousePosition,Nn,Et,Lt,mt,ai),Bo=mo.dropPosition,Ao=mo.dropLevelOffset,oi=mo.dropTargetKey,fi=mo.dropContainerKey,di=mo.dropTargetPos,mi=mo.dropAllowed,co=mo.dragOverNodeKey;if(zt.indexOf(oi)!==-1||!mi){Dt.resetDragState();return}if(Dt.delayedDragEnterLogic||(Dt.delayedDragEnterLogic={}),Object.keys(Dt.delayedDragEnterLogic).forEach(function(Sn){clearTimeout(Dt.delayedDragEnterLogic[Sn])}),Oi.props.eventKey!==kt.props.eventKey&&(Kt.persist(),Dt.delayedDragEnterLogic[ci]=window.setTimeout(function(){if(Dt.state.draggingNodeKey!==null){var Sn=(0,Ut.Z)(mt),Ct=(0,de.Z)(Lt,kt.props.eventKey);Ct&&(Ct.children||[]).length&&(Sn=(0,hn.L0)(mt,kt.props.eventKey)),"expandedKeys"in Dt.props||Dt.setExpandedKeys(Sn),qe==null||qe(Sn,{node:(0,ne.F)(kt.props),expanded:!0,nativeEvent:Kt.nativeEvent})}},800)),Oi.props.eventKey===oi&&Ao===0){Dt.resetDragState();return}Dt.setState({dragOverNodeKey:co,dropPosition:Bo,dropLevelOffset:Ao,dropTargetKey:oi,dropContainerKey:fi,dropTargetPos:di,dropAllowed:mi}),ln==null||ln({event:Kt,node:(0,ne.F)(kt.props),expandedKeys:mt})},Dt.onNodeDragOver=function(Kt,kt){var St=Dt.state,mt=St.dragChildrenKeys,Lt=St.flattenNodes,zt=St.keyEntities,Et=St.expandedKeys,Yt=St.indent,$e=Dt.props,ln=$e.onDragOver,qe=$e.allowDrop,Nn=$e.direction,ai=(0,Ie.Z)(Dt),Kn=ai.dragNode;if(Kn){var ci=(0,hn.OM)(Kt,Kn,kt,Yt,Dt.dragStartMousePosition,qe,Lt,zt,Et,Nn),Ci=ci.dropPosition,Wi=ci.dropLevelOffset,Oi=ci.dropTargetKey,mo=ci.dropContainerKey,Bo=ci.dropAllowed,Ao=ci.dropTargetPos,oi=ci.dragOverNodeKey;mt.indexOf(Oi)!==-1||!Bo||(Kn.props.eventKey===Oi&&Wi===0?Dt.state.dropPosition===null&&Dt.state.dropLevelOffset===null&&Dt.state.dropTargetKey===null&&Dt.state.dropContainerKey===null&&Dt.state.dropTargetPos===null&&Dt.state.dropAllowed===!1&&Dt.state.dragOverNodeKey===null||Dt.resetDragState():Ci===Dt.state.dropPosition&&Wi===Dt.state.dropLevelOffset&&Oi===Dt.state.dropTargetKey&&mo===Dt.state.dropContainerKey&&Ao===Dt.state.dropTargetPos&&Bo===Dt.state.dropAllowed&&oi===Dt.state.dragOverNodeKey||Dt.setState({dropPosition:Ci,dropLevelOffset:Wi,dropTargetKey:Oi,dropContainerKey:mo,dropTargetPos:Ao,dropAllowed:Bo,dragOverNodeKey:oi}),ln==null||ln({event:Kt,node:(0,ne.F)(kt.props)}))}},Dt.onNodeDragLeave=function(Kt,kt){Dt.currentMouseOverDroppableNodeKey===kt.props.eventKey&&!Kt.currentTarget.contains(Kt.relatedTarget)&&(Dt.resetDragState(),Dt.currentMouseOverDroppableNodeKey=null);var St=Dt.props.onDragLeave;St==null||St({event:Kt,node:(0,ne.F)(kt.props)})},Dt.onWindowDragEnd=function(Kt){Dt.onNodeDragEnd(Kt,null,!0),window.removeEventListener("dragend",Dt.onWindowDragEnd)},Dt.onNodeDragEnd=function(Kt,kt){var St=Dt.props.onDragEnd;Dt.setState({dragOverNodeKey:null}),Dt.cleanDragState(),St==null||St({event:Kt,node:(0,ne.F)(kt.props)}),Dt.dragNode=null,window.removeEventListener("dragend",Dt.onWindowDragEnd)},Dt.onNodeDrop=function(Kt,kt){var St,mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Lt=Dt.state,zt=Lt.dragChildrenKeys,Et=Lt.dropPosition,Yt=Lt.dropTargetKey,$e=Lt.dropTargetPos,ln=Lt.dropAllowed;if(ln){var qe=Dt.props.onDrop;if(Dt.setState({dragOverNodeKey:null}),Dt.cleanDragState(),Yt!==null){var Nn=(0,Me.Z)((0,Me.Z)({},(0,ne.H8)(Yt,Dt.getTreeNodeRequiredProps())),{},{active:((St=Dt.getActiveItem())===null||St===void 0?void 0:St.key)===Yt,data:(0,de.Z)(Dt.state.keyEntities,Yt).node}),ai=zt.indexOf(Yt)!==-1;(0,et.ZP)(!ai,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Kn=(0,hn.yx)($e),ci={event:Kt,node:(0,ne.F)(Nn),dragNode:Dt.dragNode?(0,ne.F)(Dt.dragNode.props):null,dragNodesKeys:[Dt.dragNode.props.eventKey].concat(zt),dropToGap:Et!==0,dropPosition:Et+Number(Kn[Kn.length-1])};mt||qe==null||qe(ci),Dt.dragNode=null}}},Dt.cleanDragState=function(){var Kt=Dt.state.draggingNodeKey;Kt!==null&&Dt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Dt.dragStartMousePosition=null,Dt.currentMouseOverDroppableNodeKey=null},Dt.triggerExpandActionExpand=function(Kt,kt){var St=Dt.state,mt=St.expandedKeys,Lt=St.flattenNodes,zt=kt.expanded,Et=kt.key,Yt=kt.isLeaf;if(!(Yt||Kt.shiftKey||Kt.metaKey||Kt.ctrlKey)){var $e=Lt.filter(function(qe){return qe.key===Et})[0],ln=(0,ne.F)((0,Me.Z)((0,Me.Z)({},(0,ne.H8)(Et,Dt.getTreeNodeRequiredProps())),{},{data:$e.data}));Dt.setExpandedKeys(zt?(0,hn._5)(mt,Et):(0,hn.L0)(mt,Et)),Dt.onNodeExpand(Kt,ln)}},Dt.onNodeClick=function(Kt,kt){var St=Dt.props,mt=St.onClick,Lt=St.expandAction;Lt==="click"&&Dt.triggerExpandActionExpand(Kt,kt),mt==null||mt(Kt,kt)},Dt.onNodeDoubleClick=function(Kt,kt){var St=Dt.props,mt=St.onDoubleClick,Lt=St.expandAction;Lt==="doubleClick"&&Dt.triggerExpandActionExpand(Kt,kt),mt==null||mt(Kt,kt)},Dt.onNodeSelect=function(Kt,kt){var St=Dt.state.selectedKeys,mt=Dt.state,Lt=mt.keyEntities,zt=mt.fieldNames,Et=Dt.props,Yt=Et.onSelect,$e=Et.multiple,ln=kt.selected,qe=kt[zt.key],Nn=!ln;Nn?$e?St=(0,hn.L0)(St,qe):St=[qe]:St=(0,hn._5)(St,qe);var ai=St.map(function(Kn){var ci=(0,de.Z)(Lt,Kn);return ci?ci.node:null}).filter(function(Kn){return Kn});Dt.setUncontrolledState({selectedKeys:St}),Yt==null||Yt(St,{event:"select",selected:Nn,node:kt,selectedNodes:ai,nativeEvent:Kt.nativeEvent})},Dt.onNodeCheck=function(Kt,kt,St){var mt=Dt.state,Lt=mt.keyEntities,zt=mt.checkedKeys,Et=mt.halfCheckedKeys,Yt=Dt.props,$e=Yt.checkStrictly,ln=Yt.onCheck,qe=kt.key,Nn,ai={event:"check",node:kt,checked:St,nativeEvent:Kt.nativeEvent};if($e){var Kn=St?(0,hn.L0)(zt,qe):(0,hn._5)(zt,qe),ci=(0,hn._5)(Et,qe);Nn={checked:Kn,halfChecked:ci},ai.checkedNodes=Kn.map(function(Ao){return(0,de.Z)(Lt,Ao)}).filter(function(Ao){return Ao}).map(function(Ao){return Ao.node}),Dt.setUncontrolledState({checkedKeys:Kn})}else{var Ci=(0,pn.S)([].concat((0,Ut.Z)(zt),[qe]),!0,Lt),Wi=Ci.checkedKeys,Oi=Ci.halfCheckedKeys;if(!St){var mo=new Set(Wi);mo.delete(qe);var Bo=(0,pn.S)(Array.from(mo),{checked:!1,halfCheckedKeys:Oi},Lt);Wi=Bo.checkedKeys,Oi=Bo.halfCheckedKeys}Nn=Wi,ai.checkedNodes=[],ai.checkedNodesPositions=[],ai.halfCheckedKeys=Oi,Wi.forEach(function(Ao){var oi=(0,de.Z)(Lt,Ao);if(oi){var fi=oi.node,di=oi.pos;ai.checkedNodes.push(fi),ai.checkedNodesPositions.push({node:fi,pos:di})}}),Dt.setUncontrolledState({checkedKeys:Wi},!1,{halfCheckedKeys:Oi})}ln==null||ln(Nn,ai)},Dt.onNodeLoad=function(Kt){var kt=Kt.key,St=new Promise(function(mt,Lt){Dt.setState(function(zt){var Et=zt.loadedKeys,Yt=Et===void 0?[]:Et,$e=zt.loadingKeys,ln=$e===void 0?[]:$e,qe=Dt.props,Nn=qe.loadData,ai=qe.onLoad;if(!Nn||Yt.indexOf(kt)!==-1||ln.indexOf(kt)!==-1)return null;var Kn=Nn(Kt);return Kn.then(function(){var ci=Dt.state.loadedKeys,Ci=(0,hn.L0)(ci,kt);ai==null||ai(Ci,{event:"load",node:Kt}),Dt.setUncontrolledState({loadedKeys:Ci}),Dt.setState(function(Wi){return{loadingKeys:(0,hn._5)(Wi.loadingKeys,kt)}}),mt()}).catch(function(ci){if(Dt.setState(function(Wi){return{loadingKeys:(0,hn._5)(Wi.loadingKeys,kt)}}),Dt.loadingRetryTimes[kt]=(Dt.loadingRetryTimes[kt]||0)+1,Dt.loadingRetryTimes[kt]>=vn){var Ci=Dt.state.loadedKeys;(0,et.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Dt.setUncontrolledState({loadedKeys:(0,hn.L0)(Ci,kt)}),mt()}Lt(ci)}),{loadingKeys:(0,hn.L0)(ln,kt)}})});return St.catch(function(){}),St},Dt.onNodeMouseEnter=function(Kt,kt){var St=Dt.props.onMouseEnter;St==null||St({event:Kt,node:kt})},Dt.onNodeMouseLeave=function(Kt,kt){var St=Dt.props.onMouseLeave;St==null||St({event:Kt,node:kt})},Dt.onNodeContextMenu=function(Kt,kt){var St=Dt.props.onRightClick;St&&(Kt.preventDefault(),St({event:Kt,node:kt}))},Dt.onFocus=function(){var Kt=Dt.props.onFocus;Dt.setState({focused:!0});for(var kt=arguments.length,St=new Array(kt),mt=0;mt<kt;mt++)St[mt]=arguments[mt];Kt==null||Kt.apply(void 0,St)},Dt.onBlur=function(){var Kt=Dt.props.onBlur;Dt.setState({focused:!1}),Dt.onActiveChange(null);for(var kt=arguments.length,St=new Array(kt),mt=0;mt<kt;mt++)St[mt]=arguments[mt];Kt==null||Kt.apply(void 0,St)},Dt.getTreeNodeRequiredProps=function(){var Kt=Dt.state,kt=Kt.expandedKeys,St=Kt.selectedKeys,mt=Kt.loadedKeys,Lt=Kt.loadingKeys,zt=Kt.checkedKeys,Et=Kt.halfCheckedKeys,Yt=Kt.dragOverNodeKey,$e=Kt.dropPosition,ln=Kt.keyEntities;return{expandedKeys:kt||[],selectedKeys:St||[],loadedKeys:mt||[],loadingKeys:Lt||[],checkedKeys:zt||[],halfCheckedKeys:Et||[],dragOverNodeKey:Yt,dropPosition:$e,keyEntities:ln}},Dt.setExpandedKeys=function(Kt){var kt=Dt.state,St=kt.treeData,mt=kt.fieldNames,Lt=(0,ne.oH)(St,Kt,mt);Dt.setUncontrolledState({expandedKeys:Kt,flattenNodes:Lt},!0)},Dt.onNodeExpand=function(Kt,kt){var St=Dt.state.expandedKeys,mt=Dt.state,Lt=mt.listChanging,zt=mt.fieldNames,Et=Dt.props,Yt=Et.onExpand,$e=Et.loadData,ln=kt.expanded,qe=kt[zt.key];if(!Lt){var Nn=St.indexOf(qe),ai=!ln;if((0,et.ZP)(ln&&Nn!==-1||!ln&&Nn===-1,"Expand state not sync with index check"),ai?St=(0,hn.L0)(St,qe):St=(0,hn._5)(St,qe),Dt.setExpandedKeys(St),Yt==null||Yt(St,{node:kt,expanded:ai,nativeEvent:Kt.nativeEvent}),ai&&$e){var Kn=Dt.onNodeLoad(kt);Kn&&Kn.then(function(){var ci=(0,ne.oH)(Dt.state.treeData,St,zt);Dt.setUncontrolledState({flattenNodes:ci})}).catch(function(){var ci=Dt.state.expandedKeys,Ci=(0,hn._5)(ci,qe);Dt.setExpandedKeys(Ci)})}}},Dt.onListChangeStart=function(){Dt.setUncontrolledState({listChanging:!0})},Dt.onListChangeEnd=function(){setTimeout(function(){Dt.setUncontrolledState({listChanging:!1})})},Dt.onActiveChange=function(Kt){var kt=Dt.state.activeKey,St=Dt.props.onActiveChange;kt!==Kt&&(Dt.setState({activeKey:Kt}),Kt!==null&&Dt.scrollTo({key:Kt}),St==null||St(Kt))},Dt.getActiveItem=function(){var Kt=Dt.state,kt=Kt.activeKey,St=Kt.flattenNodes;return kt===null?null:St.find(function(mt){var Lt=mt.key;return Lt===kt})||null},Dt.offsetActiveKey=function(Kt){var kt=Dt.state,St=kt.flattenNodes,mt=kt.activeKey,Lt=St.findIndex(function(Yt){var $e=Yt.key;return $e===mt});Lt===-1&&Kt<0&&(Lt=St.length),Lt=(Lt+Kt+St.length)%St.length;var zt=St[Lt];if(zt){var Et=zt.key;Dt.onActiveChange(Et)}else Dt.onActiveChange(null)},Dt.onKeyDown=function(Kt){var kt=Dt.state,St=kt.activeKey,mt=kt.expandedKeys,Lt=kt.checkedKeys,zt=kt.fieldNames,Et=Dt.props,Yt=Et.onKeyDown,$e=Et.checkable,ln=Et.selectable;switch(Kt.which){case Be.Z.UP:{Dt.offsetActiveKey(-1),Kt.preventDefault();break}case Be.Z.DOWN:{Dt.offsetActiveKey(1),Kt.preventDefault();break}}var qe=Dt.getActiveItem();if(qe&&qe.data){var Nn=Dt.getTreeNodeRequiredProps(),ai=qe.data.isLeaf===!1||!!(qe.data[zt.children]||[]).length,Kn=(0,ne.F)((0,Me.Z)((0,Me.Z)({},(0,ne.H8)(St,Nn)),{},{data:qe.data,active:!0}));switch(Kt.which){case Be.Z.LEFT:{ai&&mt.includes(St)?Dt.onNodeExpand({},Kn):qe.parent&&Dt.onActiveChange(qe.parent.key),Kt.preventDefault();break}case Be.Z.RIGHT:{ai&&!mt.includes(St)?Dt.onNodeExpand({},Kn):qe.children&&qe.children.length&&Dt.onActiveChange(qe.children[0].key),Kt.preventDefault();break}case Be.Z.ENTER:case Be.Z.SPACE:{$e&&!Kn.disabled&&Kn.checkable!==!1&&!Kn.disableCheckbox?Dt.onNodeCheck({},Kn,!Lt.includes(St)):!$e&&ln&&!Kn.disabled&&Kn.selectable!==!1&&Dt.onNodeSelect({},Kn);break}}}Yt==null||Yt(Kt)},Dt.setUncontrolledState=function(Kt){var kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Dt.destroyed){var mt=!1,Lt=!0,zt={};Object.keys(Kt).forEach(function(Et){if(Et in Dt.props){Lt=!1;return}mt=!0,zt[Et]=Kt[Et]}),mt&&(!kt||Lt)&&Dt.setState((0,Me.Z)((0,Me.Z)({},zt),St))}},Dt.scrollTo=function(Kt){Dt.listRef.current.scrollTo(Kt)},Dt}return(0,Nt.Z)(ie,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var fe=this.props.activeKey;fe!==void 0&&fe!==this.state.activeKey&&(this.setState({activeKey:fe}),fe!==null&&this.scrollTo({key:fe}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var fe,Se=this.state,ee=Se.focused,Kt=Se.flattenNodes,kt=Se.keyEntities,St=Se.draggingNodeKey,mt=Se.activeKey,Lt=Se.dropLevelOffset,zt=Se.dropContainerKey,Et=Se.dropTargetKey,Yt=Se.dropPosition,$e=Se.dragOverNodeKey,ln=Se.indent,qe=this.props,Nn=qe.prefixCls,ai=qe.className,Kn=qe.style,ci=qe.showLine,Ci=qe.focusable,Wi=qe.tabIndex,Oi=Wi===void 0?0:Wi,mo=qe.selectable,Bo=qe.showIcon,Ao=qe.icon,oi=qe.switcherIcon,fi=qe.draggable,di=qe.checkable,mi=qe.checkStrictly,co=qe.disabled,Sn=qe.motion,Ct=qe.loadData,Yn=qe.filterTreeNode,yi=qe.height,_e=qe.itemHeight,Wn=qe.virtual,_n=qe.titleRender,si=qe.dropIndicatorRender,ri=qe.onContextMenu,hi=qe.onScroll,Fe=qe.direction,Ae=qe.rootClassName,Zt=qe.rootStyle,He=(0,Tt.Z)(this.props,{aria:!0,data:!0}),fn;return fi&&((0,Qt.Z)(fi)==="object"?fn=fi:typeof fi=="function"?fn={nodeDraggable:fi}:fn={}),nt.createElement(ht.k.Provider,{value:{prefixCls:Nn,selectable:mo,showIcon:Bo,icon:Ao,switcherIcon:oi,draggable:fn,draggingNodeKey:St,checkable:di,checkStrictly:mi,disabled:co,keyEntities:kt,dropLevelOffset:Lt,dropContainerKey:zt,dropTargetKey:Et,dropPosition:Yt,dragOverNodeKey:$e,indent:ln,direction:Fe,dropIndicatorRender:si,loadData:Ct,filterTreeNode:Yn,titleRender:_n,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},nt.createElement("div",{role:"tree",className:Ce()(Nn,ai,Ae,(fe={},(0,jt.Z)(fe,"".concat(Nn,"-show-line"),ci),(0,jt.Z)(fe,"".concat(Nn,"-focused"),ee),(0,jt.Z)(fe,"".concat(Nn,"-active-focused"),mt!==null),fe)),style:Zt},nt.createElement(Hn,(0,Ot.Z)({ref:this.listRef,prefixCls:Nn,style:Kn,data:Kt,disabled:co,selectable:mo,checkable:!!di,motion:Sn,dragging:St!==null,height:yi,itemHeight:_e,virtual:Wn,focusable:Ci,focused:ee,tabIndex:Oi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ri,onScroll:hi},this.getTreeNodeRequiredProps(),He))))}}],[{key:"getDerivedStateFromProps",value:function(fe,Se){var ee=Se.prevProps,Kt={prevProps:fe};function kt(Ci){return!ee&&Ci in fe||ee&&ee[Ci]!==fe[Ci]}var St,mt=Se.fieldNames;if(kt("fieldNames")&&(mt=(0,ne.w$)(fe.fieldNames),Kt.fieldNames=mt),kt("treeData")?St=fe.treeData:kt("children")&&((0,et.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),St=(0,ne.zn)(fe.children)),St){Kt.treeData=St;var Lt=(0,ne.I8)(St,{fieldNames:mt});Kt.keyEntities=(0,Me.Z)((0,jt.Z)({},xe,Je),Lt.keyEntities)}var zt=Kt.keyEntities||Se.keyEntities;if(kt("expandedKeys")||ee&&kt("autoExpandParent"))Kt.expandedKeys=fe.autoExpandParent||!ee&&fe.defaultExpandParent?(0,hn.r7)(fe.expandedKeys,zt):fe.expandedKeys;else if(!ee&&fe.defaultExpandAll){var Et=(0,Me.Z)({},zt);delete Et[xe],Kt.expandedKeys=Object.keys(Et).map(function(Ci){return Et[Ci].key})}else!ee&&fe.defaultExpandedKeys&&(Kt.expandedKeys=fe.autoExpandParent||fe.defaultExpandParent?(0,hn.r7)(fe.defaultExpandedKeys,zt):fe.defaultExpandedKeys);if(Kt.expandedKeys||delete Kt.expandedKeys,St||Kt.expandedKeys){var Yt=(0,ne.oH)(St||Se.treeData,Kt.expandedKeys||Se.expandedKeys,mt);Kt.flattenNodes=Yt}if(fe.selectable&&(kt("selectedKeys")?Kt.selectedKeys=(0,hn.BT)(fe.selectedKeys,fe):!ee&&fe.defaultSelectedKeys&&(Kt.selectedKeys=(0,hn.BT)(fe.defaultSelectedKeys,fe))),fe.checkable){var $e;if(kt("checkedKeys")?$e=(0,hn.E6)(fe.checkedKeys)||{}:!ee&&fe.defaultCheckedKeys?$e=(0,hn.E6)(fe.defaultCheckedKeys)||{}:St&&($e=(0,hn.E6)(fe.checkedKeys)||{checkedKeys:Se.checkedKeys,halfCheckedKeys:Se.halfCheckedKeys}),$e){var ln=$e,qe=ln.checkedKeys,Nn=qe===void 0?[]:qe,ai=ln.halfCheckedKeys,Kn=ai===void 0?[]:ai;if(!fe.checkStrictly){var ci=(0,pn.S)(Nn,!0,zt);Nn=ci.checkedKeys,Kn=ci.halfCheckedKeys}Kt.checkedKeys=Nn,Kt.halfCheckedKeys=Kn}}return kt("loadedKeys")&&(Kt.loadedKeys=fe.loadedKeys),Kt}}]),ie}(nt.Component);bn.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:st,allowDrop:function(){return!0},expandAction:!1},bn.TreeNode=Wt.Z;var Qe=bn,Pn=Qe},35654:function(En,yn,xt){"use strict";xt.d(yn,{BT:function(){return nt},E6:function(){return gt},L0:function(){return qt},OM:function(){return et},_5:function(){return we},r7:function(){return vt},wA:function(){return Ce},yx:function(){return ce}});var Ot=xt(80702),jt=xt(62853),Qt=xt(48736),Me=xt(59301),Ut=xt(39417),pe=xt(67841),Nt=xt(71430),Ie=null;function we(wt,Ft){if(!wt)return[];var It=wt.slice(),At=It.indexOf(Ft);return At>=0&&It.splice(At,1),It}function qt(wt,Ft){var It=(wt||[]).slice();return It.indexOf(Ft)===-1&&It.push(Ft),It}function ce(wt){return wt.split("-")}function Ce(wt,Ft){var It=[],At=(0,pe.Z)(Ft,wt);function Wt(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];re.forEach(function(ne){var me=ne.key,Vt=ne.children;It.push(me),Wt(Vt)})}return Wt(At.children),It}function Be(wt){if(wt.parent){var Ft=ce(wt.pos);return Number(Ft[Ft.length-1])===wt.parent.children.length-1}return!1}function Tt(wt){var Ft=ce(wt.pos);return Number(Ft[Ft.length-1])===0}function et(wt,Ft,It,At,Wt,re,ne,me,Vt,Le){var he,Ge=wt.clientX,Ke=wt.clientY,Ve=wt.target.getBoundingClientRect(),sn=Ve.top,Mn=Ve.height,xe=(Le==="rtl"?-1:1)*(((Wt==null?void 0:Wt.x)||0)-Ge),Ht=(xe-12)/At,Je=(0,pe.Z)(me,It.props.eventKey);if(Ke<sn+Mn/2){var Tn=ne.findIndex(function(Pn){return Pn.key===Je.key}),An=Tn<=0?0:Tn-1,ze=ne[An].key;Je=(0,pe.Z)(me,ze)}var Te=Je.key,dn=Je,Hn=Je.key,hn=0,pn=0;if(!Vt.includes(Te))for(var de=0;de<Ht&&Be(Je);de+=1)Je=Je.parent,pn+=1;var vn=Ft.props.data,bn=Je.node,Qe=!0;return Tt(Je)&&Je.level===0&&Ke<sn+Mn/2&&re({dragNode:vn,dropNode:bn,dropPosition:-1})&&Je.key===It.props.eventKey?hn=-1:(dn.children||[]).length&&Vt.includes(Hn)?re({dragNode:vn,dropNode:bn,dropPosition:0})?hn=0:Qe=!1:pn===0?Ht>-1.5?re({dragNode:vn,dropNode:bn,dropPosition:1})?hn=1:Qe=!1:re({dragNode:vn,dropNode:bn,dropPosition:0})?hn=0:re({dragNode:vn,dropNode:bn,dropPosition:1})?hn=1:Qe=!1:re({dragNode:vn,dropNode:bn,dropPosition:1})?hn=1:Qe=!1,{dropPosition:hn,dropLevelOffset:pn,dropTargetKey:Je.key,dropTargetPos:Je.pos,dragOverNodeKey:Hn,dropContainerKey:hn===0?null:((he=Je.parent)===null||he===void 0?void 0:he.key)||null,dropAllowed:Qe}}function nt(wt,Ft){if(wt){var It=Ft.multiple;return It?wt.slice():wt.length?[wt[0]]:wt}}var ht=function(Ft){return Ft};function st(wt,Ft){if(!wt)return[];var It=Ft||{},At=It.processProps,Wt=At===void 0?ht:At,re=Array.isArray(wt)?wt:[wt];return re.map(function(ne){var me=ne.children,Vt=_objectWithoutProperties(ne,Ie),Le=st(me,Ft);return React.createElement(TreeNode,_extends({key:Vt.key},Wt(Vt)),Le)})}function gt(wt){if(!wt)return null;var Ft;if(Array.isArray(wt))Ft={checkedKeys:wt,halfCheckedKeys:void 0};else if((0,jt.Z)(wt)==="object")Ft={checkedKeys:wt.checked||void 0,halfCheckedKeys:wt.halfChecked||void 0};else return(0,Qt.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Ft}function vt(wt,Ft){var It=new Set;function At(Wt){if(!It.has(Wt)){var re=(0,pe.Z)(Ft,Wt);if(re){It.add(Wt);var ne=re.parent,me=re.node;me.disabled||ne&&At(ne.key)}}}return(wt||[]).forEach(function(Wt){At(Wt)}),(0,Ot.Z)(It)}},90782:function(En,yn,xt){"use strict";xt.d(yn,{S:function(){return Nt}});var Ot=xt(48736),jt=xt(67841);function Qt(Ie,we){var qt=new Set;return Ie.forEach(function(ce){we.has(ce)||qt.add(ce)}),qt}function Me(Ie){var we=Ie||{},qt=we.disabled,ce=we.disableCheckbox,Ce=we.checkable;return!!(qt||ce)||Ce===!1}function Ut(Ie,we,qt,ce){for(var Ce=new Set(Ie),Be=new Set,Tt=0;Tt<=qt;Tt+=1){var et=we.get(Tt)||new Set;et.forEach(function(gt){var vt=gt.key,wt=gt.node,Ft=gt.children,It=Ft===void 0?[]:Ft;Ce.has(vt)&&!ce(wt)&&It.filter(function(At){return!ce(At.node)}).forEach(function(At){Ce.add(At.key)})})}for(var nt=new Set,ht=qt;ht>=0;ht-=1){var st=we.get(ht)||new Set;st.forEach(function(gt){var vt=gt.parent,wt=gt.node;if(!(ce(wt)||!gt.parent||nt.has(gt.parent.key))){if(ce(gt.parent.node)){nt.add(vt.key);return}var Ft=!0,It=!1;(vt.children||[]).filter(function(At){return!ce(At.node)}).forEach(function(At){var Wt=At.key,re=Ce.has(Wt);Ft&&!re&&(Ft=!1),!It&&(re||Be.has(Wt))&&(It=!0)}),Ft&&Ce.add(vt.key),It&&Be.add(vt.key),nt.add(vt.key)}})}return{checkedKeys:Array.from(Ce),halfCheckedKeys:Array.from(Qt(Be,Ce))}}function pe(Ie,we,qt,ce,Ce){for(var Be=new Set(Ie),Tt=new Set(we),et=0;et<=ce;et+=1){var nt=qt.get(et)||new Set;nt.forEach(function(vt){var wt=vt.key,Ft=vt.node,It=vt.children,At=It===void 0?[]:It;!Be.has(wt)&&!Tt.has(wt)&&!Ce(Ft)&&At.filter(function(Wt){return!Ce(Wt.node)}).forEach(function(Wt){Be.delete(Wt.key)})})}Tt=new Set;for(var ht=new Set,st=ce;st>=0;st-=1){var gt=qt.get(st)||new Set;gt.forEach(function(vt){var wt=vt.parent,Ft=vt.node;if(!(Ce(Ft)||!vt.parent||ht.has(vt.parent.key))){if(Ce(vt.parent.node)){ht.add(wt.key);return}var It=!0,At=!1;(wt.children||[]).filter(function(Wt){return!Ce(Wt.node)}).forEach(function(Wt){var re=Wt.key,ne=Be.has(re);It&&!ne&&(It=!1),!At&&(ne||Tt.has(re))&&(At=!0)}),It||Be.delete(wt.key),At&&Tt.add(wt.key),ht.add(wt.key)}})}return{checkedKeys:Array.from(Be),halfCheckedKeys:Array.from(Qt(Tt,Be))}}function Nt(Ie,we,qt,ce){var Ce=[],Be;ce?Be=ce:Be=Me;var Tt=new Set(Ie.filter(function(st){var gt=!!(0,jt.Z)(qt,st);return gt||Ce.push(st),gt})),et=new Map,nt=0;Object.keys(qt).forEach(function(st){var gt=qt[st],vt=gt.level,wt=et.get(vt);wt||(wt=new Set,et.set(vt,wt)),wt.add(gt),nt=Math.max(nt,vt)}),(0,Ot.ZP)(!Ce.length,"Tree missing follow keys: ".concat(Ce.slice(0,100).map(function(st){return"'".concat(st,"'")}).join(", ")));var ht;return we===!0?ht=Ut(Tt,et,nt,Be):ht=pe(Tt,we.halfCheckedKeys,et,nt,Be),ht}},67841:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ot}});function Ot(jt,Qt){return jt[Qt]}},71430:function(En,yn,xt){"use strict";xt.d(yn,{F:function(){return vt},H8:function(){return gt},I8:function(){return st},km:function(){return Ce},oH:function(){return nt},w$:function(){return Be},zn:function(){return et}});var Ot=xt(62853),jt=xt(80702),Qt=xt(77321),Me=xt(74416),Ut=xt(11592),pe=xt(2738),Nt=xt(48736),Ie=xt(67841),we=["children"];function qt(wt,Ft){return"".concat(wt,"-").concat(Ft)}function ce(wt){return wt&&wt.type&&wt.type.isTreeNode}function Ce(wt,Ft){return wt!=null?wt:Ft}function Be(wt){var Ft=wt||{},It=Ft.title,At=Ft._title,Wt=Ft.key,re=Ft.children,ne=It||"title";return{title:ne,_title:At||[ne],key:Wt||"key",children:re||"children"}}function Tt(wt,Ft){var It=new Map;function At(Wt){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Wt||[]).forEach(function(ne){var me=ne[Ft.key],Vt=ne[Ft.children];warning(me!=null,"Tree node must have a certain key: [".concat(re).concat(me,"]"));var Le=String(me);warning(!It.has(Le)||me===null||me===void 0,"Same 'key' exist in the Tree: ".concat(Le)),It.set(Le,!0),At(Vt,"".concat(re).concat(Le," > "))})}At(wt)}function et(wt){function Ft(It){var At=(0,Ut.Z)(It);return At.map(function(Wt){if(!ce(Wt))return(0,Nt.ZP)(!Wt,"Tree/TreeNode can only accept TreeNode as children."),null;var re=Wt.key,ne=Wt.props,me=ne.children,Vt=(0,Me.Z)(ne,we),Le=(0,Qt.Z)({key:re},Vt),he=Ft(me);return he.length&&(Le.children=he),Le}).filter(function(Wt){return Wt})}return Ft(wt)}function nt(wt,Ft,It){var At=Be(It),Wt=At._title,re=At.key,ne=At.children,me=new Set(Ft===!0?[]:Ft),Vt=[];function Le(he){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return he.map(function(Ke,Ve){for(var sn=qt(Ge?Ge.pos:"0",Ve),Mn=Ce(Ke[re],sn),xe,Ht=0;Ht<Wt.length;Ht+=1){var Je=Wt[Ht];if(Ke[Je]!==void 0){xe=Ke[Je];break}}var Tn=(0,Qt.Z)((0,Qt.Z)({},(0,pe.Z)(Ke,[].concat((0,jt.Z)(Wt),[re,ne]))),{},{title:xe,key:Mn,parent:Ge,pos:sn,children:null,data:Ke,isStart:[].concat((0,jt.Z)(Ge?Ge.isStart:[]),[Ve===0]),isEnd:[].concat((0,jt.Z)(Ge?Ge.isEnd:[]),[Ve===he.length-1])});return Vt.push(Tn),Ft===!0||me.has(Mn)?Tn.children=Le(Ke[ne]||[],Tn):Tn.children=[],Tn})}return Le(wt),Vt}function ht(wt,Ft,It){var At={};(0,Ot.Z)(It)==="object"?At=It:At={externalGetKey:It},At=At||{};var Wt=At,re=Wt.childrenPropName,ne=Wt.externalGetKey,me=Wt.fieldNames,Vt=Be(me),Le=Vt.key,he=Vt.children,Ge=re||he,Ke;ne?typeof ne=="string"?Ke=function(Mn){return Mn[ne]}:typeof ne=="function"&&(Ke=function(Mn){return ne(Mn)}):Ke=function(Mn,xe){return Ce(Mn[Le],xe)};function Ve(sn,Mn,xe,Ht){var Je=sn?sn[Ge]:wt,Tn=sn?qt(xe.pos,Mn):"0",An=sn?[].concat((0,jt.Z)(Ht),[sn]):[];if(sn){var ze=Ke(sn,Tn),Te={node:sn,index:Mn,pos:Tn,key:ze,parentPos:xe.node?xe.pos:null,level:xe.level+1,nodes:An};Ft(Te)}Je&&Je.forEach(function(dn,Hn){Ve(dn,Hn,{node:sn,pos:Tn,level:xe?xe.level+1:-1},An)})}Ve(null)}function st(wt){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},It=Ft.initWrapper,At=Ft.processEntity,Wt=Ft.onProcessFinished,re=Ft.externalGetKey,ne=Ft.childrenPropName,me=Ft.fieldNames,Vt=arguments.length>2?arguments[2]:void 0,Le=re||Vt,he={},Ge={},Ke={posEntities:he,keyEntities:Ge};return It&&(Ke=It(Ke)||Ke),ht(wt,function(Ve){var sn=Ve.node,Mn=Ve.index,xe=Ve.pos,Ht=Ve.key,Je=Ve.parentPos,Tn=Ve.level,An=Ve.nodes,ze={node:sn,nodes:An,index:Mn,key:Ht,pos:xe,level:Tn},Te=Ce(Ht,xe);he[xe]=ze,Ge[Te]=ze,ze.parent=he[Je],ze.parent&&(ze.parent.children=ze.parent.children||[],ze.parent.children.push(ze)),At&&At(ze,Ke)},{externalGetKey:Le,childrenPropName:ne,fieldNames:me}),Wt&&Wt(Ke),Ke}function gt(wt,Ft){var It=Ft.expandedKeys,At=Ft.selectedKeys,Wt=Ft.loadedKeys,re=Ft.loadingKeys,ne=Ft.checkedKeys,me=Ft.halfCheckedKeys,Vt=Ft.dragOverNodeKey,Le=Ft.dropPosition,he=Ft.keyEntities,Ge=(0,Ie.Z)(he,wt),Ke={eventKey:wt,expanded:It.indexOf(wt)!==-1,selected:At.indexOf(wt)!==-1,loaded:Wt.indexOf(wt)!==-1,loading:re.indexOf(wt)!==-1,checked:ne.indexOf(wt)!==-1,halfChecked:me.indexOf(wt)!==-1,pos:String(Ge?Ge.pos:""),dragOver:Vt===wt&&Le===0,dragOverGapTop:Vt===wt&&Le===-1,dragOverGapBottom:Vt===wt&&Le===1};return Ke}function vt(wt){var Ft=wt.data,It=wt.expanded,At=wt.selected,Wt=wt.checked,re=wt.loaded,ne=wt.loading,me=wt.halfChecked,Vt=wt.dragOver,Le=wt.dragOverGapTop,he=wt.dragOverGapBottom,Ge=wt.pos,Ke=wt.active,Ve=wt.eventKey,sn=(0,Qt.Z)((0,Qt.Z)({},Ft),{},{expanded:It,selected:At,checked:Wt,loaded:re,loading:ne,halfChecked:me,dragOver:Vt,dragOverGapTop:Le,dragOverGapBottom:he,pos:Ge,active:Ke,key:Ve});return"props"in sn||Object.defineProperty(sn,"props",{get:function(){return(0,Nt.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),wt}}),sn}},8224:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return jt}});var Ot=xt(4676);function jt(Qt,Me,Ut,pe){var Nt=Ot.unstable_batchedUpdates?function(we){Ot.unstable_batchedUpdates(Ut,we)}:Ut;return Qt!=null&&Qt.addEventListener&&Qt.addEventListener(Me,Nt,pe),{remove:function(){Qt!=null&&Qt.removeEventListener&&Qt.removeEventListener(Me,Nt,pe)}}}},55468:function(En,yn,xt){"use strict";xt.d(yn,{g1:function(){return ce},os:function(){return Be}});var Ot=/margin|padding|width|height|max|min|offset/,jt={left:!0,top:!0},Qt={cssFloat:1,styleFloat:1,float:1};function Me(Tt){return Tt.nodeType===1?Tt.ownerDocument.defaultView.getComputedStyle(Tt,null):{}}function Ut(Tt,et,nt){if(et=et.toLowerCase(),nt==="auto"){if(et==="height")return Tt.offsetHeight;if(et==="width")return Tt.offsetWidth}return et in jt||(jt[et]=Ot.test(et)),jt[et]?parseFloat(nt)||0:nt}function pe(Tt,et){var nt=arguments.length,ht=Me(Tt);return et=Qt[et]?"cssFloat"in Tt.style?"cssFloat":"styleFloat":et,nt===1?ht:Ut(Tt,et,ht[et]||Tt.style[et])}function Nt(Tt,et,nt){var ht=arguments.length;if(et=Qt[et]?"cssFloat"in Tt.style?"cssFloat":"styleFloat":et,ht===3)return typeof nt=="number"&&Ot.test(et)&&(nt="".concat(nt,"px")),Tt.style[et]=nt,nt;for(var st in et)et.hasOwnProperty(st)&&Nt(Tt,st,et[st]);return Me(Tt)}function Ie(Tt){return Tt===document.body?document.documentElement.clientWidth:Tt.offsetWidth}function we(Tt){return Tt===document.body?window.innerHeight||document.documentElement.clientHeight:Tt.offsetHeight}function qt(){var Tt=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),et=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Tt,height:et}}function ce(){var Tt=document.documentElement.clientWidth,et=window.innerHeight||document.documentElement.clientHeight;return{width:Tt,height:et}}function Ce(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function Be(Tt){var et=Tt.getBoundingClientRect(),nt=document.documentElement;return{left:et.left+(window.pageXOffset||nt.scrollLeft)-(nt.clientLeft||document.body.clientLeft||0),top:et.top+(window.pageYOffset||nt.scrollTop)-(nt.clientTop||document.body.clientTop||0)}}},24514:function(En,yn,xt){"use strict";xt.d(yn,{G:function(){return Me}});var Ot=xt(47273),jt=function(pe){if((0,Ot.Z)()&&window.document.documentElement){var Nt=Array.isArray(pe)?pe:[pe],Ie=window.document.documentElement;return Nt.some(function(we){return we in Ie.style})}return!1},Qt=function(pe,Nt){if(!jt(pe))return!1;var Ie=document.createElement("div"),we=Ie.style[pe];return Ie.style[pe]=Nt,Ie.style[pe]!==we};function Me(Ut,pe){return!Array.isArray(Ut)&&pe!==void 0?Qt(Ut,pe):jt(Ut)}},45680:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return bn}});var Ot=xt(72308),jt=xt(62853),Qt=xt(77321),Me=xt(49618),Ut=xt(52487),pe=xt(74416),Nt=xt(92310),Ie=xt.n(Nt),we=xt(29301),qt=xt(70425),ce=xt(34280),Ce=xt(59301),Be=xt(4676),Tt=Ce.forwardRef(function(Qe,Pn){var Ne=Qe.height,Pe=Qe.offsetY,ie=Qe.offsetX,Dt=Qe.children,fe=Qe.prefixCls,Se=Qe.onInnerResize,ee=Qe.innerProps,Kt=Qe.rtl,kt=Qe.extra,St={},mt={display:"flex",flexDirection:"column"};return Pe!==void 0&&(St={height:Ne,position:"relative",overflow:"hidden"},mt=(0,Qt.Z)((0,Qt.Z)({},mt),{},(0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({transform:"translateY(".concat(Pe,"px)")},Kt?"marginRight":"marginLeft",-ie),"position","absolute"),"left",0),"right",0),"top",0))),Ce.createElement("div",{style:St},Ce.createElement(we.Z,{onResize:function(zt){var Et=zt.offsetHeight;Et&&Se&&Se()}},Ce.createElement("div",(0,Ot.Z)({style:mt,className:Ie()((0,Me.Z)({},"".concat(fe,"-holder-inner"),fe)),ref:Pn},ee),Dt,kt)))});Tt.displayName="Filler";var et=Tt;function nt(Qe){var Pn=Qe.children,Ne=Qe.setRef,Pe=Ce.useCallback(function(ie){Ne(ie)},[]);return Ce.cloneElement(Pn,{ref:Pe})}function ht(Qe,Pn,Ne,Pe,ie,Dt,fe,Se){var ee=Se.getKey;return Qe.slice(Pn,Ne+1).map(function(Kt,kt){var St=Pn+kt,mt=fe(Kt,St,{style:{width:Pe},offsetX:ie}),Lt=ee(Kt);return Ce.createElement(nt,{key:Lt,setRef:function(Et){return Dt(Kt,Et)}},mt)})}function st(Qe,Pn,Ne,Pe){var ie=Ne-Qe,Dt=Pn-Ne,fe=Math.min(ie,Dt)*2;if(Pe<=fe){var Se=Math.floor(Pe/2);return Pe%2?Ne+Se+1:Ne-Se}return ie>Dt?Ne-(Pe-Dt):Ne+(Pe-ie)}function gt(Qe,Pn,Ne){var Pe=Qe.length,ie=Pn.length,Dt,fe;if(Pe===0&&ie===0)return null;Pe<ie?(Dt=Qe,fe=Pn):(Dt=Pn,fe=Qe);var Se={__EMPTY_ITEM__:!0};function ee(zt){return zt!==void 0?Ne(zt):Se}for(var Kt=null,kt=Math.abs(Pe-ie)!==1,St=0;St<fe.length;St+=1){var mt=ee(Dt[St]),Lt=ee(fe[St]);if(mt!==Lt){Kt=St,kt=kt||mt!==ee(fe[St+1]);break}}return Kt===null?null:{index:Kt,multiple:kt}}function vt(Qe,Pn,Ne){var Pe=Ce.useState(Qe),ie=(0,Ut.Z)(Pe,2),Dt=ie[0],fe=ie[1],Se=Ce.useState(null),ee=(0,Ut.Z)(Se,2),Kt=ee[0],kt=ee[1];return Ce.useEffect(function(){var St=gt(Dt||[],Qe||[],Pn);(St==null?void 0:St.index)!==void 0&&(Ne==null||Ne(St.index),kt(Qe[St.index])),fe(Qe)},[Qe]),[Kt]}var wt=xt(16089),Ft=(typeof navigator=="undefined"?"undefined":(0,jt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),It=Ft,At=function(Qe,Pn,Ne,Pe){var ie=(0,Ce.useRef)(!1),Dt=(0,Ce.useRef)(null);function fe(){clearTimeout(Dt.current),ie.current=!0,Dt.current=setTimeout(function(){ie.current=!1},50)}var Se=(0,Ce.useRef)({top:Qe,bottom:Pn,left:Ne,right:Pe});return Se.current.top=Qe,Se.current.bottom=Pn,Se.current.left=Ne,Se.current.right=Pe,function(ee,Kt){var kt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,St=ee?Kt<0&&Se.current.left||Kt>0&&Se.current.right:Kt<0&&Se.current.top||Kt>0&&Se.current.bottom;return kt&&St?(clearTimeout(Dt.current),ie.current=!1):(!St||ie.current)&&fe(),!ie.current&&St}};function Wt(Qe,Pn,Ne,Pe,ie,Dt,fe){var Se=(0,Ce.useRef)(0),ee=(0,Ce.useRef)(null),Kt=(0,Ce.useRef)(null),kt=(0,Ce.useRef)(!1),St=At(Pn,Ne,Pe,ie);function mt(ln,qe){if(wt.Z.cancel(ee.current),!St(!1,qe)){var Nn=ln;if(!Nn._virtualHandled)Nn._virtualHandled=!0;else return;Se.current+=qe,Kt.current=qe,It||Nn.preventDefault(),ee.current=(0,wt.Z)(function(){var ai=kt.current?10:1;fe(Se.current*ai,!1),Se.current=0})}}function Lt(ln,qe){fe(qe,!0),It||ln.preventDefault()}var zt=(0,Ce.useRef)(null),Et=(0,Ce.useRef)(null);function Yt(ln){if(Qe){wt.Z.cancel(Et.current),Et.current=(0,wt.Z)(function(){zt.current=null},2);var qe=ln.deltaX,Nn=ln.deltaY,ai=ln.shiftKey,Kn=qe,ci=Nn;(zt.current==="sx"||!zt.current&&ai&&Nn&&!qe)&&(Kn=Nn,ci=0,zt.current="sx");var Ci=Math.abs(Kn),Wi=Math.abs(ci);zt.current===null&&(zt.current=Dt&&Ci>Wi?"x":"y"),zt.current==="y"?mt(ln,ci):Lt(ln,Kn)}}function $e(ln){Qe&&(kt.current=ln.detail===Kt.current)}return[Yt,$e]}function re(Qe,Pn,Ne,Pe){var ie=Ce.useMemo(function(){return[new Map,[]]},[Qe,Ne.id,Pe]),Dt=(0,Ut.Z)(ie,2),fe=Dt[0],Se=Dt[1],ee=function(kt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kt,mt=fe.get(kt),Lt=fe.get(St);if(mt===void 0||Lt===void 0)for(var zt=Qe.length,Et=Se.length;Et<zt;Et+=1){var Yt,$e=Qe[Et],ln=Pn($e);fe.set(ln,Et);var qe=(Yt=Ne.get(ln))!==null&&Yt!==void 0?Yt:Pe;if(Se[Et]=(Se[Et-1]||0)+qe,ln===kt&&(mt=Et),ln===St&&(Lt=Et),mt!==void 0&&Lt!==void 0)break}return{top:Se[mt-1]||0,bottom:Se[Lt]}};return ee}var ne=xt(96949),me=xt(55090),Vt=function(){function Qe(){(0,ne.Z)(this,Qe),(0,Me.Z)(this,"maps",void 0),(0,Me.Z)(this,"id",0),(0,Me.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,me.Z)(Qe,[{key:"set",value:function(Ne,Pe){this.maps[Ne]=Pe,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}}]),Qe}(),Le=Vt;function he(Qe){var Pn=parseFloat(Qe);return isNaN(Pn)?0:Pn}function Ge(Qe,Pn,Ne){var Pe=Ce.useState(0),ie=(0,Ut.Z)(Pe,2),Dt=ie[0],fe=ie[1],Se=(0,Ce.useRef)(new Map),ee=(0,Ce.useRef)(new Le),Kt=(0,Ce.useRef)(0);function kt(){Kt.current+=1}function St(){var Lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;kt();var zt=function(){var $e=!1;Se.current.forEach(function(ln,qe){if(ln&&ln.offsetParent){var Nn=ln.offsetHeight,ai=getComputedStyle(ln),Kn=ai.marginTop,ci=ai.marginBottom,Ci=he(Kn),Wi=he(ci),Oi=Nn+Ci+Wi;ee.current.get(qe)!==Oi&&(ee.current.set(qe,Oi),$e=!0)}}),$e&&fe(function(ln){return ln+1})};if(Lt)zt();else{Kt.current+=1;var Et=Kt.current;Promise.resolve().then(function(){Et===Kt.current&&zt()})}}function mt(Lt,zt){var Et=Qe(Lt),Yt=Se.current.get(Et);zt?(Se.current.set(Et,zt),St()):Se.current.delete(Et),!Yt!=!zt&&(zt?Pn==null||Pn(Lt):Ne==null||Ne(Lt))}return(0,Ce.useEffect)(function(){return kt},[]),[mt,St,ee.current,Dt]}var Ke=14/15;function Ve(Qe,Pn,Ne){var Pe=(0,Ce.useRef)(!1),ie=(0,Ce.useRef)(0),Dt=(0,Ce.useRef)(0),fe=(0,Ce.useRef)(null),Se=(0,Ce.useRef)(null),ee,Kt=function(Lt){if(Pe.current){var zt=Math.ceil(Lt.touches[0].pageX),Et=Math.ceil(Lt.touches[0].pageY),Yt=ie.current-zt,$e=Dt.current-Et,ln=Math.abs(Yt)>Math.abs($e);ln?ie.current=zt:Dt.current=Et;var qe=Ne(ln,ln?Yt:$e,!1,Lt);qe&&Lt.preventDefault(),clearInterval(Se.current),qe&&(Se.current=setInterval(function(){ln?Yt*=Ke:$e*=Ke;var Nn=Math.floor(ln?Yt:$e);(!Ne(ln,Nn,!0)||Math.abs(Nn)<=.1)&&clearInterval(Se.current)},16))}},kt=function(){Pe.current=!1,ee()},St=function(Lt){ee(),Lt.touches.length===1&&!Pe.current&&(Pe.current=!0,ie.current=Math.ceil(Lt.touches[0].pageX),Dt.current=Math.ceil(Lt.touches[0].pageY),fe.current=Lt.target,fe.current.addEventListener("touchmove",Kt,{passive:!1}),fe.current.addEventListener("touchend",kt,{passive:!0}))};ee=function(){fe.current&&(fe.current.removeEventListener("touchmove",Kt),fe.current.removeEventListener("touchend",kt))},(0,ce.Z)(function(){return Qe&&Pn.current.addEventListener("touchstart",St,{passive:!0}),function(){var mt;(mt=Pn.current)===null||mt===void 0||mt.removeEventListener("touchstart",St),ee(),clearInterval(Se.current)}},[Qe])}function sn(Qe){return Math.floor(Math.pow(Qe,.5))}function Mn(Qe,Pn){var Ne="touches"in Qe?Qe.touches[0]:Qe;return Ne[Pn?"pageX":"pageY"]-window[Pn?"scrollX":"scrollY"]}function xe(Qe,Pn,Ne){Ce.useEffect(function(){var Pe=Pn.current;if(Qe&&Pe){var ie=!1,Dt,fe,Se=function(){wt.Z.cancel(Dt)},ee=function mt(){Se(),Dt=(0,wt.Z)(function(){Ne(fe),mt()})},Kt=function(Lt){if(!(Lt.target.draggable||Lt.button!==0)){var zt=Lt;zt._virtualHandled||(zt._virtualHandled=!0,ie=!0)}},kt=function(){ie=!1,Se()},St=function(Lt){if(ie){var zt=Mn(Lt,!1),Et=Pe.getBoundingClientRect(),Yt=Et.top,$e=Et.bottom;if(zt<=Yt){var ln=Yt-zt;fe=-sn(ln),ee()}else if(zt>=$e){var qe=zt-$e;fe=sn(qe),ee()}else Se()}};return Pe.addEventListener("mousedown",Kt),Pe.ownerDocument.addEventListener("mouseup",kt),Pe.ownerDocument.addEventListener("mousemove",St),function(){Pe.removeEventListener("mousedown",Kt),Pe.ownerDocument.removeEventListener("mouseup",kt),Pe.ownerDocument.removeEventListener("mousemove",St),Se()}}},[Qe])}var Ht=10;function Je(Qe,Pn,Ne,Pe,ie,Dt,fe,Se){var ee=Ce.useRef(),Kt=Ce.useState(null),kt=(0,Ut.Z)(Kt,2),St=kt[0],mt=kt[1];return(0,ce.Z)(function(){if(St&&St.times<Ht){if(!Qe.current){mt(function(Sn){return(0,Qt.Z)({},Sn)});return}Dt();var Lt=St.targetAlign,zt=St.originAlign,Et=St.index,Yt=St.offset,$e=Qe.current.clientHeight,ln=!1,qe=Lt,Nn=null;if($e){for(var ai=Lt||zt,Kn=0,ci=0,Ci=0,Wi=Math.min(Pn.length-1,Et),Oi=0;Oi<=Wi;Oi+=1){var mo=ie(Pn[Oi]);ci=Kn;var Bo=Ne.get(mo);Ci=ci+(Bo===void 0?Pe:Bo),Kn=Ci}for(var Ao=ai==="top"?Yt:$e-Yt,oi=Wi;oi>=0;oi-=1){var fi=ie(Pn[oi]),di=Ne.get(fi);if(di===void 0){ln=!0;break}if(Ao-=di,Ao<=0)break}switch(ai){case"top":Nn=ci-Yt;break;case"bottom":Nn=Ci-$e+Yt;break;default:{var mi=Qe.current.scrollTop,co=mi+$e;ci<mi?qe="top":Ci>co&&(qe="bottom")}}Nn!==null&&fe(Nn),Nn!==St.lastTop&&(ln=!0)}ln&&mt((0,Qt.Z)((0,Qt.Z)({},St),{},{times:St.times+1,targetAlign:qe,lastTop:Nn}))}},[St,Qe.current]),function(Lt){if(Lt==null){Se();return}if(wt.Z.cancel(ee.current),typeof Lt=="number")fe(Lt);else if(Lt&&(0,jt.Z)(Lt)==="object"){var zt,Et=Lt.align;"index"in Lt?zt=Lt.index:zt=Pn.findIndex(function(ln){return ie(ln)===Lt.key});var Yt=Lt.offset,$e=Yt===void 0?0:Yt;mt({times:0,index:zt,offset:$e,originAlign:Et})}}}var Tn=Ce.forwardRef(function(Qe,Pn){var Ne=Qe.prefixCls,Pe=Qe.rtl,ie=Qe.scrollOffset,Dt=Qe.scrollRange,fe=Qe.onStartMove,Se=Qe.onStopMove,ee=Qe.onScroll,Kt=Qe.horizontal,kt=Qe.spinSize,St=Qe.containerSize,mt=Qe.style,Lt=Qe.thumbStyle,zt=Qe.showScrollBar,Et=Ce.useState(!1),Yt=(0,Ut.Z)(Et,2),$e=Yt[0],ln=Yt[1],qe=Ce.useState(null),Nn=(0,Ut.Z)(qe,2),ai=Nn[0],Kn=Nn[1],ci=Ce.useState(null),Ci=(0,Ut.Z)(ci,2),Wi=Ci[0],Oi=Ci[1],mo=!Pe,Bo=Ce.useRef(),Ao=Ce.useRef(),oi=Ce.useState(zt),fi=(0,Ut.Z)(oi,2),di=fi[0],mi=fi[1],co=Ce.useRef(),Sn=function(){zt===!0||zt===!1||(clearTimeout(co.current),mi(!0),co.current=setTimeout(function(){mi(!1)},3e3))},Ct=Dt-St||0,Yn=St-kt||0,yi=Ce.useMemo(function(){if(ie===0||Ct===0)return 0;var Zt=ie/Ct;return Zt*Yn},[ie,Ct,Yn]),_e=function(He){He.stopPropagation(),He.preventDefault()},Wn=Ce.useRef({top:yi,dragging:$e,pageY:ai,startTop:Wi});Wn.current={top:yi,dragging:$e,pageY:ai,startTop:Wi};var _n=function(He){ln(!0),Kn(Mn(He,Kt)),Oi(Wn.current.top),fe(),He.stopPropagation(),He.preventDefault()};Ce.useEffect(function(){var Zt=function(ae){ae.preventDefault()},He=Bo.current,fn=Ao.current;return He.addEventListener("touchstart",Zt,{passive:!1}),fn.addEventListener("touchstart",_n,{passive:!1}),function(){He.removeEventListener("touchstart",Zt),fn.removeEventListener("touchstart",_n)}},[]);var si=Ce.useRef();si.current=Ct;var ri=Ce.useRef();ri.current=Yn,Ce.useEffect(function(){if($e){var Zt,He=function(ae){var Ye=Wn.current,gn=Ye.dragging,In=Ye.pageY,Re=Ye.startTop;wt.Z.cancel(Zt);var _t=Bo.current.getBoundingClientRect(),nn=St/(Kt?_t.width:_t.height);if(gn){var cn=(Mn(ae,Kt)-In)*nn,Bn=Re;!mo&&Kt?Bn-=cn:Bn+=cn;var Oe=si.current,Xe=ri.current,Gn=Xe?Bn/Xe:0,Xn=Math.ceil(Gn*Oe);Xn=Math.max(Xn,0),Xn=Math.min(Xn,Oe),Zt=(0,wt.Z)(function(){ee(Xn,Kt)})}},fn=function(){ln(!1),Se()};return window.addEventListener("mousemove",He,{passive:!0}),window.addEventListener("touchmove",He,{passive:!0}),window.addEventListener("mouseup",fn,{passive:!0}),window.addEventListener("touchend",fn,{passive:!0}),function(){window.removeEventListener("mousemove",He),window.removeEventListener("touchmove",He),window.removeEventListener("mouseup",fn),window.removeEventListener("touchend",fn),wt.Z.cancel(Zt)}}},[$e]),Ce.useEffect(function(){return Sn(),function(){clearTimeout(co.current)}},[ie]),Ce.useImperativeHandle(Pn,function(){return{delayHidden:Sn}});var hi="".concat(Ne,"-scrollbar"),Fe={position:"absolute",visibility:di?null:"hidden"},Ae={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Kt?(Fe.height=8,Fe.left=0,Fe.right=0,Fe.bottom=0,Ae.height="100%",Ae.width=kt,mo?Ae.left=yi:Ae.right=yi):(Fe.width=8,Fe.top=0,Fe.bottom=0,mo?Fe.right=0:Fe.left=0,Ae.width="100%",Ae.height=kt,Ae.top=yi),Ce.createElement("div",{ref:Bo,className:Ie()(hi,(0,Me.Z)((0,Me.Z)((0,Me.Z)({},"".concat(hi,"-horizontal"),Kt),"".concat(hi,"-vertical"),!Kt),"".concat(hi,"-visible"),di)),style:(0,Qt.Z)((0,Qt.Z)({},Fe),mt),onMouseDown:_e,onMouseMove:Sn},Ce.createElement("div",{ref:Ao,className:Ie()("".concat(hi,"-thumb"),(0,Me.Z)({},"".concat(hi,"-thumb-moving"),$e)),style:(0,Qt.Z)((0,Qt.Z)({},Ae),Lt),onMouseDown:_n}))}),An=Tn,ze=20;function Te(){var Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ne=Qe/Pn*Qe;return isNaN(Ne)&&(Ne=0),Ne=Math.max(Ne,ze),Math.floor(Ne)}var dn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Hn=[],hn={overflowY:"auto",overflowAnchor:"none"};function pn(Qe,Pn){var Ne=Qe.prefixCls,Pe=Ne===void 0?"rc-virtual-list":Ne,ie=Qe.className,Dt=Qe.height,fe=Qe.itemHeight,Se=Qe.fullHeight,ee=Se===void 0?!0:Se,Kt=Qe.style,kt=Qe.data,St=Qe.children,mt=Qe.itemKey,Lt=Qe.virtual,zt=Qe.direction,Et=Qe.scrollWidth,Yt=Qe.component,$e=Yt===void 0?"div":Yt,ln=Qe.onScroll,qe=Qe.onVirtualScroll,Nn=Qe.onVisibleChange,ai=Qe.innerProps,Kn=Qe.extraRender,ci=Qe.styles,Ci=Qe.showScrollBar,Wi=Ci===void 0?"optional":Ci,Oi=(0,pe.Z)(Qe,dn),mo=Ce.useCallback(function(oo){return typeof mt=="function"?mt(oo):oo==null?void 0:oo[mt]},[mt]),Bo=Ge(mo,null,null),Ao=(0,Ut.Z)(Bo,4),oi=Ao[0],fi=Ao[1],di=Ao[2],mi=Ao[3],co=!!(Lt!==!1&&Dt&&fe),Sn=Ce.useMemo(function(){return Object.values(di.maps).reduce(function(oo,fo){return oo+fo},0)},[di.id,di.maps]),Ct=co&&kt&&(Math.max(fe*kt.length,Sn)>Dt||!!Et),Yn=zt==="rtl",yi=Ie()(Pe,(0,Me.Z)({},"".concat(Pe,"-rtl"),Yn),ie),_e=kt||Hn,Wn=(0,Ce.useRef)(),_n=(0,Ce.useRef)(),si=(0,Ce.useRef)(),ri=(0,Ce.useState)(0),hi=(0,Ut.Z)(ri,2),Fe=hi[0],Ae=hi[1],Zt=(0,Ce.useState)(0),He=(0,Ut.Z)(Zt,2),fn=He[0],ye=He[1],ae=(0,Ce.useState)(!1),Ye=(0,Ut.Z)(ae,2),gn=Ye[0],In=Ye[1],Re=function(){In(!0)},_t=function(){In(!1)},nn={getKey:mo};function cn(oo){Ae(function(fo){var _o;typeof oo=="function"?_o=oo(fo):_o=oo;var Co=Di(_o);return Wn.current.scrollTop=Co,Co})}var Bn=(0,Ce.useRef)({start:0,end:_e.length}),Oe=(0,Ce.useRef)(),Xe=vt(_e,mo),Gn=(0,Ut.Z)(Xe,1),Xn=Gn[0];Oe.current=Xn;var Jn=Ce.useMemo(function(){if(!co)return{scrollHeight:void 0,start:0,end:_e.length-1,offset:void 0};if(!Ct){var oo;return{scrollHeight:((oo=_n.current)===null||oo===void 0?void 0:oo.offsetHeight)||0,start:0,end:_e.length-1,offset:void 0}}for(var fo=0,_o,Co,lr,ha=_e.length,So=0;So<ha;So+=1){var Xi=_e[So],Zn=mo(Xi),Ji=di.get(Zn),qo=fo+(Ji===void 0?fe:Ji);qo>=Fe&&_o===void 0&&(_o=So,Co=fo),qo>Fe+Dt&&lr===void 0&&(lr=So),fo=qo}return _o===void 0&&(_o=0,Co=0,lr=Math.ceil(Dt/fe)),lr===void 0&&(lr=_e.length-1),lr=Math.min(lr+1,_e.length-1),{scrollHeight:fo,start:_o,end:lr,offset:Co}},[Ct,co,Fe,_e,mi,Dt]),Rn=Jn.scrollHeight,ni=Jn.start,Qn=Jn.end,qn=Jn.offset;Bn.current.start=ni,Bn.current.end=Qn,Ce.useLayoutEffect(function(){var oo=di.getRecord();if(oo.size===1){var fo=Array.from(oo)[0],_o=_e[ni];if(_o){var Co=mo(_o);if(Co===fo){var lr=di.get(fo),ha=lr-fe;cn(function(So){return So+ha})}}}di.resetRecord()},[Rn]);var Si=Ce.useState({width:0,height:Dt}),Vi=(0,Ut.Z)(Si,2),un=Vi[0],lo=Vi[1],to=function(fo){lo({width:fo.offsetWidth,height:fo.offsetHeight})},Ki=(0,Ce.useRef)(),en=(0,Ce.useRef)(),Dn=Ce.useMemo(function(){return Te(un.width,Et)},[un.width,Et]),gi=Ce.useMemo(function(){return Te(un.height,Rn)},[un.height,Rn]),ki=Rn-Dt,Pi=(0,Ce.useRef)(ki);Pi.current=ki;function Di(oo){var fo=oo;return Number.isNaN(Pi.current)||(fo=Math.min(fo,Pi.current)),fo=Math.max(fo,0),fo}var Zi=Fe<=0,Ri=Fe>=ki,$i=fn<=0,qi=fn>=Et,mn=At(Zi,Ri,$i,qi),Lo=function(){return{x:Yn?-fn:fn,y:Fe}},tn=(0,Ce.useRef)(Lo()),Gi=(0,qt.useEvent)(function(oo){if(qe){var fo=(0,Qt.Z)((0,Qt.Z)({},Lo()),oo);(tn.current.x!==fo.x||tn.current.y!==fo.y)&&(qe(fo),tn.current=fo)}});function Yi(oo,fo){var _o=oo;fo?((0,Be.flushSync)(function(){ye(_o)}),Gi()):cn(_o)}function ji(oo){var fo=oo.currentTarget.scrollTop;fo!==Fe&&cn(fo),ln==null||ln(oo),Gi()}var No=function(fo){var _o=fo,Co=Et?Et-un.width:0;return _o=Math.max(_o,0),_o=Math.min(_o,Co),_o},Mo=(0,qt.useEvent)(function(oo,fo){fo?((0,Be.flushSync)(function(){ye(function(_o){var Co=_o+(Yn?-oo:oo);return No(Co)})}),Gi()):cn(function(_o){var Co=_o+oo;return Co})}),Ii=Wt(co,Zi,Ri,$i,qi,!!Et,Mo),Ni=(0,Ut.Z)(Ii,2),zi=Ni[0],uo=Ni[1];Ve(co,Wn,function(oo,fo,_o,Co){var lr=Co;return mn(oo,fo,_o)?!1:!lr||!lr._virtualHandled?(lr&&(lr._virtualHandled=!0),zi({preventDefault:function(){},deltaX:oo?fo:0,deltaY:oo?0:fo}),!0):!1}),xe(Ct,Wn,function(oo){cn(function(fo){return fo+oo})}),(0,ce.Z)(function(){function oo(_o){var Co=Zi&&_o.detail<0,lr=Ri&&_o.detail>0;co&&!Co&&!lr&&_o.preventDefault()}var fo=Wn.current;return fo.addEventListener("wheel",zi,{passive:!1}),fo.addEventListener("DOMMouseScroll",uo,{passive:!0}),fo.addEventListener("MozMousePixelScroll",oo,{passive:!1}),function(){fo.removeEventListener("wheel",zi),fo.removeEventListener("DOMMouseScroll",uo),fo.removeEventListener("MozMousePixelScroll",oo)}},[co,Zi,Ri]),(0,ce.Z)(function(){if(Et){var oo=No(fn);ye(oo),Gi({x:oo})}},[un.width,Et]);var li=function(){var fo,_o;(fo=Ki.current)===null||fo===void 0||fo.delayHidden(),(_o=en.current)===null||_o===void 0||_o.delayHidden()},$t=Je(Wn,_e,di,fe,mo,function(){return fi(!0)},cn,li);Ce.useImperativeHandle(Pn,function(){return{nativeElement:si.current,getScrollInfo:Lo,scrollTo:function(fo){function _o(Co){return Co&&(0,jt.Z)(Co)==="object"&&("left"in Co||"top"in Co)}_o(fo)?(fo.left!==void 0&&ye(No(fo.left)),$t(fo.top)):$t(fo)}}}),(0,ce.Z)(function(){if(Nn){var oo=_e.slice(ni,Qn+1);Nn(oo,_e)}},[ni,Qn,_e]);var Ho=re(_e,mo,di,fe),or=Kn==null?void 0:Kn({start:ni,end:Qn,virtual:Ct,offsetX:fn,offsetY:qn,rtl:Yn,getSize:Ho}),Cr=ht(_e,ni,Qn,Et,fn,oi,St,nn),Fr=null;Dt&&(Fr=(0,Qt.Z)((0,Me.Z)({},ee?"height":"maxHeight",Dt),hn),co&&(Fr.overflowY="hidden",Et&&(Fr.overflowX="hidden"),gn&&(Fr.pointerEvents="none")));var cr={};return Yn&&(cr.dir="rtl"),Ce.createElement("div",(0,Ot.Z)({ref:si,style:(0,Qt.Z)((0,Qt.Z)({},Kt),{},{position:"relative"}),className:yi},cr,Oi),Ce.createElement(we.Z,{onResize:to},Ce.createElement($e,{className:"".concat(Pe,"-holder"),style:Fr,ref:Wn,onScroll:ji,onMouseEnter:li},Ce.createElement(et,{prefixCls:Pe,height:Rn,offsetX:fn,offsetY:qn,scrollWidth:Et,onInnerResize:fi,ref:_n,innerProps:ai,rtl:Yn,extra:or},Cr))),Ct&&Rn>Dt&&Ce.createElement(An,{ref:Ki,prefixCls:Pe,scrollOffset:Fe,scrollRange:Rn,rtl:Yn,onScroll:Yi,onStartMove:Re,onStopMove:_t,spinSize:gi,containerSize:un.height,style:ci==null?void 0:ci.verticalScrollBar,thumbStyle:ci==null?void 0:ci.verticalScrollBarThumb,showScrollBar:Wi}),Ct&&Et>un.width&&Ce.createElement(An,{ref:en,prefixCls:Pe,scrollOffset:fn,scrollRange:Et,rtl:Yn,onScroll:Yi,onStartMove:Re,onStopMove:_t,spinSize:Dn,containerSize:un.width,horizontal:!0,style:ci==null?void 0:ci.horizontalScrollBar,thumbStyle:ci==null?void 0:ci.horizontalScrollBarThumb,showScrollBar:Wi}))}var de=Ce.forwardRef(pn);de.displayName="List";var vn=de,bn=vn},32637:function(En,yn,xt){"use strict";En.exports=xt.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(En){"use strict";En.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=="},96542:function(En){"use strict";En.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAACH5JREFUaEPdm3twVFcdx7+/s8+QBOgLQniUNKG5IUGQ1qmV0RBIodCW8Q9xrK1Q+cPRQabKoDCTsrm7w3QUrVNLhoGxVluVsdjqOGJphQK1FrSIvBZ2NynvQglNISWv3Xt3z0/vQnbvhg3ZJ+CefzK595zv+X3O43fO/Z2zhCyTI6DOZ4knQfwgg8eAqYcIpwF4AfaSsHjJavH2VTSdJiLOsrqsi1OmCsP8arnOchOA+pQ0CF1gOiLoakOQxWuxWb099zS1p1Q+R5kyAnYeX3O31PTdzFyetR1EHdHRwPAKsFdAHHbanUcuVa76NGvtJAJpAy/kzZY/+4+8z+Dp+TCoX5MIZ65MC+FlY1QIeEc7h/s+HL+8L5t60wa2BVyLIfHrAZXuESQ8Vrttv4zoNglMhkQdM9cyUAfmWgDF2RgaLUskiflYtCFIeKN/LfB+oQqtu0gNp6KfPrC/eSeYZ8bECe+NLh750PVanpmpqM1dwVcaoQ4EowHqmKEAbE/F0OvnIY2IA2DhhZCHiSyHSqXz7x3Kyq6B5dICrmp7wXEq3GGI2PqFLMLSGKxufjsTo2eyat3dZpkEqdeBqc5ohGhDEFeCYclE01RGJ9DrZLe6QpWr22JTZTDROb/gCk3DWBCc/XkujD5aeaFs74Z4YQpNPvz1x0hac7rc6I5e26WRJycEi85X6PaeicHii2O7Sz+6O2zpG592IxB1Wi2W+X2TXHuis8Is0LiRR4R1rGBgMRjpi6dtTeoFiBCRiPyrszzwJ1/tHzrBxmiQdVf+YvQQSj0WEguCirojBjy7hR8MM14HMCZ1M25OTiK8Zh+Op/62iHoMC0oD6p264R8E6qTkKUR4NMmS2V5qFfdGgWe18PQI8C4Yw24OQvq1ErAddZi3q4Gu8c7RpTPgXcWMNWZlAayghZvZ/nE7jjJQaX5JBJQ4ALtI35hcljCcQ68OBPVrVQWhaed36dnB6rP7ml9m8KL4ikK7qaGFvyUZG82Fxo4AassAW7Z+MofkF3uBg+eAXs0kSuhyDMeY/qE9sDpnq/qlSES+Y3p+iWau420MNPY/vLMEeGBCDi3NoVR3CPjHcSBiWhME8JWdy8jwPdckW8AzFTJ8IP6Ceqm+hdvBGNX/8HMTgFElObQyx1J7TwMXuk0IgHvXMlKTVeNoVR+VEfmX/ndEOGEAS3B8eZo1CSiKbStybG0O5PztwLFPEoTWv7OMliaTtvtdTWbHRaAtVL+OEzYNtzpw4ALwgfF9dTWRwIZdS+k7yYGbX2Xmr8bz0rOFDuxjZsXUOF8rWOCJJ1Tn2ZDsNu/JSYiaggUe5lfv11nuNa3BwS9X15YULLDNry4By1+a5vY+vcZzf16BBQHFdqArlAP3fFUiVadl86vPg+XT8SVJ/EpT1CV5Ay4rBRZOA5w24MQnwB8PATIHH5GpA7t2gNHQDywI3wspnp/nDXhBHVAd284Ar+4HTl/KvqdTBva5jMXrjv4aLWSZFVSad+YN+PHpwLiRccAtRwBfDgKyqQAXBdaMDUvtQ3PzOoW4q6ta7ShIYEfAPU/KyBvx+UvnNMU91vi/IIHtftdKZvzItIfeqime+YUL7FM3MeTjJg/9Y01RVxUwsMvLiIaCo4kgntBqVONYqPCG9GRW7W1+7gHYGgO2iSlalWoE7gsP2NaqTkNE7jd9T2kzFCruP5nIyGkZoR9jB3W99FgtUDY8nmNnW+Jn3cCyxqbkcnDodXqoZWngURARHdAU92djvZ3u9/D0cUBDFSDyENzr7AM27wc+vQ74kMC+5ucAXh6fv/SKVuNenBGwEdN9uj6/wb19Z4AdsYORa3s8BeBtAMdidEZoNlTjeS4jYKPQt2cApY6hh16mOYwg3Z6Tg5ceEtjf3A7m2KbWYhEPBe9Vt2cMXD4CqK8cGrrYAVhNw94Ir+qRwUGMOXymE3i7FQjLzICLT6hlWlB+ZC7tsInR3VXqhYyBU+25m7GXdrSpc2RYvmWysV2v8ZSZbc7IS6cCfVOAfeoKCfkTk33b9BrPnIIFtvvVV5jlN2LDl+inmuL+QQEDNx9k5s/EAAUW6dWe3xQk8H280XbIf6474QqFsE7Tq10HCxLY7vNMYYQPmeD0SYooOUqq+fitcPbSdr/rCWb8Nj5/cVhTPPHhffVFwXhpu19dyyxjDopI/E5T1CcHrih5A55TDUyNBlWupJffTzz1S2VpS5ZnsJ2W3e96kxlzTR56paa4194wYOME8mEFuKMYOHAW+Ldxry4HaVBgn+scm+6nCBLzQor65g0DzgFbUolkwPsa3auDUn5sLmArcpT3TmxK2GYa7/M2pG8k8D8bPa9FZCT2gQCiDl1x35XMhoIA3tPY3ColfhYDJNqhK+7ZBQu8u1F1suSnTMDP64r7+4ULPKt5NgOT4oDim3qNOvDGb/T1//2Q7ivt+Ov+B9Y9YupdaSXbhL7qZ84m7+EW1sDx27H1VUBJDi705stpHTkPnLwYV28fvzd0rHpLLAZDhLc0xfPwYPUbPXwKQOxmlrFZGDciX+Zmr/veSaCzN65zqnI7zla8e+UBgQXE/GTrb2xD0rCON0kgdiwxzA588Z7E8Ez2ZuZG4XwXYAT5zMl730u4fJvRZwYvNWk17kGvIkbzNKzjuRJI2JEY8ShlFHB7UX4jlKk0Q/SupQacuwwc60g8VA8WXcR/ZrwAgHUisVZT1GeG0ozepp3ZwluZMei4H0rkZr33T/19+NIo/xsE6w9DyupAKnZEgee+yLeHgtjNjOpUCt0KefpKO148/vmXlif7XcP17ItdEH9kPd/WbfxahbHgVgAa1MsSukFYsWspJdwATtXma37k0bCe6yGxWAL1BJT/72A59puHVEXzkM9YiD6AwJZhRdiwdQklfCikU99/AbthZuR4JJoLAAAAAElFTkSuQmCC"},43301:function(En){"use strict";En.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAABrVJREFUaEPtm2lsVFUUx//nddYuU6DM64woRQS0UxCDiFrF2AiYiERFCjEgBo1BI59E3IJxi0QTNVHERD6AkUoUJdEoSsEFVEJkkUU6FbCRsnRmXpcZ6DbrO/pm7I6dMjP3WbH3S5vMPcvvnnPPO/fOG0KK47f6+jwV0TVguouZbSmqSVuMgCATdpLRstQ1fHhtMoWUbMI/fe6u97zLKh5NVT7jckS7SmTHzcn0pgxcpXh/B/MVyQzo9TkR8Qg78hzkaO3PZsrAbsVbx8xOvYAGYkey5owsttkah4C7rcCAIry9qW50Q/jc5rOR0HiVkKXJS6BsMEsDWflMzbFQFoqMuZBhPq/KjEX4vdOH/HWh1mGZcjxdPbfmXQKZ+0JnBHhb4OTUXY2n92pO5hlMyJYM6fqbsnxjJIgoqxhjsWGaoaCPnowAb208ce/uQN2nmvZZBUUozb8kZYfTFXzn9EE0hNvhNGZjurlwCHgowudJqaRVeiil/897ePnxnXjvzOF0a1G/8k+NmYbnxlwfn/OvF61lx77DmlMHhQKvvPwGvDy2dHAAv+9xY1vTCaHA99jHoVyeoA/wpiNHTNYR5vJ97fUVF/VzeP32LZNYpXUEXGvOz6Oj9nj7fPE2HusrtxxjxngN0jLMhosauOL7ry4Nh/hUx8bsD3hH4DQONdenvIfnyuNxmTl3wPJCqvSGrVvHRRA7PhDgdKv09inzMGP46IwB13p8U3x+v2dJWZn3n5T26bT+y8D7fz2MaDQKgNwmA8oXzbjD3Rs8LWBPuBXakS3Vcbk1HzkXcNxMltJdwAAR9iy5fXaiY+k20gJOFTRVuQsBBqDmXlpknT9xYvj/Agz7yMKcOVOntg0Bd1+BCyla/aVmRI3B19yM9mgEzKkmcU+5tlgEKhC/RTRS3/vDiFawutkyGo2KpoGAVoArJcnwpJA9HIpFUev3I6rGMkOaIS0Eqsg4cAK2CVFVi8UgG0SBjAKHolHUBgYpbCK1GzIGHPwbNjYYI/t3ohHhl4wA/xdgE8WLPksbOBiNoDbgx2CObEclkYje7gRWFCX3nFXNrq05NaausennjklmWx5qChKPgNJho3CNTY7/z8xoD4URaGuDmqnnjuAaJ0nSE+T2+4s4Eqwg0E3MnPTaVrBPYtUT5pNb8VYy8yyxlnpqD0US62o2ZqgjGaDzZKAbNeCzeryjoTKw44AJu4+YofilePclD1NRdm0IN04MQ9Iht7Ikwyiq8nm0F0EGfgof4Gp2nxaNAWs256KmLnE31ntMHhfBg7PbtCOduEEUcdkLLeT2ebcxeKY4S8DnP1rw7f7zf4ndYXdOaRAzp4WEuUGgP1yFjrFUpXhXg3mZKEtadFesyUesW6dpNXM8pYPhrpDaclS89FAzJEHvFBBhp0t23krVimeZylgtCrjWa8AbH+V0qrfnq3hmcTPCUcKL6/LQHuqCfn5JMwryxfTgJGGDy+5cTNU+3ywVaqUo4JozWXjrk66bydumhnDXzUFoHegL6/IQaOkK6bP3t8BRIOaERUSvuGTHysRzOBwU+n3Jxm+s2Os2YZQ9hvtmtuPAMSMO1xjgbewqYlYTY9Uj55AlKKUliZYW2x1rSWs2qhVvKwNWUVFOdGbxi7V4emtp3nvcMjmEeWWpXwgm9Z2y7iiR5a/jG8jt8x5i8NVJhdKcoBWwx1fn99HiHBnD8gUtMBnTNNCfuAETSwqcVXHgKsWzCYxygebiqnsDaxEvnRTG3dODwruuLMlgu8pub05EWPG+zMwrRQNr+t/8OAcnPImUvt4VxsJZ7eLNEgVKZMdwzVAiwg2+RYipG8RbBprbJPxwyIQcC8dbSj36aQIddhU6JncCH21ouC4ai+zRA1izofXVevTOHTxE9KVLdszpBK5pasoPRkIBPYDPtUl4fWMOTAZgxcIWfSJMeNclOx/rBI6ntc/rBbjv620ZXoV91UZ8UJkd17psbismjNa+/BI7iPC0S3a+1gPYrXh2MuMWsaaBxrMSXq3IhcnEeO6BFlhM4s/EkkQLi+2OjT2Bfd61DH5YNLCmPxxJNCFGnd5TNVDW9Ctl+acewNX1vuWqqr6uB7DeNixGc9EVI0ac7AXsvVNV+Qu9nRFtj4hixfZCs/a31x5WxjPHjol2QHf9hFMlsrPzRqfzMMrMBne9rw3MIjta3XnR6+c9PW6RqhSPG4xi/b0SaZE+LCl0LOpsQrqbqlK8q8D8jEjzuusmLCiRnZvOC3yc2Ryp973zVx9Szsx9z3G6e5uOQfKB8HaJ7FjVXcufD7eNXXNli1wAAAAASUVORK5CYII="},16722:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Ie}});const Ot=we=>typeof we=="object"&&we!=null&&we.nodeType===1,jt=(we,qt)=>(!qt||we!=="hidden")&&we!=="visible"&&we!=="clip",Qt=(we,qt)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const ce=getComputedStyle(we,null);return jt(ce.overflowY,qt)||jt(ce.overflowX,qt)||(Ce=>{const Be=(Tt=>{if(!Tt.ownerDocument||!Tt.ownerDocument.defaultView)return null;try{return Tt.ownerDocument.defaultView.frameElement}catch(et){return null}})(Ce);return!!Be&&(Be.clientHeight<Ce.scrollHeight||Be.clientWidth<Ce.scrollWidth)})(we)}return!1},Me=(we,qt,ce,Ce,Be,Tt,et,nt)=>Tt<we&&et>qt||Tt>we&&et<qt?0:Tt<=we&&nt<=ce||et>=qt&&nt>=ce?Tt-we-Ce:et>qt&&nt<ce||Tt<we&&nt>ce?et-qt+Be:0,Ut=we=>{const qt=we.parentElement;return qt==null?we.getRootNode().host||null:qt},pe=(we,qt)=>{var ce,Ce,Be,Tt;if(typeof document=="undefined")return[];const{scrollMode:et,block:nt,inline:ht,boundary:st,skipOverflowHiddenElements:gt}=qt,vt=typeof st=="function"?st:An=>An!==st;if(!Ot(we))throw new TypeError("Invalid target");const wt=document.scrollingElement||document.documentElement,Ft=[];let It=we;for(;Ot(It)&&vt(It);){if(It=Ut(It),It===wt){Ft.push(It);break}It!=null&&It===document.body&&Qt(It)&&!Qt(document.documentElement)||It!=null&&Qt(It,gt)&&Ft.push(It)}const At=(Ce=(ce=window.visualViewport)==null?void 0:ce.width)!=null?Ce:innerWidth,Wt=(Tt=(Be=window.visualViewport)==null?void 0:Be.height)!=null?Tt:innerHeight,{scrollX:re,scrollY:ne}=window,{height:me,width:Vt,top:Le,right:he,bottom:Ge,left:Ke}=we.getBoundingClientRect(),{top:Ve,right:sn,bottom:Mn,left:xe}=(An=>{const ze=window.getComputedStyle(An);return{top:parseFloat(ze.scrollMarginTop)||0,right:parseFloat(ze.scrollMarginRight)||0,bottom:parseFloat(ze.scrollMarginBottom)||0,left:parseFloat(ze.scrollMarginLeft)||0}})(we);let Ht=nt==="start"||nt==="nearest"?Le-Ve:nt==="end"?Ge+Mn:Le+me/2-Ve+Mn,Je=ht==="center"?Ke+Vt/2-xe+sn:ht==="end"?he+sn:Ke-xe;const Tn=[];for(let An=0;An<Ft.length;An++){const ze=Ft[An],{height:Te,width:dn,top:Hn,right:hn,bottom:pn,left:de}=ze.getBoundingClientRect();if(et==="if-needed"&&Le>=0&&Ke>=0&&Ge<=Wt&&he<=At&&(ze===wt&&!Qt(ze)||Le>=Hn&&Ge<=pn&&Ke>=de&&he<=hn))return Tn;const vn=getComputedStyle(ze),bn=parseInt(vn.borderLeftWidth,10),Qe=parseInt(vn.borderTopWidth,10),Pn=parseInt(vn.borderRightWidth,10),Ne=parseInt(vn.borderBottomWidth,10);let Pe=0,ie=0;const Dt="offsetWidth"in ze?ze.offsetWidth-ze.clientWidth-bn-Pn:0,fe="offsetHeight"in ze?ze.offsetHeight-ze.clientHeight-Qe-Ne:0,Se="offsetWidth"in ze?ze.offsetWidth===0?0:dn/ze.offsetWidth:0,ee="offsetHeight"in ze?ze.offsetHeight===0?0:Te/ze.offsetHeight:0;if(wt===ze)Pe=nt==="start"?Ht:nt==="end"?Ht-Wt:nt==="nearest"?Me(ne,ne+Wt,Wt,Qe,Ne,ne+Ht,ne+Ht+me,me):Ht-Wt/2,ie=ht==="start"?Je:ht==="center"?Je-At/2:ht==="end"?Je-At:Me(re,re+At,At,bn,Pn,re+Je,re+Je+Vt,Vt),Pe=Math.max(0,Pe+ne),ie=Math.max(0,ie+re);else{Pe=nt==="start"?Ht-Hn-Qe:nt==="end"?Ht-pn+Ne+fe:nt==="nearest"?Me(Hn,pn,Te,Qe,Ne+fe,Ht,Ht+me,me):Ht-(Hn+Te/2)+fe/2,ie=ht==="start"?Je-de-bn:ht==="center"?Je-(de+dn/2)+Dt/2:ht==="end"?Je-hn+Pn+Dt:Me(de,hn,dn,bn,Pn+Dt,Je,Je+Vt,Vt);const{scrollLeft:Kt,scrollTop:kt}=ze;Pe=ee===0?0:Math.max(0,Math.min(kt+Pe/ee,ze.scrollHeight-Te/ee+fe)),ie=Se===0?0:Math.max(0,Math.min(Kt+ie/Se,ze.scrollWidth-dn/Se+Dt)),Ht+=kt-Pe,Je+=Kt-ie}Tn.push({el:ze,top:Pe,left:ie})}return Tn},Nt=we=>we===!1?{block:"end",inline:"nearest"}:(qt=>qt===Object(qt)&&Object.keys(qt).length!==0)(we)?we:{block:"start",inline:"nearest"};function Ie(we,qt){if(!we.isConnected||!(Be=>{let Tt=Be;for(;Tt&&Tt.parentNode;){if(Tt.parentNode===document)return!0;Tt=Tt.parentNode instanceof ShadowRoot?Tt.parentNode.host:Tt.parentNode}return!1})(we))return;const ce=(Be=>{const Tt=window.getComputedStyle(Be);return{top:parseFloat(Tt.scrollMarginTop)||0,right:parseFloat(Tt.scrollMarginRight)||0,bottom:parseFloat(Tt.scrollMarginBottom)||0,left:parseFloat(Tt.scrollMarginLeft)||0}})(we);if((Be=>typeof Be=="object"&&typeof Be.behavior=="function")(qt))return qt.behavior(pe(we,qt));const Ce=typeof qt=="boolean"||qt==null?void 0:qt.behavior;for(const{el:Be,top:Tt,left:et}of pe(we,Nt(qt))){const nt=Tt-ce.top+ce.bottom,ht=et-ce.left+ce.right;Be.scroll({top:nt,left:ht,behavior:Ce})}}}}]);
|