|
|
(self.webpackChunk=self.webpackChunk||[]).push([[2080],{89489:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},59477:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},40001:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},26227:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},49198:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},41464:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},87169:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},73331:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},15277:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},52671:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},8657:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},56082:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},33853:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},12893:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},15075:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},32134:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},43531:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},61485:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},38819:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},47472:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ue,lt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ue,{ref:lt,icon:dt}))},Me=Re.forwardRef(st),kt=Me},37036:function(){"use strict"},88010:function(Vn,Cn){"use strict";Cn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},43809:function(Vn,Cn){"use strict";Cn.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},7761:function(Vn,Cn){"use strict";Cn.Z={flex_box_center:"flex_box_center___ycN2f",flex_space_between:"flex_space_between___LcS9e",flex_box_vertical_center:"flex_box_vertical_center___uwjPm",flex_box_center_end:"flex_box_center_end___Pc903",flex_box_column:"flex_box_column___AXEdv",bg:"bg___fm2Cw",title:"title___J3MCU",editIcon:"editIcon___i4Zll",titleLeft:"titleLeft___da61c",titleRight:"titleRight___EsdL6",formWrap:"formWrap___YTxC3",baseLineHeight:"baseLineHeight___TprCB",radioBtnWrapper:"radioBtnWrapper___Mt_XG",radiogroup:"radiogroup___EvkWh",easy:"easy___mSxtg",medium:"medium___NIaWN",hard:"hard___mddnD",baseFormItem:"baseFormItem___csbyb",cascaderPopup:"cascaderPopup___BttnF",selectdiv:"selectdiv___TAr4i",divitem:"divitem___iaXB2",bottmodiv:"bottmodiv___bmp6p",cancelBtn:"cancelBtn___Q4ZcL",confirmBtn:"confirmBtn___nRiCD",concat:"concat___jlPR1"}},84287:function(Vn,Cn,pe){"use strict";var ge=pe(59301),Re=Object.defineProperty,Ve=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,st=(bt,Ue,lt)=>Ue in bt?Re(bt,Ue,{enumerable:!0,configurable:!0,writable:!0,value:lt}):bt[Ue]=lt,Me=(bt,Ue)=>{for(var lt in Ue||(Ue={}))dt.call(Ue,lt)&&st(bt,lt,Ue[lt]);if(Ve)for(var lt of Ve(Ue))Ke.call(Ue,lt)&&st(bt,lt,Ue[lt]);return bt};const kt=bt=>React.createElement("svg",Me({className:"jiangxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},bt),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"}));Cn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Im0yNDguNjg2IDgwMy4xODItNjUuODI5IDc1LjkyMlY2NTguMjg2aC03My4xNDN2MjIwLjgxOGwtNjUuODI4LTc1Ljk5NUwwIDg1MS4zODMgMTQ2LjI4NiAxMDI0IDI5Mi41NyA4NTEuNTN6IiBmaWxsPSIjMTQ1REZGIi8+PHBhdGggZD0iTTE0Ni4yODYgMCAwIDE1OC43Mmw0My44ODYgNTUuMjIzIDY1LjgyOC03NS45MjJ2MjI3LjY5M2g3My4xNDNWMTM4LjAyMWw2NS44MjkgNzUuOTIyIDQzLjg4NS01NS4yMjN6IiBmaWxsPSIjOThCREY3Ii8+PC9zdmc+"},86087:function(Vn,Cn,pe){"use strict";var ge=pe(59301),Re=Object.defineProperty,Ve=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,st=(bt,Ue,lt)=>Ue in bt?Re(bt,Ue,{enumerable:!0,configurable:!0,writable:!0,value:lt}):bt[Ue]=lt,Me=(bt,Ue)=>{for(var lt in Ue||(Ue={}))dt.call(Ue,lt)&&st(bt,lt,Ue[lt]);if(Ve)for(var lt of Ve(Ue))Ke.call(Ue,lt)&&st(bt,lt,Ue[lt]);return bt};const kt=bt=>React.createElement("svg",Me({className:"shengxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},bt),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"}));Cn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzek0yNDguNjg2IDgwMy4xODJsLTY1LjgyOSA3NS45MjJWNjU4LjI4NmgtNzMuMTQzdjIyMC44MThsLTY1LjgyOC03NS45OTVMMCA4NTEuMzgzIDE0Ni4yODYgMTAyNCAyOTIuNTcgODUxLjUzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Ik0xNDYuMjg2IDAgMCAxNTguNzJsNDMuODg2IDU1LjIyMyA2NS44MjgtNzUuOTIydjIyNy42OTNoNzMuMTQzVjEzOC4wMjFsNjUuODI5IDc1LjkyMiA0My44ODUtNTUuMjIzeiIgZmlsbD0iIzE0NURGRiIvPjwvc3ZnPg=="},74413:function(){"use strict";function Vn(Ae,ne,ee,ce){ee===void 0&&(ee=0),ce===void 0&&(ce=1/0),this._name=Ae,this._defaultValue=ne,this._minimum=ee,this._maximum=ce}Object.defineProperty(Vn.prototype,"name",{get:function(){return this._name},set:function(Ae){if(typeof Ae!="string"||Ae==="")throw new Error("Shape name must be a valid string.");this._name=Ae}}),Object.defineProperty(Vn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("The default value must be a real number, not: "+Ae);this._defaultValue=Ae}}),Object.defineProperty(Vn.prototype,"minimum",{get:function(){return this._minimum},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("Minimum must be a real number, not: "+Ae);this._minimum=Ae}}),Object.defineProperty(Vn.prototype,"maximum",{get:function(){return this._maximum},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("Maximum must be a real number, not: "+Ae);this._maximum=Ae}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ae,ne){var ee=go.Shape._FigureParameters[Ae];return ee?ee[ne]:null},go.Shape.setFigureParameter=function(Ae,ne,ee){if(!(ee instanceof Vn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var ce=go.Shape._FigureParameters[Ae];ce||(ce=[],go.Shape._FigureParameters[Ae]=ce),ce[ne]=ee};var Cn=[];function pe(Ae,ne){var ee=Cn.pop();return ee===void 0?new go.Point(Ae,ne):(ee.x=Ae,ee.y=ne,ee)}function ge(){var Ae=Cn.pop();return Ae===void 0?new go.Point:Ae}function Re(Ae){Cn.push(Ae)}function Ve(Ae,ne,ee,ce,se,fe,ye,be,Te){Te||(Te=new go.Point);var Be=Ae-ee,ze=se-ye,Ge=NaN,nt=NaN;if(Be===0)if(ze===0)Ae===ee&&(Ge=Ae,nt=ne);else{var Je=(fe-be)/ze,xt=fe-Je*se;Ge=Ae,nt=Je*Ge+xt}else if(ze===0){var He=(ne-ce)/Be,Et=ne-He*Ae;Ge=se,nt=He*Ge+Et}else{var He=(ne-ce)/Be,Je=(fe-be)/ze,Et=ne-He*Ae,xt=fe-Je*se;Ge=(xt-Et)/(He-Je),nt=He*Ge+Et}return Te.x=Ge,Te.y=nt,Te}function dt(Ae,ne,ee,ce,se,fe,ye,be,Te,Be,ze,Ge,nt,Je){var xt=1-Te,He=Te,Et=Ae*xt+ee*He,tt=ne*xt+ce*He,Ot=ee*xt+se*He,gt=ce*xt+fe*He,Ht=se*xt+ye*He,Xt=fe*xt+be*He,Ut=Et*xt+Ot*He,it=tt*xt+gt*He,_e=Ot*xt+Ht*He,Wt=gt*xt+Xt*He,Dn=Ut*xt+_e*He,Bn=it*xt+Wt*He;Be.x=Et,Be.y=tt,ze.x=Ut,ze.y=it,Ge.x=Dn,Ge.y=Bn,nt.x=_e,nt.y=Wt,Je.x=Ht,Je.y=Xt}var Ke=new go.Spot(.156,.156),st=new go.Spot(.844,.844),Me=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Vn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=5),ce=Math.min(ce,ne/3),ce=Math.min(ce,ee/3);var se=ce*Me,fe=new go.Geometry().add(new go.PathFigure(ce,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne-ce,0)).add(new go.PathSegment(go.PathSegment.Bezier,ne,ce,ne-se,0,ne,se)).add(new go.PathSegment(go.PathSegment.Line,ne,ee-ce)).add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ee,ne,ee-se,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,ce,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ce,se,ee,0,ee-se)).add(new go.PathSegment(go.PathSegment.Line,0,ce)).add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,se,se,0).close()));return se>1&&(fe.spot1=new go.Spot(0,0,se,se),fe.spot2=new go.Spot(1,1,-se,-se)),fe}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(.5*ne,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Ae,ne,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=0,ce.startY=ee/2,ce.endX=ne,ce.endY=ee/2,ce}),go.Shape.defineFigureGenerator("LineV",function(Ae,ne,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=ne/2,ce.startY=0,ce.endX=ne/2,ce.endY=ee,ce}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,ne,ee/2)).add(new go.PathSegment(go.PathSegment.Move,ne/2,0)).add(new go.PathSegment(go.PathSegment.Line,ne/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(.25*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*ne,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(.75*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*ne,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Ae,ne,ee){var ce=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ce*ne,(1-ce)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Move,ce*ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,(1-ce)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,ne,ee/2)).add(new go.PathSegment(go.PathSegment.Move,ne/2,0)).add(new go.PathSegment(go.PathSegment.Line,ne/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(Ae,ne,ee){var ce=ne/2,se=new go.Geometry().add(new go.PathFigure(ne,ne/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ce,ce,ce,ce).close()));return se.spot1=Ke,se.spot2=st,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Ae,ne,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=0,ce.startY=0,ce.endX=ne,ce.endY=ee,ce}),go.Shape.defineFigureGenerator("Line2",function(Ae,ne,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=ne,ce.startY=0,ce.endX=0,ce.endY=ee,ce}),go.Shape.defineFigureGenerator("Curve1",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,ee,Me*ne,0,ne,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,ee,0,Me*ee,(1-Me)*ne,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,ne,Me*ee,Me*ne,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-Me)*ne,0,0,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Vn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)?ce=.1:ce<-1?ce=-1:ce>1&&(ce=1);var se=Math.abs(ce)*ne;if(ce===0){var fe=new go.Geometry(go.Geometry.Rectangle);return fe.startX=0,fe.startY=0,fe.endX=ne,fe.endY=ee,fe}else{var fe=new go.Geometry;return ce>0?fe.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):fe.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<ne/2&&fe.setSpots(se/ne,0,(ne-se)/ne,1),fe}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Vn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)?ce=10:ce<-ne?ce=-ne:ce>ne&&(ce=ne);var se=Math.abs(ce);if(ce===0){var fe=new go.Geometry(go.Geometry.Rectangle);return fe.startX=0,fe.startY=0,fe.endX=ne,fe.endY=ee,fe}else{var fe=new go.Geometry;return ce>0?fe.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):fe.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<ne/2&&fe.setSpots(se/ne,0,(ne-se)/ne,1),fe}}),go.Shape.setFigureParameter("Trapezoid1",0,new Vn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)?ce=.2:ce<.5?ce=-.5:ce>.5&&(ce=.5);var se=Math.abs(ce)*ne;if(ce===0){var fe=new go.Geometry(go.Geometry.Rectangle);return fe.startX=0,fe.startY=0,fe.endX=ne,fe.endY=ee,fe}else{var fe=new go.Geometry;return ce>0?fe.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):fe.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<ne/2&&fe.setSpots(se/ne,0,(ne-se)/ne,1),fe}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Vn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)?ce=20:ce<-ne?ce=-ne/2:ce>ne&&(ce=ne/2);var se=Math.abs(ce);if(ce===0){var fe=new go.Geometry(go.Geometry.Rectangle);return fe.startX=0,fe.startY=0,fe.endX=ne,fe.endY=ee,fe}else{var fe=new go.Geometry;return ce>0?fe.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):fe.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<ne/2&&fe.setSpots(se/ne,0,(ne-se)/ne,1),fe}}),go.Shape.setFigureParameter("ManualOperation",0,new Vn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)?ce=10:ce<-ne?ce=-ne/2:ce>ne&&(ce=ne/2);var se=Math.abs(ce);if(ce===0){var fe=new go.Geometry(go.Geometry.Rectangle);return fe.startX=0,fe.startY=0,fe.endX=ne,fe.endY=ee,fe}else{var fe=new go.Geometry;return ce>0?fe.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())):fe.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),se<ne/2&&fe.setSpots(se/ne,0,(ne-se)/ne,1),fe}});var kt=[];function bt(){var Ae=kt.pop();return Ae===void 0?[]:Ae}function Ue(Ae){Ae.length=0,kt.push(Ae)}function lt(Ae){for(var ne=bt(),ee=.5,ce=.5,se=Math.PI*1.5,fe=0,ye=0;ye<Ae;ye++)fe=2*Math.PI/Ae*ye+se,ne[ye]=new go.Point(ce+ee*Math.cos(fe),ce+ee*Math.sin(fe));return ne.push(ne[0]),ne}function yt(Ae){var ne=jt(Ae),ee=bt();ee[0]=ne[0];for(var ce=1,se=1;ce<ne.length;ce+=2,se+=3)ee[se]=ne[ce],ee[se+1]=ne[ce],ee[se+2]=ne[ce+1];return Ue(ne),ee}function jt(Ae){for(var ne=lt(Ae),ee=bt(),ce=Math.floor(ne.length/2),se=ne.length-1,fe=Ae%2===0?2:1,ye=0;ye<se;ye++){var be=ne[ye],Te=ne[ye+1],Be=ne[(ce+ye-1)%se],ze=ne[(ce+ye+fe)%se];ee[ye*2]=be,ee[ye*2+1]=Ve(be.x,be.y,Be.x,Be.y,Te.x,Te.y,ze.x,ze.y,new go.Point)}return ee[ee.length]=ee[0],Ue(ne),ee}go.Shape.defineFigureGenerator("Pentagon",function(Ae,ne,ee){var ce=lt(5),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<5;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(Ae,ne,ee){var ce=lt(6),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<6;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(Ae,ne,ee){var ce=lt(7),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<7;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(Ae,ne,ee){var ce=lt(8),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<8;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(Ae,ne,ee){var ce=lt(9),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<9;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(Ae,ne,ee){var ce=lt(10),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<10;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(Ae,ne,ee){var ce=lt(12),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<12;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(Ae,ne,ee){var ce=jt(5),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<10;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(Ae,ne,ee){var ce=jt(6),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<12;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Ae,ne,ee){var ce=jt(7),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<14;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(Ae,ne,ee){var ce=jt(8),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<16;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(Ae,ne,ee){var ce=jt(9),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<18;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(Ae,ne,ee){var ce=jt(10),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<20;ye++)fe.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*ee));return fe.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ue(ce),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Ae,ne,ee){var ce=yt(5),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<ce.length;ye+=3)fe.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*ee,ce[ye].x*ne,ce[ye].y*ee,ce[ye+1].x*ne,ce[ye+1].y*ee));return fe.segments.last().close(),Ue(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Ae,ne,ee){var ce=yt(6),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<ce.length;ye+=3)fe.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*ee,ce[ye].x*ne,ce[ye].y*ee,ce[ye+1].x*ne,ce[ye+1].y*ee));return fe.segments.last().close(),Ue(ce),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Ae,ne,ee){var ce=yt(7),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<ce.length;ye+=3)fe.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*ee,ce[ye].x*ne,ce[ye].y*ee,ce[ye+1].x*ne,ce[ye+1].y*ee));return fe.segments.last().close(),Ue(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Ae,ne,ee){var ce=yt(8),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<ce.length;ye+=3)fe.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*ee,ce[ye].x*ne,ce[ye].y*ee,ce[ye+1].x*ne,ce[ye+1].y*ee));return fe.segments.last().close(),Ue(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Ae,ne,ee){var ce=yt(9),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<ce.length;ye+=3)fe.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*ee,ce[ye].x*ne,ce[ye].y*ee,ce[ye+1].x*ne,ce[ye+1].y*ee));return fe.segments.last().close(),Ue(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Ae,ne,ee){var ce=yt(10),se=new go.Geometry,fe=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(fe);for(var ye=1;ye<ce.length;ye+=3)fe.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*ee,ce[ye].x*ne,ce[ye].y*ee,ce[ye+1].x*ne,ce[ye+1].y*ee));return fe.segments.last().close(),Ue(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new Vn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Vn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN,se=Ae?Ae.parameter2:NaN;isNaN(ce)&&(ce=8),isNaN(se)&&(se=8);var fe=new go.Geometry,ye=new go.PathFigure(0,0,!0);return fe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce<ne/2&&se<ee/2&&(ye.add(new go.PathSegment(go.PathSegment.Move,ce,se)),ye.add(new go.PathSegment(go.PathSegment.Line,ce,ee-se)),ye.add(new go.PathSegment(go.PathSegment.Line,ne-ce,ee-se)),ye.add(new go.PathSegment(go.PathSegment.Line,ne-ce,se).close())),fe.setSpots(0,0,1,1,ce,se,-ce,-se),fe}),go.Shape.setFigureParameter("Ring",0,new Vn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=8);var se=ne/2,fe=new go.Geometry,ye=new go.PathFigure(ne,ne/2,!0);fe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var be=Math.max(se-ce,0);return be>0&&(ye.add(new go.PathSegment(go.PathSegment.Move,ne/2+be,ne/2)),ye.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,be,be).close())),fe.spot1=Ke,fe.spot2=st,fe.defaultStretch=go.GraphObject.Uniform,fe}),go.Shape.defineFigureGenerator("Cloud",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(.08034461*ne,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*ne,.05349299*ee,-.09239631*ne,.07836421*ee,.1406031*ne,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*ne,.074219*ee,.2450511*ne,-.00697547*ee,.3776197*ne,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*ne,.07004196*ee,.4539471*ne,0,.6066018*ne,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*ne,.08370865*ee,.6914277*ne,-.01904177*ee,.8921095*ne,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*ne,.3194596*ee,1.036446*ne,.04105738*ee,1.020377*ne,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*ne,.562044*ee,1.04448*ne,.360238*ee,.992256*ne,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*ne,.8217117*ee,1.032337*ne,.5771781*ee,1.018411*ne,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*ne,.9156953*ee,1.028411*ne,.9571472*ee,.8556702*ne,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*ne,.9310455*ee,.7431877*ne,1.009325*ee,.5624123*ne,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*ne,.9344623*ee,.4820677*ne,1.031761*ee,.3030112*ne,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ne,.870098*ee,.2329994*ne,1.01518*ee,.03213784*ne,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*ne,.6545475*ee,-.02812061*ne,.9032597*ee,-.01205169*ne,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*ne,.4265613*ee,-.01812061*ne,.6089503*ee,-.00606892*ne,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ne,.1944299*ee,-.01606892*ne,.3892545*ee,-.01205169*ne,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Ae,ne,ee){var ce=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ce*ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,(1-ce)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,ce*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ce)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ce*ee).close())).setSpots(ce/2,ce/2,1-ce/2,1-ce/2)}),go.Shape.setFigureParameter("Pie",0,new Vn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Vn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN,se=Ae?Ae.parameter2:NaN;isNaN(ce)&&(ce=0),isNaN(se)&&(se=315);var fe=ce%360;fe<0&&(fe+=360);var ye=se%360,be=Math.min(ne,ee)/2;return new go.Geometry().add(new go.PathFigure(be,be).add(new go.PathSegment(go.PathSegment.Arc,fe,ye,be,be,be,be).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ae,ne,ee){var ce=Me/Math.SQRT2*.5,se=Math.SQRT2/2,fe=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(ne,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*ne,fe*ee,ne,(1-ce)*ee,(se+ce)*ne,(fe+ce)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Vn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=30);var se=Math.min(ce,ne)/2,fe=ne/2,ye=ee/2;return new go.Geometry().add(new go.PathFigure(fe-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,fe+se,0)).add(new go.PathSegment(go.PathSegment.Line,fe+se,ye-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ye-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ye+se)).add(new go.PathSegment(go.PathSegment.Line,fe+se,ye+se)).add(new go.PathSegment(go.PathSegment.Line,fe+se,ee)).add(new go.PathSegment(go.PathSegment.Line,fe-se,ee)).add(new go.PathSegment(go.PathSegment.Line,fe-se,ye+se)).add(new go.PathSegment(go.PathSegment.Line,0,ye+se)).add(new go.PathSegment(go.PathSegment.Line,0,ye-se)).add(new go.PathSegment(go.PathSegment.Line,fe-se,ye-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Vn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=10);var se=Math.min(ce,ne)/2,fe=ne/2,ye=ee/2;return new go.Geometry().add(new go.PathFigure(fe-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,fe+se,0)).add(new go.PathSegment(go.PathSegment.Line,fe+se,ye-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ye-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ye+se)).add(new go.PathSegment(go.PathSegment.Line,fe+se,ye+se)).add(new go.PathSegment(go.PathSegment.Line,fe+se,ee)).add(new go.PathSegment(go.PathSegment.Line,fe-se,ee)).add(new go.PathSegment(go.PathSegment.Line,fe-se,ye+se)).add(new go.PathSegment(go.PathSegment.Line,0,ye+se)).add(new go.PathSegment(go.PathSegment.Line,0,ye-se)).add(new go.PathSegment(go.PathSegment.Line,fe-se,ye-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new Vn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;if((isNaN(ce)||ce<0)&&(ce=30),ne===0||ee===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=ne,se.endY=ee,se}else{var fe=ne/2,ye=ee/2,be=Math.atan2(ee,ne),Te=ce-Math.min(Math.cos(be)*ce/2,fe),Be=ce-Math.min(Math.sin(be)*ce/2,ye),se=new go.Geometry,ze=new go.PathFigure(Te,0,!0);return se.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,fe,.2*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,ne-Te,0)),ze.add(new go.PathSegment(go.PathSegment.Line,ne,Be)),ze.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ye)),ze.add(new go.PathSegment(go.PathSegment.Line,ne,ee-Be)),ze.add(new go.PathSegment(go.PathSegment.Line,ne-Te,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,fe,.8*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,Te,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,0,ee-Be)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ye)),ze.add(new go.PathSegment(go.PathSegment.Line,0,Be).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new Vn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=10);var se=new go.Geometry,fe=new go.PathFigure(.1*ne,0,!0);return se.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.1*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.1*ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new Vn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=.2);var se=new go.Geometry,fe=new go.PathFigure(0,0,!0);return se.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ce*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,(.5+ce/2)*ne,ce*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,(.5+ce/2)*ne,(1-ce)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,(1-ce)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,(1-ce)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,(.5-ce/2)*ne,(1-ce)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,(.5-ce/2)*ne,ce*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ce*ee).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new Vn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=.5);var se=new go.Geometry,fe=new go.PathFigure(0,0,!0);return se.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Bezier,ne,ee,Math.abs(1-ce)*ne,.25*ee,Math.abs(1-ce)*ne,.75*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ce*ne,.75*ee,ce*ne,.25*ee).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,Me*ne,0,ne,(.5-Me/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,ne,(.5+Me/2)*ee,Me*ne,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,ne,0,ne,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*ne,.75*ee,.5*ne,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(.5*ne,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*ne,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*ee,0,0,.45*ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,ne,.3*ee,.55*ne,0,ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,.5*ee,.9*ne,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(.5*ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*ne,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,.6*ne,.2*ee,ne,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.7*ee,ne,.8*ee,.6*ne,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,ee,.5*ne,.75*ee,.55*ne,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*ne,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*ne,.7*ee,.45*ne,.95*ee,.5*ne,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*ne,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*ne,.01*ee,0,.25*ee,.4*ne,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.4*ne,.6*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.15*ne,ee,.5*ne,.75*ee,.45*ne,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*ne,.6*ee,.55*ne,.95*ee,.5*ne,.75*ee));var fe=.2,ye=.3,be=0,Te=fe*Me;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ye)*ne,(.5+fe+be)*ee,(.5-fe+ye)*ne,(.5+Te+be)*ee,(.5-Te+ye)*ne,(.5+fe+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+fe+ye)*ne,(.5+be)*ee,(.5+Te+ye)*ne,(.5+fe+be)*ee,(.5+fe+ye)*ne,(.5+Te+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ye)*ne,(.5-fe+be)*ee,(1-.5+fe+ye)*ne,(.5-Te+be)*ee,(.5+Te+ye)*ne,(.5-fe+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*ne,.36771243*ee,(.5-Te+ye)*ne,(.5-fe+be)*ee,(.5-fe+ye+.05)*ne,(.5-Te+be-.02)*ee)),fe=.2,ye=0,be=-.3,Te=fe*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+fe+ye)*ne,(.5+be)*ee,(.5+Te+ye)*ne,(.5+fe+be)*ee,(.5+fe+ye)*ne,(.5+Te+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ye)*ne,(.5-fe+be)*ee,(1-.5+fe+ye)*ne,(.5-Te+be)*ee,(.5+Te+ye)*ne,(.5-fe+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-fe+ye)*ne,(.5+be)*ee,(.5-Te+ye)*ne,(.5-fe+be)*ee,(.5-fe+ye)*ne,(.5-Te+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Te+ye)*ne,(.5+fe+be)*ee,(.5-fe+ye)*ne,(.5+Te+be)*ee,(.5-Te+ye)*ne,(.5+fe+be)*ee)),fe=.2,ye=-.3,be=0,Te=fe*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ye)*ne,(.5-fe+be)*ee,(1-.5+fe+ye-.05)*ne,(.5-Te+be-.02)*ee,(.5+Te+ye)*ne,(.5-fe+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-fe+ye)*ne,(.5+be)*ee,(.5-Te+ye)*ne,(.5-fe+be)*ee,(.5-fe+ye)*ne,(.5-Te+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ye)*ne,(.5+fe+be)*ee,(.5-fe+ye)*ne,(.5+Te+be)*ee,(.5-Te+ye)*ne,(.5+fe+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.6*ee,(.5+Te+ye)*ne,(.5+fe+be)*ee,(.5+fe+ye)*ne,(.5+Te+be)*ee).close()),ce.setSpots(.06,.33,.93,.68),ce}),go.Shape.defineFigureGenerator("YinYang",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*.5,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,ne*.5,ne*.5,ne*.5,ne*.5)),se.add(new go.PathSegment(go.PathSegment.Arc,90,-180,ne*.5,ne*.75,ne*.25,ne*.25)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,ne*.5,ne*.25,ne*.25,ne*.25));var fe=.1,ye=.5,be=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(ye+fe)*ne,be*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ne*ye,ee*be,fe*ne,fe*ne).close()),se=new go.PathFigure(ne*.5,0,!1),ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ne*.5,ne*.5,ne*.5,ne*.5)),be=.75,se=new go.PathFigure((ye+fe)*ne,be*ee,!0),ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,ne*ye,ee*be,fe*ne,fe*ne).close()),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("Peace",function(Ae,ne,ee){var ce=.8535533905932737,se=.5*ne,fe=.5*ee;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,fe,se,fe)).add(new go.PathSegment(go.PathSegment.Line,se,ee)).add(new go.PathSegment(go.PathSegment.Move,se,fe)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Move,se,fe)).add(new go.PathSegment(go.PathSegment.Line,ce*ne,ce*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.5,fe=.5,ye=.5,be=.5,Te=new go.PathFigure(ye*ne,(be-fe)*ee);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye-fe)*ne,be*ee,(ye-se)*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+fe)*ee,(ye-fe)*ne,(be+se)*ee,(ye-se)*ne,(be+fe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,be*ee,(ye+se)*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-fe)*ee,(ye+fe)*ne,(be-se)*ee,(ye+se)*ne,(be-fe)*ee)),fe=.4,se=Me*.4;var Be=ge(),ze=ge(),Ge=ge(),nt=ge();dt(ye,be-fe,ye+se,be-fe,ye+fe,be-se,ye+fe,be,.42,Be,ze,Ge,nt,nt);var Je=ge(),xt=ge(),He=ge();dt(ye,be-fe,ye+se,be-fe,ye+fe,be-se,ye+fe,be,.58,nt,nt,He,Je,xt);var Et=ge(),tt=ge(),Ot=ge();dt(ye,be+fe,ye-se,be+fe,ye-fe,be+se,ye-fe,be,.42,Et,tt,Ot,nt,nt);var gt=ge(),Ht=ge(),Xt=ge();return dt(ye,be+fe,ye-se,be+fe,ye-fe,be+se,ye-fe,be,.58,nt,nt,Xt,gt,Ht),Te.add(new go.PathSegment(go.PathSegment.Move,Xt.x*ne,Xt.y*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye-fe)*ne,be*ee,gt.x*ne,gt.y*ee,Ht.x*ne,Ht.y*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee,(ye-se)*ne,(be-fe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,Ge.x*ne,Ge.y*ee,Be.x*ne,Be.y*ee,ze.x*ne,ze.y*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,Xt.x*ne,Xt.y*ee).close()),Te.add(new go.PathSegment(go.PathSegment.Move,Ot.x*ne,Ot.y*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,He.x*ne,He.y*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,be*ee,Je.x*ne,Je.y*ee,xt.x*ne,xt.y*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee,(ye+se)*ne,(be+fe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,Ot.x*ne,Ot.y*ee,Et.x*ne,Et.y*ee,tt.x*ne,tt.y*ee).close()),Re(Be),Re(ze),Re(Ge),Re(nt),Re(Je),Re(xt),Re(He),Re(Et),Re(tt),Re(Ot),Re(gt),Re(Ht),Re(Xt),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("Fragile",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*ne,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*ne,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.5*ee,ne,.25*ee,.75*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Vn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=30),ce>ne&&(ce=ne);var se=(ne-ce)/2,fe=se+ce;return new go.Geometry().add(new go.PathFigure(fe,.5*ee).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,se,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,ne,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.4,fe=.4,ye=.5,be=.5,Te=ge(),Be=ge(),ze=ge(),Ge=ge(),nt=new go.PathFigure((ye-fe)*ne,be*ee,!1);ce.add(nt),nt.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee,(ye-se)*ne,(be-fe)*ee)),dt(ye,be-fe,ye+se,be-fe,ye+fe,be-se,ye+fe,be,.44,ze,Ge,Be,Te,Te),nt.add(new go.PathSegment(go.PathSegment.Bezier,Be.x*ne,Be.y*ee,ze.x*ne,ze.y*ee,Ge.x*ne,Ge.y*ee));var Je=pe(Be.x,Be.y);dt(ye,be-fe,ye+se,be-fe,ye+fe,be-se,ye+fe,be,.56,Te,Te,Be,ze,Ge);var xt=pe(Be.x,Be.y);nt.add(new go.PathSegment(go.PathSegment.Line,(Je.x*.1+.95*.9)*ne,Je.y*.1*ee)),nt.add(new go.PathSegment(go.PathSegment.Line,.85*ne,Je.y*.1*ee)),nt.add(new go.PathSegment(go.PathSegment.Line,.85*ne,0)),nt.add(new go.PathSegment(go.PathSegment.Line,ne,0)),nt.add(new go.PathSegment(go.PathSegment.Line,ne,.15*ee)),nt.add(new go.PathSegment(go.PathSegment.Line,(xt.x*.1+.9)*ne,.15*ee)),nt.add(new go.PathSegment(go.PathSegment.Line,(xt.x*.1+.9)*ne,(xt.y*.1+.05*.9)*ee)),nt.add(new go.PathSegment(go.PathSegment.Line,xt.x*ne,xt.y*ee)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,be*ee,ze.x*ne,ze.y*ee,Ge.x*ne,Ge.y*ee)),nt.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee,(ye+se)*ne,(be+fe)*ee)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(ye-fe)*ne,be*ee,(ye-se)*ne,(be+fe)*ee,(ye-fe)*ne,(be+se)*ee)),fe=.35,se=Me*.35;var He=new go.PathFigure(ye*ne,(be-fe)*ee,!1);ce.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,(ye-fe)*ne,be*ee,(ye-se)*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+fe)*ee,(ye-fe)*ne,(be+se)*ee,(ye-se)*ne,(be+fe)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,be*ee,(ye+se)*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-fe)*ee,(ye+fe)*ne,(be-se)*ee,(ye+se)*ne,(be-fe)*ee));var Et=new go.PathFigure((ye-fe)*ne,be*ee,!1);return ce.add(Et),Re(Te),Re(Be),Re(ze),Re(Ge),Re(Je),Re(xt),ce.spot1=new go.Spot(.202,.257),ce.spot2=new go.Spot(.792,.739),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("GenderFemale",function(Ae,ne,ee){var ce=new go.Geometry,se=.375,fe=0,ye=-.125,be=se*Me,Te=new go.PathFigure((.525+fe)*ne,(.5+se+ye)*ee,!1);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+fe)*ne,(.5+ye)*ee,(.5+be+fe)*ne,(.5+se+ye)*ee,(.5+se+fe)*ne,(.5+be+ye)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(.5+fe)*ne,(.5-se+ye)*ee,(1-.5+se+fe)*ne,(.5-be+ye)*ee,(.5+be+fe)*ne,(.5-se+ye)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+fe)*ne,(.5+ye)*ee,(.5-be+fe)*ne,(.5-se+ye)*ee,(.5-se+fe)*ne,(.5-be+ye)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(.475+fe)*ne,(.5+se+ye)*ee,(.5-se+fe)*ne,(.5+be+ye)*ee,(.5-be+fe)*ne,(.5+se+ye)*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.85*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.85*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.9*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.9*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.475*ne,ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.525*ne,ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.9*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.9*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.85*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.85*ee).close()),se=.325,fe=0,ye=-.125,be=se*Me;var Te=new go.PathFigure((1-.5+se+fe)*ne,(.5+ye)*ee,!1);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,(.5+fe)*ne,(.5+se+ye)*ee,(.5+se+fe)*ne,(.5+be+ye)*ee,(.5+be+fe)*ne,(.5+se+ye)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+fe)*ne,(.5+ye)*ee,(.5-be+fe)*ne,(.5+se+ye)*ee,(.5-se+fe)*ne,(.5+be+ye)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(.5+fe)*ne,(.5-se+ye)*ee,(.5-se+fe)*ne,(.5-be+ye)*ee,(.5-be+fe)*ne,(.5-se+ye)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+fe)*ne,(.5+ye)*ee,(.5+be+fe)*ne,(.5-se+ye)*ee,(1-.5+se+fe)*ne,(.5-be+ye)*ee));var Te=new go.PathFigure((.525+fe)*ne,(.5+se+ye)*ee,!1);return ce.add(Te),ce.spot1=new go.Spot(.232,.136),ce.spot2=new go.Spot(.682,.611),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("LogicImplies",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;return isNaN(ce)&&(ce=.2),new go.Geometry().add(new go.PathFigure((1-ce)*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;return isNaN(ce)&&(ce=.2),new go.Geometry().add(new go.PathFigure((1-ce)*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,ce*ne,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ce*ne,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,ne,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Ae,ne,ee){var ce=new go.Geometry().add(new go.PathFigure(.5*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*ne,.5*ee,.5*ne,.5*ee)));return ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("LogicTruth",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,.25*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,ne,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Ae,ne,ee){var ce=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,ce*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ce*ne,ce*ee,ce*ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Ae,ne,ee){var ce=.5;return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ce*ne,ce*ee,ce*ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Vn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Vn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.3);var fe=(1-ce)*ne,ye=(.5-se/2)*ee,be=(.5+se/2)*ee,Te=new go.Geometry,Be=new go.PathFigure(0,ye,!0);Te.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,fe,ye)),Be.add(new go.PathSegment(go.PathSegment.Line,fe,0)),Be.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,fe,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,fe,be)),Be.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),Te.spot1=new go.Spot(0,ye/ee);var ze=Ve(0,be/ee,1,be/ee,fe/ne,1,1,.5,ge());return Te.spot2=new go.Spot(ze.x,ze.y),Re(ze),Te}),go.Shape.setFigureParameter("Arrow2",0,new Vn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Vn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=30),ce>ne&&(ce=ne);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,ee/2);var fe=ne-ce,ye=(ee-se)/2,be=ye+se,Te=new go.Geometry,Be=new go.PathFigure(0,ye,!0);Te.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,fe,ye)),Be.add(new go.PathSegment(go.PathSegment.Line,fe,0)),Be.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,fe,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,fe,be)),Be.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),Te.spot1=new go.Spot(0,ye/ee);var ze=Ve(0,be/ee,1,be/ee,fe/ne,1,1,.5,ge());return Te.spot2=new go.Spot(ze.x,ze.y),Re(ze),Te}),go.Shape.defineFigureGenerator("Chevron",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee).close()),ce}),go.Shape.defineFigureGenerator("DoubleArrow",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.214*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,1*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.786*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),ce}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Vn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=(.5-ce/2)*ee,fe=(.5+ce/2)*ee,ye=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ye.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,fe)),be.add(new go.PathSegment(go.PathSegment.Line,.3*ne,fe)),be.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),be.add(new go.PathSegment(go.PathSegment.Line,.3*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close());var Te=Ve(0,.5,.3,0,0,se/ee,.1,se/ee,ge());return ye.spot1=new go.Spot(Te.x,Te.y),Te=Ve(.7,1,1,.5,0,fe/ee,1,fe/ee,Te),ye.spot2=new go.Spot(Te.x,Te.y),Re(Te),ye}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Vn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Vn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=40);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=100);var fe=(ee-ce)/2,ye=fe+ce,be=(ee-se)/2,Te=be+se;(ce>ee||se>ee)&&(se>ce?(ce=ce*ee/se,fe=(ee-ce)/2,ye=fe+ce,be=0,Te=ee):(fe=0,ye=ee,be=0,Te=ee));var Be=new go.Geometry,ze=new go.PathFigure(ne,.5*ee,!0);Be.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,Te)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ye)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ye)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*ne,Te)),ze.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*ne,be)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*ne,fe)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,fe)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,be).close());var Ge=Ve(0,.5,.3,be/ee,0,fe/ee,1,fe/ee,ge());return Be.spot1=new go.Spot(Ge.x,Ge.y),Ge=Ve(.7,Te/ee,1,.5,0,ye/ee,1,ye/ee,Ge),Be.spot2=new go.Spot(Ge.x,Ge.y),Re(Ge),Be}),go.Shape.setFigureParameter("IBeamArrow",0,new Vn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=(.5-ce/2)*ee,fe=(.5+ce/2)*ee,ye=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ye.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,fe)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,fe)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,0)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ye.spot1=new go.Spot(0,se/ee);var Te=Ve(.7,1,1,.5,0,fe/ee,1,fe/ee,ge());return ye.spot2=new go.Spot(Te.x,Te.y),Re(Te),ye}),go.Shape.setFigureParameter("IBeamArrow2",0,new Vn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Vn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=40);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=100);var fe=(ee-ce)/2,ye=fe+ce,be=(ee-se)/2,Te=be+se;(ce>ee||se>ee)&&(se>ce?(ce=ce*ee/se,fe=(ee-ce)/2,ye=fe+ce,be=0,Te=ee):(fe=0,ye=ee,be=0,Te=ee));var Be=new go.Geometry,ze=new go.PathFigure(ne,.5*ee,!0);Be.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,Te)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ye)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ye)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*ne,Te)),ze.add(new go.PathSegment(go.PathSegment.Line,0,Te)),ze.add(new go.PathSegment(go.PathSegment.Line,0,be)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*ne,be)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*ne,fe)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,fe)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*ne,be).close()),Be.spot1=new go.Spot(0,fe/ee);var Ge=Ve(.7,Te/ee,1,.5,0,ye/ee,1,ye/ee,ge());return Be.spot2=new go.Spot(Ge.x,Ge.y),Re(Ge),Be}),go.Shape.setFigureParameter("Pointer",0,new Vn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=.1);var se=new go.Geometry,fe=new go.PathFigure(ne,.5*ee,!0);se.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ce*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(ce,.35);var ye=Ve(.2,.65,1,.65,0,1,1,.5,ge());return se.spot2=new go.Spot(ye.x,ye.y),Re(ye),se}),go.Shape.setFigureParameter("RoundedPointer",0,new Vn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=new go.Geometry,fe=new go.PathFigure(ne,.5*ee,!0);se.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ce*ne,.75*ee,ce*ne,.25*ee).close()),se.spot1=new go.Spot(ce,.35);var ye=Ve(0,.65,1,.65,0,1,1,.5,ge());return se.spot2=new go.Spot(ye.x,ye.y),Re(ye),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new Vn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=.4);var se=(.5-ce/2)*ee,fe=(.5+ce/2)*ee,ye=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ye.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,fe)),be.add(new go.PathSegment(go.PathSegment.Line,0,fe)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ye.spot1=new go.Spot(.2,.3);var Te=Ve(.7,1,1,.5,0,fe/ee,1,fe/ee,ge());return ye.spot2=new go.Spot(Te.x,Te.y),Re(Te),ye}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Vn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=50);var se=(ee-ce)/2,fe=se+ce;ce>ee&&(se=0,fe=ee);var ye=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ye.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,fe)),be.add(new go.PathSegment(go.PathSegment.Line,0,fe)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ye.spot1=new go.Spot(.2,se/ee);var Te=Ve(.7,1,1,.5,0,fe/ee,1,fe/ee,ge());return ye.spot2=new go.Spot(Te.x,Te.y),Re(Te),ye}),go.Shape.setFigureParameter("SquareArrow",0,new Vn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=.7);var se=new go.Geometry,fe=new go.PathFigure(ne,.5*ee,!0);return se.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ce*ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,0)),fe.add(new go.PathSegment(go.PathSegment.Line,ce*ne,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(ce,1),se}),go.Shape.defineFigureGenerator("Cone1",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.5,fe=Me*.1,ye=new go.PathFigure(0,.9*ee,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.9+fe)*ee,(.5+se)*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*ne,ee,0,(.9+fe)*ee).close()),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.97),ce}),go.Shape.defineFigureGenerator("Cone2",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.9*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.9*ee,(1-.85/.9)*ne,ee,.85/.9*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var fe=new go.PathFigure(0,.9*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Bezier,ne,.9*ee,(1-.85/.9)*ne,.8*ee,.85/.9*ne,.8*ee)),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.82),ce}),go.Shape.defineFigureGenerator("Cube1",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var fe=new go.PathFigure(.5*ne,ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.3*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.3*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.15*ee)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(.5,.85),ce}),go.Shape.defineFigureGenerator("Cube2",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.3*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0).close());var fe=new go.PathFigure(0,.3*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.3*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Move,.7*ne,.3*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(.7,1),ce}),go.Shape.defineFigureGenerator("Cylinder1",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ee/3);var se=new go.Geometry,fe=Me*.5,ye=new go.PathFigure(0,ce,!0);se.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,Me*ce,(.5-fe)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,1*ne,ce,(.5+fe)*ne,0,1*ne,Me*ce)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,ee-ce)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,1*ee,1*ne,ee-Me*ce,(.5+fe)*ne,1*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ce,(.5-fe)*ne,1*ee,0,ee-Me*ce)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ce));var be=new go.PathFigure(ne,ce,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,2*ce,1*ne,2*ce-Me*ce,(.5+fe)*ne,2*ce)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,ce,(.5-fe)*ne,2*ce,0,2*ce-Me*ce)),se.spot1=new go.Spot(0,0,0,2*ce),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ee/3);var se=new go.Geometry,fe=Me*.5,ye=new go.PathFigure(0,ee-ce,!0);se.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,0,ce)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,Me*ce,(.5-fe)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,ce,(.5+fe)*ne,0,ne,Me*ce)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,ee-ce)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,ee-Me*ce,(.5+fe)*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ce,(.5-fe)*ne,ee,0,ee-Me*ce));var be=new go.PathFigure(0,ee-ce,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee-2*ce,0,ee-ce-Me*ce,(.5-fe)*ne,ee-2*ce)),be.add(new go.PathSegment(go.PathSegment.Bezier,ne,ee-ce,(.5+fe)*ne,ee-2*ce,ne,ee-ce-Me*ce)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*ce),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ne/3);var se=new go.Geometry,fe=Me*.5,ye=new go.PathFigure(ce,0,!0);se.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne-ce,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,ne-Me*ce,0,ne,(.5-fe)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ee,ne,(.5+fe)*ee,ne-Me*ce,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ce,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*ce,ee,0,(.5+fe)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,(.5-fe)*ee,Me*ce,0));var be=new go.PathFigure(ce,0,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,2*ce,.5*ee,ce+Me*ce,0,2*ce,(.5-fe)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ce,ee,2*ce,(.5+fe)*ee,ce+Me*ce,ee)),se.spot1=new go.Spot(0,0,2*ce,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ne/3);var se=new go.Geometry,fe=Me*.5,ye=new go.PathFigure(ne-ce,0,!0);se.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,ne-Me*ce,0,ne,(.5-fe)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ee,ne,(.5+fe)*ee,ne-Me*ce,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ce,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*ce,ee,0,(.5+fe)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,(.5-fe)*ee,Me*ce,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne-ce,0));var be=new go.PathFigure(ne-ce,0,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,ne-2*ce,.5*ee,ne-ce-Me*ce,0,ne-2*ce,(.5-fe)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ee,ne-2*ce,(.5+fe)*ee,ne-ce-Me*ce,ee)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*ce,0),se}),go.Shape.defineFigureGenerator("Prism1",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.25*ne,.25*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var fe=new go.PathFigure(.25*ne,.25*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),ce.spot1=new go.Spot(.408,.172),ce.spot2=new go.Spot(.833,.662),ce}),go.Shape.defineFigureGenerator("Prism2",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.25*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var fe=new go.PathFigure(0,ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*ee)),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("Pyramid1",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var fe=new go.PathFigure(.5*ne,0,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),ce.spot1=new go.Spot(.25,.367),ce.spot2=new go.Spot(.75,.875),ce}),go.Shape.defineFigureGenerator("Pyramid2",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var fe=new go.PathFigure(.5*ne,0,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.7*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.85*ee)),ce.spot1=new go.Spot(.25,.367),ce.spot2=new go.Spot(.75,.875),ce}),go.Shape.defineFigureGenerator("Actor",function(Ae,ne,ee){var ce=new go.Geometry,se=.2,fe=.1,ye=Me*se,be=Me*fe,Te=.5,Be=.1,ze=new go.PathFigure(Te*ne,(Be+fe)*ee,!0);ce.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Te-se)*ne,Be*ee,(Te-ye)*ne,(Be+fe)*ee,(Te-se)*ne,(Be+be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be-fe)*ee,(Te-se)*ne,(Be-be)*ee,(Te-ye)*ne,(Be-fe)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Te+se)*ne,Be*ee,(Te+ye)*ne,(Be-fe)*ee,(Te+se)*ne,(Be-be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be+fe)*ee,(Te+se)*ne,(Be+be)*ee,(Te+ye)*ne,(Be+fe)*ee));var Ge=.05,nt=Me*Ge;Te=.05,Be=.25;var Je=new go.PathFigure(.5*ne,.2*ee,!0);return ce.add(Je),Je.add(new go.PathSegment(go.PathSegment.Line,.95*ne,.2*ee)),Te=.95,Be=.25,Je.add(new go.PathSegment(go.PathSegment.Bezier,(Te+Ge)*ne,Be*ee,(Te+nt)*ne,(Be-Ge)*ee,(Te+Ge)*ne,(Be-nt)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,ne,.6*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.35*ee)),Ge=.025,nt=Me*Ge,Te=.825,Be=.35,Je.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be-Ge)*ee,(Te+Ge)*ne,(Be-nt)*ee,(Te+nt)*ne,(Be-Ge)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Te-Ge)*ne,Be*ee,(Te-nt)*ne,(Be-Ge)*ee,(Te-Ge)*ne,(Be-nt)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*ne,ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*ee)),Ge=.05,nt=Me*Ge,Te=.5,Be=.7,Je.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be-Ge)*ee,(Te+Ge)*ne,(Be-nt)*ee,(Te+nt)*ne,(Be-Ge)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Te-Ge)*ne,Be*ee,(Te-nt)*ne,(Be-Ge)*ee,(Te-Ge)*ne,(Be-nt)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.45*ne,ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.35*ee)),Ge=.025,nt=Me*Ge,Te=.175,Be=.35,Je.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be-Ge)*ee,(Te+Ge)*ne,(Be-nt)*ee,(Te+nt)*ne,(Be-Ge)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Te-Ge)*ne,Be*ee,(Te-nt)*ne,(Be-Ge)*ee,(Te-Ge)*ne,(Be-nt)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),Ge=.05,nt=Me*Ge,Te=.05,Be=.25,Je.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be-Ge)*ee,(Te-Ge)*ne,(Be-nt)*ee,(Te-nt)*ne,(Be-Ge)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.2*ee)),ce.spot1=new go.Spot(.2,.2),ce.spot2=new go.Spot(.8,.65),ce}),go.Shape.setFigureParameter("Card",0,new Vn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;isNaN(ce)&&(ce=.2);var se=new go.Geometry,fe=new go.PathFigure(ne,0,!0);return se.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ce*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ce*ne,0).close()),se.spot1=new go.Spot(0,ce),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,.5*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee));var fe=new go.PathFigure(.5*ne,.5*ee,!0);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),ce.spot1=new go.Spot(.25,0),ce.spot2=new go.Spot(.75,.25),ce}),go.Shape.defineFigureGenerator("CreateRequest",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var fe=new go.PathFigure(0,0,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ye=new go.PathFigure(0,se*ee,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,se*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*ee)),ce}),go.Shape.defineFigureGenerator("Database",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.5,fe=Me*.1,ye=new go.PathFigure(ne,.1*ee,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.9+fe)*ee,(.5+se)*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*ne,ee,0,(.9+fe)*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-fe)*ee,(.5-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*ee,(.5+se)*ne,0,ne,(.1-fe)*ee));var be=new go.PathFigure(ne,.1*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*ee,ne,(.1+fe)*ee,(.5+se)*ne,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*ne,.2*ee,0,(.1+fe)*ee)),be.add(new go.PathSegment(go.PathSegment.Move,ne,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*ee,ne,(.2+fe)*ee,(.5+se)*ne,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*ne,.3*ee,0,(.2+fe)*ee)),be.add(new go.PathSegment(go.PathSegment.Move,ne,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.4*ee,ne,(.3+fe)*ee,(.5+se)*ne,.4*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-se)*ne,.4*ee,0,(.3+fe)*ee)),ce.spot1=new go.Spot(0,.4),ce.spot2=new go.Spot(1,.9),ce}),go.Shape.defineFigureGenerator("DataStorage",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,ee,ne,0,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.9*ee,.25*ne,.1*ee).close()),ce.spot1=new go.Spot(.226,0),ce.spot2=new go.Spot(.81,1),ce}),go.Shape.defineFigureGenerator("DiskStorage",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.5,fe=Me*.1,ye=new go.PathFigure(ne,.1*ee,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.9+fe)*ee,(.5+se)*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*ne,ee,0,(.9+fe)*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-fe)*ee,(.5-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*ee,(.5+se)*ne,0,ne,(.1-fe)*ee));var be=new go.PathFigure(ne,.1*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*ee,ne,(.1+fe)*ee,(.5+se)*ne,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*ne,.2*ee,0,(.1+fe)*ee)),be.add(new go.PathSegment(go.PathSegment.Move,ne,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*ee,ne,(.2+fe)*ee,(.5+se)*ne,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*ne,.3*ee,0,(.2+fe)*ee)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(1,.9),ce}),go.Shape.defineFigureGenerator("Display",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.25*ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,ee,ne,0,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),ce.spot1=new go.Spot(.25,0),ce.spot2=new go.Spot(.75,1),ce}),go.Shape.defineFigureGenerator("DividedEvent",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var fe=Me*.2,ye=new go.PathFigure(0,.2*ee,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,0,(.2-fe)*ee,(.2-fe)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.2*ee,(.8+fe)*ne,0,ne,(.2-fe)*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,ee,ne,(.8+fe)*ee,(.8+fe)*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-fe)*ne,ee,0,(.8+fe)*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var be=new go.PathFigure(0,se*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne,se*ee)),ce}),go.Shape.defineFigureGenerator("DividedProcess",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var fe=new go.PathFigure(0,0,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ye=new go.PathFigure(0,se*ee,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,se*ee)),ce}),go.Shape.defineFigureGenerator("Document",function(Ae,ne,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*ne,.4*ee,.5*ne,ee).close()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(1,.6),ce}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var fe=new go.PathFigure(0,0,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ye=new go.PathFigure(se*ne,0,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,0,se*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,ne,se*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*ee)),ce}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var fe=new go.PathFigure(.1*ne,.4*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.9*ne,.6*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.6*ne,.1*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.1*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.4*ne,.9*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.9*ee)),ce.spot1=new go.Spot(.25,.25),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("File",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var fe=new go.PathFigure(.75*ne,0,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.25*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("Interrupt",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,.5*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee));var fe=new go.PathFigure(ne,.5*ee,!1);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee));var ye=new go.PathFigure(ne,.5*ee,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("InternalStorage",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN,fe=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(fe)&&(fe=.1);var ye=new go.PathFigure(0,0,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var be=new go.PathFigure(se*ne,0,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Move,0,fe*ee)),be.add(new go.PathSegment(go.PathSegment.Line,ne,fe*ee)),ce}),go.Shape.defineFigureGenerator("Junction",function(Ae,ne,ee){var ce=new go.Geometry,se=1/Math.SQRT2,fe=(1-1/Math.SQRT2)/2,ye=Me*.5,be=.5,Te=new go.PathFigure(ne,be*ee,!0);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,be*ne,ee,ne,(be+ye)*ee,(be+ye)*ne,ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,0,be*ee,(be-ye)*ne,ee,0,(be+ye)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,be*ne,0,0,(be-ye)*ee,(be-ye)*ne,0)),Te.add(new go.PathSegment(go.PathSegment.Bezier,ne,be*ee,(be+ye)*ne,0,ne,(be-ye)*ee));var Be=new go.PathFigure((fe+se)*ne,(fe+se)*ee,!1);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,fe*ne,fe*ee)),Be.add(new go.PathSegment(go.PathSegment.Move,fe*ne,(fe+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,(fe+se)*ne,fe*ee)),ce}),go.Shape.defineFigureGenerator("LinedDocument",function(Ae,ne,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*ne,.4*ee,.5*ne,ee).close());var fe=new go.PathFigure(.1*ne,0,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.75*ee)),ce.spot1=new go.Spot(.1,0),ce.spot2=new go.Spot(1,.6),ce}),go.Shape.defineFigureGenerator("LoopLimit",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee).close()),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("MagneticTape",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.5,fe=.5,ye=new go.PathFigure(.5*ne,ee,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,fe*ee,(fe-se)*ne,ee,0,(fe+se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,fe*ne,0,0,(fe-se)*ee,(fe-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,fe*ee,(fe+se)*ne,0,ne,(fe-se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(fe+.1)*ne,.9*ee,ne,(fe+se)*ee,(fe+se)*ne,.9*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),ce.spot1=new go.Spot(.15,.15),ce.spot2=new go.Spot(.85,.8),ce}),go.Shape.defineFigureGenerator("ManualInput",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("MessageFromUser",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.7);var fe=new go.PathFigure(0,0,!0);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,se*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=go.Spot.TopLeft,ce}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.25);var fe=new go.PathFigure(0,0,!0);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,se*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,(1-se)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(1,.75),ce}),go.Shape.defineFigureGenerator("MultiDocument",function(Ae,ne,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.44*ee,.96*ne,.47*ee,.93*ne,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.54*ee,.86*ne,.57*ee,.83*ne,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*ne,.4*ee,.4*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0).close());var fe=new go.PathFigure(.1*ne,.2*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.54*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.1*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.44*ee)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.8,.77),ce}),go.Shape.defineFigureGenerator("MultiProcess",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,.1*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*ee).close());var fe=new go.PathFigure(.2*ne,.1*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.1*ne,.2*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.9*ee)),ce.spot1=new go.Spot(0,.2),ce.spot2=new go.Spot(.8,1),ce}),go.Shape.defineFigureGenerator("OfflineStorage",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var fe=1-se,ye=new go.PathFigure(0,0,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee).close());var be=new go.PathFigure(.5*se*ne,se*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*ne,se*ee)),ce}),go.Shape.defineFigureGenerator("OffPageConnector",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(.75,1),ce}),go.Shape.defineFigureGenerator("Or",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.5,fe=.5,ye=new go.PathFigure(ne,fe*ee,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,fe*ne,ee,ne,(fe+se)*ee,(fe+se)*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,fe*ee,(fe-se)*ne,ee,0,(fe+se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,fe*ne,0,0,(fe-se)*ee,(fe-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,fe*ee,(fe+se)*ne,0,ne,(fe-se)*ee));var be=new go.PathFigure(ne,.5*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.5*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ce}),go.Shape.defineFigureGenerator("PaperTape",function(Ae,ne,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.3*ee,.5*ne,.6*ee,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*ne,.4*ee,.5*ne,ee).close()),ce.spot1=new go.Spot(0,.49),ce.spot2=new go.Spot(1,.75),ce}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN,fe=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(fe)&&(fe=.3);var ye=new go.PathFigure(0,0,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,(1-fe)*ne,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN,fe=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(fe)&&(fe=.3);var ye=new go.PathFigure(0,0,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,(1-fe)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,(1-fe)*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce}),go.Shape.defineFigureGenerator("Procedure",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var fe=new go.PathFigure(0,0,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ye=new go.PathFigure((1-se)*ne,0,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Move,se*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ce}),go.Shape.defineFigureGenerator("Process",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var fe=new go.PathFigure(0,0,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ye=new go.PathFigure(se*ne,0,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("Sort",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var fe=new go.PathFigure(0,.5*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),ce.spot1=new go.Spot(.25,.25),ce.spot2=new go.Spot(.75,.5),ce}),go.Shape.defineFigureGenerator("Start",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.25);var fe=new go.PathFigure(se*ne,0,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ne,.5*ee,.25*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ne,.5*ee,.25*ne,.5*ee));var ye=new go.PathFigure(se*ne,0,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,ee)),ce.spot1=new go.Spot(se,0),ce.spot2=new go.Spot(1-se,1),ce}),go.Shape.defineFigureGenerator("Terminator",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.25*ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ne,.5*ee,.25*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ne,.5*ee,.25*ne,.5*ee)),ce.spot1=new go.Spot(.23,0),ce.spot2=new go.Spot(.77,1),ce}),go.Shape.defineFigureGenerator("TransmittalTape",function(Ae,ne,ee){var ce=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var fe=new go.PathFigure(0,0,!0);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.75*ne,(1-se)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*ee).close()),ce.spot1=go.Spot.TopLeft,ce}),go.Shape.defineFigureGenerator("AndGate",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.5,fe=new go.PathFigure(0,0,!0);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),fe.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,(.5+se)*ne,0,ne,(.5-se)*ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.5+se)*ee,(.5+se)*ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(.55,1),ce}),go.Shape.defineFigureGenerator("Buffer",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("Clock",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.5,fe=.5,ye=new go.PathFigure(ne,fe*ee,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,fe*ne,ee,ne,(fe+se)*ee,(fe+se)*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,fe*ee,(fe-se)*ne,ee,0,(fe+se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,fe*ne,0,0,(fe-se)*ee,(fe-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,fe*ee,(fe+se)*ne,0,ne,(fe-se)*ee));var be=new go.PathFigure(ne,fe*ee,!1);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne,fe*ee));var Te=new go.PathFigure(.8*ne,.75*ee,!1);return ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.25*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.25*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.75*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.75*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.25*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.25*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.75*ee)),ce}),go.Shape.defineFigureGenerator("Ground",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.3*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,ee)),ce}),go.Shape.defineFigureGenerator("Inverter",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.1,fe=.1,ye=.9,be=.5,Te=new go.PathFigure(.8*ne,.5*ee,!0);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Te.add(new go.PathSegment(go.PathSegment.Line,0,0)),Te.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*ee));var Be=new go.PathFigure((ye+fe)*ne,be*ee,!0);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee,(ye+se)*ne,(be+fe)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ye-fe)*ne,be*ee,(ye-se)*ne,(be+fe)*ee,(ye-fe)*ne,(be+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee,(ye-se)*ne,(be-fe)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,be*ee,(ye+se)*ne,(be-fe)*ee,(ye+fe)*ne,(be-se)*ee)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.4,.75),ce}),go.Shape.defineFigureGenerator("NandGate",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.5,fe=Me*.4,ye=Me*.1,be=.1,Te=.9,Be=.5,ze=new go.PathFigure(.8*ne,.5*ee,!0);ce.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,ee,.8*ne,(.5+fe)*ee,(.4+se)*ne,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,0,0)),ze.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),ze.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*ee,(.4+se)*ne,0,.8*ne,(.5-fe)*ee));var Ge=new go.PathFigure((Te+be)*ne,Be*ee,!0);return ce.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be+be)*ee,(Te+be)*ne,(Be+ye)*ee,(Te+ye)*ne,(Be+be)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(Te-be)*ne,Be*ee,(Te-ye)*ne,(Be+be)*ee,(Te-be)*ne,(Be+ye)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be-be)*ee,(Te-be)*ne,(Be-ye)*ee,(Te-ye)*ne,(Be-be)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(Te+be)*ne,Be*ee,(Te+ye)*ne,(Be-be)*ee,(Te+be)*ne,(Be-ye)*ee)),ce.spot1=new go.Spot(0,.05),ce.spot2=new go.Spot(.55,.95),ce}),go.Shape.defineFigureGenerator("NorGate",function(Ae,ne,ee){var ce=new go.Geometry,se=.5,fe=Me*se,ye=0,be=.5,Te=new go.PathFigure(.8*ne,.5*ee,!0);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.75*ee,.25*ne,.25*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*ee,(ye+fe)*ne,(be-se)*ee,.7*ne,(be-fe)*ee)),se=.1,fe=Me*.1,ye=.9,be=.5;var Be=new go.PathFigure((ye-se)*ne,be*ee,!0);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-se)*ee,(ye-se)*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,be*ee,(ye+fe)*ne,(be-se)*ee,(ye+se)*ne,(be-fe)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+se)*ee,(ye+se)*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,be*ee,(ye-fe)*ne,(be+se)*ee,(ye-se)*ne,(be+fe)*ee)),ce.spot1=new go.Spot(.2,.25),ce.spot2=new go.Spot(.6,.75),ce}),go.Shape.defineFigureGenerator("OrGate",function(Ae,ne,ee){var ce=new go.Geometry,se=.5,fe=Me*se,ye=0,be=.5,Te=new go.PathFigure(0,0,!0);return ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,(ye+fe+fe)*ne,(be-se)*ee,.8*ne,(be-fe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*ne,(be+fe)*ee,(ye+fe+fe)*ne,(be+se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.75*ee,.25*ne,.25*ee).close()),ce.spot1=new go.Spot(.2,.25),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("XnorGate",function(Ae,ne,ee){var ce=new go.Geometry,se=.5,fe=Me*se,ye=.2,be=.5,Te=new go.PathFigure(.1*ne,0,!1);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,ee,.35*ne,.25*ee,.35*ne,.75*ee));var Be=new go.PathFigure(.8*ne,.5*ee,!0);ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,ee,.7*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,.45*ne,.75*ee,.45*ne,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*ee,(ye+fe)*ne,(be-se)*ee,.7*ne,(be-fe)*ee)),se=.1,fe=Me*.1,ye=.9,be=.5;var ze=new go.PathFigure((ye-se)*ne,be*ee,!0);return ce.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-se)*ee,(ye-se)*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,be*ee,(ye+fe)*ne,(be-se)*ee,(ye+se)*ne,(be-fe)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+se)*ee,(ye+se)*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,be*ee,(ye-fe)*ne,(be+se)*ee,(ye-se)*ne,(be+fe)*ee)),ce.spot1=new go.Spot(.4,.25),ce.spot2=new go.Spot(.65,.75),ce}),go.Shape.defineFigureGenerator("XorGate",function(Ae,ne,ee){var ce=new go.Geometry,se=.5,fe=Me*se,ye=.2,be=.5,Te=new go.PathFigure(.1*ne,0,!1);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,ee,.35*ne,.25*ee,.35*ne,.75*ee));var Be=new go.PathFigure(.2*ne,0,!0);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,(ye+fe)*ne,(be-se)*ee,.9*ne,(be-fe)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,ee,.9*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,.45*ne,.75*ee,.45*ne,.25*ee).close()),ce.spot1=new go.Spot(.4,.25),ce.spot2=new go.Spot(.8,.75),ce}),go.Shape.defineFigureGenerator("Capacitor",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ce}),go.Shape.defineFigureGenerator("Resistor",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.5*ee)),ce}),go.Shape.defineFigureGenerator("Inductor",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.1,fe=.1,ye=.1,be=.5,Te=new go.PathFigure((ye-se*.5)*ne,ee,!1);return ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,0,(ye-se)*ne,ee,(ye-fe)*ne,0)),ye=.3,Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,ee,(ye+fe)*ne,0,(ye+se)*ne,ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,0,(ye-se)*ne,ee,(ye-fe)*ne,0)),ye=.5,Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,ee,(ye+fe)*ne,0,(ye+se)*ne,ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,0,(ye-se)*ne,ee,(ye-fe)*ne,0)),ye=.7,Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,ee,(ye+fe)*ne,0,(ye+se)*ne,ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,0,(ye-se)*ne,ee,(ye-fe)*ne,0)),ye=.9,Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se*.5)*ne,ee,(ye+fe)*ne,0,(ye+se)*ne,ee)),ce}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.5,fe=.5,ye=.5,be=.5,Te=new go.PathFigure((ye-fe)*ne,be*ee,!1);return ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee,(ye-se)*ne,(be-fe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,be*ee,(ye+se)*ne,(be-fe)*ee,(ye+fe)*ne,(be-se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee,(ye+se)*ne,(be+fe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye-fe)*ne,be*ee,(ye-se)*ne,(be+fe)*ee,(ye-fe)*ne,(be+se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Move,(ye-fe+.1)*ne,be*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe-.1)*ne,be*ee,ye*ne,(be-fe)*ee,ye*ne,(be+fe)*ee)),ce}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ce}),go.Shape.defineFigureGenerator("Diode",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("Wifi",function(Ae,ne,ee){var ce=new go.Geometry,se=ne,fe=ee;ne=ne*.38,ee=ee*.6;var ye=Me*.8,be=.8,Te=0,Be=.5,ze=(se-ne)/2,Ge=(fe-ee)/2,nt=new go.PathFigure(Te*ne+ze,(Be+be)*ee+Ge,!0);ce.add(nt),nt.add(new go.PathSegment(go.PathSegment.Bezier,(Te-be)*ne+ze,Be*ee+Ge,(Te-ye)*ne+ze,(Be+be)*ee+Ge,(Te-be)*ne+ze,(Be+ye)*ee+Ge)),nt.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne+ze,(Be-be)*ee+Ge,(Te-be)*ne+ze,(Be-ye)*ee+Ge,(Te-ye)*ne+ze,(Be-be)*ee+Ge)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(Te-be+ye*.5)*ne+ze,Be*ee+Ge,Te*ne+ze,(Be-be)*ee+Ge,(Te-be+ye*.5)*ne+ze,(Be-ye)*ee+Ge)),nt.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne+ze,(Be+be)*ee+Ge,(Te-be+ye*.5)*ne+ze,(Be+ye)*ee+Ge,Te*ne+ze,(Be+be)*ee+Ge).close()),ye=Me*.4,be=.4,Te=.2,Be=.5;var Je=new go.PathFigure(Te*ne+ze,(Be+be)*ee+Ge,!0);ce.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Te-be)*ne+ze,Be*ee+Ge,(Te-ye)*ne+ze,(Be+be)*ee+Ge,(Te-be)*ne+ze,(Be+ye)*ee+Ge)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne+ze,(Be-be)*ee+Ge,(Te-be)*ne+ze,(Be-ye)*ee+Ge,(Te-ye)*ne+ze,(Be-be)*ee+Ge)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Te-be+ye*.5)*ne+ze,Be*ee+Ge,Te*ne+ze,(Be-be)*ee+Ge,(Te-be+ye*.5)*ne+ze,(Be-ye)*ee+Ge)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne+ze,(Be+be)*ee+Ge,(Te-be+ye*.5)*ne+ze,(Be+ye)*ee+Ge,Te*ne+ze,(Be+be)*ee+Ge).close()),ye=Me*.2,be=.2,Te=.5,Be=.5;var xt=new go.PathFigure((Te-be)*ne+ze,Be*ee+Ge,!0);ce.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne+ze,(Be-be)*ee+Ge,(Te-be)*ne+ze,(Be-ye)*ee+Ge,(Te-ye)*ne+ze,(Be-be)*ee+Ge)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Te+be)*ne+ze,Be*ee+Ge,(Te+ye)*ne+ze,(Be-be)*ee+Ge,(Te+be)*ne+ze,(Be-ye)*ee+Ge)),xt.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne+ze,(Be+be)*ee+Ge,(Te+be)*ne+ze,(Be+ye)*ee+Ge,(Te+ye)*ne+ze,(Be+be)*ee+Ge)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Te-be)*ne+ze,Be*ee+Ge,(Te-ye)*ne+ze,(Be+be)*ee+Ge,(Te-be)*ne+ze,(Be+ye)*ee+Ge)),ye=Me*.4,be=.4,Te=.8,Be=.5;var He=new go.PathFigure(Te*ne+ze,(Be-be)*ee+Ge,!0);ce.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,(Te+be)*ne+ze,Be*ee+Ge,(Te+ye)*ne+ze,(Be-be)*ee+Ge,(Te+be)*ne+ze,(Be-ye)*ee+Ge)),He.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne+ze,(Be+be)*ee+Ge,(Te+be)*ne+ze,(Be+ye)*ee+Ge,(Te+ye)*ne+ze,(Be+be)*ee+Ge)),He.add(new go.PathSegment(go.PathSegment.Bezier,(Te+be-ye*.5)*ne+ze,Be*ee+Ge,Te*ne+ze,(Be+be)*ee+Ge,(Te+be-ye*.5)*ne+ze,(Be+ye)*ee+Ge)),He.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne+ze,(Be-be)*ee+Ge,(Te+be-ye*.5)*ne+ze,(Be-ye)*ee+Ge,Te*ne+ze,(Be-be)*ee+Ge).close()),ye=Me*.8,be=.8,Te=1,Be=.5;var Et=new go.PathFigure(Te*ne+ze,(Be-be)*ee+Ge,!0);return ce.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,(Te+be)*ne+ze,Be*ee+Ge,(Te+ye)*ne+ze,(Be-be)*ee+Ge,(Te+be)*ne+ze,(Be-ye)*ee+Ge)),Et.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne+ze,(Be+be)*ee+Ge,(Te+be)*ne+ze,(Be+ye)*ee+Ge,(Te+ye)*ne+ze,(Be+be)*ee+Ge)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(Te+be-ye*.5)*ne+ze,Be*ee+Ge,Te*ne+ze,(Be+be)*ee+Ge,(Te+be-ye*.5)*ne+ze,(Be+ye)*ee+Ge)),Et.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne+ze,(Be-be)*ee+Ge,(Te+be-ye*.5)*ne+ze,(Be-ye)*ee+Ge,Te*ne+ze,(Be-be)*ee+Ge).close()),ce}),go.Shape.defineFigureGenerator("Email",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var fe=new go.PathFigure(0,0,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),fe.add(new go.PathSegment(go.PathSegment.Move,0,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.54*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.54*ee)),ce}),go.Shape.defineFigureGenerator("Ethernet",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.35*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,0).close());var fe=new go.PathFigure(.1*ne,ee,!0,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.6*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.1*ne,ee).close());var ye=new go.PathFigure(.6*ne,ee,!0,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.6*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.6*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.6*ne,ee).close());var be=new go.PathFigure(0,.5*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.75*ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.6*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.25*ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.6*ee)),ce}),go.Shape.defineFigureGenerator("Power",function(Ae,ne,ee){var ce=new go.Geometry,se=Me*.4,fe=.4,ye=.5,be=.5,Te=ge(),Be=ge(),ze=ge(),Ge=ge();dt(ye,be-fe,ye+se,be-fe,ye+fe,be-se,ye+fe,be,.5,Te,Te,Be,ze,Ge);var nt=pe(Be.x,Be.y),Je=new go.PathFigure(Be.x*ne,Be.y*ee,!0);ce.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,be*ee,ze.x*ne,ze.y*ee,Ge.x*ne,Ge.y*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee,(ye+se)*ne,(be+fe)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ye-fe)*ne,be*ee,(ye-se)*ne,(be+fe)*ee,(ye-fe)*ne,(be+se)*ee)),dt(ye-fe,be,ye-fe,be-se,ye-se,be-fe,ye,be-fe,.5,ze,Ge,Be,Te,Te),Je.add(new go.PathSegment(go.PathSegment.Bezier,Be.x*ne,Be.y*ee,ze.x*ne,ze.y*ee,Ge.x*ne,Ge.y*ee)),se=Me*.3,fe=.3,dt(ye-fe,be,ye-fe,be-se,ye-se,be-fe,ye,be-fe,.5,ze,Ge,Be,Te,Te),Je.add(new go.PathSegment(go.PathSegment.Line,Be.x*ne,Be.y*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ye-fe)*ne,be*ee,Ge.x*ne,Ge.y*ee,ze.x*ne,ze.y*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+fe)*ee,(ye-fe)*ne,(be+se)*ee,(ye-se)*ne,(be+fe)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ye+fe)*ne,be*ee,(ye+se)*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),dt(ye,be-fe,ye+se,be-fe,ye+fe,be-se,ye+fe,be,.5,Te,Te,Be,ze,Ge),Je.add(new go.PathSegment(go.PathSegment.Bezier,Be.x*ne,Be.y*ee,Ge.x*ne,Ge.y*ee,ze.x*ne,ze.y*ee).close());var Je=new go.PathFigure(.45*ne,0,!0);return ce.add(Je),Je.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.5*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.5*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*ne,0).close()),Re(Te),Re(Be),Re(ze),Re(Ge),Re(nt),ce.spot1=new go.Spot(.25,.45),ce.spot2=new go.Spot(.75,.8),ce}),go.Shape.defineFigureGenerator("Fallout",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee/2,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,ne/2,ee/2,ne/2,ee/2));function fe(ye,be,Te){ye.add(new go.PathSegment(go.PathSegment.Move,(.3+be)*ne,(.8+Te)*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,(.5+be)*ne,(.5+Te)*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,(.1+be)*ne,(.5+Te)*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,(.3+be)*ne,(.8+Te)*ee).close())}return fe(se,0,0),fe(se,.4,0),fe(se,.2,-.3),ce}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.2*ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),ce.spot1=new go.Spot(.3,.3),ce.spot2=new go.Spot(.7,.7),ce}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.37*ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.11*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*ne,.04*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.49*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.37*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.63*ne,.86*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*ne,.91*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*ne,.78*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.44*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.56*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),ce}),go.Shape.defineFigureGenerator("FireHazard",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.29*ne,0,-.25*ne,.63*ee,.45*ne,.44*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.51*ne,.42*ee,.48*ne,.17*ee,.54*ne,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.59*ne,.18*ee,.59*ne,.29*ee,.58*ne,.28*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,.6*ee,.8*ne,.34*ee,.88*ne,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.88*ne,.31*ee,.87*ne,.48*ee,.88*ne,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,ee,1.17*ne,.76*ee,.82*ne,.8*ee).close()),ce.spot1=new go.Spot(.07,.445),ce.spot2=new go.Spot(.884,.958),ce}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Ae,ne,ee){var ce=new go.Geometry,se=.5,fe=0,ye=0,be=se*Me,Te=.4*Math.SQRT2/2+.5,Be=.5-.5*Math.SQRT2/2,ze=1,Ge=.5,nt=.5,Je=0,xt=new go.PathFigure(Te*ne,(1-Be)*ee,!1);return ce.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,ze*ne,Ge*ee,ze*ne,.7*ee,ze*ne,Ge*ee)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(nt+fe)*ne,(Je+fe)*ee,(.5+se+fe)*ne,(.5-be+fe)*ee,(.5+be+fe)*ne,(.5-se+fe)*ee)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+fe)*ne,(.5+ye)*ee,(.5-be+fe)*ne,(.5-se+ye)*ee,(.5-se+fe)*ne,(.5-be+ye)*ee)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(.35+fe)*ne,.9*ee,(.5-se+fe)*ne,(.5+be+ye)*ee,(.5-be+fe)*ne,.9*ee)),xt.add(new go.PathSegment(go.PathSegment.Move,(.25+fe)*ne,.8*ee)),xt.add(new go.PathSegment(go.PathSegment.Line,(.35+fe)*ne,.9*ee)),xt.add(new go.PathSegment(go.PathSegment.Line,(.2+fe)*ne,.95*ee)),ce}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ce}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ce}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var fe=new go.PathFigure(ne,ee,!1);ce.add(fe);var ye=new go.PathFigure(0,.5*ee,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.5*ee,.2*ne,.35*ee,.3*ne,.35*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,.7*ne,.65*ee,.8*ne,.65*ee)),ce}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee).close()),ce}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var se=new go.PathFigure(0,.2*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee)),ce}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.7*ne,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,0,.6*ne,.5*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,ee,.4*ne,.5*ee,ne,.5*ee).close());var fe=new go.PathFigure(.45*ne,.73*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.73*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.38*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.63*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.31*ne,.27*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.56*ne,.27*ee)),ce}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var fe=new go.PathFigure(.335*ne,(1-.555)*ee,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,ne,.68*ee,(1-.12)*ne,.46*ee,(1-.02)*ne,.54*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,.335*ne,(1-.555)*ee,.02*ne,.54*ee,.12*ne,.46*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.365*ne,(1-.595)*ee));var ye=.5-.285,be=.5,Te=ye,Be=Math.PI/4,ze=4*(1-Math.cos(Be))/(3*Math.sin(Be)),Ge=ze*.5,nt=ye,Je=ye,xt=ze*nt,He=ze*Je;fe.add(new go.PathSegment(go.PathSegment.Bezier,(be-nt)*ne,Te*ee,(be-(xt+nt)/2)*ne,(Te+(Je+He)/2)*ee,(be-nt)*ne,(Te+He)*ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,be*ne,(Te-Je)*ee,(be-nt)*ne,(Te-He)*ee,(be-xt)*ne,(Te-Je)*ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(be+nt)*ne,Te*ee,(be+xt)*ne,(Te-Je)*ee,(be+nt)*ne,(Te-He)*ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*ne,(1-.595)*ee,(be+nt)*ne,(Te+He)*ee,(be+(xt+nt)/2)*ne,(Te+(Je+He)/2)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*ne,(1-.595)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*ee));var Et=new go.PathFigure(.2*ne,ee,!1);ce.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.8*ee));var tt=new go.PathFigure(.8*ne,ee,!1);return ce.add(tt),tt.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*ee)),ce}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,ee).close());var fe=new go.PathFigure(.2*ne,.2*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.6*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.6*ee)),fe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.8*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*ee)),ce}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.5*ee).close()),ce}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var fe=new go.PathFigure(ne,ee,!1);ce.add(fe);var ye=new go.PathFigure(.1*ne,ee,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee).close()),ce}),go.Shape.defineFigureGenerator("Caution",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.05*ne,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,.8*ee,0,ee,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.1*ee,.5*ne,0,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.95*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,ee,ne,ee,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,ee));var fe=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-fe)*ne,.875*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*ne,.875*ee,fe*ne,fe*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.325*ee,.575*ne,.725*ee,.625*ne,.375*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.75*ee,.375*ne,.375*ee,.425*ne,.725*ee)),ce}),go.Shape.defineFigureGenerator("Recycle",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.45*ne,.95*ee,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.185*ne,.85*ee,.17*ne,.95*ee,.15*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.235*ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.625*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.275*ne,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.1875*ne,.95*ee,0,.675*ee,0,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.45*ne,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.775*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.22*ne,.775*ee));var fe=new go.PathFigure(.475*ne,.2*ee,!1);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.4*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.225*ne,.3*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.275*ne,.175*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.325*ne,.05*ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.05*ee,.35*ne,0,.375*ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.375*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.4*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.475*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.315*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.32*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.05*ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,.575*ne,0,.65*ne,.05*ee,.625*ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,.38*ne,.0105*ee));var ye=new go.PathFigure(.675*ne,.575*ee,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.875*ne,.525*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.775*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.85*ne,.95*ee,ne,.8*ee,ne,.85*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.95*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.65*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.85*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.725*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.775*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.775*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.775*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,.675*ne,.575*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.775*ne,.775*ee)),ce}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ae,ne,ee){var ce=new go.Geometry,se=.5,fe=Me*.5,ye=new go.PathFigure(ne,se*ee,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,ee,ne,(se+fe)*ee,(se+fe)*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-fe)*ne,ee,0,(se+fe)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,0,0,(se-fe)*ee,(se-fe)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,se*ee,(se+fe)*ne,0,ne,(se-fe)*ee));var be=new go.PathFigure(se*ne,0,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se*ne,.15*ee)),be.add(new go.PathSegment(go.PathSegment.Move,se*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,se*ne,.85*ee)),be.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.15*ne,se*ee)),be.add(new go.PathSegment(go.PathSegment.Move,ne,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.85*ne,se*ee)),be.add(new go.PathSegment(go.PathSegment.Move,se*ne,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.58*ne,.1*ee)),be.add(new go.PathSegment(go.PathSegment.Move,se*ne,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.78*ne,.54*ee)),ce}),go.Shape.defineFigureGenerator("Package",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.15*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var fe=new go.PathFigure(0,.15*ee,!0);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,0,0)),fe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.15*ee).close()),ce.spot1=new go.Spot(0,.1),ce.spot2=new go.Spot(1,1),ce}),go.Shape.defineFigureGenerator("Class",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var fe=new go.PathFigure(0,.2*ee,!1);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee).close());var ye=new go.PathFigure(0,.5*ee,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee).close()),ce}),go.Shape.defineFigureGenerator("Component",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee).close());var fe=new go.PathFigure(0,.2*ee,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.2*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.4*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ye=new go.PathFigure(0,.6*ee,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.6*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.8*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),ce}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.15*ne,.6*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*ee));var fe=new go.PathFigure(.15*ne,.6*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*ee)),ce}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee).close()),ce}),go.Shape.defineFigureGenerator("Workcell",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce}),go.Shape.defineFigureGenerator("Supermarket",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Move,ne,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Move,ne,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ce}),go.Shape.defineFigureGenerator("TruckShipment",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var fe=new go.PathFigure(ne,.8*ee,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.4*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.4*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.8*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee).close());var ye=.1,be=Me*.1,Te=.2,Be=.9,ze=new go.PathFigure((Te-ye)*ne,Be*ee,!0);ce.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be-ye)*ee,(Te-ye)*ne,(Be-be)*ee,(Te-be)*ne,(Be-ye)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Te+ye)*ne,Be*ee,(Te+be)*ne,(Be-ye)*ee,(Te+ye)*ne,(Be-be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be+ye)*ee,(Te+ye)*ne,(Be+be)*ee,(Te+be)*ne,(Be+ye)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Te-ye)*ne,Be*ee,(Te-be)*ne,(Be+ye)*ee,(Te-ye)*ne,(Be+be)*ee).close()),ye=.1,be=Me*.1,Te=.8,Be=.9;var Ge=new go.PathFigure((Te-ye)*ne,Be*ee,!0);return ce.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be-ye)*ee,(Te-ye)*ne,(Be-be)*ee,(Te-be)*ne,(Be-ye)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(Te+ye)*ne,Be*ee,(Te+be)*ne,(Be-ye)*ee,(Te+ye)*ne,(Be-be)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,Te*ne,(Be+ye)*ee,(Te+ye)*ne,(Be+be)*ee,(Te+be)*ne,(Be+ye)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(Te-ye)*ne,Be*ee,(Te-be)*ne,(Be+ye)*ee,(Te-ye)*ne,(Be+be)*ee).close()),ce}),go.Shape.defineFigureGenerator("KanbanPost",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.2*ne,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ee)),ce}),go.Shape.defineFigureGenerator("Forklift",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0));var fe=new go.PathFigure(0,.5*ee,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.8*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ye=new go.PathFigure(.5*ne,.8*ee,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.1*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.1*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.8*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.8*ee));var be=new go.PathFigure(.5*ne,.7*ee,!1);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne,.7*ee));var Te=.1,Be=Me*.1,ze=.1,Ge=.9,nt=new go.PathFigure((ze-Te)*ne,Ge*ee,!0);ce.add(nt),nt.add(new go.PathSegment(go.PathSegment.Bezier,ze*ne,(Ge-Te)*ee,(ze-Te)*ne,(Ge-Be)*ee,(ze-Be)*ne,(Ge-Te)*ee)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Te)*ne,Ge*ee,(ze+Be)*ne,(Ge-Te)*ee,(ze+Te)*ne,(Ge-Be)*ee)),nt.add(new go.PathSegment(go.PathSegment.Bezier,ze*ne,(Ge+Te)*ee,(ze+Te)*ne,(Ge+Be)*ee,(ze+Be)*ne,(Ge+Te)*ee)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Te)*ne,Ge*ee,(ze-Be)*ne,(Ge+Te)*ee,(ze-Te)*ne,(Ge+Be)*ee)),Te=.1,Be=Me*.1,ze=.4,Ge=.9;var Je=new go.PathFigure((ze-Te)*ne,Ge*ee,!0);return ce.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,ze*ne,(Ge-Te)*ee,(ze-Te)*ne,(Ge-Be)*ee,(ze-Be)*ne,(Ge-Te)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Te)*ne,Ge*ee,(ze+Be)*ne,(Ge-Te)*ee,(ze+Te)*ne,(Ge-Be)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,ze*ne,(Ge+Te)*ee,(ze+Te)*ne,(Ge+Be)*ee,(ze+Be)*ne,(Ge+Te)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Te)*ne,Ge*ee,(ze-Be)*ne,(Ge+Te)*ee,(ze-Te)*ne,(Ge+Be)*ee)),ce}),go.Shape.defineFigureGenerator("RailShipment",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,.4*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.4*ee).close());var fe=new go.PathFigure(.45*ne,.7*ee,!1);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*ee));var ye=new go.PathFigure(.55*ne,.4*ee,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.9*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.9*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.4*ee).close());var ze=.05,Ge=Me*.05,nt=.175,Je=.95,be=new go.PathFigure((nt-ze)*ne,Je*ee,!0);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(Je-ze)*ee,(nt-ze)*ne,(Je-Ge)*ee,(nt-Ge)*ne,(Je-ze)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(nt+ze)*ne,Je*ee,(nt+Ge)*ne,(Je-ze)*ee,(nt+ze)*ne,(Je-Ge)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(Je+ze)*ee,(nt+ze)*ne,(Je+Ge)*ee,(nt+Ge)*ne,(Je+ze)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(nt-ze)*ne,Je*ee,(nt-Ge)*ne,(Je+ze)*ee,(nt-ze)*ne,(Je+Ge)*ee));var ze=.05,Ge=Me*.05,nt=.375,Je=.95,Te=new go.PathFigure((nt-ze)*ne,Je*ee,!0);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(Je-ze)*ee,(nt-ze)*ne,(Je-Ge)*ee,(nt-Ge)*ne,(Je-ze)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(nt+ze)*ne,Je*ee,(nt+Ge)*ne,(Je-ze)*ee,(nt+ze)*ne,(Je-Ge)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(Je+ze)*ee,(nt+ze)*ne,(Je+Ge)*ee,(nt+Ge)*ne,(Je+ze)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(nt-ze)*ne,Je*ee,(nt-Ge)*ne,(Je+ze)*ee,(nt-ze)*ne,(Je+Ge)*ee));var ze=.05,Ge=Me*.05,nt=.625,Je=.95,Be=new go.PathFigure((nt-ze)*ne,Je*ee,!0);ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(Je-ze)*ee,(nt-ze)*ne,(Je-Ge)*ee,(nt-Ge)*ne,(Je-ze)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(nt+ze)*ne,Je*ee,(nt+Ge)*ne,(Je-ze)*ee,(nt+ze)*ne,(Je-Ge)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(Je+ze)*ee,(nt+ze)*ne,(Je+Ge)*ee,(nt+Ge)*ne,(Je+ze)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(nt-ze)*ne,Je*ee,(nt-Ge)*ne,(Je+ze)*ee,(nt-ze)*ne,(Je+Ge)*ee));var ze=.05,Ge=Me*.05,nt=.825,Je=.95,xt=new go.PathFigure((nt-ze)*ne,Je*ee,!0);ce.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(Je-ze)*ee,(nt-ze)*ne,(Je-Ge)*ee,(nt-Ge)*ne,(Je-ze)*ee)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(nt+ze)*ne,Je*ee,(nt+Ge)*ne,(Je-ze)*ee,(nt+ze)*ne,(Je-Ge)*ee)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(Je+ze)*ee,(nt+ze)*ne,(Je+Ge)*ee,(nt+Ge)*ne,(Je+ze)*ee)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(nt-ze)*ne,Je*ee,(nt-Ge)*ne,(Je+ze)*ee,(nt-ze)*ne,(Je+Ge)*ee).close());var He=new go.PathFigure(0,ee,!1);return ce.add(He),He.add(new go.PathSegment(go.PathSegment.Line,ne,ee).close()),ce}),go.Shape.defineFigureGenerator("Warehouse",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var fe=new go.PathFigure(0,.2*ee,!1);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee).close());var ye=new go.PathFigure(.15*ne,ee,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.4*ne,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.15*ne,ee).close());var be=.05,Te=Me*.05,Be=.35,ze=.775,Ge=new go.PathFigure((Be-be)*ne,ze*ee,!0);return ce.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,Be*ne,(ze-be)*ee,(Be-be)*ne,(ze-Te)*ee,(Be-Te)*ne,(ze-be)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(Be+be)*ne,ze*ee,(Be+Te)*ne,(ze-be)*ee,(Be+be)*ne,(ze-Te)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,Be*ne,(ze+be)*ee,(Be+be)*ne,(ze+Te)*ee,(Be+Te)*ne,(ze+be)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(Be-be)*ne,ze*ee,(Be-Te)*ne,(ze+be)*ee,(Be-be)*ne,(ze+Te)*ee).close()),ce}),go.Shape.defineFigureGenerator("ControlCenter",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*ee).close()),ce}),go.Shape.defineFigureGenerator("Bluetooth",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ce}),go.Shape.defineFigureGenerator("Bookmark",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*ee)),ce}),go.Shape.defineFigureGenerator("Bookmark",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*ee)),ce}),go.Shape.defineFigureGenerator("Globe",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,.75*ne,0,ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,.75*ee,.75*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*ne,ee,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,.25*ee,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,.15*ne,.25*ee,.15*ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.85*ne,.75*ee,.85*ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*ne,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ne,.15*ee,.35*ne,.3*ee,.65*ne,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ne,.85*ee,.35*ne,.7*ee,.65*ne,.7*ee)),ce}),go.Shape.defineFigureGenerator("Wave",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.25*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.25*ee,.1*ne,0,.2*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,.25*ee,.425*ne,.5*ee,.575*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.25*ee,.8*ne,0,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.75*ee,.1*ne,.5*ee,.2*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,.75*ee,.425*ne,ee,.575*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.75*ee,.8*ne,.5*ee,.9*ne,.5*ee)),ce}),go.Shape.defineFigureGenerator("Operator",function(Ae,ne,ee){var ce=new go.Geometry,se=.3,fe=Me*.3,ye=.5,be=.7,Te=new go.PathFigure((ye-se)*ne,be*ee,!0);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-se)*ee,(ye-se)*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,be*ee,(ye+fe)*ne,(be-se)*ee,(ye+se)*ne,(be-fe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+se)*ee,(ye+se)*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,be*ee,(ye-fe)*ne,(be+se)*ee,(ye-se)*ne,(be+fe)*ee));var Be=new go.PathFigure(0,.7*ee,!1);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ne,.7*ee,0,0,ne,0)),ce}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*ee,.65*ne,.3*ee,.65*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.35*ne,.5*ee,.35*ne,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*ne,.6*ee,.1*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*ee,.2*ne,ee,.35*ne,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,ee,.7*ne,.6*ee,.9*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*ee,.8*ne,ee,.65*ne,.95*ee)),ce}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,ee,0,ee,.4*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.4*ee,.8*ne,ee,.85*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ce}),go.Shape.defineFigureGenerator("Battery",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.1*ee));var fe=new go.PathFigure(0,.6*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.4*ee)),ce}),go.Shape.defineFigureGenerator("Delete",function(Ae,ne,ee){var ce=new go.Geometry,se=.5,fe=Me*.5,ye=.5,be=.5,Te=new go.PathFigure((ye-se)*ne,be*ee,!0);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-se)*ee,(ye-se)*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,be*ee,(ye+fe)*ne,(be-se)*ee,(ye+se)*ne,(be-fe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+se)*ee,(ye+se)*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,be*ee,(ye-fe)*ne,(be+se)*ee,(ye-se)*ne,(be+fe)*ee));var Be=new go.PathFigure(.15*ne,.5*ee,!1);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.5*ee)),ce}),go.Shape.defineFigureGenerator("Flag",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.1*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.1*ee,.15*ne,0,.35*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*ee,.65*ne,.2*ee,.85*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.5*ee,.85*ne,.6*ee,.65*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*ne,.4*ee,.15*ne,.4*ee).close()),ce}),go.Shape.defineFigureGenerator("Help",function(Ae,ne,ee){var ce=new go.Geometry,se=.5,fe=Me*.5,ye=.5,be=.5,Te=new go.PathFigure((ye-se)*ne,be*ee,!1);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-se)*ee,(ye-se)*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,be*ee,(ye+fe)*ne,(be-se)*ee,(ye+se)*ne,(be-fe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+se)*ee,(ye+se)*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,be*ee,(ye-fe)*ne,(be+se)*ee,(ye-se)*ne,(be+fe)*ee).close()),se=.05,fe=Me*.05,ye=.5,be=.8;var Be=new go.PathFigure((ye-se)*ne,be*ee,!1);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be-se)*ee,(ye-se)*ne,(be-fe)*ee,(ye-fe)*ne,(be-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,be*ee,(ye+fe)*ne,(be-se)*ee,(ye+se)*ne,(be-fe)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(be+se)*ee,(ye+se)*ne,(be+fe)*ee,(ye+fe)*ne,(be+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,be*ee,(ye-fe)*ne,(be+se)*ee,(ye-se)*ne,(be+fe)*ee).close()),Be.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*ee,.75*ne,.475*ee,.75*ne,.225*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.35*ee,.4*ne,.2*ee,.3*ne,.25*ee)),ce}),go.Shape.defineFigureGenerator("Location",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(.5*ne,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.975*ne,.025*ee,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*ne,.5*ee,.5*ne,0,.025*ne,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ne,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*ne,.3*ee,.1*ne,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var fe=new go.PathFigure(.2*ne,.5*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*ee,.25*ne,0,.75*ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.3*ee)),ce}),go.Shape.defineFigureGenerator("Unlocked",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var fe=new go.PathFigure(.2*ne,.5*ee,!1);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*ee)),fe.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*ee,.25*ne,0,.75*ne,0)),fe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.35*ee)),ce}),go.Shape.defineFigureGenerator("Gear",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(.9375*ne,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*ne,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*ne,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*ne,.3316875*ee,.79840625*ne,.39915625*ee,.7834375*ne,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*ne,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*ne,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*ne,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*ne,.19378125*ee,.64228125*ne,.2188125*ee,.603875*ne,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*ne,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*ne,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*ne,.239375*ee,.39759375*ne,.20190625*ee,.36053125*ne,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*ne,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*ne,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*ne,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*ne,.4375*ee,.21765625*ne,.36059375*ee,.201875*ne,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*ne,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*ne,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*ne,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*ne,.67596875*ee,.20221875*ne,.603875*ee,.21884375*ne,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*ne,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*ne,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*ne,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*ne,.80621875*ee,.36353125*ne,.78340625*ee,.3991875*ne,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*ne,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*ne,.760625*ee,.602375*ne,.79809375*ee,.63946875*ne,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*ne,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*ne,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*ne,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*ne,.56246875*ee,.78234375*ne,.63940625*ee,.798125*ne,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*ne,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ne,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*ne,.5*ee,.1*ne,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,.3*ee,0,.375*ee,.05*ne,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.45*ne,.075*ee,.3*ne,.225*ee,.4*ne,.175*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.525*ne,.075*ee,.46*ne,.05*ee,.525*ne,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.4*ee,.525*ne,.275*ee,.475*ne,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.55*ee,ne,.4*ee,ne,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*ne,.7*ee,.675*ne,.55*ee,.675*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*ne,.85*ee,.65*ne,.7*ee,.65*ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.535*ne,ee,.61*ne,.85*ee,.61*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*ne,ee,0,ee).close()),ce}),go.Shape.defineFigureGenerator("Map",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.8*ee)),ce}),go.Shape.defineFigureGenerator("Eject",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee*.7)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var fe=new go.PathFigure(0,ee*.6,!0);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne,.6*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0).close()),ce}),go.Shape.defineFigureGenerator("Pencil",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*1,ee*1,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee*.85).close());var fe=new go.PathFigure(.126*ne,.85*ee,!1);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,.126*ne,.45*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.45*ee)),fe.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.85*ee).close());var ye=new go.PathFigure(.402*ne,.85*ee,!1);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.402*ne,.45*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.598*ne,.45*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.598*ne,.85*ee).close());var be=new go.PathFigure(.678*ne,.85*ee,!1);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.678*ne,.45*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.874*ne,.45*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.874*ne,.85*ee).close());var Te=new go.PathFigure(.5*ne,.1*ee,!1);return ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*ne,.3*ee)),Te.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*ne,.3*ee).close()),ce}),go.Shape.defineFigureGenerator("Staircase",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),ce}),go.Shape.defineFigureGenerator("5Bars",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.184,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.184,ee*(1-.184)).close());var fe=new go.PathFigure(ne*.204,ee,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.204,ee*(1-.184))),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.388,ee*(1-.184*2))),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.388,ee*1).close());var ye=new go.PathFigure(ne*.408,ee,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.408,ee*(1-.184*2))),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.592,ee*(1-.184*3))),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.592,ee*1).close());var be=new go.PathFigure(ne*.612,ee,!0);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne*.612,ee*(1-.184*3))),be.add(new go.PathSegment(go.PathSegment.Line,ne*.796,ee*(1-.184*4))),be.add(new go.PathSegment(go.PathSegment.Line,ne*.796,ee*1).close());var Te=new go.PathFigure(ne*.816,ee,!0);return ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Line,ne*.816,ee*(1-.184*4))),Te.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*(1-.184*5))),Te.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1).close()),ce}),go.Shape.defineFigureGenerator("PC",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,0).close());var fe=new go.PathFigure(ne*.055,.07*ee,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.07)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.1)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.055,ee*.1).close());var ye=new go.PathFigure(ne*.055,.13*ee,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.13)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.16)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.055,ee*.16).close());var be=new go.PathFigure(ne*.055,.18*ee,!0);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.18)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.21)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.055,ee*.21).close());var Te=new go.PathFigure(ne*1,0,!0);return ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Line,ne*.4,0)),Te.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.65)),Te.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.65).close()),ce}),go.Shape.defineFigureGenerator("Plane",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.55*ne,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.35*ne,.525*ee,0,.4*ee,.225*ne,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.2*ee,.975*ne,0,ne,.08*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.55*ne,ee).close()),ce}),go.Shape.defineFigureGenerator("Key",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*1,ee*.5,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.9,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.9,.6*ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.17*ne,.425*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*ne,.5*ee,.075*ne,.075*ee).close()),ce}),go.Shape.defineFigureGenerator("FilmTape",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,ne*0,ne*.3,ne*.055)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.08,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.08,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*1),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*1),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*2),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*2),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*3),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*3),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*4),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*4),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*5),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*5),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*6),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*6),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*7),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*7),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*8),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*8),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*9),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*9),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*10),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*10),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*11),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*11),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*12),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*12),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*13),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*13),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*14),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*14),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*15),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*15),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1));var fe=new go.PathFigure(0,0,!1);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*0)),fe.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ne*1,ne*.3,ne*.055)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1));var ye=new go.PathFigure(ne*.11,ee*.1,!1);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),ee*.1)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),ee*.8)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.11,ee*.8).close());var be=new go.PathFigure(ne*(.11+.24133333*1+.028*1),ee*.1,!1);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*1),ee*.1)),be.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*1),ee*.8)),be.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*1),ee*.8).close());var Te=new go.PathFigure(ne*(.11+.24133333*2+.028*2),ee*.1,!1);return ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),ee*.1)),Te.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),ee*.8)),Te.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*2),ee*.8).close()),ce}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ae,ne,ee){var ce=new go.Geometry,se=8,fe=se*Me,ye=new go.PathFigure(se,0,!1);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.86,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.14)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,ee-se)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,ee,ne,ee-fe,ne-fe,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,fe,ee,0,ee-fe)),ye.add(new go.PathSegment(go.PathSegment.Line,0,se)),ye.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,fe,fe,0).close());var be=new go.PathFigure(ne*.83,0,!1);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne*.83,ee*.3)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.17,ee*.3)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.17,ee*0).close());var Te=new go.PathFigure(ne*.83,ee*1,!1);ce.add(Te),Te.add(new go.PathSegment(go.PathSegment.Line,ne*.83,ee*.5)),Te.add(new go.PathSegment(go.PathSegment.Line,ne*.17,ee*.5)),Te.add(new go.PathSegment(go.PathSegment.Line,ne*.17,ee*1).close());var Be=new go.PathFigure(ne*.78,ee*.05,!1);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.05)),Be.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.25)),Be.add(new go.PathSegment(go.PathSegment.Line,ne*.78,ee*.25).close()),ce}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ae,ne,ee){var ce=Ae?Ae.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=15),ce=Math.min(ce,ne/3),ce=Math.min(ce,ee/3);var se=ce*Me,fe=ee*.8,ye=new go.Geometry,be=new go.PathFigure(ce,0,!0);return ye.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne-ce,0)),be.add(new go.PathSegment(go.PathSegment.Bezier,ne,ce,ne-se,0,ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,ne,fe-ce)),be.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,fe,ne,fe-se,ne-se,fe)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.7,fe)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.55,fe)),be.add(new go.PathSegment(go.PathSegment.Line,ce,fe)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,fe-ce,se,fe,0,fe-se)),be.add(new go.PathSegment(go.PathSegment.Line,0,ce)),be.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,se,se,0).close()),se>1?(ye.spot1=new go.Spot(0,0,se,se),ye.spot2=new go.Spot(1,.8,-se,-se)):(ye.spot1=go.Spot.TopLeft,ye.spot2=new go.Spot(1,.8)),ye}),go.Shape.defineFigureGenerator("Repeat",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*.45,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,ee*.45).close());var fe=new go.PathFigure(ne*1,ee*.55,!0);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*1)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.55)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee*.55)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee*.1)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.1)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.35,ee*0)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*0)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*.55).close()),ce}),go.Shape.defineFigureGenerator("Windows",function(Ae,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*ne,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*ne,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*ne,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*.1,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,ee*.9).close());var fe=new go.PathFigure(ne*.1,ee*.2,!0);ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.1,ee*.25)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.22,ee*.285)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.1,ee*.32)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.1,ee*.37)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.275,ee*.32)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.275,ee*.25).close());var ye=new go.PathFigure(ne*.28,ee*.37,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.37)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.41)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.28,ee*.41).close()),ce}),go.Shape.defineFigureGenerator("Beaker",function(Ae,ne,ee){var ce=new go.Geometry,se=15,fe=se*Me,ye=new go.PathFigure(ne*.62,ee*.475,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,ee-se)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,ee,ne,ee-fe,ne-fe,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,fe,ee,0,ee-fe)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.38,ee*.475)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.38,ee*.03)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.36,ee*0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.62,ee*.03).close()),fe>1?(ce.spot1=new go.Spot(0,0,fe,fe),ce.spot2=new go.Spot(1,1,-fe,-fe)):(ce.spot1=go.Spot.TopLeft,ce.spot2=go.Spot.BottomRight),ce}),go.Shape.defineFigureGenerator("Download",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*1,!0);ce.add(se);var fe=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,ee*(1-fe)).close());var ye=new go.PathFigure(ne*.4,ee*0,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.44)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.26,ee*.44)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.66)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.26),ee*.44)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.44)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*0).close()),ce}),go.Shape.defineFigureGenerator("Bin",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*1,!0);ce.add(se);var fe=.1/.3;return se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,ee*(1-fe)).close()),ce}),go.Shape.defineFigureGenerator("Upload",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*1,!0);ce.add(se);var fe=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,ee*(1-fe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,ee*(1-fe)).close());var ye=new go.PathFigure(ne*.5,ee*0,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.26,ee*.25)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.25)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.63)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.63)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.25)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.74,ee*.25).close()),ce}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*.15,ee*0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,ee*1).close()),ce}),go.Shape.defineFigureGenerator("Drink",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*.15,ee*0,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,ee*1).close());var fe=new go.PathFigure(ne*.235,ee*.28,!0);return ce.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.765,ee*.28)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.655,ee*.97)),fe.add(new go.PathSegment(go.PathSegment.Line,ne*.345,ee*.97).close()),ce}),go.Shape.defineFigureGenerator("4Arrows",function(Ae,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*.5,ee*0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,ee*.25).close()),ce}),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 Vn={},Cn="5.0",pe={},ge=null,Re=!1,Ve=!1,dt=null,Ke=!1,st=null,Me=null,kt=0;kt<arguments.length;kt++){var bt=arguments[kt];if(bt!==null)switch(typeof bt){case"number":Cn=bt.toFixed(1);break;case"string":bt.match(new RegExp("^[0-9]\\.[0-9]+$"))?Cn=bt:dt=bt;break;case"object":typeof bt.is3D!="undefined"?ge=bt:pe=bt;break;case"boolean":Re=bt,Ve=!0;break}}ge===null&&(ge={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},pe.material_id!==void 0&&!Ve&&(Re=!0)),dt!==null&&pe.id===void 0&&(pe.id=dt);var Ue="",lt="",yt=!1,jt=null,Ae=null,ne=null,ee=!1,ce=null,se=null,fe=null,ye=null,be=null;pe.height!==void 0&&(pe.height=Math.round(pe.height)),pe.width!==void 0&&(pe.width=Math.round(pe.width));var Te=function($t){return parseFloat($t)>4?parseFloat($t):5};Vn.setHTML5Codebase=function($t,ln){Me=$t,Wt($t,ln)},Vn.setJavaCodebase=Vn.setJavaCodebaseVersion=Vn.isCompiledInstalled=Vn.setPreCompiledScriptPath=Vn.setPreCompiledResourcePath=function(){},Vn.setHTML5CodebaseVersion=function($t,ln){var Tn=parseFloat($t);if(Tn!==NaN&&Tn<5){console.log("The GeoGebra HTML5 codebase version "+Tn+" is deprecated. Using version latest instead.");return}st=$t,_e($t,ln)},Vn.getHTML5CodebaseVersion=function(){return Ae},Vn.getParameters=function(){return pe},Vn.setFontsCSSURL=function($t){ye=$t},Vn.setGiacJSURL=function($t){},Vn.setJNLPFile=function($t){Ue=$t},Vn.setJNLPBaseDir=function($t){},Vn.inject=function(){function $t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ln="auto",Tn=pe.id,ei,Ln=!1,Yn=0;Yn<arguments.length;Yn++){var zt=arguments[Yn];typeof zt=="string"?(zt=zt.toLowerCase(),zt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ln=zt:Tn=arguments[Yn]):typeof zt=="boolean"?Ln=zt:zt instanceof HTMLElement&&(ei=zt)}wn();function wn(){if(!Ke){setTimeout(wn,200);return}ln=Ut(ln);var $n=ei||document.getElementById(Tn);if(!$n){console.log("possibly bug on ajax loading? ");return}if(Vn.removeExistingApplet($n,!1),pe.width===void 0&&$n.clientWidth&&(pe.width=$n.clientWidth),pe.height===void 0&&$n.clientHeight&&(pe.height=$n.clientHeight),!(pe.width&&pe.height)&&ln==="html5"&&(delete pe.width,delete pe.height),jt=ln,ln==="screenshot")tt($n,pe);else{var Yt=!1;pe.hasOwnProperty("playButton")&&pe.playButton||pe.hasOwnProperty("clickToLoad")&&pe.clickToLoad?Yt=!0:pe.hasOwnProperty("playButtonAutoDecide")&&pe.playButtonAutoDecide&&(Yt=(!Be()||$t())&&ze()),Yt?(jt="screenshot",gt($n,pe,Ln,ln)):Et($n,pe,Ln)}}};function Be(){try{return window.self!==window.top}catch($t){return!0}}function ze(){return pe.hasOwnProperty("screenshotGenerator")&&pe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Vn.getViews=function(){return ge},Vn.isJavaInstalled=function(){return!1};var Ge=function($t){var ln=function(Yn){var zt=JSON.parse(Yn),wn=function(tn){return tn.type=="G"||tn.type=="E"},$n=zt.elements?zt.elements.filter(wn)[0]:zt;if(!$n||!$n.url){Tn();return}pe.fileName=$n.url,nt($n.settings||{}),ge.is3D=!0;var Yt="https://www.geogebra.org/images/";Vn.setPreviewImage(ce||$n.previewUrl,Yt+"GeoGebra_loading.png",Yt+"applet_play.png"),$t()},Tn=function(){pe.onError&&pe.onError(),Dn("Error: Fetching material (id "+pe.material_id+") failed.",pe)},ei=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Ln="/materials/"+pe.material_id+"?scope=basic";Je("https://"+ei+"/api/proxy.php?path="+encodeURIComponent(Ln),ln,Tn)};function nt($t){var ln=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Tn){$t[Tn]=!!$t[Tn]}),ln.forEach(function(Tn){pe[Tn]===void 0&&$t[Tn]!==void 0&&(pe[Tn]=$t[Tn])}),pe.showToolBarHelp===void 0&&(pe.showToolBarHelp=pe.showToolBar)}function Je($t,ln,Tn){var ei=new XMLHttpRequest;ei.open("GET",$t),ei.onload=function(){ln(ei.responseText)},ei.onerror=Tn,ei.send()}Vn.isHTML5Installed=function(){return!0},Vn.getLoadedAppletType=function(){return jt},Vn.setPreviewImage=function($t,ln,Tn){ce=$t,se=ln,fe=Tn},Vn.removeExistingApplet=function($t,ln){var Tn;typeof $t=="string"&&($t=document.getElementById($t)),jt=null;var ei=null;for(Tn=0;Tn<$t.childNodes.length;Tn++){var Ln=$t.childNodes[Tn],Yn=Ln.className;Yn==="applet_screenshot"?ln?(Ln.style.display="block",jt="screenshot"):Ln.style.display="none":Yn!=="applet_scaler prerender"&&($t.removeChild(Ln),ei=Yn&&Yn.indexOf("appletParameters")!=-1?Ln.id:null,Tn--)}var zt=pe.id!==void 0?pe.id:ei,wn=window[zt];wn&&typeof wn.getBase64=="function"&&(wn.remove(),window[zt]=null)},Vn.refreshHitPoints=function(){if(Te(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var $t=Vn.getAppletObject();return $t&&typeof $t.recalculateEnvironments=="function"?($t.recalculateEnvironments(),!0):!1},Vn.startAnimation=function(){var $t=Vn.getAppletObject();return $t&&typeof $t.startAnimation=="function"?($t.startAnimation(),!0):!1},Vn.stopAnimation=function(){var $t=Vn.getAppletObject();return $t&&typeof $t.stopAnimation=="function"?($t.stopAnimation(),!0):!1},Vn.getAppletObject=function(){var $t=pe.id!==void 0?pe.id:"ggbApplet";return window[$t]},Vn.resize=function(){};var xt=function($t,ln,Tn){var ei=document.createElement("param");ei.setAttribute("name",ln),ei.setAttribute("value",Tn),$t.appendChild(ei)},He=function($t){return $t&&$t!=="false"},Et=function($t,ln,Tn){Te(Ae)<=4.2&&(Tn=!0);var ei=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ae||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(ei=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ln=document.createElement("div");Ln.classList.add("appletParameters","notranslate");var Yn=ln.width,zt=ln.height;if(ln.disableAutoScale=ln.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ln.disableAutoScale,ln.width!==void 0)if(Te(Ae)<=4.4)He(ln.showToolBar)&&(ln.height-=7),He(ln.showAlgebraInput)&&(ln.height-=37),ln.width<605&&He(ln.showToolBar)&&(ln.width=605,Yn=605);else{var wn=100;(He(ln.showToolBar)||He(ln.showMenuBar))&&(ln.hasOwnProperty("customToolBar")&&(ln.customToolbar=ln.customToolBar),wn=He(ln.showMenuBar)?245:155),Yn<wn&&(ln.width=wn,Yn=wn)}Ln.style.border="none",Ln.style.display="inline-block";for(var $n in ln)ln.hasOwnProperty($n)&&$n!=="appletOnLoad"&&Ln.setAttribute("data-param-"+$n,ln[$n]);ye&&Ln.setAttribute("data-param-fontscssurl",ye),Vn.resize=function(){GGBAppletUtils.responsiveResize($t,ln)},window.addEventListener("resize",function(ve){Vn.resize()});var Yt=typeof ln.appletOnLoad=="function"?ln.appletOnLoad:function(){};if(!Tn&&ln.width!==void 0){ln.hasOwnProperty("showSplash")||Ln.setAttribute("data-param-showSplash","false");var tn=$t.querySelector(".applet_scaler.prerender"),Gt=tn!==null;if(Gt)var Tt=tn.querySelector(".ggb_preview");else{var Tt=Xt(Yn,zt,ln.borderColor,!1);tn=document.createElement("div"),tn.className="applet_scaler",tn.style.position="relative",tn.style.display="block",tn.style.width=Yn+"px",tn.style.height=zt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(tn,"66%"),Te(Ae)>=5?(ln.appletOnLoad=function(ve){var Fe=$t.querySelector(".ggb_preview");Fe&&Fe.parentNode.removeChild(Fe),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(tn),window.GGBT_wsf_view&&$(window).trigger("resize"),Yt(ve)},Gt||tn.appendChild(Tt)):Ln.appendChild(Tt),tn.appendChild(Ln),Gt||$t.appendChild(tn),setTimeout(function(){Vn.resize()},1)}else{var ot=document.createElement("div");ot.className="applet_scaler",ot.style.position="relative",ot.style.display="block",ot.appendChild(Ln),$t.appendChild(ot),ln.appletOnLoad=function(ve){Vn.resize(),Yt(ve)}}function Ze(ve,Fe){Fe&&typeof Fe.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ve,Fe.appletOnLoad):renderGGBElement(ve),Dn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Fe)}function At(ve,Fe){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ve,params:Fe}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(We){Ze(We.article,We.params)}),html5AppletsToProcess=null)},Te(Ae)<5&&(ve.className+=" geogebraweb")):Ze(ve,Fe)}if(ei){scriptLoadStarted=!0;for(var Dt=0;Dt<Ln.childNodes.length;Dt++){var rt=Ln.childNodes[Dt].tagName;rt==="TABLE"&&(Ln.removeChild(Ln.childNodes[Dt]),Dt--)}if(ggbHTML5LoadedScript!==null){var et=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');et!=null&&et.parentNode.removeChild(et)}var Oe=document.createElement("script"),Pe=function(){At(Ln,ln)};Oe.src=lt+ne,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=Ae,ggbHTML5LoadedScript=Oe.src,Dn("GeoGebra HTML5 codebase loaded: '"+lt+"'.",ln),!Me&&(!st||st=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Pe()):lt.requirejs?__webpack_require__.e(4184).then(function(){var ve=[__webpack_require__(74620)];Pe.apply(null,ve)}.bind(this)).catch(__webpack_require__.oe):(Oe.onload=Pe,$t.appendChild(Oe))}else At(Ln,ln);ln.height=zt,ln.width=Yn},tt=function($t,ln,Tn){var ei=Xt(ln.width,ln.height,ln.borderColor,Tn),Ln=document.createElement("div");Ln.style.position="relative",Ln.style.display="block",Ln.style.width=ln.width+"px",Ln.style.height=ln.height+"px",Ln.className="applet_screenshot applet_scaler"+(Tn?" applet_screenshot_play":""),Ln.appendChild(ei);var Yn=GGBAppletUtils.getScale(ln,$t,Tn);Tn?($t.appendChild(Ht()),window.GGBT_wsf_view||($t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ln,"66%"),$t.appendChild(Ln),Yn!==1&&!isNaN(Yn)&&(GGBAppletUtils.scaleElement(Ln,Yn),Ln.style.width=ln.width+"px",Ln.style.height=ln.height+"px",Ln.parentNode.style.width=ln.width*Yn+"px",Ln.parentNode.style.height=ln.height*Yn+"px"),Vn.resize=function(){Ot($t,ei,Ln,Tn)},window.addEventListener("resize",function(zt){Vn.resize()}),Vn.resize()};function Ot($t,ln,Tn,ei){if($t.contains(ln)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if($t.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition($t)}var Ln=GGBAppletUtils.getScale(pe,$t,ei);Tn.parentNode!==null&&(!isNaN(Ln)&&Ln!==1?(GGBAppletUtils.scaleElement(Tn,Ln),Tn.parentNode.style.width=pe.width*Ln+"px",Tn.parentNode.style.height=pe.height*Ln+"px"):(GGBAppletUtils.scaleElement(Tn,1),Tn.parentNode.style.width=pe.width+"px",Tn.parentNode.style.height=pe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter($t),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Vn.onExitFullscreen=function($t,ln){ln.appendChild($t)};var gt=function($t,ln,Tn,ei){tt($t,ln,!0);for(var Ln=function(){var wn=[];for(zt=0;zt<$t.childNodes.length;zt++)wn.push($t.childNodes[zt]);if(window.GGBT_wsf_view){var $n=window.GGBT_wsf_view.renderFullScreen($t,ln.id),Yt=document.getElementById("fullscreencontainer"),tn=jQuery($t).find(".fullscreencontent");tn.length>0?($n.remove(),tn.attr("id","fullscreencontent").show(),jQuery(Yt).append(tn),window.dispatchEvent(new Event("resize"))):Et($n,ln,!1),window.GGBT_wsf_view.launchFullScreen(Yt)}else jt=ei,Et($t,ln,!1);if(!window.GGBT_wsf_view)for(zt=0;zt<wn.length;zt++)$t.removeChild(wn[zt])},Yn=$t.getElementsByClassName("ggb_preview_play"),zt=0;zt<Yn.length;zt++)Yn[zt].addEventListener("click",Ln,!1),Yn[zt].addEventListener("ontouchstart",Ln,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload($t),ze()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ht=function(){var $t=document.createElement("div");if($t.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ln='.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");}',Tn=document.createElement("style");Tn.styleSheet?Tn.styleSheet.cssText=ln:Tn.appendChild(document.createTextNode(ln)),document.getElementsByTagName("head")[0].appendChild(Tn)}return $t},Xt=function($t,ln,Tn,ei){var Ln=document.createElement("div");Ln.className="ggb_preview",Ln.style.position="absolute",Ln.style.zIndex="90",Ln.style.width=$t-2+"px",Ln.style.height=ln-2+"px",Ln.style.top="0px",Ln.style.left="0px",Ln.style.overflow="hidden",Ln.style.backgroundColor="white";var Yn="lightgrey";Tn!==void 0&&(Tn==="none"?Yn="transparent":Yn=Tn),Ln.style.border="1px solid "+Yn;var zt=document.createElement("img");if(zt.style.position="relative",zt.style.zIndex="1000",zt.style.top="-1px",zt.style.left="-1px",ce!==null&&zt.setAttribute("src",ce),zt.style.opacity=.7,se!==null){var wn,$n,Yt;if(!ei){wn=document.createElement("img"),wn.style.position="absolute",wn.style.zIndex="1001",wn.style.opacity=1,zt.style.opacity=.3,$n=360,$n>$t/4*3&&($n=$t/4*3),Yt=$n/5.8,wn.setAttribute("src",se),wn.setAttribute("width",$n),wn.setAttribute("height",Yt);var tn=($t-$n)/2,Gt=(ln-Yt)/2;wn.style.left=tn+"px",wn.style.top=Gt+"px",Ln.appendChild(wn)}}return Ln.appendChild(zt),Ln},Ut=function($t){return $t=$t.toLowerCase(),$t==="html5"||$t==="screenshot"?$t:"html5"},it=["web","webSimple","web3d","tablet","tablet3d","phone"],_e=function($t,ln){if(Ae=$t,ln){Wt(Ae,!0);return}var Tn=!Re;if(Tn){var ei=Te(Ae);!isNaN(ei)&&ei<4.4&&(Tn=!1)}var Ln,Yn;window.location.protocol.substr(0,4)==="http"?Ln=window.location.protocol:Ln="http:";var zt=Ae.indexOf("//");zt>0?Yn=Ae:zt===0?Yn=Ln+Ae:Yn="https://www.geogebra.org/apps/5.2.814.0/";for(var wn in it)if(Ae.slice(it[wn].length*-1)===it[wn]||Ae.slice((it[wn].length+1)*-1)===it[wn]+"/"){Wt(Yn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Tn&&!ge.is3D&&!ge.AV&&!ge.SV&&!ge.CV&&!ge.EV2&&!ge.CP&&!ge.PC&&!ge.DA&&!ge.FI&&!ge.PV&&!He(pe.showToolBar)&&!He(pe.showMenuBar)&&!He(pe.showAlgebraInput)&&!He(pe.enableRightClick)&&(!pe.appName||pe.appName=="classic")?Yn+="webSimple/":Yn+="web3d/",Wt(Yn,!1)},Wt=function($t,ln){if($t.requirejs){lt=$t;return}$t.slice(-1)!=="/"&&($t+="/"),lt=$t,ln===null&&(ln=$t.indexOf("http")===-1),yt=ln,ne="web.nocache.js",ee=!1;var Tn=lt.split("/");Tn.length>1&&(!ln&&Tn[Tn.length-2]==="webSimple"?(ne="webSimple.nocache.js",ee=!0):it.indexOf(Tn[Tn.length-2])>=0&&(ne=Tn[Tn.length-2]+".nocache.js")),Tn=$t.split("/"),Ae=Tn[Tn.length-3],Ae.substr(0,4)==="test"?Ae=Ae.substr(4,1)+"."+Ae.substr(5,1):(Ae.substr(0,3)==="war"||Ae.substr(0,4)==="beta")&&(Ae="5.0");var ei=parseFloat(Ae);ei!==NaN&&ei<5&&$t.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+ei+" is deprecated. Using version latest instead."),_e("5.0",ln))},Dn=function($t,ln){window.console&&window.console.log&&(!ln||typeof ln.showLogging=="undefined"||ln.showLogging&&ln.showLogging!=="false")&&console.log($t)};pe.material_id!==void 0?Ge(Bn):Bn();function Bn(){var $t=Cn;st!==null?$t=st:parseFloat($t)<5&&($t="5.0"),_e($t,!1),Me!==null&&Wt(Me,yt),Ke=!0}return Vn},GGBAppletUtils=function(){"use strict";function Vn(){return window.GGBT_wsf_edit!==void 0}function Cn(Ke,st){st!=1?(Ke.style.transformOrigin="0% 0% 0px",Ke.style.webkitTransformOrigin="0% 0% 0px",Ke.style.transform="scale("+st+","+st+")",Ke.style.webkitTransform="scale("+st+","+st+")",Ke.style.maxWidth="initial",Ke.querySelector(".ggb_preview")!==null&&(Ke.querySelector(".ggb_preview").style.maxWidth="initial"),Ke.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ke.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ke.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ke.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ke.style.transform="none",Ke.style.webkitTransform="none")}function pe(Ke,st,Me,kt,bt,Ue){var lt=null;if(Ue!=null&&Ue!="")for(var yt=Ke.parentNode;yt!=null;)if((" "+yt.className+" ").indexOf(" "+Ue+" ")>-1){lt=yt;break}else yt=yt.parentNode;var jt=0,Ae=0,ne=0,ee=0,ce=0,se=0,fe=0;if(lt)jt=lt.offsetWidth,Ae=Math.max(kt?lt.offsetWidth:0,lt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(jt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ae=Math.min(window.innerHeight,document.documentElement.clientHeight),ne=jt):(jt=window.innerWidth,Ae=window.innerHeight,ne=window.innerWidth),Ke){var ye=Ke.getBoundingClientRect();ye.left>0&&ye.left<=jt&&(bt===void 0||!bt)&&(document.dir==="rtl"?(ce=jt-ye.width-ye.left,se=ne<=480?10:30):(se=ye.left,ce=ne<=480?10:30),ee=se+ce)}if(Ke&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var be=Ke.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,fe=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,fe=40)}}return Ke&&((Me===void 0||!Me)&&st>0&&st+ee<jt?jt=st:jt-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Me===void 0||!Me)&&(Ae-=fe)),{width:jt,height:Ae}}function ge(Ke,st,Me,kt,bt){if(Ke.isScreenshoGenerator)return 1;var Ue=kt!==void 0&&kt,lt=Ke.noScaleMargin!=null&&Ke.noScaleMargin,yt=function(be){return be&&be!=="false"},jt=yt(Ke.autoHeight),Ae=pe(st,Ke.width,Me,jt,Ue&&window.GGBT_wsf_view||lt,bt),ne=parseInt(Ae.width),ee=Ke.width,ce=Ke.height;if(ee===void 0){var se=st.querySelector(".appletParameters");se&&(ee=se.offsetWidth,ce=se.offsetHeight)}var fe=ne/ee,ye=Ue?1:Ae.height/ce;return Me!==void 0&&!Me&&(fe=Math.min(1,fe),ye=Math.min(1,ye)),Math.min(fe,ye)}function Re(Ke,st,Me){var kt=1,bt,Ue=!1;if(Ke.hasOwnProperty("allowUpscale")&&(Ue=Ke.allowUpscale),Ke.hasOwnProperty("scale")&&(kt=parseFloat(Ke.scale),(isNaN(kt)||kt===null||kt===0)&&(kt=1),kt>1&&(Ue=!0)),st&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ue=!0),!(Ke.hasOwnProperty("disableAutoScale")&&Ke.disableAutoScale))bt=ge(Ke,st,Ue,Me,Ke.scaleContainerClass);else return kt;return Ue&&(!Ke.hasOwnProperty("scale")||kt===1)?bt:Math.min(kt,bt)}function Ve(Ke){var st=Math.min(window.innerWidth,document.documentElement.clientWidth),Me=Math.min(window.innerHeight,document.documentElement.clientHeight),kt=Ke.getBoundingClientRect(),bt=(st-kt.width)/2,Ue=(Me-kt.height)/2;Ue<0&&(Ue=0),Ke.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(bt<40?Ke.style.left="40px":Ke.style.left=bt+"px",Ke.style.top=Ue+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ue<40?Ke.style.top="40px":Ke.style.top=Ue+"px",Ke.style.left=bt+"px")}function dt(Ke,st){var Me=Ke.querySelector(".appletParameters");if(Me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(st.id!==Me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ke)}if(Me.parentElement&&/fullscreen/.test(Me.parentElement.className))return;var kt=Re(st,Ke);Vn()&&Me.setAttribute("data-param-scale",kt);for(var bt=null,Ue=0;Ue<Ke.childNodes.length;Ue++)if(Ke.childNodes[Ue].className!==void 0&&Ke.childNodes[Ue].className.match(/^applet_scaler/)){bt=Ke.childNodes[Ue];break}if(bt!==null&&bt.querySelector(".noscale")!==null)return;var lt=st.id!==void 0?st.id:"ggbApplet",yt=window[lt];(yt==null||!yt.recalculateEnvironments)&&bt!==null&&!bt.className.match(/fullscreen/)&&(bt.parentNode.style.transform="",!isNaN(kt)&&kt!==1?(bt.parentNode.style.width=st.width*kt+"px",bt.parentNode.style.height=st.height*kt+"px",Cn(bt,kt)):(Cn(bt,1),bt.parentNode.style.width=st.width+"px",bt.parentNode.style.height=st.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ve(Ke),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Me).parents(".content-added-content"))}}return{responsiveResize:dt,isFlexibleWorksheetEditor:Vn,positionCenter:Ve,getScale:Re,scaleElement:Cn}}();__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 Vn=n.location.search;return Vn.indexOf(J)!=-1||Vn.indexOf(K)!=-1}function q(Vn,Cn){}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(Vn){var Cn=s[L].bindings;s[L].bindings=function(){for(var pe=Cn?Cn():{},ge=Vn[webModule.__softPermutationId],Re=O;Re<ge.length;Re++){var Ve=ge[Re];pe[Ve[O]]=Ve[P]}return pe}};var t;function u(){return v(),t}function v(){if(!t){var Vn=o.createElement(Q);if(Vn.id=L,Vn.style.cssText=R+S,Vn.tabIndex=-1,o.body.appendChild(Vn),t=Vn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Cn=document.compatMode==U?V:W;t.write(Cn+X),t.close()}}}function w(Vn){function Cn(ge){function Re(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ve=Re();if(Ve){ge();return}function dt(){if(!Ve){if(!Re())return;Ve=!0,ge(),o.removeEventListener&&o.removeEventListener(Z,dt,!1),Ke&&clearInterval(Ke)}}o.addEventListener&&o.addEventListener(Z,dt,!1);var Ke=setInterval(function(){dt()},$)}function pe(ge){var Re=u(),Ve=Re.body,dt=Re.createElement(_);dt.language=ab,dt.crossOrigin=W,dt.src=ge,webModule.__errFn&&(dt.onerror=function(){webModule.__errFn(L,new Error(bb+ge))}),Ve.appendChild(dt)}Cn(function(){pe(Vn)})}webModule.__startLoadingFragment=function(Vn){return C(Vn)},webModule.__installRunAsyncCode=function(Vn){var Cn=u(),pe=Cn.body,ge=Cn.createElement(_);ge.language=ab,ge.text=Vn,pe.appendChild(ge),pe.removeChild(ge)};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(Vn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Vn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Vn){var Cn=c[Vn];return Cn==null?null:Cn},r=d,webModule.__errFn=e}function B(){function Vn(Ke){var st=Ke.lastIndexOf(rb);st==-1&&(st=Ke.length);var Me=Ke.indexOf(sb);Me==-1&&(Me=Ke.length);var kt=Ke.lastIndexOf(tb,Math.min(Me,st));return kt>=O?Ke.substring(O,kt+P):W}function Cn(Ke){if(!Ke.match(/^\w+:\/\//)){var st=o.createElement(ub);st.src=Ke+vb,Ke=Vn(st.src)}return Ke}function pe(){var Ke=__gwt_getMetaProperty(wb);return Ke!=null?Ke:W}function ge(){for(var Ke=o.getElementsByTagName(_),st=O;st<Ke.length;++st)if(Ke[st].src.indexOf(xb)!=-1)return Vn(Ke[st].src);return W}function Re(){var Ke=o.getElementsByTagName(yb);return Ke.length>O?Ke[Ke.length-P].href:W}function Ve(){var Ke=o.location;return Ke.href==Ke.protocol+zb+Ke.host+Ke.pathname+Ke.search+Ke.hash}var dt=pe();return dt==W&&(dt=ge()),dt==W&&(dt=Re()),dt==W&&Ve()&&(dt=Vn(o.location.href)),dt=Cn(dt),dt}function C(Vn){return Vn.match(/^\//)||Vn.match(/^[a-zA-Z]+:\/\//)?Vn:webModule.__moduleBase+Vn}function D(){var Vn=[],Cn=O,pe=[],ge=[];function Re(Ke){var st=ge[Ke](),Me=pe[Ke];if(st in Me)return st;var kt=[];for(var bt in Me)kt[Me[bt]]=bt;throw r&&r(Ke,kt,st),null}if(__gwt_isKnownPropertyValue=function(Ke,st){return st in pe[Ke]},webModule.__getPropMap=function(){var Ke={};for(var st in pe)pe.hasOwnProperty(st)&&(Ke[st]=Re(st));return Ke},webModule.__computePropValue=Re,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ve;try{Ve=Cb;var dt=Ve.indexOf(Db);dt!=-1&&(Cn=parseInt(Ve.substring(dt+P),$),Ve=Ve.substring(O,dt))}catch(Ke){}return webModule.__softPermutationId=Cn,C(Ve+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(Vn,Cn,pe){"use strict";pe.d(Cn,{Ax:function(){return dt},Ds:function(){return Ke},KI:function(){return Me},SI:function(){return Ve},f1:function(){return Re}});var ge=pe(3294);function Re(kt){let bt=!0;if(kt.length>0){for(let Ue=0;Ue<kt.length;Ue++)if(kt[Ue].compile_success==0||!kt[Ue].compile_success){bt=!1;break}}else bt=!1;return bt}function Ve(kt,bt=""){let Ue=[];for(let lt=0;lt<kt.length;lt++){let yt=kt[lt],jt=bt?`${bt}/${yt.name}`:`${yt.name}`;Ue.push({title:yt.name,type:yt.type,isLeaf:yt.type!=="tree",key:jt})}return Ue}function dt(kt,bt,Ue){for(let lt=0;lt<kt.length;lt++){let yt=kt[lt];if(yt.key===bt){yt.children=Ue;break}yt.children&&dt(yt.children,bt,Ue)}return kt}function Ke(kt,bt,Ue){let lt;return function(){let yt=this,jt=arguments,Ae=function(){lt=null,Ue||kt.apply(yt,jt)},ne=Ue&&!lt;clearTimeout(lt),lt=setTimeout(Ae,bt),ne&&kt.apply(yt,jt)}}const st=!0,Me=ge.Z.API_SERVER},85786:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return dt}});var ge=pe(59301),Re={digitalLabel:"digitalLabel___tImKs",active:"active___Ck70Q"},dt=({number:Ke,active:st,className:Me})=>ge.createElement("div",{className:`${Re.digitalLabel} ${st?Re.active:""} ${Me}`},Ke)},57647:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return se}});var ge=pe(59301),Re=pe(17574),Ve={folderWrapper:"folderWrapper___G__0a",folderIcon:"folderIcon___oTG6c"},dt=pe(73631),Ke=pe(5623),st=pe(16149),Me=Object.defineProperty,kt=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,jt=(fe,ye,be)=>ye in fe?Me(fe,ye,{enumerable:!0,configurable:!0,writable:!0,value:be}):fe[ye]=be,Ae=(fe,ye)=>{for(var be in ye||(ye={}))lt.call(ye,be)&&jt(fe,be,ye[be]);if(Ue)for(var be of Ue(ye))yt.call(ye,be)&&jt(fe,be,ye[be]);return fe},ne=(fe,ye)=>kt(fe,bt(ye)),ee=(fe,ye,be)=>new Promise((Te,Be)=>{var ze=Je=>{try{nt(be.next(Je))}catch(xt){Be(xt)}},Ge=Je=>{try{nt(be.throw(Je))}catch(xt){Be(xt)}},nt=Je=>Je.done?Te(Je.value):Promise.resolve(Je.value).then(ze,Ge);nt((be=be.apply(fe,ye)).next())}),se=({value:fe,onChange:ye,scrollId:be})=>{const[Te,Be]=(0,ge.useState)([]);(0,ge.useEffect)(()=>{ze()},[]);const ze=()=>ee(void 0,null,function*(){const Et=yield(0,st.NZ)({});if(Et!=null&&Et.data){const tt=[{title:"\u6839\u76EE\u5F55",value:0,key:0,icon:ge.createElement("img",{src:dt,className:Ve.folderIcon}),isLeaf:!1,children:Ge(Et.data||[])}];Be(tt)}}),Ge=Et=>Et.map(tt=>({title:tt.name,key:tt.group_id,icon:ge.createElement("img",{src:dt,className:Ve.folderIcon}),isLeaf:tt.children.length===0,children:Ge(tt.children)})),nt=(Et,tt,Ot)=>Et.map(gt=>gt.key===tt?Ae(Ae({},gt),Ot):gt.children?ne(Ae({},gt),{children:nt(gt.children,tt,Ot)}):gt),Je=(Et,tt,Ot)=>Et.map(gt=>{if(gt.key===tt)return ne(Ae({},gt),{icon:Ot?ge.createElement("img",{src:Ke,className:Ve.folderIcon}):ge.createElement("img",{src:dt,className:Ve.folderIcon})});if(gt.children)return ne(Ae({},gt),{children:Je(gt.children,tt,Ot)})}),xt=(Et,tt)=>{Be(Ot=>Je(Ot,tt.node.key,tt.expanded))},He=fe?{selectedKeys:fe,defaultExpandedKeys:fe}:{};return Te.length>0&&ge.createElement("div",{id:be||""},ge.createElement(Re.default,Ae({showLine:{showLeafIcon:!1},showIcon:!0,treeData:Te,className:Ve.folderWrapper,onSelect:ye,onExpand:xt},He)))}},32570:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return st}});var ge=pe(60324),Re={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},Ve=pe(32637),dt=pe(59301),st=({type:Me,style:kt})=>{const bt=dt.createElement("div",{className:Re.wrap,onClick:Ue=>{Ue.preventDefault(),Ue.stopPropagation()}},dt.createElement("p",null,Me==="shixun"||Me==="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",dt.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Me==="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"),dt.createElement("div",{className:Re.contact},dt.createElement("div",{className:Re.img},dt.createElement("img",{src:Ve,width:"124px",height:"124px"})),dt.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return dt.createElement(ge.Z,{content:bt},dt.createElement("span",{className:Re.text,style:kt},"\u9AD8\u6D88\u8017"))}},16406:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return et}});var ge=pe(59301),Re={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ve=pe(92310),dt=pe.n(Ve),Ke=pe(71418);var st=function(Oe,Pe){return(st=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,Fe){ve.__proto__=Fe}||function(ve,Fe){for(var We in Fe)Object.prototype.hasOwnProperty.call(Fe,We)&&(ve[We]=Fe[We])})(Oe,Pe)};function Me(Oe,Pe){function ve(){this.constructor=Oe}st(Oe,Pe),Oe.prototype=Pe===null?Object.create(Pe):(ve.prototype=Pe.prototype,new ve)}function kt(Oe,Pe,ve,Fe){return new(ve||(ve=Promise))(function(We,Ne){function ft(Pt){try{un(Fe.next(Pt))}catch(qt){Ne(qt)}}function sn(Pt){try{un(Fe.throw(Pt))}catch(qt){Ne(qt)}}function un(Pt){var qt;Pt.done?We(Pt.value):(qt=Pt.value,qt instanceof ve?qt:new ve(function(Mn){Mn(qt)})).then(ft,sn)}un((Fe=Fe.apply(Oe,Pe||[])).next())})}function bt(Oe,Pe){var ve,Fe,We,Ne,ft={label:0,sent:function(){if(1&We[0])throw We[1];return We[1]},trys:[],ops:[]};return Ne={next:sn(0),throw:sn(1),return:sn(2)},typeof Symbol=="function"&&(Ne[Symbol.iterator]=function(){return this}),Ne;function sn(un){return function(Pt){return function(qt){if(ve)throw new TypeError("Generator is already executing.");for(;ft;)try{if(ve=1,Fe&&(We=2&qt[0]?Fe.return:qt[0]?Fe.throw||((We=Fe.return)&&We.call(Fe),0):Fe.next)&&!(We=We.call(Fe,qt[1])).done)return We;switch(Fe=0,We&&(qt=[2&qt[0],We.value]),qt[0]){case 0:case 1:We=qt;break;case 4:return ft.label++,{value:qt[1],done:!1};case 5:ft.label++,Fe=qt[1],qt=[0];continue;case 7:qt=ft.ops.pop(),ft.trys.pop();continue;default:if(We=ft.trys,!((We=We.length>0&&We[We.length-1])||qt[0]!==6&&qt[0]!==2)){ft=0;continue}if(qt[0]===3&&(!We||qt[1]>We[0]&&qt[1]<We[3])){ft.label=qt[1];break}if(qt[0]===6&&ft.label<We[1]){ft.label=We[1],We=qt;break}if(We&&ft.label<We[2]){ft.label=We[2],ft.ops.push(qt);break}We[2]&&ft.ops.pop(),ft.trys.pop();continue}qt=Pe.call(Oe,ft)}catch(Mn){qt=[6,Mn],Fe=0}finally{ve=We=0}if(5&qt[0])throw qt[1];return{value:qt[0]?qt[1]:void 0,done:!0}}([un,Pt])}}}function Ue(){for(var Oe=0,Pe=0,ve=arguments.length;Pe<ve;Pe++)Oe+=arguments[Pe].length;var Fe=Array(Oe),We=0;for(Pe=0;Pe<ve;Pe++)for(var Ne=arguments[Pe],ft=0,sn=Ne.length;ft<sn;ft++,We++)Fe[We]=Ne[ft];return Fe}var lt=function(){function Oe(){}return Oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Oe.setAttributes=function(Pe,ve){for(var Fe=0,We=ve;Fe<We.length;Fe++){var Ne=We[Fe],ft=Ne[0],sn=Ne[1];Pe.setAttribute(ft,sn)}},Oe.createRect=function(Pe,ve,Fe){var We=document.createElementNS("http://www.w3.org/2000/svg","rect");return We.setAttribute("width",Pe.toString()),We.setAttribute("height",ve.toString()),Fe&&Oe.setAttributes(We,Fe),We},Oe.createLine=function(Pe,ve,Fe,We,Ne){var ft=document.createElementNS("http://www.w3.org/2000/svg","line");return ft.setAttribute("x1",Pe.toString()),ft.setAttribute("y1",ve.toString()),ft.setAttribute("x2",Fe.toString()),ft.setAttribute("y2",We.toString()),Ne&&Oe.setAttributes(ft,Ne),ft},Oe.createPolygon=function(Pe,ve){var Fe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Fe.setAttribute("points",Pe),ve&&Oe.setAttributes(Fe,ve),Fe},Oe.createCircle=function(Pe,ve){var Fe=document.createElementNS("http://www.w3.org/2000/svg","circle");return Fe.setAttribute("cx",(Pe/2).toString()),Fe.setAttribute("cy",(Pe/2).toString()),Fe.setAttribute("r",Pe.toString()),ve&&Oe.setAttributes(Fe,ve),Fe},Oe.createEllipse=function(Pe,ve,Fe){var We=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return We.setAttribute("cx",(Pe/2).toString()),We.setAttribute("cy",(ve/2).toString()),We.setAttribute("rx",(Pe/2).toString()),We.setAttribute("ry",(ve/2).toString()),Fe&&Oe.setAttributes(We,Fe),We},Oe.createGroup=function(Pe){var ve=document.createElementNS("http://www.w3.org/2000/svg","g");return Pe&&Oe.setAttributes(ve,Pe),ve},Oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Oe.createMarker=function(Pe,ve,Fe,We,Ne,ft,sn){var un=document.createElementNS("http://www.w3.org/2000/svg","marker");return Oe.setAttributes(un,[["id",Pe],["orient",ve],["markerWidth",Fe.toString()],["markerHeight",We.toString()],["refX",Ne.toString()],["refY",ft.toString()]]),un.appendChild(sn),un},Oe.createText=function(Pe){var ve=document.createElementNS("http://www.w3.org/2000/svg","text");return ve.setAttribute("x","0"),ve.setAttribute("y","0"),Pe&&Oe.setAttributes(ve,Pe),ve},Oe.createTSpan=function(Pe,ve){var Fe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Fe.textContent=Pe,ve&&Oe.setAttributes(Fe,ve),Fe},Oe.createImage=function(Pe){var ve=document.createElementNS("http://www.w3.org/2000/svg","image");return Pe&&Oe.setAttributes(ve,Pe),ve},Oe.createPoint=function(Pe,ve){var Fe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Fe.x=Pe,Fe.y=ve,Fe},Oe.createPath=function(Pe,ve){var Fe=document.createElementNS("http://www.w3.org/2000/svg","path");return Fe.setAttribute("d",Pe),ve&&Oe.setAttributes(Fe,ve),Fe},Oe}(),yt=function(){function Oe(){}return Oe.addKey=function(Pe){Oe.key=Pe},Object.defineProperty(Oe,"isLicensed",{get:function(){return!!Oe.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Oe.key)},enumerable:!1,configurable:!0}),Oe}(),jt=function(){function Oe(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Oe.prototype.rasterize=function(Pe,ve,Fe){var We=this;return new Promise(function(Ne){var ft=Fe!==void 0?Fe:document.createElement("canvas");Pe===null&&(We.markersOnly=!0,We.naturalSize=!1);var sn=document.createElementNS("http://www.w3.org/2000/svg","svg");sn.setAttribute("xmlns","http://www.w3.org/2000/svg"),sn.setAttribute("width",ve.width.baseVal.valueAsString),sn.setAttribute("height",ve.height.baseVal.valueAsString),sn.setAttribute("viewBox","0 0 "+ve.viewBox.baseVal.width.toString()+" "+ve.viewBox.baseVal.height.toString()),sn.innerHTML=ve.innerHTML,We.naturalSize===!0?(sn.width.baseVal.value=Pe.naturalWidth,sn.height.baseVal.value=Pe.naturalHeight):We.width!==void 0&&We.height!==void 0&&(sn.width.baseVal.value=We.width,sn.height.baseVal.value=We.height),ft.width=sn.width.baseVal.value,ft.height=sn.height.baseVal.value;var un=sn.outerHTML,Pt=ft.getContext("2d");We.markersOnly!==!0&&Pt.drawImage(Pe,0,0,ft.width,ft.height);var qt=window.URL,Mn=new Image(ft.width,ft.height);Mn.setAttribute("crossOrigin","anonymous");var hn=new Blob([un],{type:"image/svg+xml"}),fn=qt.createObjectURL(hn);Mn.onload=function(){Pt.drawImage(Mn,0,0),qt.revokeObjectURL(fn);var ui=ft.toDataURL(We.imageType,We.imageQuality);Ne(ui)},Mn.src=fn})},Oe}(),Ae=function(){},ne=function(){function Oe(Pe){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Pe+"_"}return Object.defineProperty(Oe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.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(Oe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Oe.prototype.addClass=function(Pe){return this.styleSheet===void 0&&this.addStyleSheet(),Pe.name=""+this.classNamePrefix+Pe.localName,this.classes.push(Pe),this.styleSheet.sheet.insertRule("."+Pe.name+" {"+Pe.style+"}",this.styleSheet.sheet.cssRules.length),Pe},Oe.prototype.addRule=function(Pe){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Pe),this.styleSheet.sheet.insertRule(Pe.selector+" {"+Pe.style+"}",this.styleSheet.sheet.cssRules.length)},Oe.prototype.addStyleSheet=function(){var Pe;this.styleSheet=document.createElement("style"),((Pe=this.styleSheetRoot)!==null&&Pe!==void 0?Pe:document.head).appendChild(this.styleSheet),this.addRule(new ee("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new ce("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new ce("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Oe.prototype.removeStyleSheet=function(){var Pe;this.styleSheet&&(((Pe=this.styleSheetRoot)!==null&&Pe!==void 0?Pe:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Oe}(),ee=function(Oe,Pe){this.selector=Oe,this.style=Pe},ce=function(Oe,Pe){this.localName=Oe,this.style=Pe},se=function(){function Oe(Pe,ve,Fe,We,Ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Pe,this.displayMode=ve,this.markerItems=Fe,this.uiStyleSettings=We,this.styles=Ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Oe.prototype.show=function(Pe){var ve=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Pe,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Fe=document.createElement("div");Fe.className=this.toolbarBlockStyleClass.name,Fe.style.whiteSpace="nowrap",this.uiContainer.appendChild(Fe),this.addActionButton(Fe,'<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(Fe,'<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(Fe,'<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(Fe,'<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(Fe,'<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(Fe,'<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(Fe,'<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(Fe,'<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(Ne){var ft=document.createElement("div");ft.className=""+ve.toolbarButtonStyleClass.name,ft.setAttribute("data-type-name",Ne.typeName),ft.innerHTML=Ne.icon,ft.addEventListener("click",function(){ve.markerToolbarButtonClicked(ft,Ne)}),ve.buttons.push(ft),ve.markerButtons.push(ft)}),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 We=document.createElement("div");We.className=this.toolbarBlockStyleClass.name,We.style.whiteSpace="nowrap",We.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(We),this.addActionButton(We,'<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(We,'<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()},Oe.prototype.addButtonClickListener=function(Pe){this.buttonClickListeners.push(Pe)},Oe.prototype.removeButtonClickListener=function(Pe){this.buttonClickListeners.indexOf(Pe)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Pe),1)},Oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Pe=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var ve=0;ve<this.markerButtons.length;ve++)ve<Pe||ve===Pe&&this.markerButtons.length-1===Pe?this.markerButtonBlock.appendChild(this.markerButtons[ve]):(ve===Pe&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ve]))}},Oe.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")},Oe.prototype.resetButtonStyles=function(){var Pe=this;this.buttons.forEach(function(ve){ve.className=ve.className.replace(Pe.uiStyleSettings.toolbarButtonStyleColorsClassName?Pe.uiStyleSettings.toolbarButtonStyleColorsClassName:Pe.toolbarButtonStyleColorsClass.name,"").trim(),ve.className=ve.className.replace(Pe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Pe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Pe.toolbarActiveButtonStyleColorsClass.name,"").trim(),ve.className+=" "+(Pe.uiStyleSettings.toolbarButtonStyleColorsClassName?Pe.uiStyleSettings.toolbarButtonStyleColorsClassName:Pe.toolbarButtonStyleColorsClass.name)})},Oe.prototype.addActionButton=function(Pe,ve,Fe){var We=this,Ne=document.createElement("div");switch(Ne.className=""+this.toolbarButtonStyleClass.name,Ne.innerHTML=ve,Ne.setAttribute("data-action",Fe),Ne.addEventListener("click",function(){We.actionToolbarButtonClicked(Ne,Fe)}),Fe){case"select":Ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ne.style.fill=this.uiStyleSettings.closeButtonColor}Pe.appendChild(Ne),this.buttons.push(Ne)},Oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ce("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 ce("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ce("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ce("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 ce("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var Pe=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ce("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
|
|
|
padding: `+Pe+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ce("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ce("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Oe.prototype.markerToolbarButtonClicked=function(Pe,ve){this.setActiveButton(Pe),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Fe){return Fe("marker",ve)}),this.markerButtonOverflowBlock.style.display="none"},Oe.prototype.actionToolbarButtonClicked=function(Pe,ve){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Fe){return Fe("action",ve)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Oe.prototype.setActiveButton=function(Pe){this.resetButtonStyles(),Pe.className=Pe.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Pe.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Oe.prototype.setActiveMarkerButton=function(Pe){var ve=this.markerButtons.find(function(Fe){return Fe.getAttribute("data-type-name")===Pe});ve&&this.setActiveButton(ve)},Oe.prototype.setCurrentMarker=function(Pe){var ve=this;this.currentMarker=Pe,this.buttons.filter(function(Fe){return/delete|notes/.test(Fe.getAttribute("data-action"))}).forEach(function(Fe){ve.currentMarker===void 0?(Fe.style.fillOpacity="0.4",Fe.style.pointerEvents="none"):(Fe.style.fillOpacity="1",Fe.style.pointerEvents="all")})},Oe}(),fe=function(){function Oe(Pe,ve,Fe,We){this.panels=[],this.panelButtons=[],this.markerjsContainer=Pe,this.displayMode=ve,this.uiStyleSettings=Fe,this.styles=We,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Oe.prototype.addStyles=function(){var Pe;this.toolboxStyleClass=this.styles.addClass(new ce("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 ce("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var ve=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ce("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ce("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ce("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 ce("toolbox-panel-row_colors",`
|
|
|
background-color: `+((Pe=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Pe!==void 0?Pe:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ce("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ve)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ve)+`px;
|
|
|
padding: `+ve+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ce("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ce("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Oe.prototype.show=function(Pe){var ve;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Pe,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ve=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ve!==void 0?ve:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Oe.prototype.setPanelButtons=function(Pe){var ve,Fe,We=this;this.panels=Pe,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ve=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ve!==void 0?ve:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Fe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Fe!==void 0?Fe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ne){var ft;Ne.uiStyleSettings=We.uiStyleSettings;var sn=document.createElement("div");sn.className=We.toolboxButtonStyleClass.name+" "+((ft=We.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ft!==void 0?ft:We.toolboxButtonStyleColorsClass.name),sn.innerHTML=Ne.icon,sn.title=Ne.title,sn.addEventListener("click",function(){We.panelButtonClick(Ne)}),We.panelButtons.push(sn),We.buttonRow.appendChild(sn)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Oe.prototype.panelButtonClick=function(Pe){var ve=this,Fe=-1;if(Pe!==this.activePanel){Fe=this.panels.indexOf(Pe),this.panelRow.innerHTML="";var We=Pe.getUi();We.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(We),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=Pe}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ve.displayMode==="inline"?ve.panelRow.style.display="none":ve.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ne,ft){var sn,un;Ne.className=ve.toolboxButtonStyleClass.name+" "+(ft===Fe?""+((sn=ve.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&sn!==void 0?sn:ve.toolboxActiveButtonStyleColorsClass.name):""+((un=ve.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&un!==void 0?un:ve.toolboxButtonStyleColorsClass.name))})},Oe}(),ye=function(Oe,Pe){this.title=Oe,this.icon=Pe},be=function(Oe){function Pe(ve,Fe,We,Ne){var ft=Oe.call(this,ve,Ne||'<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 ft.colors=[],ft.addTransparent=!1,ft.colorBoxes=[],ft.colors=Fe,ft.currentColor=We,ft.setCurrentColor=ft.setCurrentColor.bind(ft),ft.getColorBox=ft.getColorBox.bind(ft),ft}return Me(Pe,Oe),Pe.prototype.getUi=function(){var ve=this,Fe=document.createElement("div");return Fe.style.overflow="hidden",Fe.style.whiteSpace="nowrap",this.colors.forEach(function(We){var Ne=ve.getColorBox(We);Fe.appendChild(Ne),ve.colorBoxes.push(Ne)}),Fe},Pe.prototype.getColorBox=function(ve){var Fe=this,We=this.uiStyleSettings.toolbarHeight/4,Ne=this.uiStyleSettings.toolbarHeight-We,ft=document.createElement("div");ft.style.display="inline-block",ft.style.boxSizing="content-box",ft.style.width=Ne-2+"px",ft.style.height=Ne-2+"px",ft.style.padding="1px",ft.style.marginRight="2px",ft.style.marginBottom="2px",ft.style.borderWidth="2px",ft.style.borderStyle="solid",ft.style.borderRadius=(Ne+2)/2+"px",ft.style.borderColor=ve===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ft.addEventListener("click",function(){Fe.setCurrentColor(ve,ft)});var sn=document.createElement("div");return sn.style.display="inline-block",sn.style.width=Ne-2+"px",sn.style.height=Ne-2+"px",sn.style.backgroundColor=ve,sn.style.borderRadius=Ne/2+"px",ve==="transparent"&&(sn.style.fill=this.uiStyleSettings.toolboxAccentColor,sn.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>`),ft.appendChild(sn),ft},Pe.prototype.setCurrentColor=function(ve,Fe){var We=this;this.currentColor=ve,this.colorBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Fe?We.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ve)},Pe}(ye),Te=function(){function Oe(Pe,ve,Fe){this._state="new",this._isSelected=!1,this._container=Pe,this._overlayContainer=ve,this.globalSettings=Fe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Oe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Oe.prototype.ownsTarget=function(Pe){return!1},Object.defineProperty(Oe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Oe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Oe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Oe.prototype.pointerDown=function(Pe,ve){},Oe.prototype.dblClick=function(Pe,ve){},Oe.prototype.manipulate=function(Pe){},Oe.prototype.pointerUp=function(Pe){this.stateChanged()},Oe.prototype.dispose=function(){},Oe.prototype.addMarkerVisualToContainer=function(Pe){this.container.childNodes.length>0?this.container.insertBefore(Pe,this.container.childNodes[0]):this.container.appendChild(Pe)},Oe.prototype.getState=function(){return{typeName:Oe.typeName,state:this.state,notes:this.notes}},Oe.prototype.restoreState=function(Pe){this._state=Pe.state,this.notes=Pe.notes},Oe.prototype.scale=function(Pe,ve){},Oe.prototype.colorChanged=function(Pe){this.onColorChanged&&this.onColorChanged(Pe),this.stateChanged()},Oe.prototype.fillColorChanged=function(Pe){this.onFillColorChanged&&this.onFillColorChanged(Pe),this.stateChanged()},Oe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Pe=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Pe.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Pe)&&this.onStateChanged(this)}},Oe.typeName="MarkerBase",Oe}(),Be=function(){function Oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Oe.prototype.findGripByVisual=function(Pe){return this.topLeft.ownsTarget(Pe)?this.topLeft:this.topCenter.ownsTarget(Pe)?this.topCenter:this.topRight.ownsTarget(Pe)?this.topRight:this.centerLeft.ownsTarget(Pe)?this.centerLeft:this.centerRight.ownsTarget(Pe)?this.centerRight:this.bottomLeft.ownsTarget(Pe)?this.bottomLeft:this.bottomCenter.ownsTarget(Pe)?this.bottomCenter:this.bottomRight.ownsTarget(Pe)?this.bottomRight:void 0},Oe}(),ze=function(){function Oe(){this.GRIP_SIZE=10,this.visual=lt.createGroup(),this.visual.appendChild(lt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(lt.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Oe.prototype.ownsTarget=function(Pe){return Pe===this.visual||Pe===this.visual.childNodes[0]||Pe===this.visual.childNodes[1]},Oe}(),Ge=function(){function Oe(){}return Oe.toITransformMatrix=function(Pe){return{a:Pe.a,b:Pe.b,c:Pe.c,d:Pe.d,e:Pe.e,f:Pe.f}},Oe.toSVGMatrix=function(Pe,ve){return Pe.a=ve.a,Pe.b=ve.b,Pe.c=ve.c,Pe.d=ve.d,Pe.e=ve.e,Pe.f=ve.f,Pe},Oe}(),nt=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.left=0,Ne.top=0,Ne.width=0,Ne.height=0,Ne.defaultSize={x:50,y:20},Ne.offsetX=0,Ne.offsetY=0,Ne.rotationAngle=0,Ne.CB_DISTANCE=10,Ne._suppressMarkerCreateEvent=!1,Ne.container.transform.baseVal.appendItem(lt.createTransform()),Ne.setupControlBox(),Ne}return Me(Pe,Oe),Object.defineProperty(Pe.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"visual",{get:function(){return this._visual},set:function(ve){this._visual=ve;var Fe=lt.createTransform();this._visual.transform.baseVal.appendItem(Fe)},enumerable:!1,configurable:!0}),Pe.prototype.ownsTarget=function(ve){return!!Oe.prototype.ownsTarget.call(this,ve)||!!(this.controlGrips.findGripByVisual(ve)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ve))},Pe.prototype.pointerDown=function(ve,Fe){Oe.prototype.pointerDown.call(this,ve,Fe),this.state==="new"&&(this.left=ve.x,this.top=ve.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var We=this.unrotatePoint(ve);if(this.manipulationStartX=We.x,this.manipulationStartY=We.y,this.offsetX=We.x-this.left,this.offsetY=We.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Fe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Fe)){this.activeGrip=this.rotatorGrip;var Ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ne.x-this.width/2,this.top=Ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ft=this.container.transform.baseVal.getItem(0);ft.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ft,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Pe.prototype.pointerUp=function(ve){var Fe=this.state;Oe.prototype.pointerUp.call(this,ve),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ve),this._state="select",Fe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Pe.prototype.moveVisual=function(ve){this.visual.style.transform="translate("+ve.x+"px, "+ve.y+"px)"},Pe.prototype.manipulate=function(ve){var Fe=this.unrotatePoint(ve);this.state==="creating"?this.resize(ve):this.state==="move"?(this.left=this.manipulationStartLeft+(Fe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Fe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Fe):this.state==="rotate"&&this.rotate(ve)},Pe.prototype.resize=function(ve){var Fe=this.manipulationStartLeft,We=this.manipulationStartWidth,Ne=this.manipulationStartTop,ft=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Fe=this.manipulationStartLeft+ve.x-this.manipulationStartX,We=this.manipulationStartWidth+this.manipulationStartLeft-Fe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:We=this.manipulationStartWidth+ve.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ne=this.manipulationStartTop+ve.y-this.manipulationStartY,ft=this.manipulationStartHeight+this.manipulationStartTop-Ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ft=this.manipulationStartHeight+ve.y-this.manipulationStartY}We>=0?(this.left=Fe,this.width=We):(this.left=Fe+We,this.width=-We),ft>=0?(this.top=Ne,this.height=ft):(this.top=Ne+ft,this.height=-ft),this.setSize()},Pe.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Pe.prototype.rotate=function(ve){if(Math.abs(ve.x-this.centerX)>.1){var Fe=Math.sign(ve.x-this.centerX);this.rotationAngle=180*Math.atan((ve.y-this.centerY)/(ve.x-this.centerX))/Math.PI+90*Fe,this.applyRotation()}},Pe.prototype.applyRotation=function(){var ve=this.container.transform.baseVal.getItem(0);ve.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ve,0)},Pe.prototype.rotatePoint=function(ve){if(this.rotationAngle===0)return ve;var Fe=this.container.getCTM(),We=lt.createPoint(ve.x,ve.y);return{x:(We=We.matrixTransform(Fe)).x,y:We.y}},Pe.prototype.unrotatePoint=function(ve){if(this.rotationAngle===0)return ve;var Fe=this.container.getCTM();Fe=Fe.inverse();var We=lt.createPoint(ve.x,ve.y);return{x:(We=We.matrixTransform(Fe)).x,y:We.y}},Pe.prototype.select=function(){Oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Pe.prototype.deselect=function(){Oe.prototype.deselect.call(this),this.controlBox.style.display="none"},Pe.prototype.setupControlBox=function(){this.controlBox=lt.createGroup();var ve=lt.createTransform();ve.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ve),this.container.appendChild(this.controlBox),this.controlRect=lt.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=lt.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 Be,this.addControlGrips(),this.controlBox.style.display="none"},Pe.prototype.adjustControlBox=function(){var ve=this.controlBox.transform.baseVal.getItem(0);ve.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ve,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()},Pe.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()},Pe.prototype.createGrip=function(){var ve=new ze;return ve.visual.transform.baseVal.appendItem(lt.createTransform()),this.controlBox.appendChild(ve.visual),ve},Pe.prototype.positionGrips=function(){var ve=this.controlGrips.topLeft.GRIP_SIZE,Fe=-ve/2,We=Fe,Ne=(this.width+this.CB_DISTANCE)/2-ve/2,ft=(this.height+this.CB_DISTANCE)/2-ve/2,sn=this.height+this.CB_DISTANCE-ve/2,un=this.width+this.CB_DISTANCE-ve/2;this.positionGrip(this.controlGrips.topLeft.visual,Fe,We),this.positionGrip(this.controlGrips.topCenter.visual,Ne,We),this.positionGrip(this.controlGrips.topRight.visual,un,We),this.positionGrip(this.controlGrips.centerLeft.visual,Fe,ft),this.positionGrip(this.controlGrips.centerRight.visual,un,ft),this.positionGrip(this.controlGrips.bottomLeft.visual,Fe,sn),this.positionGrip(this.controlGrips.bottomCenter.visual,Ne,sn),this.positionGrip(this.controlGrips.bottomRight.visual,un,sn),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ne,We-3*this.CB_DISTANCE)},Pe.prototype.positionGrip=function(ve,Fe,We){var Ne=ve.transform.baseVal.getItem(0);Ne.setTranslate(Fe,We),ve.transform.baseVal.replaceItem(Ne,0)},Pe.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Pe.prototype.showControlBox=function(){this.controlBox.style.display=""},Pe.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ge.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ge.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Oe.prototype.getState.call(this))},Pe.prototype.restoreState=function(ve){Oe.prototype.restoreState.call(this,ve);var Fe=ve;this.left=Fe.left,this.top=Fe.top,this.width=Fe.width,this.height=Fe.height,this.rotationAngle=Fe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ge.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Fe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ge.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Fe.containerTransformMatrix))},Pe.prototype.scale=function(ve,Fe){Oe.prototype.scale.call(this,ve,Fe);var We=this.rotatePoint({x:this.left,y:this.top}),Ne=this.unrotatePoint({x:We.x*ve,y:We.y*Fe});this.left=Ne.x,this.top=Ne.y,this.width=this.width*ve,this.height=this.height*Fe,this.adjustControlBox()},Pe}(Te),Je=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.fillColor="transparent",Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.opacity=1,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setFillColor=Ne.setFillColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.createVisual=Ne.createVisual.bind(Ne),Ne}return Me(Pe,Oe),Pe.prototype.ownsTarget=function(ve){return!(!Oe.prototype.ownsTarget.call(this,ve)&&ve!==this.visual)},Pe.prototype.createVisual=function(){this.visual=lt.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)},Pe.prototype.pointerDown=function(ve,Fe){Oe.prototype.pointerDown.call(this,ve,Fe),this.state==="new"&&(this.createVisual(),this.moveVisual(ve),this._state="creating")},Pe.prototype.manipulate=function(ve){Oe.prototype.manipulate.call(this,ve)},Pe.prototype.resize=function(ve){Oe.prototype.resize.call(this,ve),this.setSize()},Pe.prototype.setSize=function(){Oe.prototype.setSize.call(this),lt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Pe.prototype.pointerUp=function(ve){Oe.prototype.pointerUp.call(this,ve),this.setSize()},Pe.prototype.setStrokeColor=function(ve){this.strokeColor=ve,this.visual&<.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ve),this.stateChanged()},Pe.prototype.setFillColor=function(ve){this.fillColor=ve,this.visual&<.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Pe.prototype.setStrokeWidth=function(ve){this.strokeWidth=ve,this.visual&<.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pe.prototype.setStrokeDasharray=function(ve){this.strokeDasharray=ve,this.visual&<.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Pe.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Oe.prototype.getState.call(this))},Pe.prototype.restoreState=function(ve){var Fe=ve;this.fillColor=Fe.fillColor,this.strokeColor=Fe.strokeColor,this.strokeWidth=Fe.strokeWidth,this.strokeDasharray=Fe.strokeDasharray,this.opacity=Fe.opacity,this.createVisual(),Oe.prototype.restoreState.call(this,ve),this.setSize()},Pe.prototype.scale=function(ve,Fe){Oe.prototype.scale.call(this,ve,Fe),this.setSize()},Pe.title="Rectangle marker",Pe}(nt),xt=function(Oe){function Pe(ve,Fe,We,Ne){var ft=Oe.call(this,ve,Ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ft.widths=[],ft.widthBoxes=[],ft.widths=Fe,ft.currentWidth=We,ft.setCurrentWidth=ft.setCurrentWidth.bind(ft),ft}return Me(Pe,Oe),Pe.prototype.getUi=function(){var ve=this,Fe=document.createElement("div");return Fe.style.display="flex",Fe.style.overflow="hidden",Fe.style.flexGrow="2",this.widths.forEach(function(We){var Ne=document.createElement("div");Ne.style.display="flex",Ne.style.flexGrow="2",Ne.style.alignItems="center",Ne.style.justifyContent="space-between",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.borderColor=We===ve.currentWidth?ve.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){ve.setCurrentWidth(We,Ne)}),Fe.appendChild(Ne);var ft=document.createElement("div");ft.innerText=We.toString(),ft.style.marginRight="5px",Ne.appendChild(ft);var sn=document.createElement("div");sn.style.minHeight="20px",sn.style.flexGrow="2",sn.style.display="flex",sn.style.alignItems="center";var un=document.createElement("hr");un.style.minWidth="20px",un.style.border="0px",un.style.borderTop=We+"px solid "+ve.uiStyleSettings.toolboxColor,un.style.flexGrow="2",sn.appendChild(un),Ne.appendChild(sn),ve.widthBoxes.push(Ne)}),Fe},Pe.prototype.setCurrentWidth=function(ve,Fe){var We=this;this.currentWidth=ve,this.widthBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Fe?We.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Pe}(ye),He=function(Oe){function Pe(ve,Fe,We,Ne){var ft=Oe.call(this,ve,Ne||'<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 ft.styles=[],ft.styleBoxes=[],ft.styles=Fe,ft.currentStyle=We,ft.setCurrentStyle=ft.setCurrentStyle.bind(ft),ft}return Me(Pe,Oe),Pe.prototype.getUi=function(){var ve=this,Fe=document.createElement("div");return Fe.style.display="flex",Fe.style.overflow="hidden",Fe.style.flexGrow="2",this.styles.forEach(function(We){var Ne=document.createElement("div");Ne.style.display="flex",Ne.style.alignItems="center",Ne.style.justifyContent="space-between",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.overflow="hidden",Ne.style.maxWidth=100/ve.styles.length-5+"%",Ne.style.borderColor=We===ve.currentStyle?ve.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){ve.setCurrentStyle(We,Ne)}),Fe.appendChild(Ne);var ft=document.createElement("div");ft.style.minHeight="20px",ft.style.flexGrow="2",ft.style.overflow="hidden";var sn=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ve.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(We!==""?'stroke-dasharray="'+We+'"':"")+` />
|
|
|
</svg>`;ft.innerHTML=sn,Ne.appendChild(ft),ve.styleBoxes.push(Ne)}),Fe},Pe.prototype.setCurrentStyle=function(ve,Fe){var We=this;this.currentStyle=ve,this.styleBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Fe?We.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Pe}(ye),Et=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.strokeColor=We.defaultColor,Ne.strokeWidth=We.defaultStrokeWidth,Ne.strokeDasharray=We.defaultStrokeDasharray,Ne.strokePanel=new be("Line color",We.defaultColorSet,We.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.strokeWidthPanel=new xt("Line width",We.defaultStrokeWidths,We.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new He("Line style",We.defaultStrokeDasharrays,We.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne}return Me(Pe,Oe),Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=Oe.prototype.getState.call(this);return ve.typeName=Pe.typeName,ve},Pe.typeName="FrameMarker",Pe.title="Frame marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Pe}(Je),tt=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"},Ot=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.x1=0,Ne.y1=0,Ne.x2=0,Ne.y2=0,Ne.defaultLength=50,Ne.manipulationStartX=0,Ne.manipulationStartY=0,Ne.manipulationStartX1=0,Ne.manipulationStartY1=0,Ne.manipulationStartX2=0,Ne.manipulationStartY2=0,Ne.setupControlBox(),Ne}return Me(Pe,Oe),Pe.prototype.ownsTarget=function(ve){return!!Oe.prototype.ownsTarget.call(this,ve)||!(!this.grip1.ownsTarget(ve)&&!this.grip2.ownsTarget(ve))},Pe.prototype.pointerDown=function(ve,Fe){Oe.prototype.pointerDown.call(this,ve,Fe),this.manipulationStartX=ve.x,this.manipulationStartY=ve.y,this.state==="new"&&(this.x1=ve.x,this.y1=ve.y,this.x2=ve.x,this.y2=ve.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(Fe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Fe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Pe.prototype.pointerUp=function(ve){var Fe=this.state;Oe.prototype.pointerUp.call(this,ve),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(ve),this._state="select",Fe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Pe.prototype.adjustVisual=function(){},Pe.prototype.manipulate=function(ve){this.state==="creating"?this.resize(ve):this.state==="move"?(this.x1=this.manipulationStartX1+ve.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ve.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ve.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ve.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ve)},Pe.prototype.resize=function(ve){switch(this.activeGrip){case this.grip1:this.x1=ve.x,this.y1=ve.y;break;case this.grip2:case void 0:this.x2=ve.x,this.y2=ve.y}this.adjustVisual(),this.adjustControlBox()},Pe.prototype.select=function(){Oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Pe.prototype.deselect=function(){Oe.prototype.deselect.call(this),this.controlBox.style.display="none"},Pe.prototype.setupControlBox=function(){this.controlBox=lt.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Pe.prototype.adjustControlBox=function(){this.positionGrips()},Pe.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Pe.prototype.createGrip=function(){var ve=new ze;return ve.visual.transform.baseVal.appendItem(lt.createTransform()),this.controlBox.appendChild(ve.visual),ve},Pe.prototype.positionGrips=function(){var ve=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ve/2,this.y1-ve/2),this.positionGrip(this.grip2.visual,this.x2-ve/2,this.y2-ve/2)},Pe.prototype.positionGrip=function(ve,Fe,We){var Ne=ve.transform.baseVal.getItem(0);Ne.setTranslate(Fe,We),ve.transform.baseVal.replaceItem(Ne,0)},Pe.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Oe.prototype.getState.call(this))},Pe.prototype.restoreState=function(ve){Oe.prototype.restoreState.call(this,ve);var Fe=ve;this.x1=Fe.x1,this.y1=Fe.y1,this.x2=Fe.x2,this.y2=Fe.y2},Pe.prototype.scale=function(ve,Fe){Oe.prototype.scale.call(this,ve,Fe),this.x1=this.x1*ve,this.y1=this.y1*Fe,this.x2=this.x2*ve,this.y2=this.y2*Fe,this.adjustVisual(),this.adjustControlBox()},Pe}(Te),gt=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.strokeColor=We.defaultColor,Ne.strokeWidth=We.defaultStrokeWidth,Ne.strokeDasharray=We.defaultStrokeDasharray,Ne.strokePanel=new be("Line color",We.defaultColorSet,We.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.strokeWidthPanel=new xt("Line width",We.defaultStrokeWidths,We.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new He("Line style",We.defaultStrokeDasharrays,We.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne}return Me(Pe,Oe),Pe.prototype.ownsTarget=function(ve){return!(!Oe.prototype.ownsTarget.call(this,ve)&&ve!==this.visual&&ve!==this.selectorLine&&ve!==this.visibleLine)},Pe.prototype.createVisual=function(){this.visual=lt.createGroup(),this.selectorLine=lt.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=lt.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)},Pe.prototype.pointerDown=function(ve,Fe){Oe.prototype.pointerDown.call(this,ve,Fe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Pe.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()),lt.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),lt.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),lt.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Pe.prototype.setStrokeColor=function(ve){this.strokeColor=ve,this.adjustVisual(),this.colorChanged(ve)},Pe.prototype.setStrokeWidth=function(ve){this.strokeWidth=ve,this.adjustVisual()},Pe.prototype.setStrokeDasharray=function(ve){this.strokeDasharray=ve,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Oe.prototype.getState.call(this));return ve.typeName=Pe.typeName,ve},Pe.prototype.restoreState=function(ve){Oe.prototype.restoreState.call(this,ve);var Fe=ve;this.strokeColor=Fe.strokeColor,this.strokeWidth=Fe.strokeWidth,this.strokeDasharray=Fe.strokeDasharray,this.createVisual(),this.adjustVisual()},Pe.typeName="LineMarker",Pe.title="Line marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Pe}(Ot),Ht=function(Oe){function Pe(ve,Fe,We,Ne){var ft=Oe.call(this,ve,Ne||'<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 ft.fonts=[],ft.fontBoxes=[],ft.fonts=Fe,ft.currentFont=We,ft.setCurrentFont=ft.setCurrentFont.bind(ft),ft}return Me(Pe,Oe),Pe.prototype.getUi=function(){var ve=this,Fe=document.createElement("div");return Fe.style.overflow="hidden",Fe.style.flexGrow="2",this.fonts.forEach(function(We){var Ne=document.createElement("div");Ne.style.display="inline-block",Ne.style.alignItems="center",Ne.style.justifyContent="space-between",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.overflow="hidden",Ne.style.maxWidth=100/ve.fonts.length-5+"%",Ne.style.borderColor=We===ve.currentFont?ve.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){ve.setCurrentFont(We,Ne)}),Fe.appendChild(Ne);var ft=document.createElement("div");ft.style.display="flex",ft.style.minHeight="20px",ft.style.flexGrow="2",ft.style.fontFamily=We,ft.style.overflow="hidden";var sn=document.createElement("div");sn.style.whiteSpace="nowrap",sn.style.overflow="hidden",sn.style.textOverflow="ellipsis",sn.innerHTML="The quick brown fox jumps over the lazy dog",ft.appendChild(sn),Ne.appendChild(ft),ve.fontBoxes.push(Ne)}),Fe},Pe.prototype.setCurrentFont=function(ve,Fe){var We=this;this.currentFont=ve,this.fontBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Fe?We.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Pe}(ye),Xt=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.color="transparent",Ne.padding=5,Ne.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ne.text=Ne.DEFAULT_TEXT,Ne.isMoved=!1,Ne.color=We.defaultColor,Ne.fontFamily=We.defaultFontFamily,Ne.defaultSize={x:100,y:30},Ne.setColor=Ne.setColor.bind(Ne),Ne.setFont=Ne.setFont.bind(Ne),Ne.renderText=Ne.renderText.bind(Ne),Ne.sizeText=Ne.sizeText.bind(Ne),Ne.textEditDivClicked=Ne.textEditDivClicked.bind(Ne),Ne.showTextEditor=Ne.showTextEditor.bind(Ne),Ne.setSize=Ne.setSize.bind(Ne),Ne.positionTextEditor=Ne.positionTextEditor.bind(Ne),Ne.colorPanel=new be("Color",We.defaultColorSet,We.defaultColor),Ne.colorPanel.onColorChanged=Ne.setColor,Ne.fontFamilyPanel=new Ht("Font",We.defaultFontFamilies,We.defaultFontFamily),Ne.fontFamilyPanel.onFontChanged=Ne.setFont,Ne}return Me(Pe,Oe),Pe.prototype.ownsTarget=function(ve){if(Oe.prototype.ownsTarget.call(this,ve)||ve===this.visual||ve===this.textElement||ve===this.bgRectangle)return!0;var Fe=!1;return this.textElement.childNodes.forEach(function(We){We===ve&&(Fe=!0)}),Fe},Pe.prototype.createVisual=function(){this.visual=lt.createGroup(),this.bgRectangle=lt.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=lt.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(lt.createTransform()),this.textElement.transform.baseVal.appendItem(lt.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Pe.prototype.pointerDown=function(ve,Fe){Oe.prototype.pointerDown.call(this,ve,Fe),this.isMoved=!1,this.pointerDownPoint=ve,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ve),this._state="creating")},Pe.prototype.renderText=function(){var ve=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(Fe){ve.textElement.appendChild(lt.createTSpan(Fe.trim()===""?" ":Fe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Pe.prototype.getTextScale=function(){var ve=this.textElement.getBBox(),Fe=1;if(ve.width>0&&ve.height>0){var We=(1*this.width-this.width*this.padding*2/100)/ve.width,Ne=(1*this.height-this.height*this.padding*2/100)/ve.height;Fe=Math.min(We,Ne)}return Fe},Pe.prototype.getTextPosition=function(ve){var Fe=this.textElement.getBBox(),We=0,Ne=0;return Fe.width>0&&Fe.height>0&&(We=(this.width-Fe.width*ve)/2,Ne=this.height/2-Fe.height*ve/2),{x:We,y:Ne}},Pe.prototype.sizeText=function(){var ve=this.textElement.getBBox(),Fe=this.getTextScale(),We=this.getTextPosition(Fe);We.y-=ve.y*Fe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+We.x+"px, "+We.y+"px) scale("+Fe+", "+Fe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(We.x,We.y),this.textElement.transform.baseVal.getItem(1).setScale(Fe,Fe))},Pe.prototype.manipulate=function(ve){Oe.prototype.manipulate.call(this,ve),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ve.x-this.pointerDownPoint.x)>5||Math.abs(ve.y-this.pointerDownPoint.y)>5)},Pe.prototype.resize=function(ve){Oe.prototype.resize.call(this,ve),this.isMoved=!0,this.setSize(),this.sizeText()},Pe.prototype.setSize=function(){Oe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(lt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),lt.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Pe.prototype.pointerUp=function(ve){var Fe=this.state;Fe==="creating"&&(this._suppressMarkerCreateEvent=!0),Oe.prototype.pointerUp.call(this,ve),this.setSize(),(Fe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Pe.prototype.showTextEditor=function(){var ve=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(Fe){Fe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Fe=Number.parseFloat(ve.textEditor.style.fontSize);ve.textEditor.clientWidth>=Number.parseInt(ve.textEditor.style.maxWidth)&&Fe>.9;)Fe-=.1,ve.textEditor.style.fontSize=Math.max(Fe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Fe){Fe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Fe){if(Fe.clipboardData){var We=Fe.clipboardData.getData("text"),Ne=window.getSelection();if(!Ne.rangeCount)return!1;Ne.deleteFromDocument(),Ne.getRangeAt(0).insertNode(document.createTextNode(We)),Fe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ve.textEditDivClicked(ve.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Pe.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ve=this.getTextScale(),Fe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),We=this.textElement.getBBox(),Ne={x:We.width*ve,y:We.height*ve};Fe.x-=Ne.x/2,Fe.y-=Ne.y/2,this.textEditor.style.top=Fe.y+"px",this.textEditor.style.left=Fe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Fe.x+"px",this.textEditor.style.fontSize=Math.max(16*ve,12)+"px",this.textElement.style.display="none"}},Pe.prototype.textEditDivClicked=function(ve){this.text=ve.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Pe.prototype.select=function(){Oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Pe.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Oe.prototype.deselect.call(this)},Pe.prototype.dblClick=function(ve,Fe){Oe.prototype.dblClick.call(this,ve,Fe),this.showTextEditor()},Pe.prototype.setColor=function(ve){this.textElement&<.setAttributes(this.textElement,[["fill",ve]]),this.color=ve,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ve)},Pe.prototype.setFont=function(ve){this.textElement&<.setAttributes(this.textElement,[["font-family",ve]]),this.fontFamily=ve,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Pe.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Pe.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Oe.prototype.getState.call(this));return ve.typeName=Pe.typeName,ve},Pe.prototype.restoreState=function(ve){var Fe=ve;this.color=Fe.color,this.fontFamily=Fe.fontFamily,this.padding=Fe.padding,this.text=Fe.text,this.createVisual(),Oe.prototype.restoreState.call(this,ve),this.setSize()},Pe.prototype.scale=function(ve,Fe){Oe.prototype.scale.call(this,ve,Fe),this.setSize(),this.sizeText(),this.positionTextEditor()},Pe.typeName="TextMarker",Pe.title="Text marker",Pe.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>',Pe}(nt),Ut=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.color="transparent",Ne.lineWidth=3,Ne.drawing=!1,Ne.pixelRatio=1,Ne.color=We.defaultColor,Ne.lineWidth=We.defaultStrokeWidth,Ne.pixelRatio=We.freehandPixelRatio,Ne.setColor=Ne.setColor.bind(Ne),Ne.addCanvas=Ne.addCanvas.bind(Ne),Ne.finishCreation=Ne.finishCreation.bind(Ne),Ne.setLineWidth=Ne.setLineWidth.bind(Ne),Ne.colorPanel=new be("Color",We.defaultColorSet,We.defaultColor),Ne.colorPanel.onColorChanged=Ne.setColor,Ne.lineWidthPanel=new xt("Line width",We.defaultStrokeWidths,We.defaultStrokeWidth),Ne.lineWidthPanel.onWidthChanged=Ne.setLineWidth,Ne}return Me(Pe,Oe),Pe.prototype.ownsTarget=function(ve){return!(!Oe.prototype.ownsTarget.call(this,ve)&&ve!==this.visual&&ve!==this.drawingImage)},Pe.prototype.createVisual=function(){this.visual=lt.createGroup(),this.drawingImage=lt.createImage(),this.visual.appendChild(this.drawingImage);var ve=lt.createTransform();this.visual.transform.baseVal.appendItem(ve),this.addMarkerVisualToContainer(this.visual)},Pe.prototype.pointerDown=function(ve,Fe){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(ve.x,ve.y),this.drawing=!0):Oe.prototype.pointerDown.call(this,ve,Fe)},Pe.prototype.manipulate=function(ve){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ve.x,ve.y),this.canvasContext.stroke()):Oe.prototype.manipulate.call(this,ve)},Pe.prototype.resize=function(ve){Oe.prototype.resize.call(this,ve),lt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),lt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Pe.prototype.pointerUp=function(ve){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Oe.prototype.pointerUp.call(this,ve)},Pe.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)},Pe.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Oe.prototype.select.call(this)},Pe.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Oe.prototype.deselect.call(this)},Pe.prototype.finishCreation=function(){for(var ve=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Fe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],We=Fe[0],Ne=Fe[1],ft=Fe[2],sn=Fe[3],un=!1,Pt=0;Pt<this.canvasElement.height;Pt++)for(var qt=0;qt<this.canvasElement.width;qt++)ve.data[Pt*this.canvasElement.width*4+4*qt+3]>0&&(un=!0,Pt<Ne&&(Ne=Pt),qt<We&&(We=qt),Pt>sn&&(sn=Pt),qt>ft&&(ft=qt));if(un){this.left=We/this.pixelRatio,this.top=Ne/this.pixelRatio,this.width=(ft-We)/this.pixelRatio,this.height=(sn-Ne)/this.pixelRatio;var Mn=document.createElement("canvas");Mn.width=ft-We,Mn.height=sn-Ne,Mn.getContext("2d").putImageData(this.canvasContext.getImageData(We,Ne,ft-We,sn-Ne),0,0),this.drawingImgUrl=Mn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Pe.prototype.setDrawingImage=function(){lt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),lt.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Pe.prototype.setColor=function(ve){this.color=ve,this.colorChanged(ve)},Pe.prototype.setLineWidth=function(ve){this.lineWidth=ve},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=Object.assign({drawingImgUrl:this.drawingImgUrl},Oe.prototype.getState.call(this));return ve.typeName=Pe.typeName,ve},Pe.prototype.restoreState=function(ve){this.createVisual(),Oe.prototype.restoreState.call(this,ve),this.drawingImgUrl=ve.drawingImgUrl,this.setDrawingImage()},Pe.prototype.scale=function(ve,Fe){Oe.prototype.scale.call(this,ve,Fe),this.setDrawingImage()},Pe.typeName="FreehandMarker",Pe.title="Freehand marker",Pe.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>',Pe}(nt),it=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,We||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ne.typeBoxes=[],Ne.currentType=Fe,Ne.setCurrentType=Ne.setCurrentType.bind(Ne),Ne}return Me(Pe,Oe),Pe.prototype.getUi=function(){var ve=this,Fe=document.createElement("div");Fe.style.display="flex",Fe.style.overflow="hidden",Fe.style.flexGrow="2";for(var We=function(sn){var un="both";switch(sn){case 0:un="both";break;case 1:un="start";break;case 2:un="end";break;case 3:un="none"}var Pt=document.createElement("div");if(Pt.style.display="flex",Pt.style.flexGrow="2",Pt.style.alignItems="center",Pt.style.justifyContent="space-between",Pt.style.padding="5px",Pt.style.borderWidth="2px",Pt.style.borderStyle="solid",Pt.style.borderColor=un===Ne.currentType?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Pt.addEventListener("click",function(){ve.setCurrentType(un,Pt)}),Fe.appendChild(Pt),un==="both"||un==="start"){var qt=document.createElement("div");qt.style.display="flex",qt.style.alignItems="center",qt.style.minHeight="20px",qt.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="`+(Ne.uiStyleSettings!==void 0?Ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,qt.style.marginLeft="5px",Pt.appendChild(qt)}var Mn=document.createElement("div");Mn.style.display="flex",Mn.style.alignItems="center",Mn.style.minHeight="20px",Mn.style.flexGrow="2";var hn=document.createElement("hr");if(hn.style.minWidth="20px",hn.style.border="0px",hn.style.borderTop="3px solid "+(Ne.uiStyleSettings!==void 0?Ne.uiStyleSettings.toolboxColor:"#eeeeee"),hn.style.flexGrow="2",Mn.appendChild(hn),Pt.appendChild(Mn),un==="both"||un==="end"){var fn=document.createElement("div");fn.style.display="flex",fn.style.alignItems="center",fn.style.minHeight="20px",fn.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="`+(Ne.uiStyleSettings!==void 0?Ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,fn.style.marginRight="5px",Pt.appendChild(fn)}Ne.typeBoxes.push(Pt)},Ne=this,ft=0;ft<4;ft++)We(ft);return Fe},Pe.prototype.setCurrentType=function(ve,Fe){var We=this;this.currentType=ve,this.typeBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Fe?We.uiStyleSettings!==void 0?We.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Pe}(ye),_e=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.arrowType="end",Ne.arrowBaseHeight=10,Ne.arrowBaseWidth=10,Ne.getArrowPoints=Ne.getArrowPoints.bind(Ne),Ne.setArrowType=Ne.setArrowType.bind(Ne),Ne.arrowTypePanel=new it("Arrow type","end"),Ne.arrowTypePanel.onArrowTypeChanged=Ne.setArrowType,Ne}return Me(Pe,Oe),Pe.prototype.ownsTarget=function(ve){return!(!Oe.prototype.ownsTarget.call(this,ve)&&ve!==this.arrow1&&ve!==this.arrow2)},Pe.prototype.getArrowPoints=function(ve,Fe){var We=this.arrowBaseWidth+2*this.strokeWidth,Ne=this.arrowBaseHeight+2*this.strokeWidth;return ve-We/2+","+(Fe+Ne/2)+" "+ve+","+(Fe-Ne/2)+" "+(ve+We/2)+","+(Fe+Ne/2)},Pe.prototype.createTips=function(){this.arrow1=lt.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(lt.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=lt.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(lt.createTransform()),this.visual.appendChild(this.arrow2)},Pe.prototype.pointerDown=function(ve,Fe){Oe.prototype.pointerDown.call(this,ve,Fe),this.state==="creating"&&this.createTips()},Pe.prototype.adjustVisual=function(){if(Oe.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",lt.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),lt.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ve=0;Math.abs(this.x1-this.x2)>.1&&(ve=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Fe=this.arrow1.transform.baseVal.getItem(0);Fe.setRotate(ve,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Fe,0);var We=this.arrow2.transform.baseVal.getItem(0);We.setRotate(ve+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(We,0)}},Pe.prototype.setArrowType=function(ve){this.arrowType=ve,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=Object.assign({arrowType:this.arrowType},Oe.prototype.getState.call(this));return ve.typeName=Pe.typeName,ve},Pe.prototype.restoreState=function(ve){Oe.prototype.restoreState.call(this,ve);var Fe=ve;this.arrowType=Fe.arrowType,this.createTips(),this.adjustVisual()},Pe.typeName="ArrowMarker",Pe.title="Arrow marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Pe}(gt),Wt=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.fillColor=We.defaultFillColor,Ne.strokeWidth=0,Ne.fillPanel=new be("Color",We.defaultColorSet,We.defaultFillColor),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne}return Me(Pe,Oe),Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=Oe.prototype.getState.call(this);return ve.typeName=Pe.typeName,ve},Pe.typeName="CoverMarker",Pe.title="Cover marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Pe}(Je),Dn=function(Oe){function Pe(ve,Fe,We,Ne){var ft=Oe.call(this,ve,Ne||'<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 ft.opacities=[],ft.opacityBoxes=[],ft.opacities=Fe,ft.currentOpacity=We,ft.setCurrentOpacity=ft.setCurrentOpacity.bind(ft),ft}return Me(Pe,Oe),Pe.prototype.getUi=function(){var ve=this,Fe=document.createElement("div");return Fe.style.display="flex",Fe.style.overflow="hidden",Fe.style.flexGrow="2",Fe.style.justifyContent="space-between",this.opacities.forEach(function(We){var Ne=document.createElement("div");Ne.style.display="flex",Ne.style.alignItems="center",Ne.style.justifyContent="center",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.borderColor=We===ve.currentOpacity?ve.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){ve.setCurrentOpacity(We,Ne)}),Fe.appendChild(Ne);var ft=document.createElement("div");ft.innerText=100*We+"%",Ne.appendChild(ft),ve.opacityBoxes.push(Ne)}),Fe},Pe.prototype.setCurrentOpacity=function(ve,Fe){var We=this;this.currentOpacity=ve,this.opacityBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Fe?We.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Pe}(ye),Bn=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.setOpacity=Ne.setOpacity.bind(Ne),Ne.fillColor=We.defaultHighlightColor,Ne.strokeWidth=0,Ne.opacity=We.defaultHighlightOpacity,Ne.fillPanel=new be("Color",We.defaultColorSet,Ne.fillColor),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne.opacityPanel=new Dn("Opacity",We.defaultOpacitySteps,Ne.opacity),Ne.opacityPanel.onOpacityChanged=Ne.setOpacity,Ne}return Me(Pe,Oe),Pe.prototype.setOpacity=function(ve){this.opacity=ve,this.visual&<.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=Oe.prototype.getState.call(this);return ve.typeName=Pe.typeName,ve},Pe.typeName="HighlightMarker",Pe.title="Highlight marker",Pe.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>',Pe}(Wt),$t='<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>',ln='<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>',Tn=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.bgColor="transparent",Ne.tipPosition={x:0,y:0},Ne.tipBase1Position={x:0,y:0},Ne.tipBase2Position={x:0,y:0},Ne.tipMoving=!1,Ne.color=We.defaultStrokeColor,Ne.bgColor=We.defaultFillColor,Ne.fontFamily=We.defaultFontFamily,Ne.defaultSize={x:100,y:30},Ne.setBgColor=Ne.setBgColor.bind(Ne),Ne.getTipPoints=Ne.getTipPoints.bind(Ne),Ne.positionTip=Ne.positionTip.bind(Ne),Ne.setTipPoints=Ne.setTipPoints.bind(Ne),Ne.colorPanel=new be("Text color",We.defaultColorSet,Ne.color,$t),Ne.colorPanel.onColorChanged=Ne.setColor,Ne.bgColorPanel=new be("Fill color",We.defaultColorSet,Ne.bgColor,ln),Ne.bgColorPanel.onColorChanged=Ne.setBgColor,Ne.fontFamilyPanel=new Ht("Font",We.defaultFontFamilies,We.defaultFontFamily),Ne.fontFamilyPanel.onFontChanged=Ne.setFont,Ne.tipGrip=new ze,Ne.tipGrip.visual.transform.baseVal.appendItem(lt.createTransform()),Ne.controlBox.appendChild(Ne.tipGrip.visual),Ne}return Me(Pe,Oe),Pe.prototype.ownsTarget=function(ve){return Oe.prototype.ownsTarget.call(this,ve)||this.tipGrip.ownsTarget(ve)||this.tip===ve},Pe.prototype.createTip=function(){lt.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=lt.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Pe.prototype.pointerDown=function(ve,Fe){this.state==="new"&&Oe.prototype.pointerDown.call(this,ve,Fe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Fe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Oe.prototype.pointerDown.call(this,ve,Fe)},Pe.prototype.pointerUp=function(ve){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Oe.prototype.pointerUp.call(this,ve);else{var Fe=this.state==="creating";Oe.prototype.pointerUp.call(this,ve),this.setTipPoints(Fe),this.positionTip()}},Pe.prototype.manipulate=function(ve){if(this.tipMoving){var Fe=this.unrotatePoint(ve);this.tipPosition={x:Fe.x-this.manipulationStartLeft,y:Fe.y-this.manipulationStartTop},this.positionTip()}else Oe.prototype.manipulate.call(this,ve)},Pe.prototype.setBgColor=function(ve){this.bgRectangle&&this.tip&&(lt.setAttributes(this.bgRectangle,[["fill",ve]]),lt.setAttributes(this.tip,[["fill",ve]])),this.bgColor=ve,this.fillColorChanged(ve)},Pe.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},Pe.prototype.setTipPoints=function(ve){ve===void 0&&(ve=!1);var Fe=Math.min(this.height/2,15),We=this.height/5;ve&&(this.tipPosition={x:Fe+We/2,y:this.height+20});var Ne=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(We=this.width/5,Fe=Math.min(this.width/2,15),this.tipBase1Position={x:Fe,y:0},this.tipBase2Position={x:Fe+We,y:0}):(this.tipBase1Position={x:0,y:Fe},this.tipBase2Position={x:0,y:Fe+We}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(We=this.width/5,Fe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Fe-We,y:0},this.tipBase2Position={x:this.width-Fe,y:0}):(this.tipBase1Position={x:this.width,y:Fe},this.tipBase2Position={x:this.width,y:Fe+We}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(We=this.width/5,Fe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Fe-We,y:this.height},this.tipBase2Position={x:this.width-Fe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Fe-We},this.tipBase2Position={x:this.width,y:this.height-Fe}):Ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(We=this.width/5,Fe=Math.min(this.width/2,15),this.tipBase1Position={x:Fe,y:this.height},this.tipBase2Position={x:Fe+We,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Fe},this.tipBase2Position={x:0,y:this.height-Fe-We})},Pe.prototype.resize=function(ve){Oe.prototype.resize.call(this,ve),this.positionTip()},Pe.prototype.positionTip=function(){lt.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ve=this.tipGrip.visual.transform.baseVal.getItem(0);ve.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ve,0)},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Pe.prototype.select=function(){this.positionTip(),Oe.prototype.select.call(this)},Pe.prototype.getState=function(){var ve=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Oe.prototype.getState.call(this));return ve.typeName=Pe.typeName,ve},Pe.prototype.restoreState=function(ve){var Fe=ve;this.bgColor=Fe.bgColor,this.tipPosition=Fe.tipPosition,Oe.prototype.restoreState.call(this,ve),this.createTip(),this.setTipPoints()},Pe.prototype.scale=function(ve,Fe){Oe.prototype.scale.call(this,ve,Fe),this.tipPosition={x:this.tipPosition.x*ve,y:this.tipPosition.y*Fe},this.positionTip()},Pe.typeName="CalloutMarker",Pe.title="Callout marker",Pe.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>',Pe}(Xt),ei=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.fillColor="transparent",Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.opacity=1,Ne.strokeColor=We.defaultColor,Ne.strokeWidth=We.defaultStrokeWidth,Ne.strokeDasharray=We.defaultStrokeDasharray,Ne.fillColor=We.defaultFillColor,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setFillColor=Ne.setFillColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.setOpacity=Ne.setOpacity.bind(Ne),Ne.createVisual=Ne.createVisual.bind(Ne),Ne.strokePanel=new be("Line color",Ue(We.defaultColorSet,["transparent"]),We.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.fillPanel=new be("Fill color",Ue(We.defaultColorSet,["transparent"]),Ne.fillColor,ln),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne.strokeWidthPanel=new xt("Line width",We.defaultStrokeWidths,We.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new He("Line style",We.defaultStrokeDasharrays,We.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne.opacityPanel=new Dn("Opacity",We.defaultOpacitySteps,Ne.opacity),Ne.opacityPanel.onOpacityChanged=Ne.setOpacity,Ne}return Me(Pe,Oe),Pe.prototype.ownsTarget=function(ve){return!(!Oe.prototype.ownsTarget.call(this,ve)&&ve!==this.visual)},Pe.prototype.createVisual=function(){this.visual=lt.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)},Pe.prototype.pointerDown=function(ve,Fe){Oe.prototype.pointerDown.call(this,ve,Fe),this.state==="new"&&(this.createVisual(),this.moveVisual(ve),this._state="creating")},Pe.prototype.manipulate=function(ve){Oe.prototype.manipulate.call(this,ve)},Pe.prototype.resize=function(ve){Oe.prototype.resize.call(this,ve),this.setSize()},Pe.prototype.setSize=function(){Oe.prototype.setSize.call(this),lt.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Pe.prototype.pointerUp=function(ve){Oe.prototype.pointerUp.call(this,ve),this.setSize()},Pe.prototype.setStrokeColor=function(ve){this.strokeColor=ve,this.visual&<.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ve),this.stateChanged()},Pe.prototype.setFillColor=function(ve){this.fillColor=ve,this.visual&<.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ve),this.stateChanged()},Pe.prototype.setStrokeWidth=function(ve){this.strokeWidth=ve,this.visual&<.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pe.prototype.setStrokeDasharray=function(ve){this.strokeDasharray=ve,this.visual&<.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Pe.prototype.setOpacity=function(ve){this.opacity=ve,this.visual&<.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Oe.prototype.getState.call(this));return ve.typeName=Pe.typeName,ve},Pe.prototype.restoreState=function(ve){var Fe=ve;this.fillColor=Fe.fillColor,this.strokeColor=Fe.strokeColor,this.strokeWidth=Fe.strokeWidth,this.strokeDasharray=Fe.strokeDasharray,this.opacity=Fe.opacity,this.createVisual(),Oe.prototype.restoreState.call(this,ve),this.setSize()},Pe.prototype.scale=function(ve,Fe){Oe.prototype.scale.call(this,ve,Fe),this.setSize()},Pe.typeName="EllipseMarker",Pe.title="Ellipse marker",Pe.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>',Pe}(nt),Ln=function(Oe){function Pe(ve,Fe,We){return Oe.call(this,ve,Fe,We)||this}return Me(Pe,Oe),Object.defineProperty(Pe.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Pe.prototype.ownsTarget=function(ve){return!(!Oe.prototype.ownsTarget.call(this,ve)&&ve!==this.tip1&&ve!==this.tip2)},Pe.prototype.createTips=function(){this.tip1=lt.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(lt.createTransform()),this.visual.appendChild(this.tip1),this.tip2=lt.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(lt.createTransform()),this.visual.appendChild(this.tip2)},Pe.prototype.pointerDown=function(ve,Fe){Oe.prototype.pointerDown.call(this,ve,Fe),this.state==="creating"&&this.createTips()},Pe.prototype.adjustVisual=function(){if(Oe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(lt.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()]]),lt.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 ve=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Fe=this.tip1.transform.baseVal.getItem(0);Fe.setRotate(ve,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Fe,0);var We=this.tip2.transform.baseVal.getItem(0);We.setRotate(ve+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(We,0)}},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=Oe.prototype.getState.call(this);return ve.typeName=Pe.typeName,ve},Pe.prototype.restoreState=function(ve){Oe.prototype.restoreState.call(this,ve),this.createTips(),this.adjustVisual()},Pe.typeName="MeasurementMarker",Pe.title="Measurement marker",Pe.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>',Pe}(gt),Yn=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.strokePanel.colors=We.defaultColorSet,Ne.fillColor="transparent",Ne}return Me(Pe,Oe),Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=Oe.prototype.getState.call(this);return ve.typeName=Pe.typeName,ve},Pe.typeName="EllipseFrameMarker",Pe.title="Ellipse frame marker",Pe.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>',Pe}(ei),zt=function(){function Oe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Oe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Oe.prototype.addUndoStep=function(Pe){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Pe)||(this.undoStack.push(Pe),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Pe)&&this.redoStack.splice(0,this.redoStack.length))},Oe.prototype.replaceLastUndoStep=function(Pe){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Pe)},Oe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Oe.prototype.undo=function(){if(this.undoStack.length>1){var Pe=this.undoStack.pop();return Pe!==void 0&&this.redoStack.push(Pe),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Oe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Oe}(),wn=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.curveX=0,Ne.curveY=0,Ne.manipulationStartCurveX=0,Ne.manipulationStartCurveY=0,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.positionGrips=Ne.positionGrips.bind(Ne),Ne.addControlGrips=Ne.addControlGrips.bind(Ne),Ne.adjustVisual=Ne.adjustVisual.bind(Ne),Ne.setupControlBox=Ne.setupControlBox.bind(Ne),Ne.resize=Ne.resize.bind(Ne),Ne.strokeColor=We.defaultColor,Ne.strokeWidth=We.defaultStrokeWidth,Ne.strokeDasharray=We.defaultStrokeDasharray,Ne.strokePanel=new be("Line color",We.defaultColorSet,We.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.strokeWidthPanel=new xt("Line width",We.defaultStrokeWidths,We.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new He("Line style",We.defaultStrokeDasharrays,We.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne}return Me(Pe,Oe),Pe.prototype.ownsTarget=function(ve){return!(!Oe.prototype.ownsTarget.call(this,ve)&&ve!==this.visual&&ve!==this.selectorCurve&&ve!==this.visibleCurve&&!this.curveGrip.ownsTarget(ve))},Pe.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Pe.prototype.createVisual=function(){this.visual=lt.createGroup(),this.selectorCurve=lt.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=lt.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)},Pe.prototype.pointerDown=function(ve,Fe){Oe.prototype.pointerDown.call(this,ve,Fe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ve.x,this.curveY=ve.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Fe)&&(this.activeGrip=this.curveGrip,this._state="resize")},Pe.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),lt.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),lt.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),lt.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Pe.prototype.setupControlBox=function(){Oe.prototype.setupControlBox.call(this),this.curveControlLine1=lt.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=lt.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)},Pe.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Oe.prototype.addControlGrips.call(this)},Pe.prototype.positionGrips=function(){Oe.prototype.positionGrips.call(this);var ve=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ve/2,this.curveY-ve/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()))},Pe.prototype.manipulate=function(ve){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ve.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ve.y-this.manipulationStartY),Oe.prototype.manipulate.call(this,ve)},Pe.prototype.resize=function(ve){this.activeGrip===this.curveGrip&&(this.curveX=ve.x,this.curveY=ve.y),Oe.prototype.resize.call(this,ve),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Pe.prototype.setStrokeColor=function(ve){this.strokeColor=ve,this.adjustVisual(),this.colorChanged(ve)},Pe.prototype.setStrokeWidth=function(ve){this.strokeWidth=ve,this.adjustVisual()},Pe.prototype.setStrokeDasharray=function(ve){this.strokeDasharray=ve,this.adjustVisual()},Pe.prototype.scale=function(ve,Fe){this.curveX=this.curveX*ve,this.curveY=this.curveY*Fe,Oe.prototype.scale.call(this,ve,Fe)},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Oe.prototype.getState.call(this));return ve.typeName=Pe.typeName,ve},Pe.prototype.restoreState=function(ve){Oe.prototype.restoreState.call(this,ve);var Fe=ve;this.strokeColor=Fe.strokeColor,this.strokeWidth=Fe.strokeWidth,this.strokeDasharray=Fe.strokeDasharray,this.curveX=Fe.curveX,this.curveY=Fe.curveY,this.createVisual(),this.adjustVisual()},Pe.typeName="CurveMarker",Pe.title="Curve marker",Pe.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>',Pe}(Ot),$n=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,Fe,We)||this;return Ne.fillColor="transparent",Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.textColor="transparent",Ne.fontSize="1rem",Ne.isMoved=!1,Ne.captionText="Caption",Ne.PADDING=5,Ne.captionBoxWidth=0,Ne.captionBoxHeight=0,Ne.strokeColor=We.defaultColor,Ne.strokeWidth=We.defaultStrokeWidth,Ne.strokeDasharray=We.defaultStrokeDasharray,Ne.fillColor=We.defaultFillColor,Ne.textColor=We.defaultStrokeColor,Ne.fontFamily=We.defaultFontFamily,Ne.fontSize=We.defaultCaptionFontSize,Ne.captionText=We.defaultCaptionText,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setFillColor=Ne.setFillColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.createVisual=Ne.createVisual.bind(Ne),Ne.sizeCaption=Ne.sizeCaption.bind(Ne),Ne.setCaptionText=Ne.setCaptionText.bind(Ne),Ne.showTextEditor=Ne.showTextEditor.bind(Ne),Ne.positionTextEditor=Ne.positionTextEditor.bind(Ne),Ne.finishTextEditing=Ne.finishTextEditing.bind(Ne),Ne.setFont=Ne.setFont.bind(Ne),Ne.setTextColor=Ne.setTextColor.bind(Ne),Ne.strokePanel=new be("Line color",Ue(We.defaultColorSet,["transparent"]),Ne.strokeColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.fillPanel=new be("Fill color",Ue(We.defaultColorSet,["transparent"]),Ne.fillColor,ln),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne.strokeWidthPanel=new xt("Line width",We.defaultStrokeWidths,We.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new He("Line style",We.defaultStrokeDasharrays,We.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne.fontFamilyPanel=new Ht("Font",We.defaultFontFamilies,We.defaultFontFamily),Ne.fontFamilyPanel.onFontChanged=Ne.setFont,Ne.textColorPanel=new be("Text color",We.defaultColorSet,Ne.textColor,$t),Ne.textColorPanel.onColorChanged=Ne.setTextColor,Ne}return Me(Pe,Oe),Pe.prototype.ownsTarget=function(ve){return!(!Oe.prototype.ownsTarget.call(this,ve)&&ve!==this.visual&&ve!==this.frame&&ve!==this.captionBg&&ve!==this.captionElement)},Pe.prototype.createVisual=function(){this.visual=lt.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=lt.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=lt.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=lt.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()},Pe.prototype.setCaptionText=function(ve){this.captionText=ve,this.captionElement.textContent=this.captionText,this.sizeCaption()},Pe.prototype.pointerDown=function(ve,Fe){Oe.prototype.pointerDown.call(this,ve,Fe),this.isMoved=!1,this.pointerDownPoint=ve,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ve),this._state="creating")},Pe.prototype.manipulate=function(ve){Oe.prototype.manipulate.call(this,ve),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ve.x-this.pointerDownPoint.x)>5||Math.abs(ve.y-this.pointerDownPoint.y)>5)},Pe.prototype.resize=function(ve){Oe.prototype.resize.call(this,ve),this.setSize()},Pe.prototype.sizeCaption=function(){var ve=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ve.width+2*this.PADDING,this.captionBoxHeight=ve.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),lt.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')"]]),lt.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')"]])},Pe.prototype.showTextEditor=function(){var ve=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(Fe){Fe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Fe){Fe.key==="Enter"&&ve.finishTextEditing(ve.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Fe){Fe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ve.finishTextEditing(ve.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ve.finishTextEditing(ve.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Pe.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"))},Pe.prototype.finishTextEditing=function(ve){this.setCaptionText(ve.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Pe.prototype.setFont=function(ve){this.captionElement&<.setAttributes(this.captionElement,[["font-family",ve]]),this.fontFamily=ve,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Pe.prototype.setTextColor=function(ve){this.captionElement&<.setAttributes(this.captionElement,[["fill",ve]]),this.textColor=ve,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Pe.prototype.setSize=function(){Oe.prototype.setSize.call(this),lt.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Pe.prototype.pointerUp=function(ve){Oe.prototype.pointerUp.call(this,ve),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Pe.prototype.dblClick=function(ve,Fe){Oe.prototype.dblClick.call(this,ve,Fe),this.showTextEditor()},Pe.prototype.setStrokeColor=function(ve){this.strokeColor=ve,this.frame&<.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ve),this.stateChanged()},Pe.prototype.setFillColor=function(ve){this.fillColor=ve,this.captionBg&<.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ve),this.stateChanged()},Pe.prototype.setStrokeWidth=function(ve){this.strokeWidth=ve,this.frame&<.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pe.prototype.setStrokeDasharray=function(ve){this.strokeDasharray=ve,this.frame&<.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ve=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},Oe.prototype.getState.call(this));return ve.typeName=this.typeName,ve},Pe.prototype.restoreState=function(ve){var Fe=ve;this.fillColor=Fe.fillColor,this.strokeColor=Fe.strokeColor,this.strokeWidth=Fe.strokeWidth,this.strokeDasharray=Fe.strokeDasharray,this.textColor=Fe.textColor,this.fontFamily=Fe.fontFamily,this.captionText=Fe.captionText,this.fontSize=Fe.fontSize,this.createVisual(),Oe.prototype.restoreState.call(this,ve),this.setSize()},Pe.prototype.scale=function(ve,Fe){Oe.prototype.scale.call(this,ve,Fe),this.setSize()},Pe.typeName="CaptionFrameMarker",Pe.title="Caption frame marker",Pe.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>',Pe}(nt),Yt=function(){function Oe(Pe,ve){ve===void 0&&(ve=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Pe,this.cancelable=ve}return Object.defineProperty(Oe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Oe.prototype.preventDefault=function(){this._defaultPrevented=!0},Oe}(),tn=function(Oe){function Pe(ve,Fe,We){var Ne=Oe.call(this,ve,!1)||this;return Ne.dataUrl=Fe,Ne.state=We,Ne}return Me(Pe,Oe),Pe}(Yt),Gt=function(Oe){function Pe(ve,Fe,We){We===void 0&&(We=!1);var Ne=Oe.call(this,ve,We)||this;return Ne.marker=Fe,Ne}return Me(Pe,Oe),Pe}(Yt),Tt=function(){function Oe(){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 Oe.prototype.addEventListener=function(Pe,ve){this[Pe].push(ve)},Oe.prototype.removeEventListener=function(Pe,ve){var Fe=this[Pe].indexOf(ve);Fe>-1&&this[Pe].splice(Fe,1)},Oe}(),ot=function(){function Oe(Pe){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new tt,this._isOpen=!1,this.undoRedoManager=new zt,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 Tt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Oe.instanceCounter++,this.styles=new ne(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Pe,this.targetRoot=document.body,this.width=Pe.clientWidth,this.height=Pe.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(Oe.prototype,"ALL_MARKER_TYPES",{get:function(){return[Et,Ut,_e,Xt,Yn,ei,Bn,Tn,Ln,Wt,gt,wn,$n]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Et,Ut,_e,Xt,ei,Bn,Tn]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Et,Ut,_e,Xt,Bn]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Pe){var ve=this;this._availableMarkerTypes.splice(0),Pe.forEach(function(Fe){if(typeof Fe=="string"){var We=ve.ALL_MARKER_TYPES.find(function(Ne){return Ne.typeName===Fe});We!==void 0&&ve._availableMarkerTypes.push(We)}else ve._availableMarkerTypes.push(Fe)})},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Pe){this._zoomLevel=Pe,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(Oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Oe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),yt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Oe.prototype.show=function(){var Pe=this;this.styles.styleSheetRoot===void 0&&Ae.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ae.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ve){return ve(new Yt(Pe))})},Oe.prototype.render=function(){return kt(this,void 0,void 0,function(){var Pe;return bt(this,function(ve){switch(ve.label){case 0:return this.setCurrentMarker(),(Pe=new jt).naturalSize=this.renderAtNaturalSize,Pe.imageType=this.renderImageType,Pe.imageQuality=this.renderImageQuality,Pe.markersOnly=this.renderMarkersOnly,Pe.width=this.renderWidth,Pe.height=this.renderHeight,[4,Pe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return ve.sent(),[4,Pe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ve.sent()]}})})},Oe.prototype.close=function(Pe){var ve=this;if(Pe===void 0&&(Pe=!1),this.isOpen){var Fe=!1;Pe||this.eventListeners.beforeclose.forEach(function(We){var Ne=new Yt(ve,!0);We(Ne),Ne.defaultPrevented&&(Fe=!0)}),Fe||(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(We){return We(new Yt(ve))}),this.detachEvents(),this._isOpen=!1)}},Oe.prototype.addMarkersToToolbar=function(){for(var Pe,ve=[],Fe=0;Fe<arguments.length;Fe++)ve[Fe]=arguments[Fe];(Pe=this._availableMarkerTypes).push.apply(Pe,ve)},Oe.prototype.addRenderEventListener=function(Pe){this.addEventListener("render",function(ve){Pe(ve.dataUrl,ve.state)})},Oe.prototype.removeRenderEventListener=function(Pe){},Oe.prototype.addCloseEventListener=function(Pe){this.addEventListener("close",function(){Pe()})},Oe.prototype.removeCloseEventListener=function(Pe){},Oe.prototype.setupResizeObserver=function(){var Pe=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Pe.resize(Pe.target.clientWidth,Pe.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Pe.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Oe.prototype.onPopupTargetResize=function(){var Pe=1*this.target.clientWidth/this.target.clientHeight,ve=this.editorCanvas.clientWidth/Pe>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Pe:this.editorCanvas.clientWidth,Fe=ve<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Pe;this.resize(ve,Fe)},Oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Oe.prototype.resize=function(Pe,ve){this._isResizing=!0;var Fe=Pe/this.imageWidth,We=ve/this.imageHeight;this.imageWidth=Math.round(Pe),this.imageHeight=Math.round(ve),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(Fe,We),this._isResizing=!1},Oe.prototype.scaleMarkers=function(Pe,ve){var Fe,We=this;this._currentMarker&&this._currentMarker instanceof Xt?this._currentMarker.scale(Pe,ve):(Fe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ne){Ne!==We._currentMarker&&Ne.scale(Pe,ve)}),Fe!==void 0&&this.setCurrentMarker(Fe)},Oe.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"},Oe.prototype.setTopLeft=function(){var Pe=this.editingTarget.getBoundingClientRect(),ve=this.editorCanvas.getBoundingClientRect();this.left=Pe.left-ve.left,this.top=Pe.top-ve.top},Oe.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)},Oe.prototype.addDefs=function(){for(var Pe,ve=[],Fe=0;Fe<arguments.length;Fe++)ve[Fe]=arguments[Fe];this.defs=lt.createDefs(),this.addDefsToImage(),(Pe=this.defs).append.apply(Pe,ve)},Oe.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Oe.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)},Oe.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Oe.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Oe.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)},Oe.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Oe.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)},Oe.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 Pe=document.createElement("a");Pe.href="https://markerjs.com/",Pe.target="_blank",Pe.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>',Pe.title="Powered by marker.js",Pe.style.display="grid",Pe.style.alignItems="center",Pe.style.justifyItems="center",Pe.style.padding="3px",Pe.style.width="20px",Pe.style.height="20px",this.logoUI.appendChild(Pe),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Oe.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")},Oe.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"},Oe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Oe.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 Pe=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=Pe+"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 se(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 fe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Oe.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Oe.prototype.removeMarker=function(Pe){this.markerImage.removeChild(Pe.container),this.markers.indexOf(Pe)>-1&&this.markers.splice(this.markers.indexOf(Pe),1),Pe.dispose()},Oe.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())},Oe.prototype.toolbarButtonClicked=function(Pe,ve){if(Pe==="marker"&&ve!==void 0)this.createNewMarker(ve);else if(Pe==="action")switch(ve){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()}},Oe.prototype.deleteSelectedMarker=function(){var Pe=this;if(this._currentMarker!==void 0){var ve=!1;if(this.eventListeners.markerbeforedelete.forEach(function(We){var Ne=new Gt(Pe,Pe._currentMarker,!0);We(Ne),Ne.defaultPrevented&&(ve=!0)}),!ve){var Fe=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(We){return We(new Gt(Pe,Fe))})}}},Oe.prototype.clear=function(){var Pe=this,ve=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ft){var sn=new Gt(Pe,void 0,!0);ft(sn),sn.defaultPrevented&&(ve=!0)}),!ve)){this.setCurrentMarker();for(var Fe=function(ft){var sn=We.markers[ft];We.setCurrentMarker(We.markers[ft]),We._currentMarker.dispose(),We.markerImage.removeChild(We._currentMarker.container),We.markers.splice(We.markers.indexOf(We._currentMarker),1),We.eventListeners.markerdelete.forEach(function(un){return un(new Gt(Pe,sn))})},We=this,Ne=this.markers.length-1;Ne>=0;Ne--)Fe(Ne);this.addUndoStep()}},Object.defineProperty(Oe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Oe.prototype.showNotesEditor=function(){var Pe;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=(Pe=this._currentMarker.notes)!==null&&Pe!==void 0?Pe:"",this.overlayContainer.appendChild(this.notesArea))},Oe.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)},Oe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Oe.prototype.addUndoStep=function(){var Pe=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ve=this.getState(),Fe=this.undoRedoManager.getLastUndoStep();if(!Fe||Fe.width===ve.width&&Fe.height===ve.height){var We=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ve),We<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ne){return Ne(new Yt(Pe))})}else this.undoRedoManager.replaceLastUndoStep(ve),this.eventListeners.statechange.forEach(function(Ne){return Ne(new Yt(Pe))})}},Oe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Oe.prototype.undoStep=function(){var Pe=this,ve=this.undoRedoManager.undo();ve!==void 0&&(this.restoreState(ve),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Fe){return Fe(new Yt(Pe))}))},Oe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Oe.prototype.redoStep=function(){var Pe=this,ve=this.undoRedoManager.redo();ve!==void 0&&(this.restoreState(ve),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Fe){return Fe(new Yt(Pe))}))},Oe.prototype.stepZoom=function(){var Pe=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Pe<this.zoomSteps.length-1?this.zoomSteps[Pe+1]:this.zoomSteps[0]},Oe.prototype.panTo=function(Pe){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Pe.x,top:this.prevPanPoint.y-Pe.y}),this.prevPanPoint=Pe},Oe.prototype.startRenderAndClose=function(){return kt(this,void 0,void 0,function(){var Pe,ve,Fe=this;return bt(this,function(We){switch(We.label){case 0:return[4,this.render()];case 1:return Pe=We.sent(),ve=this.getState(),this.eventListeners.render.forEach(function(Ne){return Ne(new tn(Fe,Pe,ve))}),this.close(!0),[2]}})})},Oe.prototype.getState=function(Pe){Pe===!0&&this.setCurrentMarker();var ve={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Fe){return ve.markers.push(Fe.getState())}),ve},Oe.prototype.restoreState=function(Pe){var ve=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Pe.markers.forEach(function(Fe){var We=ve._availableMarkerTypes.find(function(ft){return ft.typeName===Fe.typeName});if(We!==void 0){var Ne=ve.addNewMarker(We);Ne.restoreState(Fe),ve.markers.push(Ne)}}),Pe.width&&Pe.height&&(Pe.width!==this.imageWidth||Pe.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Pe.width,this.imageHeight/Pe.height),this.eventListeners.restorestate.forEach(function(Fe){return Fe(new Yt(ve))})},Oe.prototype.addNewMarker=function(Pe){var ve=lt.createGroup();return this.markerImage.appendChild(ve),new Pe(ve,this.overlayContainer,this.settings)},Oe.prototype.createNewMarker=function(Pe){var ve,Fe=this;(ve=typeof Pe=="string"?this._availableMarkerTypes.find(function(We){return We.typeName===Pe}):Pe)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ve),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(ve.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(We){return We(new Gt(Fe,Fe._currentMarker))}))},Oe.prototype.markerCreated=function(Pe){var ve=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Pe),this.setCurrentMarker(Pe),Pe instanceof Ut&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ut):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Fe){return Fe(new Gt(ve,ve._currentMarker))})},Oe.prototype.colorChanged=function(Pe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Pe,this.settings.defaultStrokeColor=Pe)},Oe.prototype.fillColorChanged=function(Pe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Pe)},Oe.prototype.markerStateChanged=function(Pe){var ve=this;this.eventListeners.markerchange.forEach(function(Fe){return Fe(new Gt(ve,Pe))})},Oe.prototype.setCurrentMarker=function(Pe){var ve=this;this._currentMarker!==Pe&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Fe){return Fe(new Gt(ve,ve._currentMarker))})),this._currentMarker=Pe,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(Fe){return Fe(new Gt(ve,ve._currentMarker))}))},Oe.prototype.onPointerDown=function(Pe){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Pe.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var ve=this.markers.find(function(Fe){return Fe.ownsTarget(Pe.target)});ve!==void 0?(this.setCurrentMarker(ve),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY),Pe.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Pe.clientX,y:Pe.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY))},Oe.prototype.onDblClick=function(Pe){if(this._isFocused||this.focus(),this.mode==="select"){var ve=this.markers.find(function(Fe){return Fe.ownsTarget(Pe.target)});ve!==void 0&&ve!==this._currentMarker&&this.setCurrentMarker(ve),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY),Pe.target):this.setCurrentMarker()}},Oe.prototype.onPointerMove=function(Pe){this.touchPoints!==1&&Pe.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Pe.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY)):this.zoomLevel>1&&this.panTo({x:Pe.clientX,y:Pe.clientY}))},Oe.prototype.onPointerUp=function(Pe){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY)),this.isDragging=!1,this.addUndoStep()},Oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Oe.prototype.onKeyUp=function(Pe){this._currentMarker===void 0||this.notesArea!==void 0||Pe.key!=="Delete"&&Pe.key!=="Backspace"||this.deleteSelectedMarker()},Oe.prototype.clientToLocalCoordinates=function(Pe,ve){var Fe=this.markerImage.getBoundingClientRect();return{x:(Pe-Fe.left)/this.zoomLevel,y:(ve-Fe.top)/this.zoomLevel}},Oe.prototype.onWindowResize=function(){this.positionUI()},Oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Pe=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Pe+"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()},Oe.prototype.addLicenseKey=function(Pe){yt.addKey(Pe)},Oe.prototype.addEventListener=function(Pe,ve){this.eventListeners.addEventListener(Pe,ve)},Oe.prototype.removeEventListener=function(Pe,ve){this.eventListeners.removeEventListener(Pe,ve)},Oe.prototype.renderState=function(Pe){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Pe),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Oe.prototype.focus=function(){var Pe=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(ve){return ve(new Yt(Pe))}))},Oe.prototype.blur=function(){var Pe=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ve){return ve(new Yt(Pe))}))},Oe.instanceCounter=0,Oe}(),Ze=pe(99064),At=pe(955),Dt=(Oe,Pe,ve)=>new Promise((Fe,We)=>{var Ne=un=>{try{sn(ve.next(un))}catch(Pt){We(Pt)}},ft=un=>{try{sn(ve.throw(un))}catch(Pt){We(Pt)}},sn=un=>un.done?Fe(un.value):Promise.resolve(un.value).then(Ne,ft);sn((ve=ve.apply(Oe,Pe)).next())}),et=({data:Oe,className:Pe,fullWidth:ve,style:Fe={},onClose:We,onOk:Ne,showFullTools:ft,noAssociationId:sn})=>{const un=(0,ge.useRef)(null),Pt=(0,ge.useRef)(null),qt=(0,ge.useRef)(null),Mn=(0,ge.useRef)(null),[hn,fn]=(0,ge.useState)(!1),[ui,gi]=(0,ge.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ge.useEffect)(()=>(qt.current||(qt.current=document.createElement("style"),document.head.appendChild(qt.current)),Oe!=null&&Oe.visible?(document.body.setAttribute("data-custom","y-hidden"),qt.current.innerHTML=" html { overflow-y: hidden; }",Oe!=null&&Oe.src&&fi()):(document.body.removeAttribute("data-custom"),qt.current&&(document.head.removeChild(qt.current),qt.current=null)),()=>{document.body.removeAttribute("data-custom"),qt.current&&(document.head.removeChild(qt.current),qt.current=null)}),[Oe==null?void 0:Oe.visible]);const fi=()=>Dt(void 0,null,function*(){fn(!0),gi("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Wi=yield(0,At.ZJ)(Oe==null?void 0:Oe.src);un.current.src="",un.current.src=Wi,un.current.onload=function(){rr()},fn(!1),gi("")}),bi=Wi=>Dt(void 0,null,function*(){fn(!0),gi("\u6B63\u5728\u4FDD\u5B58\u4E2D");const vr=yield(0,Ze.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Oe.title,file:Wi.dataUrl}});vr!=null&&vr.id&&!sn?(yield(0,Ze.ZP)(`/api/attachments/${Oe.id}/add_subitem.json`,{method:"post",body:{subitem_id:vr==null?void 0:vr.id,settings:JSON.stringify(Wi.state)}})).status===0&&Ne():vr!=null&&vr.id&&Ne(vr),fn(!1),gi("")}),_i=()=>{const Wi=document.querySelector('a[href="https://markerjs.com/"]');Wi&&Wi.parentNode&&(Wi.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(fr=>{const zi=document.querySelector(fr.name);zi&&zi.setAttribute("title",fr.title)})},rr=()=>{Pt.current=new ot(un.current),Pt.current.targetRoot=Mn.current,Pt.current.addEventListener("render",bi),Pt.current.addEventListener("beforeclose",We),ft&&(Pt.current.availableMarkerTypes=Pt.current.ALL_MARKER_TYPES,Pt.current.uiStyleSettings.redoButtonVisible=!0,Pt.current.uiStyleSettings.notesButtonVisible=!0,Pt.current.uiStyleSettings.zoomButtonVisible=!0,Pt.current.uiStyleSettings.zoomOutButtonVisible=!0,Pt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Pt.current.uiStyleSettings,Pt.current.show(),Oe!=null&&Oe.snapshotData&&Pt.current.restoreState(Oe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),_i()},300)};return ge.createElement(ge.Fragment,null,(Oe==null?void 0:Oe.visible)&&ge.createElement(Ke.Z,{spinning:hn,tip:ui,style:{position:"absolute",width:"100vw"}},ge.createElement("div",{ref:Mn,className:dt()(Re.imageDimensions,Pe,ve?Re.fullWidth:""),style:Fe},ge.createElement("img",{className:Re.img,ref:un}))))}},14791:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return ot},$:function(){return Tt}});var ge=pe(59301),Re={flex_box_center:"flex_box_center___ILe3s",flex_space_between:"flex_space_between___c0XhE",flex_box_vertical_center:"flex_box_vertical_center___Iusj1",flex_box_center_end:"flex_box_center_end___DIVMO",flex_box_column:"flex_box_column___x06LA",intelligentBox:"intelligentBox___M5xO7",red:"red___oyEWt",imgBox:"imgBox___DdoNI",underpin:"underpin___fwUex",row:"row___W9MrK",leftLayout:"leftLayout___MMjoZ",rightLayout:"rightLayout___EsxRX",head:"head___Q7Od8",centerBox:"centerBox___j58Ut",title:"title___rMcNx",tip:"tip___gLHFS",leftBox:"leftBox___DJ6lp",question:"question___THjM9",rightBox:"rightBox___CuMdf",error:"error___PHzCG",actionHead:"actionHead___vTHMx",edit:"edit___EaRLy",option:"option___z4UTy",active:"active___o8wNJ",fill:"fill___g760n",text:"text___L_lug",liWrap:"liWrap___LDwxe",li:"li___k4Mcf",buttonFixed:"buttonFixed___QxKdm",buttonWrap:"buttonWrap___OEep5",button:"button___b2y4h",menu:"menu___aQ4xO",tabs:"tabs___QmlP4",dotLoading:"dotLoading___zUYOu",showHide:"showHide___fHrAG"},Ve=pe(92310),dt=pe.n(Ve),Ke=pe(78241),st=pe(8591),Me=pe(43418),kt=pe(5871),bt=pe(95237),Ue=pe(24905),lt=pe(38854),yt=pe(54580),jt=pe(3113),Ae=pe(93948),ne=pe(19842),ee=pe(92832),ce=pe(5112),se=pe(6848),fe=pe(43604),ye=pe(85057),be=pe(3294),Te="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAAUCAYAAADC1B7dAAAAAXNSR0IArs4c6QAABk1JREFUWEd1lwlsVkUQx3/7ClGMSMSrHCKXHCpQhYhCNB5AYqRQGq1AiKgEEAiokAJFFIoipcVE5EYFyn23IGCJgoTDQimWSJSzCIKIcglUEIGu2bdv3+77vo+XfPl2Z2Zn5z8zuzsjSPDJ0tZV2ftfGog0BG0Q1AbuRABCgJDBvxorWqDE5xkZh+4porNGjRXNyKvlMuCbf2OXDPRIWYHnnQJKqaSQOimFos3s67HmG1NCupzxWDcgD2Qjf0P1qT/fqGAcGh4Yb4x1ZZSsCySy3oAV4LnOCByi9Pl7CQ00HPvIDb0cz8sUqSUFLqgQkJRjPCavzEFUZoaecz2oNjYAjXGJgEQi5Bio1kYiZYDEOEt5z4+ecZ4D2I2kGePl0eWlkUJkVxp/+yvkpOa5IDOtxxIAiE2nuEg5RhjZ2EiFhgYpF6ZfTNq662KzI+TpgOGJPJFaMjwEJCc06YZgtY5AENLMA7HpCcVTYfd0TR/yi+Vvy4F9CyG5BaQviV9nKBeOwNrXoNdOSKqqqSe2wJZ3dfS9JP0LM+MmyJt63iEfaj6m11w5DUWdo+c1yUtX6SfkrNZVOXNpP1I2Cg+qApV1KN6wc+WQ31nTh+63/K05sHc+JLeEjKW3BnT+CKxKh66L4P4WWu7ySVj1sh63GwNN0u36IwVQMk6HPWMHVKmmeceLoOR9exnpFC2nHs2F/LDxqwi5PBIdJTA6ASClbE4XOHsIhjsR3DIByhboCPVYZg2qvAHST21tlA8oA9pnQYuemqwOff5TcPMqpK2Ae5ra9Wd/hvU9ocZDkLbW0ktz4PBynU1+OgZnzhMZQo5quAhBz/DqNQdy7JHEnt4+HbZ+BqMcwJs+gR/nQ62W0EttFHxrB8PR7+xlYq78Zl2h4wQrt6oHnD8MfXaCV8XSb/wL+W2hYUd4fpKlr+sOFw7q58P3VQhosZAjGhwEmkTfE2D8Uavg4GZo+oKenz8O0zrCBw6gb8dD6Xyo3RJ6r7DrDnwD54/a1Di2HU7vhZoNofd6K7fpA7hwFF5ZFO/EpanQJBWe6Kd516/Awvb6bJnLwgQBcUjIofUuI4R+NNVnHrwcB9C3n8Lj6XBvAy0zMw3eLrSbbxwPu+ZBnVbQZ2XiyCrq9xNhz1zNH7wbbquux2Xz4eJJeG6UnitwdzfU46Kh0KwL1H9Oz0/uhA197YWgaPbmrBByyIPSvjuBLSqEnx5zDJ4EwoNOQzVt2xfwTF/L/+Zj2DkP6raCvqtuDWjzRNg1RxvQfR7Uf1rLHi+Gf87AI130mduUDR2yNa9kJjTvCtVr6fnuGbB7mlOduO+YqBByUF2diObKNmGc/Js1bEMe7F0DWdu03MU/ocYDlr/uIyhWgFrCAOfh/mEOnNpnn4LTvwQpKOCFYdCuv9bxzzm4dhlq1oczB6FgIPTbpHmnyqD243avgr5wYoc9N1G7DwnZr450QmbDN/WEY3AefDcVBq+ARk/GR2DtONgxF+qlwCAH0KIBsH9jtO5Tq5XTmnWA12bE6ypbBkUfwjvFcEfNKF9Fb2pbuF4RfYP8gCi93mIh36qVIOWAWb9bZV/nwsYp0K4H9MyNN6JwHGybAw+lwBDnbN24BpU3rfy/lyG3nZ7XSIbMHfG61oyAn1ZD91nwcHARGam/DsDcrvFgTFYleRlCvp4s42oshfZLVdgGX+FEKJoC1apDbhlUvT1qyOps2PIVNEiB95z3Itbcq5cgO8WmYFYx3OWkrpL/vCOc+xWeHQgvBmfW6NmzBDaO0bNInel3AOXUqN5cyN7J0q+Hgqon/M//w5qzeiJsmKyV9J8JbVKjpq4YqwHVT4HMr+O9bihXL8LoVrZIfWM2PNrJyl/5G8a31oAbt4c3F8Q4bhjsW2Ova5O+frpVSRdZ+ws0IPXFgjKqDD3OKzFecpWHVXmg5Fbthks36/1/fzP3OrZVgVtv2v4rT4w5rIvTSIRcEIFO05qEkXPpt6q+jUyiZtA13G0RfFnTbsS0DuZtDPU6fVmSyEP0Gimyg/bBP0Mm3QwgN/3c6CUaxwKMeNptCmPaEZ/ldr5BKiRsJhN0u1COl5QpcsqjDV4IyM3WoESKO1eJjHdTMlGE41LVaVHiuuDA8EiEw7a/AsEpPK8UZCFN7ysU/ffEteD/A0+36M8YCYIrAAAAAElFTkSuQmCC",Be="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAB4CAYAAAAqs3YmAAAAAXNSR0IArs4c6QAACbJJREFUeF7tnVtMHNcZx79vxruLITZUceNbwEpr8KXAwi6+pm3qKoraqhepVfvWB3sJqKn60Mf2hfLSPvYhquVgcKTmrVIrpbdIURXbTWPMZYHl4osSy7FpiO2QFBuDze7OOdUh3t1hvLczZ2BmzMcbO9853zf/33xnvpk5MwfB5h/nHNs6p2ohZWwH5NUcMWSzq3XZjCEaGvD5Ch64+V7vvpuIyO0IgXYafaPresXd6flWRL7FTntqs1IBxtinNXU1I+e6n3soq400QJF5kdjEYYInK3VxewFx9ExLv2wmSgOMdkzWccMIOxs+9SYUqIDA+IW+/Tdk1JAHeDxxiGvwTMYJ6nAnWLUw3v/7ow9kHK932yO/vLAxuVDVzI2cloAwN9IbfldGG3mAJ8ZeMhcsoc0L/yJ4MpLnbAXEpXtVL2Z+EYXNWG/zP2V6kwYYiSW+Z3Yw0hf+m4xDsl2pgKqeBNDlI4oAugxA1T0BVFXQ5fYE0GUAqu4JoKqCLrcngC4DUHVPAFUVdLk9AXQZgKp7AqiqoMvtCaDLAFTdE0BVBV1uTwBdBqDqngCqKuhyewLoMgBV9wRQVUGX2xNAlwGouieAqgq63N4xgDTP02WSJdwXmke6/ESe5nl6G541OvM8UqR5nv6Cl4k2O4+U5nn6E6CIWswjxahlnueeukr40Qs1sKnSvzv2JEY+vwjw5/NzcPXmYm73EOYwapnn+euf7iB4Hj0CBMTfvjGTjU4UNmgtY3/XucOj4VNYQoFfvZYDKP4ngD47Lgigz4BZwyWABNDnCvg8fMpAAuhzBRwO35oR1ireut3qXrbqpwwkgA4r4PPuKAMJoJQCNIRKyeU9YwLoPSZSERFAKbm8Z0wAvcdEKiICKCWX94wJoPeYSEVEAKXk8p4xAfQeE6mICKCUXN4zJoDeYyIVEQGUkst7xgTQe0ykIiKAUnJ5z5gAeo+JVEQEUEou7xkTQO8xkYrIUYBDVxZh6Ooi3J41IJk2pAJZ78bBDTps3aLDgT2VcGBv+S+iOAJQzNH/0zuz8MFHyfXOwZH9370zCD/55pay3klxBGDf3wmeI+RMnQiIse+WXkdFGaAYNv9yfs7p+Kk/APjhCzUlh1NlgCffnIXpW7mhk9aNsHfs5Vs3onZbEF75QfEsVAbY1Xd7RcFC60bYAyhaWdeNEIVNd2xr0Q6VAVo7oHUj7AMULWXfzySAano73poAOi7p2nZIANdWb8e9EUDHJV3bDgng2urtuDfPA7QG6LQCfq+CCaDPl78jgARw5YKOpV75lb2QpyG0+EnD8xno9DnvSeuPAPqcqDLAlvbx72ic6xkdSn3sTnYI9bm+qx6+DMD8H7trT3wNONRkIi31uUkC6CzTcgEW/Nzk0dilXQ8h1Ww3LL9eh337F++HPllM7meQ3soZpnnQuDF6quUDROR2tbDTTqXIW/7gq/jkcuuJsSOapj1tJwA/AhTP4R7eqzqKACtmE3FufPz92taR7m5kdrSw08YuwOwnl4VT8dHzuZtzETsQ/QawELyM+GsN0Q7AFR89zwXO8fn2y3UPMVXHADeZC5tiR5afAOaDh8AYB00z7+NaQiwXYNFlB2RSX3WhChlfTtrmhafjhwDJK09vDgRn5yBiLubWCqKqnsvrRsj8qTqU8eWUbT54GsD14b7wZMZHtGM4wFng8FpDVNXziQcoqs1bi4tfNRcsVnhuQiSAJdK0LTbVyiD9bMYMdfww3tM8UaiZyERIh45xZKG1KGw8D7Dck3QhQVWLpEgs8S0ACIj+RcECuvF2vKctVRjg+F5u8Hrr9tU6JxLAEhnYenz8RdT4xozZliS88/Yb4YV8zQ6+PNaQZrinUJerAZEAlgDY0nmpXkun9mbNDJjDYOqiNQsjsfhugA37MnYaosG1DaOcpXavZmFDAEsA7Ori2l+nJyOIbHshiG3Hx7/ENP6VzHZxzaVrocF4z57ZQtXpSF9r3Inbbp4H6NSlgEo/AuKbN8aimq5ts0IMaPrOZEprMsMLhgIDg3/Y92mp6tQJiASwTLJ5MxFhAThU5eAxI5hMDgz+8VAW3mpDJIBlAhRmeTPxUXvOMV2B2kB/X+NnxS4xrBf7gDgTP900Ync4JYASAItB5JWVF0dfrf+kVHf5zokqEAlgKcXzbM+Xicj5/zbVhi+e68Z0qS6dhEgAS6ldYLtXIBJAmwALDaduZaLd3Xjib2aXEsYrmVgqzkLb1z3AbCbOjEU1lrtO9EsmEsBHh/ZyJipA7HiNB4aHxlc8T1SpTsvNSAJoUsqPEAmg5VD3G8RVB6j6PNA6lKg+HyxnaPITRAJY7DpR8Zw4NDhxBIFXZ10o3nbLFyoBLJKSTmSiFSLq2qV4T9O1ckaCcmwIYAmVHIeIsBA/3XzW7s1va7irDrCco8jrNp9DnIpqzMg+Tyz3OlG8unCgPdHCALMTqzg34qNnIjNO7DcBLFNFOxAFvIMdY2GDabVmNxqy+aHTLeedyEICWCbA3B2b8jKxELyMO9QDw/Ge/R9LuM9rSgAlFSwnE/PB01Cb1wEupzg7KFxyhvdGX28+L+n+MXMCaEPBYhDP/gYM67Ap4H1xY0X/W6/WL0XaJ5qBs13CrR7Sh4ZONt6yEULuykS2serzK1l/XrUvBFHT+X3zOc8MT+zLj7smg9dm0seAYZAD3h3ta/63yj5SBiqolw/iymIll3nm36Mdk3XcMMLitwBqgwO9TbfthkEA7Sr3qJ2A+I//JtoY4GOf2kW9ol/MLbW6EOfItljieY74BUCYG+kNv2s3DAJoVzlTOwHxrZnE7lRaqzNP4wfGub4hcL1qx/6r1rk20Y7hap4MfB10gIoADFw4Fb5jJxQCaEe1Am2Wq88TQ88aeqjePN8UOV8KBmGq/1TLR+ambbFEIwN4TtwUiJ9p+Y+dUKQBRk+MvcQRs69e0UfPH5ddgDz88vjONOP1HPGpjAXnOFtdoU2cO9l4X/xmfpWt3GmNVm/yAI8nDnENnsl0RMsOFM4bAfLozxI7kkloyIJknIOuX9u8c/b9c93H0q2xkV0IerMG+mfDfY3vyWahPEBTBSXrzE/2Tj53FCAjsavbde1BA+PaJqEDZ/ggqPMrRiBUxZJLDeK3QkVPMd2kAX4ezMRhRF56nRg/EbPE6iTA3BDKsa3z8jaNpxsMxjc/NhzqcCfeEx6QkU0aoOhcfFfm7vR865MMcTUAmkEe/PnU1vQSazA/8EXO78fPtJxddYDLQ4C4lumcqoWUsR2QV5sLG5kAvGq7mgDN+3zglcltfCn1ZcbwKR30S0OvN03LaPJ/jAi5buoQkzIAAAAASUVORK5CYII=",ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAB4CAYAAAAqs3YmAAAAAXNSR0IArs4c6QAADGlJREFUeF7tnVlQHMcZx7/umT0AcSjGBonDOmxdgV2Ww0iWIsmxrfIhJ1VJ2W+uilgEjqtclTwmLxQvyYur8uCKYmFQXMmbXUlV4lw+YsmHkBECdhdkSZZlyUJgScEWh7h2d7pTvcUuw2hhp3dm2dmleWPn66+/+f+me7p7vplGkOQfpRTVt56vgJCyARAtpAg5knS1JosRhBQMdMpJbddPd+68jhCiyQiBkil0sO2qc2J4yoMQLU6mvCizVAFCyLdFlUX9p9o3z/Fqww2Qtbxa7+BuAY9X6pXtGcSBEzVneFsiN8C6lqFKqihuc8MX3pgCTrAFurt2fc2jBj/AI/5GiuGBaCVIgtv2vOnAmd89OstT8Vq33fPL7pzgdJ6LKotaAoLx/k73Jzza8ANs8h1SD1gcBdMfCHg8ki/aMojzk3lPRH9hAxtfp+tfPN64AdZ6/c+pK+jvcr/DU6GwXaqAUT0FwDRfUQJgmgEYrV4ANKpgmssLgGkGYLR6AdCogmkuLwCmGYDR6gVAowqmubwAmGYARqsXAI0qmObyAmCaARitXgA0qmCaywuAaQZgtHoB0KiCaS4vAKYZgNHqBUCjCqa5vACYZgBGqxcAjSqY5vKmARR5nmkmmaD65fJII0/kRZ6nteFpo1PnkSKR55lZ8KLRxvJIRZ5nZgJkUbM8UlSnyfPcXpkLPz1QBPm5mXti2Rj51AzAXz4ah0vXZxZPD8E4qtPkef76xY0CnkWvAAbxN38ejUXHBjZIO4z9betGi4YvwmIK/Or4IkD2vwCYYdeFAJhhwLThCoACYIYrkOHhixYoAGa4AiaHr20R2lG89ri2et5Rv2iBAqDJCmS4O9ECBUAuBUQXyiWX9YwFQOsx4YpIAOSSy3rGAqD1mHBFJAByyWU9YwHQeky4IhIAueSynrEAaD0mXBEJgFxyWc9YALQeE66IBEAuuaxnLABajwlXRAIgl1zWMxYArceEKyIBkEsu6xkLgNZjwhWRqQB7L85A76UZuDWmQDCscAWy1o3tsgQlxRI0bM+Fhh36X0QxBSDL0X/rwzH4ciS41jmYcv4PldnhhR8W63onxRSAXf8Q8Ewhp3LCIHoPJ95HxTBA1m3+9aNxs+MX/gDgJweKEnanhgEe+9sYDN9c7DrFvhHJXXvx9o2oKLXDyz9euRUaBtjWdWvJgEXsG5EcQFZKu28EG9i0e0tWdGgYoNaB2DcieYCsJO/7mQKgMb1NLy0Ami7p6joUAFdXb9NrEwBNl3R1HQqAq6u36bVZHqA2QLMVyPRRsACYou3v2CfIeLdDTebiFABNANj4yuWC0MzkA0TB65Ek5SCg7PGADQilCFMKVA4pNHxXxngSETyxqRLderu9ypSVfAEwSYCRVZCp/E2IQAVFhG8LdUIpSGhMUvDIM5VVI+3tiCTT+sREPgnVFtYgd9IQ3QgYcW+Aqa2SAszIDvzF2d9X3Uimy7V8C0xC45QUYfe0xqOBTUEgOzHFktmVUIImc9Fk/+kT+6Z4fBsGWNMceAZTGjuhRB+7y8S10OfbhuyXR0P1mOD74omLgBAE6H8E5O9kp3SnJFQ4OwqjoS13viJfrd/isCtO5xwNOjGR71NAKcUSdi7nx2aD85+97rmmFyIPwPgfu2v2/wAoFEUrTPS5yUwDeOhFf963NukRipR194iKYFoGuPpgmTTCMyg5+IuBoulp2KQQXBEPlE2WrvQcr/pcD0S9AJf93OSj3s8fnIOQS09l8WysPA9j8MZkug8wsqtjp1QJS1S+9Gxl9TUjA5DGVz4rCN/N2Umxai/4hYqQhK6dO149lOi+aGSeHPngK7s3eJp8ezCO370kAmtVgKzb/GoY9t7T8thHUnGor6+jXvXl1ERnufLxSCMgwWrtoAhT+OLcCfellUonCzD2yWXmnH30fPz6eG0yEK0IMHJRtvj2aO95SIKRLXcu+d9++wXTU+jqWs4VUyrXAVna2m0In+3prL61HMRkAC756HnUMTvpvc0XKudQqJIAylcPbFa6gqwIsP5IYAvB9PuabvOb/i5PX6IuzUhbZF3q/Kxjn2aUGyooLzh1qn3zXDzfegGuuO0AT9BGN6rgqSsZWzbPm53KeUwtIqL0zuEKd7eR+53eWBpeHipV5pUGtb2EyXDvGx6fHoC8DYJ7Imt1gHUt/lqqQNliz4LC5XLxR+90bDTtnpcI5iNHfdvCBG1X231PWvfxBx1bJ7RljeqZVQAjy2PjuY+rBxNspNbdtevrRKKbebytjeK/3wg8hgBiKddEITd9b3p6BcAVlK5tHtwJlDwUa30AMz8qd51cja5TG9ael3xl8yFUG/udUFqyLu/9f7/28Lza1vItUO9Nejkueu8Jkb2fvENPqhemkST5+zqqrpvZuvT6YvE0HPUdIBTnL5YJX+jvqvtSAIyjYl3LuUKq2PZHD7HlsfzymndPtaOwXtHNtqtpHXgYh/GOWEyU3uk7UfOpABhH6Vpv30MA8s7oIYLJTd8b995zzIa0kr+9TRfzZ9H8wcWLCpMtkxf+o56Hii50QZ2anw00YAmXRsWy28ggz6JyqsB6vP7H1YMZB0inz3RVfRetz/IAUyWM1q/HG9iPgBZGf5dDc91n/9T47WrVv1w9NUeHGjBRYhcWBSUw0FUbGxULgAvK1Xr9T0XSIBb+tpZL7/I8YUgV6LqWQDVV6KZF/9KF/q6q2EBGAAQANuKraw4cVkN4rtz1z3RMH7QXQk3r5w/jcCg2kKGydGVA9ahJAIy2wCO+w+oJvN7pR6paXtTvI83+zWEKVbGBjIKu9b3pGhT3QI3ydd6BZylgHP3ZKi1Qu6xGZNtF3/FdlwVALcCmwUPqSXzx+pIP33u1dDrVLSyR/3qvv4oAbI7aSQ7s6z1WPSwAapSrOTLwqPp5ptMGPd2vu28nEjjVxz1NgT0I0dhrt2bHlTWL2dorHUnocl+H62KqAa3kf2GD6acQonLUrsAhnTx1rOquWXFlDcCGlwcrlHlSExMGwXh/p/sTs4RKxs++nwfWzwTpvmhZStDswB9dHyTja7kyWQOQ5cBcuR4+pB6JFq+HD9971Z22+2Bt86ALKHkwKj4GuHquyz0kAC6jQG2zfzdQuD+VgukV/2DbSXli+L4n1d0nkpxn+jq2j+n1occua1ogO9mGI4MVCl7sRgkiyoacdf/VPoPTI4xRm/om/3aCYFvMD6HB5yrd75u9uJBygEafB2qFXGmCHu9JOMtE6+tw9xsFwlOeZQaEptY9RlQZ7zKCobOd7qs8fvTYZhXASCvUDmbYAmmC1D49Qum1iZdny16ASVVmQNYBjAzdmwb3I0wLYqM/isL2vJnTPa/tntQLIlk7T+vQLhRWtqrLO2y0/8zrNSPJ+lypXNYBZCe7t+nT/DmUt1+9tMaG8NgW7DYzI1srrKdpsB4hskH9OyJw+9wJ19lU5aOmHGAqrjo9Pne/NLApGMLVS2wJDeY68dlP/+C6o8eHXpvI05CjQzvUCVWsLEF4rqis6mQq0zqyFiATsLF1aFdI051hhBQM9ELPG65rZrSKSCLx3RxP3FfXFACbDAM9ne4bei8GXrusBsjEuPeB6oJECMYdVDqvTm/gEe9gG5VnRv1bQgrZipAUWyq7x0eKIWY9wEh6nzewbcmcbMlNCsYlO75WLDlv65kvsuWxEMEbQmGlUp0BEHXJuk0cJk5QvwOcQohZDzAqbGPzYEmIEk880WOjVUATMlYmqYJn7cg2R2zziIQxCilKDgYpHxAtpAgt+0EENmDJr3T1zY4ESkNh8KwGxDUDkEFir9FNj47vWO7NWp4uVG3L5nm51HHh9Ikdo4sXjL98NSCuKYBRcZ9ouVI4Rie34TAqMfSlCkKDsoS+eLrM9XW8JbLG5tRDXJMAoyCffuWy49bMZAWiUikgqZACiaVkLNcaI/NJCrfA7vjm8IZt3yVa20w1xDUNUA3p+effkm4U7Cqcg2A+AruNymDH80RSHPKcTVLmbITM27E0k8zD2FRCFACTvfFxllsOopQr9fYeq7rJ6S5mzg2wrsl3SD0SEx891y99PIgU0MRAl+tj/V6WWvIDPOJvVH9WQ2w7wCe9FiLTr6/D3cPnZdGaH2DLUCVVFHeyFWZKuVQmBrP36MPzZBtCNFiG7w8Yef2bG+BCptVudapcpkDhiTOVAHniSGTLDTA6IZ4YnvJkM8SsBsggRl5pbj1fASFlQ6IlpkRXkRWPZwrA/wPlJnpuyspBOgAAAABJRU5ErkJggg==",Ge="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAAwCAYAAADJuP4nAAAAAXNSR0IArs4c6QAAAz5JREFUeF7tnM9PE0EUx+fN7rKlAQ6EWw3GEMSE8iPSmHjz4kE961Wjif4ZpH8DicZGjYaTclYTT1ysIbEXxYOJLRZMRSUYC0X7Y2dMiyVaKd2Zt+3s4XHtfN+bfD7Zlp2dHWD0hyYwd/P9iFWrxjwhyvZgf2FlYbyILuqzAPgcR8PaELj8RFrZp29n//7YceDTyr2pL72ARgKRlM9dW4sU5c5kaxnbkdsXYtP5ZBIEssWRcRKIpNtOYKOsA3tjMcguJeMVZJu2cRKIJHukQMaYbfFaNMKyy7fju8hWh8ZJIJJqJ4H18sBtyRxrPZOa2EK2+y9OApFE/QhstgCXf3t9d3IDACSy7UGcBCJJqgist+KW3JV2NZdJJarI1o04CURSVBXYgA6swvoq2UwqsYdsTwKxAHUENq5E2xIOk/lX9+PbmDnQFYihxxjTFdhs60p3M/3oZEH3d5EEGha4f7voFUcvzuaWroCnOh0SqEqsZTz2CmyW47YsD3hDH5YfnvilMqWGQCklJG5lbJUgjd0nMGhH3GJJTATBwwLuib7+tUxq7IffenD2xupwlcFxUfO43xCN6y4BcCuFTCrx2U8XOHN9dabmCbr6/NDq4RjO2fdLo1MfOy2Gw+mrb+Z6OC9qpUDA4fzn8ICbfb4wXm4XI4EKQE0MrS+GO8zOvXxwauew/iTQhBWNnhEhN9KLM19boyRQA6apSMS2t84fe7yRTCYPHhKTQFM2NPsCsNKfddTGYjgJ1ARpNCahOiJF9sXiTIkEGjWh3xy4lINS5EigPkPzSQlVEmheg/4MSKA+O9PJ/a/QIfoKNS1Cqz/9E6OFLRQhuo0IhQa9SdCNvB63UKRoKS0UGtQnQYvZ6sxCk/D1OIke6IbG1z8T8f1Al7ZUhE+g0paK+vRpU5O+ROObmvSnTsk6gVBsKyQV+gSCEEgbe/X5o5NYgW6/u5m+Q1vr0SJ0C+gKpJdbdIkHnNMRSK+XBSwBU05VIL3giaHdhayKQHrFugsCsCX9CKRDDrCUu5jvJJCOGeki/CBK00E/QVA0WIOO2jIIP4jW8/OSP8u/m/aksJr16LC7IMj2sEbzuEkBnmdFo+u9PG7yNxidqHC3DAxxAAAAAElFTkSuQmCC",nt=pe(99064),Je=pe(57647),xt=pe(5623),He=pe(50304),Et=pe(59879),tt=pe(28451),Ot=pe(15342),gt=pe.n(Ot),Ht=(Ze,At,Dt)=>new Promise((rt,et)=>{var Oe=Fe=>{try{ve(Dt.next(Fe))}catch(We){et(We)}},Pe=Fe=>{try{ve(Dt.throw(Fe))}catch(We){et(We)}},ve=Fe=>Fe.done?rt(Fe.value):Promise.resolve(Fe.value).then(Oe,Pe);ve((Dt=Dt.apply(Ze,At)).next())}),Ut=ge.memo(({tagName:Ze="div",value:At="",className:Dt,style:rt={},onBlur:et,id:Oe})=>{const Pe=(0,ge.useRef)(null);(0,ge.useEffect)(()=>{if(!Pe.current)return;Ht(void 0,null,function*(){const We=Pe.current;We.innerHTML="";const Ne=At==null?void 0:At.split(/(`?\$\$[\s\S]*?\$\$`?)/g);for(const ft of Ne)if(ft.startsWith("$$")&&ft.endsWith("$$")||ft.startsWith("`$$")&&ft.endsWith("$$`")){const sn=ft.startsWith("`$$")?ft.slice(3,-3):ft.slice(2,-2),un=document.createElement("span");un.setAttribute("contentEditable","false"),un.setAttribute("title",ft),un.className="edu_latex",We.appendChild(un),gt().render(sn,un,{throwOnError:!1})}else{const sn=ft==null?void 0:ft.replace(/<[^>]*>/g,un=>un.startsWith("<img")?un:un.replace(/</g,"<"));We.insertAdjacentHTML("beforeend",sn)}})},[Oe]);const ve=()=>{var Fe,We;if(et&&Pe.current){const ft=Pe.current.cloneNode(!0),sn=ft.querySelectorAll("span.edu_latex");for(let un of sn){const Pt=un.getAttribute("title"),qt=document.createTextNode(Pt||""),Mn=un;(We=(Fe=Mn.parentNode)==null?void 0:Fe.replaceChild)==null||We.call(Fe,qt,Mn)}et(ft.innerHTML)}};return ge.createElement(ge.Fragment,null,ge.createElement(Ze,{ref:Pe,contentEditable:!0,className:Dt,style:rt,onBlur:ve}))}),it=pe(24065),_e=pe(34604),Wt=Object.defineProperty,Dn=Object.defineProperties,Bn=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,Tn=Object.prototype.propertyIsEnumerable,ei=(Ze,At,Dt)=>At in Ze?Wt(Ze,At,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):Ze[At]=Dt,Ln=(Ze,At)=>{for(var Dt in At||(At={}))ln.call(At,Dt)&&ei(Ze,Dt,At[Dt]);if($t)for(var Dt of $t(At))Tn.call(At,Dt)&&ei(Ze,Dt,At[Dt]);return Ze},Yn=(Ze,At)=>Dn(Ze,Bn(At)),zt=(Ze,At,Dt)=>new Promise((rt,et)=>{var Oe=Fe=>{try{ve(Dt.next(Fe))}catch(We){et(We)}},Pe=Fe=>{try{ve(Dt.throw(Fe))}catch(We){et(We)}},ve=Fe=>Fe.done?rt(Fe.value):Promise.resolve(Fe.value).then(Oe,Pe);ve((Dt=Dt.apply(Ze,At)).next())});const wn=Ze=>{Ze.preventDefault();let Dt=(Ze.clipboardData||window.clipboardData).getData("Text");document.execCommand("insertText",!1,Dt)},$n=Ze=>{Ze.key==="Enter"&&Ze.preventDefault()},Yt=({children:Ze,style:At})=>ge.createElement("div",{className:Re.leftBox,style:At,onPaste:wn},Ze),tn=({children:Ze,style:At,className:Dt})=>ge.createElement("div",{className:dt()(Re.rightBox,Dt),style:At,onPaste:wn},Ze),Gt=({className:Ze,style:At={},width:Dt=1200,onCancel:rt=()=>{},onSuccess:et=()=>{},gather:Oe={},mode:Pe=1,stickyTop:ve=0,subDisciplineId:Fe=[],hideWordFeatures:We,dataSource:Ne=[],customLeftHeadNode:ft,customRightHeadNode:sn,customLeftContent:un,hideRecognition:Pt=!1,onExchange:qt,isSingleSelection:Mn=!1,underpinBackgroundStyle:hn={},headExtraNode:fn,isRefreshItemBank:ui=!1,okText:gi="\u786E\u5B9A\u5BFC\u5165"})=>{var fi;const[bi,_i]=(0,ge.useState)(1),[rr,Wi]=(0,ge.useState)(0),[vr,fr]=(0,ge.useState)(""),[zi,Er]=(0,ge.useState)(!1),[Kn,Le]=(0,ge.useState)([]),[Ei,Ri]=(0,ge.useState)([]),[an,di]=(0,ge.useState)(!1),[yi,Li]=(0,ge.useState)(!1),[On,Un]=(0,ge.useState)(!1),[It,Kt]=(0,ge.useState)(!1),[Ye,nn]=(0,ge.useState)([]),[xn,Nt]=(0,ge.useState)(1),[at,cn]=(0,ge.useState)(!1),[Nn,kn]=(0,ge.useState)(!1),[Jn,St]=(0,ge.useState)(!0),[An,qn]=(0,ge.useState)(0),[Si,rn]=(0,ge.useState)(1),[bn,Ft]=(0,ge.useState)(""),[Pn,yn]=(0,ge.useState)([]),[Sn,Gn]=(0,ge.useState)(0),[Zn,Qn]=(0,ge.useState)(0),[ii,ji]=(0,ge.useState)(0),[pn,Ji]=(0,ge.useState)(0),[Ki,Gi]=(0,ge.useState)(0),[gn]=Ke.default.useForm(),[oi]=Ke.default.useForm(),Bi=(0,ge.useRef)(null),$i=(0,ge.useRef)(null),Ti=(0,ge.useRef)(),Qi=["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"],pr=["C","C++","Java","Python","JavaScript","Ruby"];(0,ge.useEffect)(()=>{Ne!=null&&Ne.length&&aa(Ne)},[Ne]),(0,ge.useEffect)(()=>{bi===2&&Bi.current.focus()},[bi]),(0,ge.useEffect)(()=>{On&&Vi()},[On]);const hr=()=>{if(bi===1){st.ZP.warning("\u8BF7\u5148\u4E0A\u4F20\u8BD5\u9898\uFF01");return}Me.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u6E05\u7A7A\u64CD\u4F5C\u5C06\u5220\u9664\u8BD5\u9898\u7F16\u8F91\u533A\u57DF\u7684\u5168\u90E8\u5185\u5BB9\uFF0C\u786E\u5B9A\u4E00\u952E\u6E05\u7A7A\u5417\uFF1F",onOk:()=>zt(void 0,null,function*(){_i(1)})})},Vi=()=>zt(void 0,null,function*(){const Mt=yield(0,nt.ZP)("/api/disciplines.json",{method:"get",params:{source:Pe===1?"new_question":"subject"}});nn(Mt.disciplines||[])}),xr=Mt=>{const Pi=[],_t=(Xi,wi)=>{Xi.length>=2&&Pi.push(Xi.join(""));for(let Sr=wi;Sr<Mt.length;Sr++)Xi.push(Mt[Sr]),_t(Xi,Sr+1),Xi.pop()};return _t([],0),Pi},Rn=Mt=>(Mt=Mt||"",Mt=String(Mt),Mt=Mt.replace(/\s+/g,""),Mt),Br=Mt=>(Mt=Mt||"",Mt=String(Mt),Mt=Mt.replace(/<div>/g,""),Mt=Mt.replace(/<br>/g,`
|
|
|
`),Mt=Mt.replace(/<\/div>/g,`
|
|
|
`),Mt=Or(Mt),Mt),_n=Mt=>Mt.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Or=Mt=>Mt.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'"),no=Mt=>{var Pi;const _t=Mt.clipboardData;if(_t){const Xi=_t.types.toString(),wi=_t.items;if(Xi==="Files"||_t.types.indexOf("Files")>-1){Mt.preventDefault();try{let Sr=wi[1];((Pi=wi[0])==null?void 0:Pi.kind)==="file"&&(Sr=wi[0]);const Zi=Sr.getAsFile();(0,tt.I)(Zi,Ci=>{var nr;if(Ci.id){if(((nr=Zi==null?void 0:Zi.type)==null?void 0:nr.indexOf("image"))>-1){const or=`<img src='${be.Z.API_SERVER}${Ci.url}'>`;document.execCommand("insertText",!1,or)}}else(Ci==null?void 0:Ci.status)===401&&(document.location.href="/user/login")})}catch(Sr){st.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};function br(Mt,Pi){return zt(this,null,function*(){if(typeof Mt=="string")return yield Pi(Mt);if(typeof Mt!="object"||Mt===null)return Mt;if(Array.isArray(Mt))return yield Promise.all(Mt.map(wi=>zt(this,null,function*(){return yield br(wi,Pi)})));const _t={};for(const Xi in Mt)if(Object.prototype.hasOwnProperty.call(Mt,Xi)){const wi=Mt[Xi];typeof wi=="string"?_t[Xi]=yield Pi(wi):typeof wi=="object"?_t[Xi]=yield br(wi,Pi):_t[Xi]=wi}return _t})}const mo=()=>zt(void 0,null,function*(){var Mt;Er(!0),fr("\u5904\u7406\u4E2D"),yield new Promise(Xi=>setTimeout(Xi,1e3));let Pi=(Mt=$i.current)==null?void 0:Mt.querySelectorAll('[data-text="edit"]'),_t="";try{Pi.forEach(function(Xi){var wi,Sr,Zi,Ci;const nr=Xi.cloneNode(!0),or=nr.querySelectorAll("span.edu_latex");for(let Pr of or){const Gr=Pr.getAttribute("title"),yr=document.createTextNode(Gr),kr=Pr;(Sr=(wi=kr.parentNode)==null?void 0:wi.replaceChild)==null||Sr.call(wi,yr,kr)}const cr=nr.querySelectorAll("span[style]");for(let Pr of cr)if(Pr.style.fontFamily){const Gr=Pr.innerHTML,yr=document.createTextNode(Gr),kr=Pr;(Ci=(Zi=kr.parentNode)==null?void 0:Zi.replaceChild)==null||Ci.call(Zi,yr,kr)}nr==null||nr.childNodes.forEach(function(Pr){Pr.nodeType===Node.ELEMENT_NODE&&Pr.localName!=="h5"&&Pr.localName!=="h4"?_t+=`<p>${Pr.innerHTML}</p>`:Pr.nodeType===Node.TEXT_NODE&&(_t+=`<p>${Pr.textContent}</p>`)})}),Ho("/api/intelligent_imports/import.json",{html:Or(_t)})}catch(Xi){console.error("\u5904\u7406\u8282\u70B9\u9519\u8BEF:",Xi)}}),Jr=Mt=>{let Pi=Mt.filter(_t=>!!(_t!=null&&_t.type));return Pi=Pi.map(_t=>{var Xi;const wi=(Xi=pi.find(Zi=>Zi.id===(_t==null?void 0:_t.type)))==null?void 0:Xi.deal,Sr=Yn(Ln({},_t),{id:String(Math.random()).slice(-6),knowledgePoint:Rn(_t==null?void 0:_t.knowledgePoint)});return wi?wi(Sr):Sr}),Pi},ur=()=>{if(bi===1){st.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898!");return}Me.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u91CD\u65B0\u8BC6\u522B\u4F1A\u8986\u76D6\u53F3\u4FA7\u5DF2\u8BC6\u522B\u7ED3\u679C\uFF0C\u5305\u62EC\u4EBA\u5DE5\u4FEE\u6539\u7684\u5185\u5BB9\uFF0C\u786E\u5B9A\u91CD\u65B0\u8BC6\u522B\u5417?",onOk:mo})},er=()=>ge.createElement("div",{className:Re.row},ge.createElement("div",{className:Re.leftLayout},ge.createElement(Yt,{style:{height:675}},bi===1&&ge.createElement("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center"},onClick:()=>_i(2)},ge.createElement("div",{style:{color:"#9096A3",fontSize:12}},"1.\u672C\u529F\u80FD\u652F\u6301\u5BFC\u5165\u7684\u9898\u578B\uFF1A\u5355\u9009\u9898\u3001\u591A\u9009\u9898\u3001\u586B\u7A7A\u9898\u3001\u5224\u65AD\u9898\u3001\u7B80\u7B54\u9898\u3001 \u7EC4\u5408\u9898\u3001\u7F16\u7A0B\u9898\u3001\u7A0B\u5E8F\u586B\u7A7A\u9898\u3002",ge.createElement("br",null),"2.\u82E5\u8981\u5BFC\u5165\u7EC4\u5408\u9898\uFF0C\u8BF7\u5728\u9898\u76EE\u524D\u540E\u4F7F\u7528\u4E00\u5BF9\u201C","{{\u201D\u3001\u201C}}","\u201D\u5C06\u5185\u5BB9\u6807\u51FA\uFF1B\u5927\u9898\u9898\u5E72\u548C\u5C0F\u9898\u9898\u5E72\u4E4B\u95F4\u4E0D\u9700\u8981\u7A7A\u884C\uFF1B\u5927\u9898\u548C\u5C0F\u9898\u9898\u5E72\u90FD\u9700\u6807\u6CE8\u9898\u53F7\uFF1B\u5C0F\u9898\u7B54\u6848\u53EF\u8DDF\u5728\u5C0F\u9898\u9898\u5E72\u540E\uFF0C\u5E76\u7528\u7A7A\u683C\u4E0E\u9898\u5E72\u5185\u5BB9\u9694\u5F00\u3002\u8303\u4F8B\u53EF\u53C2\u8003\u63A8\u8350\u683C\u5F0F\u3002",ge.createElement("br",null),"3.\u5BFC\u5165\u652F\u6301\u6587\u672C\u3001\u56FE\u7247\u3001\u516C\u5F0F\u3002\u9898\u76EE\u7ED3\u6784\u652F\u6301\u8BC6\u522B\u7B54\u6848\u3001\u89E3\u6790\u3001\u96BE\u5EA6\u3001\u77E5\u8BC6\u70B9\u3002",ge.createElement("br",null),"4.\u82E5\u8BC6\u522B\u6709\u8BEF\uFF0C\u53EF\u5728\u5DE6\u4FA7\u4FEE\u6539\u9898\u76EE\u5185\u5BB9\u540E\u91CD\u65B0\u8BC6\u522B\uFF0C\u6216\u4E0B\u8F7D\u63A8\u8350\u683C\u5F0F\uFF0C\u6309\u683C\u5F0F\u4FEE\u6539\u540E\u91CD\u65B0\u5BFC\u5165\u8BC6\u522B\u3002",ge.createElement("br",null)),ge.createElement("div",{className:Re.imgBox,style:{marginTop:75}},ge.createElement("img",{width:56,src:Be}),ge.createElement("span",null,"\u7F16\u8F91\u533A"))),bi===2&&ge.createElement("div",{"data-text":"edit",onBlur:()=>{Bi.current.innerHTML||_i(1)},ref:Bi,contentEditable:!0,style:{color:"#9096A3",height:"100%",overflow:"auto"}}))),ge.createElement("div",{className:Re.rightLayout,style:{display:"flex",alignItems:"start",justifyContent:"center"}},ge.createElement("div",{className:Re.imgBox,style:{marginTop:240}},ge.createElement("img",{width:56,src:ze}),ge.createElement("span",null,"\u9884\u89C8\u533A")))),qi=(Mt,Pi,_t,Xi)=>{var wi;console.log(Mt,Pi,_t,Xi,"onDataChange\u4FEE\u6539\u6570\u503C");const Sr=JSON.parse(JSON.stringify(Ei));Xi===void 0?Sr[Pi][Mt]=_t:Sr[Pi].questions[Xi][Mt]=_t;const Zi=Ln({},Sr[Pi]),Ci=(wi=pi.find(nr=>nr.id===(Zi==null?void 0:Zi.type)))==null?void 0:wi.deal;Sr[Pi]=Ci(Zi),Ri(Sr)},Rr=(Mt,Pi,_t)=>{var Xi;const wi=_t!==void 0,Sr=(Xi=pi.find(nr=>nr.id===(Mt==null?void 0:Mt.type)))==null?void 0:Xi.type,Zi=`${Pi+1}.${_t===void 0?"":_t+1+"."}`,Ci=`${(Mt==null?void 0:Mt.type)==="7"?"{{":""}${Zi}\u3010${Sr}\u3011${(Mt==null?void 0:Mt.question)||""}`;return ge.createElement(ge.Fragment,null,wi&&ge.createElement("h4",{contentEditable:!0}),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,tagName:"div",value:Ci}))},Ii=(Mt,Pi)=>zt(void 0,null,function*(){var _t;const Xi=yield qt(Mt,Pi),wi=(_t=Xi==null?void 0:Xi.data)==null?void 0:_t.content;if(wi!=null&&wi.length){const Sr=Jr(wi)[0];Kn.splice(Pi,1,Sr),Ei.splice(Pi,1,Sr),Le([...Kn]),Ri([...Ei])}}),Qe=(Mt,Pi,_t)=>{var Xi;const wi=_t!==void 0,Sr=(Xi=pi.find(Ci=>Ci.id===(Mt==null?void 0:Mt.type)))==null?void 0:Xi.type,Zi=`${Pi+1}.${_t===void 0?"":_t+1+"."}`;return wi?ge.createElement("div",{style:{padding:"10px 18px"}},`${Zi}\u3010${Sr}\u3011`,ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,tagName:"span",className:Re.edit,onBlur:Ci=>qi("question",Pi,Ci,_t),value:(Mt==null?void 0:Mt.question)||""})):ge.createElement(ge.Fragment,null,ge.createElement("div",{className:Re.actionHead},ge.createElement("div",{className:"c-light-primary"},`${Zi}\u3010${Sr}\u3011`),Pe!==1&&ge.createElement(kt.Z,{disabled:(Mt==null?void 0:Mt.type)==="7",min:0,max:100,style:{width:100,marginLeft:10},addonAfter:"\u5206",precision:1,size:"middle",onChange:Ci=>qi("score",Pi,Ci,_t),value:Mt==null?void 0:Mt.score}),ge.createElement(bt.Z,{align:"middle",style:{marginLeft:"auto"}},!!qt&&ge.createElement("span",{className:"current c-light-primary mr30",onClick:()=>Ii(Mt,Pi)},ge.createElement("i",{className:"iconfont icon-huanyihuan mr5"}),"\u6362\u4E00\u6362"),ge.createElement(Ue.default,{onChange:Ci=>qi("checked",Pi,Ci.target.checked,_t),checked:!!(Mt!=null&&Mt.checked)},"\u4E0D\u5BFC\u5165\u6B64\u9898"))),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,tagName:"div",style:{padding:"10px 18px"},className:Re.edit,onBlur:Ci=>qi("question",Pi,Ci,_t),value:Mt==null?void 0:Mt.question}))},Qr=(Mt,Pi,_t)=>ge.createElement(ge.Fragment,null,["0","1","2","4"].includes(Mt==null?void 0:Mt.type)&&ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u7B54\u6848\uFF1A${Pi||""}`,tagName:"p"}),!_t&&ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u96BE\u5EA6\uFF1A${(Mt==null?void 0:Mt.difficulty)||""}`,tagName:"p"}),(Mt==null?void 0:Mt.type)!=="7"&&ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u89E3\u6790\uFF1A${(Mt==null?void 0:Mt.analyze)||""}`,tagName:"p"}),!_t&&ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u77E5\u8BC6\u70B9\uFF1A${(Mt==null?void 0:Mt.knowledgePoint)||""}`,tagName:"p"})),lo=(Mt,Pi,_t,Xi)=>{const wi=Xi!==void 0,Sr=["\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],Zi=wi&&!Mt.last&&!Mt.errorMsg?{marginBottom:10}:{},Ci=Sr.map(nr=>({key:nr,label:nr,onClick:()=>qi("difficulty",_t,nr,Xi)}));return ge.createElement("div",{className:Re.liWrap,style:Zi},["4"].includes(Mt==null?void 0:Mt.type)&&ge.createElement("div",{className:Re.li},ge.createElement("aside",null,"\u7B54\xA0\xA0\xA0\xA0\u6848\uFF1A"),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,tagName:"div",className:`${Re.edit} c-black`,onBlur:nr=>qi("answer",_t,[nr],Xi),value:Pi})),!wi&&ge.createElement("div",{className:Re.li},ge.createElement("aside",null,"\u96BE\xA0\xA0\xA0\xA0\u5EA6\uFF1A"),ge.createElement("div",{className:"c-black"},ge.createElement(lt.Z,{menu:{items:Ci}},ge.createElement("span",{className:"c-light-primary"},Mt==null?void 0:Mt.difficulty,ge.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),(Mt==null?void 0:Mt.type)!=="7"&&ge.createElement("div",{className:Re.li},ge.createElement("aside",null,"\u89E3\xA0\xA0\xA0\xA0\u6790\uFF1A"),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,tagName:"div",className:`${Re.edit} c-grey-333`,onBlur:nr=>qi("analyze",_t,nr,Xi),value:Mt==null?void 0:Mt.analyze})),!wi&&ge.createElement("div",{onKeyDown:$n,className:Re.li},ge.createElement("aside",null,"\u77E5\u8BC6\u70B9\uFF1A"),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,tagName:"div",value:(Mt==null?void 0:Mt.knowledgePoint)||"",className:`${Re.edit} c-grey-333`,onBlur:nr=>qi("knowledgePoint",_t,Rn(Br(nr)),Xi)})))},jr=Mt=>ge.createElement(ge.Fragment,null,typeof(Mt==null?void 0:Mt.errorMsg)=="string"&&!!(Mt!=null&&Mt.errorMsg)&&ge.createElement("h5",{contentEditable:!1},ge.createElement("i",{className:"iconfont icon-shanchuhuanjing"}),ge.createElement("div",null,Mt==null?void 0:Mt.errorMsg))),vo=Mt=>ge.createElement(ge.Fragment,null,typeof(Mt==null?void 0:Mt.errorMsg)=="string"&&!!(Mt!=null&&Mt.errorMsg)&&ge.createElement("h5",null,ge.createElement("i",{className:"iconfont icon-shanchuhuanjing"}),ge.createElement("div",null,Mt==null?void 0:Mt.errorMsg))),po=(Mt,Pi,_t,Xi)=>{let wi="flex";return(Mn&&An!==Xi||an&&!(_t!=null&&_t.errorMsg))&&(wi="none"),ge.createElement("div",{className:Re.row,style:{display:wi}},ge.createElement("div",{className:Re.leftLayout},un||ge.createElement(Yt,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Re.question},Mt))),ge.createElement("div",{className:Re.rightLayout},ge.createElement(tn,{className:_t!=null&&_t.errorMsg?Re.error:""},Pi)))},pi=[{id:"0",type:"\u5355\u9009\u9898",element:(Mt,Pi,_t)=>{var Xi,wi;const Sr=_t!==void 0;let Zi=(Xi=Mt==null?void 0:Mt.answer)==null?void 0:Xi[0];const Ci=ge.createElement(ge.Fragment,null,Rr(Mt,Pi,_t),(wi=Mt==null?void 0:Mt.options)==null?void 0:wi.map((Pr,Gr)=>ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,key:Gr,value:`${Qi[Gr]}.${Pr}`,tagName:"p"})),Qr(Mt,Zi,Sr),jr(Mt));let nr=Sr?Mt:Ei[Pi];const or=nr==null?void 0:nr.options,cr=ge.createElement(ge.Fragment,null,Qe(nr,Pi,_t),or==null?void 0:or.map((Pr,Gr)=>{var yr;return ge.createElement("div",{key:Gr,className:Re.option},ge.createElement("aside",{className:((yr=nr==null?void 0:nr.answer)==null?void 0:yr[0])===Qi[Gr]?Re.active:"",onClick:()=>qi("answer",Pi,[Qi[Gr]],_t)},Qi[Gr]),ge.createElement(Ut,{id:nr==null?void 0:nr.id,tagName:"div",className:`${Re.text}`,onBlur:kr=>{or[Gr]=kr,qi("options",Pi,or,_t)},value:Pr}))}),lo(nr,"",Pi,_t),vo(nr));return Sr?[Ci,cr]:po(Ci,cr,nr,Pi)},deal:Mt=>{var Pi,_t,Xi;Mt.score=Mt.score===void 0?2:Mt.score;let wi=Rn((Pi=Mt==null?void 0:Mt.answer)==null?void 0:Pi[0]).toUpperCase();Mt.answer=wi?[wi]:[];let Sr=[];if(!(Mt!=null&&Mt.options))Sr.push("\u672A\u8BC6\u522B\u5230\u9009\u9879\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C A.\u9009\u9879\u4E00 B.\u9009\u9879\u4E8C C.\u9009\u9879\u4E09 \u201D");else{Mt.options=(_t=Mt.options)==null?void 0:_t.slice(0,8);const Zi=Mt.options.map(nr=>nr==null?void 0:nr.trim().replace(/^\s+|\s+$/g,""));new Set(Zi).size!==Zi.length&&Sr.push("\u9009\u9879\u5185\u5BB9\u91CD\u590D")}return wi||Sr.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AA \u201D"),wi&&(Qi.slice(0,((Xi=Mt==null?void 0:Mt.options)==null?void 0:Xi.length)||8).includes(wi)||Sr.push("\u6B63\u786E\u7B54\u6848\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AA \u201D")),Rn(Mt==null?void 0:Mt.question)||Sr.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Mt.errorMsg=Sr.join(`
|
|
|
`),Mt}},{id:"1",type:"\u591A\u9009\u9898",element:(Mt,Pi,_t)=>{var Xi,wi;const Sr=_t!==void 0;let Zi=(Xi=Mt==null?void 0:Mt.answer)==null?void 0:Xi[0];const Ci=ge.createElement(ge.Fragment,null,Rr(Mt,Pi,_t),(wi=Mt==null?void 0:Mt.options)==null?void 0:wi.map((Pr,Gr)=>ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,key:Gr,value:`${Qi[Gr]}.${Pr}`,tagName:"p"})),Qr(Mt,Zi,Sr),jr(Mt));let nr=Sr?Mt:Ei[Pi];const or=nr==null?void 0:nr.options,cr=ge.createElement(ge.Fragment,null,Qe(nr,Pi,_t),or==null?void 0:or.map((Pr,Gr)=>{var yr,kr;return ge.createElement("div",{key:Gr,className:Re.option},ge.createElement("aside",{className:(kr=(yr=nr==null?void 0:nr.answer)==null?void 0:yr[0])!=null&&kr.includes(Qi[Gr])?Re.active:"",onClick:()=>{var Zr;let Oi=((Zr=nr==null?void 0:nr.answer)==null?void 0:Zr[0])||"";const sa=Qi[Gr];Oi.includes(sa)?Oi=Oi.replace(new RegExp(sa,"g"),""):Oi+=sa,Oi=Oi.split("").sort().join(""),qi("answer",Pi,[Oi],_t)}},Qi[Gr]),ge.createElement(Ut,{id:nr==null?void 0:nr.id,tagName:"div",className:`${Re.text}`,onBlur:Zr=>{or[Gr]=Zr,qi("options",Pi,or,_t)},value:Pr}))}),lo(nr,"",Pi,_t),vo(nr));return Sr?[Ci,cr]:po(Ci,cr,nr,Pi)},deal:Mt=>{var Pi,_t,Xi;Mt.score=Mt.score===void 0?2:Mt.score;let wi=Rn((Pi=Mt==null?void 0:Mt.answer)==null?void 0:Pi[0]).toUpperCase().split("").sort().join("");Mt.answer=wi?[wi]:[];let Sr=[];if(!(Mt!=null&&Mt.options))Sr.push("\u672A\u8BC6\u522B\u5230\u9009\u9879\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C A.\u9009\u9879\u4E00 B.\u9009\u9879\u4E8C C.\u9009\u9879\u4E09 \u201D");else{Mt.options=(_t=Mt.options)==null?void 0:_t.slice(0,8);const Zi=Mt.options.map(nr=>nr==null?void 0:nr.trim().replace(/^\s+|\s+$/g,""));new Set(Zi).size!==Zi.length&&Sr.push("\u9009\u9879\u5185\u5BB9\u91CD\u590D")}if(wi||Sr.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AAB \u201D"),wi){const Zi=Qi.slice(0,((Xi=Mt==null?void 0:Mt.options)==null?void 0:Xi.length)||8);xr(Zi).includes(wi)||Sr.push("\u6B63\u786E\u7B54\u6848\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AAB \u201D")}return Rn(Mt==null?void 0:Mt.question)||Sr.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Mt.errorMsg=Sr.join(`
|
|
|
`),Mt}},{id:"2",type:"\u5224\u65AD\u9898",element:(Mt,Pi,_t)=>{var Xi,wi;const Sr=_t!==void 0;let Zi=(Xi=Mt==null?void 0:Mt.answer)==null?void 0:Xi[0];const Ci=ge.createElement(ge.Fragment,null,Rr(Mt,Pi,_t),Qr(Mt,Zi,Sr),jr(Mt));let nr=Sr?Mt:Ei[Pi];const or=["\u6B63\u786E","\u9519\u8BEF"];let cr=((wi=nr==null?void 0:nr.answer)==null?void 0:wi[0])||"";["\u6B63\u786E","\u5BF9","T","True","t","true"].includes(cr)?cr="\u6B63\u786E":["\u9519\u8BEF","\u9519","T","true","t","false"].includes(cr)&&(cr="\u9519\u8BEF");const Pr=ge.createElement(ge.Fragment,null,Qe(nr,Pi,_t),or==null?void 0:or.map((Gr,yr)=>ge.createElement("div",{key:yr,className:Re.option},ge.createElement("aside",{style:{borderRadius:2},className:cr===Gr?Re.active:"",onClick:()=>qi("answer",Pi,[Gr],_t)},Gr==="\u6B63\u786E"?"T":"F"),ge.createElement("div",{style:{pointerEvents:"none"},className:`${Re.text}`},Gr))),lo(nr,"",Pi,_t),vo(nr));return Sr?[Ci,Pr]:po(Ci,Pr,nr,Pi)},deal:Mt=>{var Pi;Mt.score=Mt.score===void 0?2:Mt.score;let _t=Rn((Pi=Mt==null?void 0:Mt.answer)==null?void 0:Pi[0]);Mt.answer=_t?[_t]:[];let Xi=[];return _t||Xi.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1A\u9519\u8BEF\u201D"),_t&&!["\u6B63\u786E","\u5BF9","T","True","t","true","\u9519\u8BEF","\u9519","T","true","t","false"].includes(_t)&&Xi.push("\u6B63\u786E\u7B54\u6848\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1A\u9519\u8BEF\u201D"),Rn(Mt==null?void 0:Mt.question)||Xi.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Mt.errorMsg=Xi.join(`
|
|
|
`),Mt}},{id:"3",type:"\u586B\u7A7A\u9898",element:(Mt,Pi,_t)=>{var Xi,wi;const Sr=_t!==void 0,Zi=ge.createElement(ge.Fragment,null,Rr(Mt,Pi,_t),(Xi=Mt==null?void 0:Mt.answer)==null?void 0:Xi.map((or,cr)=>ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,key:cr,tagName:"p",value:`\u7B54\u6848${cr+1}\uFF1A${or.text||""}`})),Qr(Mt,"",Sr),jr(Mt));let Ci=Sr?Mt:Ei[Pi];const nr=ge.createElement(ge.Fragment,null,Qe(Ci,Pi,_t),(wi=Ci==null?void 0:Ci.answer)==null?void 0:wi.map((or,cr)=>ge.createElement("div",{key:cr,className:Re.option},ge.createElement("aside",{className:Re.fill},"\u586B\u7A7A\u9879",cr+1),or.model===1&&ge.createElement(Ut,{id:Ci==null?void 0:Ci.id,tagName:"div",onBlur:Pr=>{Ci.answer[cr].latex=Br(Pr),qi("answer",Pi,Ci.answer,_t)},className:`${Re.text}`,value:or.latex}),or.model===2&&ge.createElement(Et.Z,{value:or.latex,onChange:Pr=>{Ci.answer[cr].latex=Pr,qi("answer",Pi,Ci.answer,_t)}}))),lo(Ci,"",Pi,_t),vo(Ci));return Sr?[Zi,nr]:po(Zi,nr,Ci,Pi)},deal:Mt=>{var Pi,_t,Xi,wi;Mt.score=Mt.score===void 0?2:Mt.score,Mt.question=(Pi=Mt.question)==null?void 0:Pi.replaceAll("\u2581","_");const Sr=(_t=Mt.answer)==null?void 0:_t.map(Ci=>{if(Object.prototype.toString.call(Ci)==="[object Object]")return Ci;const nr={model:1,text:Ci,latex:Ci};return Ci.startsWith("$$")&&Ci.endsWith("$$")||Ci.startsWith("`$$")&&Ci.endsWith("$$`")?(nr.model=2,nr.latex=Ci.slice(2,-2)):nr.latex=Br(Ci),nr});Mt.answer=Sr;let Zi=[];return Sr||Zi.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u7B54\u68481\uFF1A\u4E2D\u56FD\uFF1B\u7B54\u68482\uFF1A\u4E16\u754C"),Rn(Mt==null?void 0:Mt.question)?Mt!=null&&Mt.question.includes("_")?(Xi=Mt==null?void 0:Mt.answer)!=null&&Xi.length&&((Mt==null?void 0:Mt.question.match(/_+/g))||[]).length!==((wi=Mt==null?void 0:Mt.answer)==null?void 0:wi.length)&&Zi.push("\u586B\u7A7A\u9879\u4E0E\u7B54\u6848\u4E2A\u6570\u4E0D\u5339\u914D\uFF0C\u8BF7\u8FDB\u884C\u8C03\u6574"):Zi.push("\u586B\u7A7A\u9879\u672A\u8BBE\u7F6E\uFF0C\u8BF7\u4F7F\u7528\u82F1\u6587\u4E0B\u5212\u7EBF\u201C___\u201D\u8868\u793A\u586B\u7A7A\u9879"):Zi.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Mt.errorMsg=Zi.join(`
|
|
|
`),Mt}},{id:"4",type:"\u7B80\u7B54\u9898",element:(Mt,Pi,_t)=>{var Xi,wi;const Sr=_t!==void 0;let Zi=(Xi=Mt==null?void 0:Mt.answer)==null?void 0:Xi[0];const Ci=ge.createElement(ge.Fragment,null,Rr(Mt,Pi,_t),Qr(Mt,Zi,Sr),jr(Mt));let nr=Sr?Mt:Ei[Pi];const or=ge.createElement(ge.Fragment,null,Qe(nr,Pi,_t),lo(nr,(wi=nr==null?void 0:nr.answer)==null?void 0:wi[0],Pi,_t),vo(nr));return Sr?[Ci,or]:po(Ci,or,nr,Pi)},deal:Mt=>{Mt.score=Mt.score===void 0?5:Mt.score;let Pi=[];return Rn(Mt==null?void 0:Mt.question)||Pi.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Mt.errorMsg=Pi.join(`
|
|
|
`),Mt}},{id:"6",type:"\u7F16\u7A0B\u9898",element:(Mt,Pi)=>{var _t,Xi;const wi=Ei[Pi],Sr=pr.slice(0,4).map(Zi=>({key:Zi,label:Zi,onClick:()=>qi("platform",Pi,Zi)}));return ge.createElement("div",{className:Re.row,style:{display:an?wi!=null&&wi.errorMsg?"flex":"none":"flex"}},ge.createElement("div",{className:Re.leftLayout},ge.createElement(Yt,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Re.question},Rr(Mt,Pi),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u8BD5\u9898\u63CF\u8FF0\uFF1A${(Mt==null?void 0:Mt.description)||""}`,tagName:"p"}),Qr(Mt),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A${Mt==null?void 0:Mt.timeLimit}`,tagName:"p"}),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u7F16\u7A0B\u8BED\u8A00\uFF1A${(Mt==null?void 0:Mt.platform)||""}`,tagName:"p"}),ge.createElement("p",{contentEditable:!0},"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\uFF1A"),ge.createElement("h4",null),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:(Mt==null?void 0:Mt.code)||"",tagName:"div"}),(_t=Mt==null?void 0:Mt.inputs)==null?void 0:_t.map((Zi,Ci)=>{var nr;return ge.createElement(ge.Fragment,{key:Ci},ge.createElement("h4",null),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u6D4B\u8BD5\u7528\u4F8B(${Ci+1})\u8F93\u5165\uFF1A${Zi||""}`,tagName:"div"}),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u6D4B\u8BD5\u7528\u4F8B(${Ci+1})\u8F93\u51FA\uFF1A${((nr=Mt==null?void 0:Mt.outputs)==null?void 0:nr[Ci])||""}`,tagName:"div"}))}),jr(Mt)))),ge.createElement("div",{className:Re.rightLayout},ge.createElement(tn,{className:wi!=null&&wi.errorMsg?Re.error:""},Qe(wi,Pi),ge.createElement("div",{className:Re.liWrap,style:{background:"transparent",marginBottom:0,padding:0}},ge.createElement("div",{className:Re.li},ge.createElement("aside",null,"\u8BD5\u9898\u63CF\u8FF0\uFF1A"),ge.createElement(Ut,{className:Re.edit,id:wi==null?void 0:wi.id,value:wi==null?void 0:wi.description,tagName:"div",onBlur:Zi=>qi("description",Pi,Zi)}))),lo(wi,"",Pi),ge.createElement("div",{className:Re.liWrap},ge.createElement("div",{className:Re.li},ge.createElement("aside",null,"\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A"),ge.createElement(Ut,{className:Re.edit,id:wi==null?void 0:wi.id,value:wi==null?void 0:wi.timeLimit,tagName:"div",onBlur:Zi=>qi("timeLimit",Pi,Br(Zi))})),ge.createElement("div",{className:Re.li},ge.createElement("aside",null,"\u7F16\u7A0B\u8BED\u8A00\uFF1A"),ge.createElement("div",{className:"c-black"},ge.createElement(lt.Z,{menu:{items:Sr}},ge.createElement("span",{className:"c-light-primary"},wi==null?void 0:wi.platform,ge.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),ge.createElement("div",{className:Re.li,style:{flexDirection:"column",alignItems:"start"}},ge.createElement("aside",{className:"mb10"},"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\uFF1A"),ge.createElement(Ut,{className:Re.edit,id:wi==null?void 0:wi.id,value:(wi==null?void 0:wi.code)||"",onBlur:Zi=>qi("code",Pi,Br(Zi)),tagName:"div"}))),(Xi=wi==null?void 0:wi.inputs)==null?void 0:Xi.map((Zi,Ci)=>{var nr;return ge.createElement("div",{className:Re.liWrap,key:Ci},ge.createElement("div",{className:Re.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B(",Ci+1,")\u8F93\u5165\uFF1A"),ge.createElement(Ut,{id:wi==null?void 0:wi.id,value:Zi||"",className:Re.edit,onBlur:or=>{const cr=[...(wi==null?void 0:wi.inputs)||[]];cr[Ci]=Br(or),qi("inputs",Pi,cr)},tagName:"div"})),ge.createElement("div",{className:Re.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B(",Ci+1,")\u8F93\u51FA\uFF1A"),ge.createElement(Ut,{id:wi==null?void 0:wi.id,value:((nr=wi==null?void 0:wi.outputs)==null?void 0:nr[Ci])||"",className:Re.edit,onBlur:or=>{const cr=[...(wi==null?void 0:wi.outputs)||[]];cr[Ci]=Br(or),qi("outputs",Pi,cr)},tagName:"div"})))}),vo(wi))))},deal:Mt=>{var Pi,_t,Xi;Mt.score=Mt.score===void 0?10:Mt.score,Mt.code=(Pi=Mt.code)==null?void 0:Pi.trim();let wi=[];Rn(Mt==null?void 0:Mt.question)?((_t=Mt==null?void 0:Mt.question)==null?void 0:_t.length)>60&&wi.push("\u7F16\u7A0B\u9898\u540D\u79F0\u9650\u523660\u4E2A\u5B57\u7B26"):wi.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Rn(Mt==null?void 0:Mt.description)||wi.push("\u672A\u8BC6\u522B\u5230\u8BD5\u9898\u63CF\u8FF0");const Sr=Rn(String((Mt==null?void 0:Mt.timeLimit)||""));if(Mt.timeLimit=Sr,(!Sr||Sr&&!["3","4","5","6","7","8","9","10"].includes(Sr))&&wi.push("\u65F6\u95F4\u9650\u5236\u4E3A\u5FC5\u586B\u9879\uFF0C\u53EA\u652F\u63013-10\u7684\u6574\u6570"),Mt.platform=Rn(Mt==null?void 0:Mt.platform),Mt!=null&&Mt.platform){const Zi=["c","c++","java","python"],Ci=(Xi=Mt==null?void 0:Mt.platform)==null?void 0:Xi.toLowerCase(),nr=Zi.findIndex(or=>or===Ci);nr>-1?Mt.platform=pr[nr]:wi.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u8BED\u8A00")}else wi.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u8BED\u8A00");if(!(Mt!=null&&Mt.inputs)||!(Mt!=null&&Mt.outputs))Mt.inputs=[],Mt.outputs=[],wi.push("\u672A\u8BC6\u522B\u5230\u6D4B\u8BD5\u7528\u4F8B\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u6D4B\u8BD5\u7528\u4F8B(1)\u8F93\u5165\uFF1A1\uFF1B\u6D4B\u8BD5\u7528\u4F8B(1)\u8F93\u51FA\uFF1A2");else{const Zi=Math.min(Mt.inputs.length,Mt.outputs.length);Mt.inputs=Mt.inputs.slice(0,Zi),Mt.outputs=Mt.outputs.slice(0,Zi),Mt.outputs.some(Ci=>!Rn(Ci))&&wi.push("\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\u4E3A\u5FC5\u586B\u9879")}return Mt.errorMsg=wi.join(`
|
|
|
`),Mt}},{id:"7",type:"\u7EC4\u5408\u9898",element:(Mt,Pi)=>{var _t,Xi;const wi=Ei[Pi];return ge.createElement("div",{className:Re.row,style:{display:an?wi!=null&&wi.errorMsg?"flex":"none":"flex"}},ge.createElement("div",{className:Re.leftLayout},ge.createElement(Yt,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Re.question},Rr(Mt,Pi),Qr(Mt),(_t=Mt==null?void 0:Mt.questions)==null?void 0:_t.map((Sr,Zi)=>{var Ci;const nr=(Ci=pi.find(or=>or.id===(Sr==null?void 0:Sr.type)))==null?void 0:Ci.element;return ge.createElement(ge.Fragment,{key:`left-${Mt.id}-${Zi}`},nr(Sr,Pi,Zi)[0])}),jr(Mt),ge.createElement("p",{contentEditable:!0},"}}")))),ge.createElement("div",{className:Re.rightLayout},ge.createElement(tn,{className:wi!=null&&wi.errorMsg?Re.error:""},Qe(wi,Pi),lo(wi,"",Pi),(Xi=wi==null?void 0:wi.questions)==null?void 0:Xi.map((Sr,Zi)=>{var Ci;const nr=(Ci=pi.find(or=>or.id===(Sr==null?void 0:Sr.type)))==null?void 0:Ci.element;return ge.createElement(ge.Fragment,{key:`right-${wi.id}-${Zi}`},nr(Sr,Pi,Zi)[1])}),vo(wi))))},deal:Mt=>{var Pi,_t,Xi,wi,Sr;const Zi=Jr,Ci=[...pi],nr=Ci.findIndex(Gr=>Gr.id==="0"),or=Ci.findIndex(Gr=>Gr.id==="1");if(nr!==-1){const Gr=Ci[nr].deal;Ci[nr].deal=yr=>{const kr=Gr(yr);return kr.errorMsg&&(kr.errorMsg=kr.errorMsg.split(`
|
|
|
`).filter(Zr=>Zr!=="\u9009\u9879\u5185\u5BB9\u91CD\u590D").join(`
|
|
|
`)),kr}}if(or!==-1){const Gr=Ci[or].deal;Ci[or].deal=yr=>{const kr=Gr(yr);return kr.errorMsg&&(kr.errorMsg=kr.errorMsg.split(`
|
|
|
`).filter(Zr=>Zr!=="\u9009\u9879\u5185\u5BB9\u91CD\u590D").join(`
|
|
|
`)),kr}}Mt.questions=(Pi=Mt.questions)!=null&&Pi.length?Jr(Mt.questions.slice(0,20)):[],Mt.questions=(_t=Mt.questions)==null?void 0:_t.map((Gr,yr)=>{var kr;if(Gr.type==="0"||Gr.type==="1"){const Zr=(kr=Gr.options)==null?void 0:kr.map(Oi=>Oi==null?void 0:Oi.trim().replace(/^\s+|\s+$/g,""));Zr&&new Set(Zr).size!==Zr.length&&(Gr.errorMsg=(Gr.errorMsg?Gr.errorMsg+`
|
|
|
`:"")+"\u9009\u9879\u5185\u5BB9\u91CD\u590D")}return Yn(Ln({},Gr),{last:yr===Mt.questions.length-1})});const cr=(Xi=Mt.questions)==null?void 0:Xi.reduce((Gr,yr)=>{const kr=parseFloat(yr.score);return isNaN(kr)?Gr:Gr+kr},0);Mt.score=cr;let Pr=[];return(wi=Mt.questions)!=null&&wi.length?Mt.errorMsg=((Sr=Mt.questions)==null?void 0:Sr.findIndex(Gr=>!!Gr.errorMsg))>-1:Pr.push("\u8BF7\u6DFB\u52A0\u5C0F\u9898"),Rn(Mt==null?void 0:Mt.question)||Pr.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Pr.length&&(Mt.errorMsg=Pr.join(`
|
|
|
`)),Mt}},{id:"8",type:"\u7A0B\u5E8F\u586B\u7A7A\u9898",element:(Mt,Pi)=>{var _t,Xi;const wi=Ei[Pi],Sr=pr.map(Zi=>({key:Zi,label:Zi,onClick:()=>qi("platform",Pi,Zi)}));return ge.createElement("div",{className:Re.row,style:{display:an?wi!=null&&wi.errorMsg?"flex":"none":"flex"}},ge.createElement("div",{className:Re.leftLayout},ge.createElement(Yt,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Re.question},Rr(Mt,Pi),Qr(Mt),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A${Mt==null?void 0:Mt.timeLimit}`,tagName:"p"}),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u7F16\u7A0B\u8BED\u8A00\uFF1A${(Mt==null?void 0:Mt.platform)||""}`,tagName:"p"}),ge.createElement("p",{contentEditable:!0},"\u7A0B\u5E8F\u4EE3\u7801\uFF1A"),ge.createElement("h4",null),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:(Mt==null?void 0:Mt.code)||"",tagName:"div"}),ge.createElement("h4",null),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u6D4B\u8BD5\u7528\u4F8B\u8F93\u5165\uFF1A${(Mt==null?void 0:Mt.input)||""}`,tagName:"p"}),ge.createElement(Ut,{id:Mt==null?void 0:Mt.id,value:`\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\uFF1A${(Mt==null?void 0:Mt.output)||""}`,tagName:"p"}),(_t=Mt==null?void 0:Mt.answer)==null?void 0:_t.map((Zi,Ci)=>ge.createElement(Ut,{key:Ci,id:Mt==null?void 0:Mt.id,value:`\u7B54\u6848${Ci+1}\uFF1A${Zi||""}`,tagName:"p"})),jr(Mt)))),ge.createElement("div",{className:Re.rightLayout},ge.createElement(tn,{className:wi!=null&&wi.errorMsg?Re.error:""},Qe(wi,Pi),lo(wi,"",Pi),ge.createElement("div",{className:Re.liWrap},ge.createElement("div",{className:Re.li,onKeyDown:$n},ge.createElement("aside",null,"\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A"),ge.createElement(Ut,{className:Re.edit,id:wi==null?void 0:wi.id,value:wi==null?void 0:wi.timeLimit,tagName:"div",onBlur:Zi=>qi("timeLimit",Pi,Br(Zi))})),ge.createElement("div",{className:Re.li},ge.createElement("aside",null,"\u7F16\u7A0B\u8BED\u8A00\uFF1A"),ge.createElement("div",{className:"c-black"},ge.createElement(lt.Z,{menu:{items:Sr}},ge.createElement("span",{className:"c-light-primary"},wi==null?void 0:wi.platform,ge.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),ge.createElement("div",{className:Re.li,style:{flexDirection:"column",alignItems:"start"}},ge.createElement("aside",{className:"mb10"},"\u7A0B\u5E8F\u4EE3\u7801\uFF1A"),ge.createElement(Ut,{className:Re.edit,id:wi==null?void 0:wi.id,value:(wi==null?void 0:wi.code)||"",onBlur:Zi=>qi("code",Pi,Br(Zi)),tagName:"div"})),ge.createElement("div",{className:Re.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B\u8F93\u5165\uFF1A"),ge.createElement(Ut,{className:Re.edit,id:wi==null?void 0:wi.id,value:(wi==null?void 0:wi.input)||"",onBlur:Zi=>qi("input",Pi,Br(Zi)),tagName:"div"})),ge.createElement("div",{className:Re.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\uFF1A"),ge.createElement(Ut,{className:Re.edit,id:wi==null?void 0:wi.id,value:(wi==null?void 0:wi.output)||"",onBlur:Zi=>qi("output",Pi,Br(Zi)),tagName:"div"}))),ge.createElement("div",{className:Re.liWrap},(Xi=wi==null?void 0:wi.answer)==null?void 0:Xi.map((Zi,Ci)=>ge.createElement("div",{className:Re.li,key:Ci},ge.createElement("aside",null,"\u7B54\u6848",Ci+1,"\uFF1A"),ge.createElement(Ut,{id:wi==null?void 0:wi.id,value:Zi||"",className:Re.edit,onBlur:nr=>{const or=[...(wi==null?void 0:wi.answer)||[]];or[Ci]=Br(nr),qi("output",Pi,or)},tagName:"div"})))),vo(wi))))},deal:Mt=>{var Pi,_t,Xi,wi,Sr,Zi,Ci,nr;Mt.score=Mt.score===void 0?10:Mt.score,Mt.code=(Xi=(_t=(Pi=Mt.code)==null?void 0:Pi.trim())==null?void 0:_t.replace(/@_@/g,"@\u2581@"))==null?void 0:Xi.replace(/@__@/g,"@\u2581\u2581@");let or=[];if(Rn(Mt==null?void 0:Mt.question)||or.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Rn(Mt==null?void 0:Mt.code)?/@▁@|@▁▁@/.test(Mt==null?void 0:Mt.code)?(wi=Mt==null?void 0:Mt.answer)!=null&&wi.length&&((Sr=Mt==null?void 0:Mt.code.match(/@▁@|@▁▁@/g))==null?void 0:Sr.length)!==((Zi=Mt==null?void 0:Mt.answer)==null?void 0:Zi.length)&&or.push("\u586B\u7A7A\u9879\u4E0E\u7B54\u6848\u4E2A\u6570\u4E0D\u5339\u914D\uFF0C\u8BF7\u8FDB\u884C\u8C03\u6574"):or.push("\u7A0B\u5E8F\u4EE3\u7801\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u7A0B\u5E8F\u4EE3\u7801\u4E2D\u7684\u586B\u7A7A\u9879\u9700\u8981\u4F7F\u7528 @\u2581@ \u7B26\u53F7\u6807\u8BC6\u51FA\u6765"):or.push("\u672A\u8BC6\u522B\u5230\u7A0B\u5E8F\u4EE3\u7801"),Mt!=null&&Mt.answer?(Ci=Mt.answer)!=null&&Ci.some(Pr=>!Rn(Pr))&&or.push("\u7B54\u6848\u4E3A\u5FC5\u586B\u9879"):or.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u7B54\u68481\uFF1AHello\uFF1B\u7B54\u68482\uFF1AWorld"),Mt.platform=Rn(Mt==null?void 0:Mt.platform),Mt!=null&&Mt.platform){const Pr=["c","c++","java","python","javascript","ruby"],Gr=(nr=Mt==null?void 0:Mt.platform)==null?void 0:nr.toLowerCase(),yr=Pr.findIndex(kr=>kr===Gr);yr>-1?Mt.platform=pr[yr]:or.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u3001JavaScript\u3001Ruby\u8BED\u8A00")}else or.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u3001JavaScript\u3001Ruby\u8BED\u8A00");Rn(Mt==null?void 0:Mt.output)||or.push("\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\u4E3A\u5FC5\u586B\u9879");const cr=Rn(String((Mt==null?void 0:Mt.timeLimit)||""));return Mt.timeLimit=cr,(!cr||cr&&!["3","4","5","6","7","8","9","10"].includes(cr))&&or.push("\u65F6\u95F4\u9650\u5236\u4E3A\u5FC5\u586B\u9879\uFF0C\u53EA\u652F\u63013-10\u7684\u6574\u6570"),Mt.errorMsg=or.join(`
|
|
|
`),Mt}}],Tr=()=>ge.createElement(ge.Fragment,null,Kn.filter(Mt=>{var Pi;return!!((Pi=pi.find(Xi=>Xi.id===(Mt==null?void 0:Mt.type)))==null?void 0:Pi.element)}).map((Mt,Pi)=>{var _t;const Xi=(_t=pi.find(wi=>wi.id===(Mt==null?void 0:Mt.type)))==null?void 0:_t.element;return ge.createElement(ge.Fragment,{key:Mt.id},Xi(Mt,Pi))})),Bo=()=>zt(void 0,null,function*(){const Mt=Ei.filter(Pi=>!Pi.checked);if(bi!==3||!Mt.length){st.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898\uFF01");return}gn.setFieldsValue({sub_discipline_id:Fe}),Un(!0)}),aa=Mt=>zt(void 0,null,function*(){const Pi=Jr(Mt);Le(Pi),Ri(JSON.parse(JSON.stringify(Pi))),_i(3),Er(!1),cn(!1),di(!1)});(0,ge.useEffect)(()=>{if(Jn)return;const Mt=()=>{Wi(Pi=>Pi>=90?(clearInterval(Ti.current),90):Pi+1)};return Ti.current=setInterval(Mt,5e4/90),()=>clearInterval(Ti.current)},[Jn]);const Ho=(Mt,Pi)=>{St(!1);const _t=new FormData;Object.keys(Pi).forEach(wi=>{_t.append(wi,Pi[wi])});const Xi=new window.XMLHttpRequest;Xi.withCredentials=!0,Xi.addEventListener("load",function(wi){return zt(this,null,function*(){var Sr,Zi;try{const Ci=JSON.parse((Sr=wi==null?void 0:wi.target)==null?void 0:Sr.response);if(St(!0),Wi(100),yield new Promise(nr=>setTimeout(()=>nr(),780)),Ci.status===0){if(!((Zi=Ci==null?void 0:Ci.data)!=null&&Zi.length)){st.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898!"),Er(!1);return}aa((Ci==null?void 0:Ci.data)||[])}else Er(!1),st.ZP.warning(Ci==null?void 0:Ci.message)}catch(Ci){console.log("\u8BF7\u6C42\u9519\u8BEF\uFF1A",Ci)}})}),Xi.addEventListener("error",()=>{Er(!1)}),Xi.open("POST",`${be.Z.API_SERVER}${Mt}`),Xi.send(_t)},Ao=Mt=>zt(void 0,null,function*(){const Pi=Mt.name.split(".").slice(-1)[0].toLowerCase();return["docx"].indexOf(Pi)==-1?(st.ZP.error(`${Mt.name}\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\uFF0C\u5F53\u524D\u4EC5\u9650\u652F\u6301\u683C\u5F0F\u4E3Adocx\u6587\u4EF6\uFF08Microsoft Word 2007\u4EE5\u4E0A\u7684\u7248\u672C\uFF09`),Promise.reject()):(Er(!0),fr("\u5904\u7406\u4E2D"),Ho("/api/intelligent_imports/import.json",{file:Mt}),Promise.reject())}),_o=Mt=>zt(void 0,null,function*(){const Pi=Mt.name.split(".").slice(-1)[0].toLowerCase();return["docx","doc","pdf","png","jpg"].indexOf(Pi)==-1?(st.ZP.warning("\u5355\u6B21\u4EC5\u652F\u6301\u4E0A\u4F201\u4E2A\u6587\u6863\u62161\u5F20\u56FE\u7247\uFF0C\u6587\u6863\u652F\u6301PDF/Word\u683C\u5F0F\uFF0C\u56FE\u7247\u652F\u63011\u5F20\u4E0D\u8D85\u8FC710M\u7684PNG/JPG\u56FE\u7247"),Promise.reject()):Mt.size/1024/1024>200?(st.ZP.warning("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E200M"),Promise.reject()):(Pn!=null&&Pn.length?Me.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u5355\u6B21\u51FA\u9898\u53EA\u652F\u6301\u4E0A\u4F20\u4E00\u4E2A\u6587\u4EF6/\u4E00\u5F20\u56FE\u7247\uFF0C\u518D\u6B21\u4E0A\u4F20\u4F1A\u66FF\u6362\u5F53\u524D\u5DF2\u4E0A\u4F20\u7684\u5185\u5BB9\u3002",onOk:()=>yn([Mt])}):yn([Mt]),Promise.reject())});let ta=[{key:1,label:ge.createElement(yt.default,{showUploadList:!1,accept:".docx",maxCount:1,beforeUpload:Ao},ge.createElement("div",{style:{padding:"0 5px",width:108,height:35,lineHeight:"35px"}},"\u672C\u5730\u5BFC\u5165"))}];((0,it.Ny)()||(0,it.$O)())&&ta.push({key:2,label:ge.createElement("div",{style:{padding:"0 5px"}},"\u5927\u6A21\u578B\u667A\u80FD\u51FA\u9898"),onClick:()=>{cn(!0)}});const Ea=[Ei.length,(fi=Ei.filter(Mt=>!!(Mt!=null&&Mt.errorMsg)))==null?void 0:fi.length];return ge.createElement("div",{className:dt()(Re.intelligentBox,"intelligent-body-curb",Ze),style:Yn(Ln({},At),{width:Dt}),ref:$i},ge.createElement("div",{className:Re.underpin},ge.createElement("b",{style:hn}),ge.createElement("b",{style:hn})),ge.createElement("div",{className:Re.head,style:{top:ve}},ge.createElement("div",{className:Re.leftLayout},ft||ge.createElement(ge.Fragment,null,ge.createElement(bt.Z,{align:"middle"},ge.createElement("div",{className:Re.title},"\u8BD5\u9898\u7F16\u8F91"),!We&&ge.createElement(ye.op,{href:`${be.Z.API_SERVER}/api/intelligent_imports/download_template`,download:!0,type:"link"},"\u4E0B\u8F7DWord\u6A21\u7248",ge.createElement("i",{className:"iconfont icon-xiazai4 font14 ml10"})),ge.createElement(ye.op,{onClick:hr,shape:"default"},"\u4E00\u952E\u6E05\u7A7A"),!We&&ge.createElement(lt.Z,{overlayClassName:Re.menu,menu:{items:ta}},ge.createElement(ye.op,{className:"ml20",type:"primary",shape:"default"},"\u5BFC\u5165\u8BD5\u9898")),!!fn&&fn),ge.createElement("div",{className:Re.tip},ge.createElement("i",{className:"iconfont icon-tishi7 font12 mr10"}),"\u63D0\u793A\uFF1A\u82E5\u8BC6\u522B\u6709\u8BEF\uFF0C\u53EF\u5728\u5DE6\u4FA7\u7F16\u8F91\u533A\u70B9\u51FB\u5BF9\u5E94\u7684\u8BD5\u9898\u6309\u683C\u5F0F\u4FEE\u6539\u540E\u91CD\u65B0\u8BC6\u522B"))),ge.createElement(bt.Z,{className:Re.rightLayout,style:{alignItems:"start"}},sn||ge.createElement(ge.Fragment,null,ge.createElement("div",{className:Re.title,style:{marginRight:0}},"\u8BD5\u9898\u9884\u89C8"),[3].includes(bi)&&ge.createElement(Ue.default,{className:"ml20",checked:an,onChange:Mt=>di(Mt.target.checked)},"\u4EC5\u67E5\u770B\u9519\u8BEF\u8BD5\u9898"),[3].includes(bi)&&ge.createElement("div",{style:{color:"#5F6368",marginLeft:"auto"}},"\u5171\u8BC6\u522B",ge.createElement("span",{className:"ml5 mr5 c-light-primary"},Ea[0]),"\u9898\uFF0C\u5176\u4E2D\u8BC6\u522B\u6709\u8BEF",ge.createElement("span",{className:"ml5 mr5 c-red-e53"},Ea[1]),"\u9898")),Mn&&ge.createElement("div",{className:Re.tabs},Kn==null?void 0:Kn.map((Mt,Pi)=>ge.createElement("div",{onClick:()=>{qn(Pi)},className:An===Pi&&Re.active,key:Pi},"\u65B0\u9898",Pi+1)))),ge.createElement("div",{className:Re.centerBox},ge.createElement("img",{className:"mb10",src:Ge,width:56}),!Pt&&ge.createElement(ye.op,{onClick:ur},"\u8BC6\u522B"))),[1,2].includes(bi)&&er(),[3].includes(bi)&&Tr(),ge.createElement("div",{className:"pb10"}),ge.createElement("div",{className:Re.buttonFixed},ge.createElement("div",{className:Re.buttonWrap},ge.createElement(jt.ZP,{size:"middle",className:`${Re.button} mr20`,onClick:rt},"\u53D6\u6D88"),ge.createElement(jt.ZP,{size:"middle",type:"primary",className:`${Re.button}`,onClick:Bo},gi))),ge.createElement(Me.default,{centered:!0,closable:!1,destroyOnClose:!0,open:zi,title:null,footer:null,width:320,afterClose:()=>Wi(0)},ge.createElement(bt.Z,{align:"middle",style:{flexDirection:"column"}},ge.createElement("b",{style:{color:"#5F6368"},className:"font16 mb5 mt20"},vr,ge.createElement("span",{className:Re.dotLoading},ge.createElement("span",null,"."),ge.createElement("span",null,"."),ge.createElement("span",null,"."))),ge.createElement(Ae.Z,{style:{width:"auto"},size:[200,8],showInfo:!1,percent:rr}),ge.createElement("div",{style:{color:"#5F6368"},className:"mb20"},"\u6B63\u5728\u8BC6\u522B\uFF0C\u5DF2\u5B8C\u6210",ge.createElement("span",{className:"ml5 c-light-primary"},rr,"%")))),ge.createElement(Me.default,{centered:!0,open:On,title:"\u8BD5\u9898\u5BFC\u5165\u8BBE\u7F6E",confirmLoading:yi,width:480,onCancel:()=>Un(!1),onOk:()=>gn.submit(),afterClose:()=>{gn.resetFields()}},ge.createElement(Ke.default,{style:{maxHeight:550},form:gn,layout:"horizontal",colon:!1,size:"large",onFinish:Mt=>zt(void 0,null,function*(){var Pi,_t,Xi,wi,Sr;const Zi=Ei.filter(or=>!or.checked&&!or.errorMsg);Li(!0);const Ci=()=>zt(void 0,null,function*(){var or,cr;const Pr=yield(0,nt.ZP)("/api/intelligent_imports/save.json",{method:"post",body:Yn(Ln(Ln({},Oe),Mt),{list:Zi,mode:Pe})});Pr.status===0&&(ui&&((or=Pr==null?void 0:Pr.data)!=null&&or.success)&&window.location.pathname==="/problemset"&&(_e.Z.publish("refresh-item-bank",Mt.group_id),yield new Promise(Gr=>setTimeout(()=>Gr(),1500))),st.ZP.success(`\u6210\u529F\u5BFC\u5165${(cr=Pr==null?void 0:Pr.data)==null?void 0:cr.success}\u9053\u8BD5\u9898`,3),et(Pr),Un(!1)),Li(!1)});if(Pe!==1){yield Ci();return}const nr=yield(0,nt.ZP)("/api/intelligent_imports/is_repeated.json",{method:"post",body:{list:Ei,mode:Pe}});if(nr.status===0){if(!((Pi=nr==null?void 0:nr.data)!=null&&Pi.error_size)){yield Ci();return}Me.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onCancel:()=>{Li(!1)},title:"\u63D0\u793A",content:ge.createElement("div",{style:{overflow:"auto",maxHeight:500}},"\u5171",ge.createElement("span",{className:"c-light-primary ml5 mr5"},(_t=nr==null?void 0:nr.data)==null?void 0:_t.all_size),"\u9053\u8BD5\u9898\uFF0C\u5176\u4E2D",ge.createElement("span",{style:{color:"#FF9D18"},className:"ml5 mr5"},(Xi=nr==null?void 0:nr.data)==null?void 0:Xi.error_size),"\u9053\u8BD5\u9898\u91CD\u590D\uFF08\u7B2C",ge.createElement("span",{className:"ml5 mr5"},(Sr=(wi=nr==null?void 0:nr.data)==null?void 0:wi.index)==null?void 0:Sr.join("\u3001")),"\u9053\uFF09\uFF0C\u91CD\u590D\u8BD5\u9898\u5C06\u4F1A\u4E3A\u60A8\u81EA\u52A8\u8FC7\u6EE4\uFF0C\u786E\u5B9A\u5BFC\u5165\u5417\uFF1F"),onOk:Ci})}})},ge.createElement("div",{className:"c-grey-999 mb20"},"\u63D0\u793A\uFF1A\u8BC6\u522B\u6709\u8BEF\u7684\u8BD5\u9898\u5C06\u4E0D\u4F1A\u88AB\u5BFC\u5165"),ge.createElement(Ke.default.Item,{label:"\u65B9\u5411&\u8BFE\u7A0B",name:"sub_discipline_id",labelCol:{span:5},wrapperCol:{span:19},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B"}]},ge.createElement(ne.Z,{placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",fieldNames:{label:"name",value:"id",children:"sub_disciplines"},options:Ye})),Pe===1&&ge.createElement(Ke.default.Item,{label:ge.createElement(bt.Z,{align:"middle",style:{justifyContent:"space-between"}},ge.createElement("span",null,"\u653E\u5165\u6587\u4EF6\u5939\u76EE\u5F55"),ge.createElement("div",{onClick:()=>Kt(!0),style:{marginLeft:211,transform:"translateX(14px)",display:"flex",color:"#5F6368",cursor:"pointer"}},ge.createElement("img",{className:"mr5 primary-hover",src:xt}),"\u65B0\u5EFA\u6587\u4EF6\u5939")),rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939"}],name:"group_id",labelCol:{span:24},wrapperCol:{span:24}},ge.createElement(Je.Z,{key:xn})))),ge.createElement(Me.default,{centered:!0,open:It,title:"\u65B0\u5EFA\u6587\u4EF6\u5939",destroyOnClose:!0,width:480,confirmLoading:Nn,onCancel:()=>Kt(!1),onOk:()=>oi.submit(),afterClose:()=>{oi.resetFields()}},ge.createElement(Ke.default,{style:{maxHeight:550},form:oi,layout:"horizontal",colon:!1,size:"large",onFinish:Mt=>zt(void 0,null,function*(){var Pi;kn(!0),(yield(0,nt.ZP)("/api/item_banks_groups.json",{method:"post",body:{name:Mt.name,parent_id:(Pi=Mt==null?void 0:Mt.parent_id)==null?void 0:Pi[0]}})).status===0?(Nt(xn+1),setTimeout(()=>{st.ZP.success("\u64CD\u4F5C\u6210\u529F"),Kt(!1),kn(!1)},1e3)):kn(!1)})},ge.createElement(Ke.default.Item,{label:"\u6587\u4EF6\u5939\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},ge.createElement(ee.default,{maxLength:60,showCount:!0,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"})),ge.createElement(Ke.default.Item,{label:"\u6587\u4EF6\u5939\u4F4D\u7F6E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939"}],name:"parent_id"},ge.createElement(Je.Z,null)))),ge.createElement(Me.default,{centered:!0,open:at,title:"\u5927\u6A21\u578B\u667A\u80FD\u51FA\u9898",width:814,okText:"\u751F\u6210\u8BD5\u9898",onCancel:()=>cn(!1),onOk:()=>{if(Si===1&&!Rn(bn)){st.ZP.warning("\u8BF7\u5148\u8F93\u5165\u51FA\u9898\u8981\u6C42");return}if(Si===2&&!Rn(bn)&&!(Pn!=null&&Pn.length)){st.ZP.warning("\u8BF7\u4E0A\u4F20\u6750\u6599\u6587\u6863\u6216\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6750\u6599\u5185\u5BB9");return}const Mt=[{name:"\u5355\u9009\u9898",num:Sn||0},{name:"\u591A\u9009\u9898",num:Zn||0},{name:"\u5224\u65AD\u9898",num:ii||0},{name:"\u586B\u7A7A\u9898",num:pn||0},{name:"\u7B80\u7B54\u9898",num:Ki||0}];if(Mt.reduce((Xi,wi)=>Xi+wi.num,0)===0){st.ZP.warning("\u8BF7\u8BBE\u7F6E\u51FA\u9898\u6570\u91CF");return}console.log(Si,Sn,Zn),Er(!0),fr("\u5904\u7406\u4E2D");const _t={type:Si,query:bn,item_types:JSON.stringify(Mt)};Si===2&&(_t.file=(Pn==null?void 0:Pn[0])||null),Ho("/api/intelligent_imports/large_model_intelligent_qa.json",_t)}},ge.createElement(bt.Z,{align:"middle",className:"mb10 c-black"},ge.createElement("div",{className:"mr10"},"\u51FA\u9898\u8981\u6C42"),ge.createElement(ce.ZP.Group,{value:Si,onChange:Mt=>rn(Mt.target.value)},ge.createElement(ce.ZP,{value:1,className:"c-black"},"\u6839\u636E\u77E5\u8BC6\u70B9\u51FA\u9898"),ge.createElement(ce.ZP,{value:2,className:"ml40 c-black"},"\u6839\u636E\u6750\u6599\u51FA\u9898"))),ge.createElement(ee.default.TextArea,{style:{height:120},className:"mb20",value:bn,placeholder:Si===1?"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\uFF0C\u591A\u4E2A\u77E5\u8BC6\u70B9\u7528\u201C\u3001\u201D\u5206\u9694\u5F00":"\u8BF7\u5148\u63D0\u4F9B\u60A8\u51FA\u9898\u4F9D\u636E\u7684\u6750\u6599\uFF0C\u53EF\u4EE5\u76F4\u63A5\u590D\u5236\u6750\u6599\u5185\u5BB9\u7C98\u8D34\u5728\u6B64\u533A\u57DF\uFF0C\u4E5F\u53EF\u70B9\u51FB\u4E0B\u65B9\u4E0A\u4F20\u6750\u6599\u6309\u94AE\u4E0A\u4F20\u672C\u5730\u6750\u6599\u6587\u6863",onChange:Mt=>{Ft(Mt.target.value)}}),Si===2&&ge.createElement(ge.Fragment,null,ge.createElement(yt.default,{accept:".doc,.docx,.pdf,.png,.jpg",maxCount:1,fileList:Pn,beforeUpload:_o,className:"mb20",onRemove:()=>yn([])},ge.createElement(se.Z,{title:"\u5355\u6B21\u4EC5\u652F\u6301\u4E0A\u4F201\u4E2A\u6587\u6863\u62161\u5F20\u56FE\u7247\uFF0C\u6587\u6863\u652F\u6301PDF/Word\u683C\u5F0F\uFF0C\u56FE\u7247\u652F\u63011\u5F20\u4E0D\u8D85\u8FC710M\u7684PNG/JPG\u56FE\u7247"},ge.createElement(ye.op,{style:{borderRadius:2}},ge.createElement("i",{className:"icon-shangchuan3 mr5"}),"\u4E0A\u4F20\u6750\u6599"))),ge.createElement("div",{style:{height:20}})),ge.createElement(bt.Z,{align:"middle",className:"c-black"},ge.createElement("div",{className:"mb10"},"\u51FA\u9898\u6570\u91CF"),ge.createElement(bt.Z,{gutter:16},ge.createElement(fe.Z,null,ge.createElement("label",null,"\u5355\u9009\u9898"),ge.createElement(kt.Z,{min:0,max:10,value:Sn,onChange:Gn,style:{marginLeft:"8px"}})),ge.createElement(fe.Z,null,ge.createElement("label",null,"\u591A\u9009\u9898"),ge.createElement(kt.Z,{min:0,max:10,value:Zn,onChange:Qn,style:{marginLeft:"8px"}})),ge.createElement(fe.Z,null,ge.createElement("label",null,"\u5224\u65AD\u9898"),ge.createElement(kt.Z,{min:0,max:10,value:ii,onChange:ji,style:{marginLeft:"8px"}})),ge.createElement(fe.Z,null,ge.createElement("label",null,"\u586B\u7A7A\u9898"),ge.createElement(kt.Z,{min:0,max:10,value:pn,onChange:Ji,style:{marginLeft:"8px"}})),ge.createElement(fe.Z,null,ge.createElement("label",null,"\u7B80\u7B54\u9898"),ge.createElement(kt.Z,{min:0,max:10,value:Ki,onChange:Gi,style:{marginLeft:"8px"}}))))))},Tt=Te;var ot=Gt},59879:function(Vn,Cn,pe){"use strict";var ge=pe(59301),Re=pe(88010),Ve=pe(48136),dt=pe(41588),Ke=pe(43418),st=pe(59301);const Me=(0,ge.forwardRef)(({callback:kt,width:bt,onChange:Ue,disabled:lt,readOnly:yt,type:jt="",value:Ae="",style:ne={}},ee)=>{const ce=(0,ge.useRef)(),se=(0,ge.useRef)(),[fe,ye]=(0,ge.useState)(0),[be,Te]=(0,ge.useState)(0),[Be,ze]=(0,ge.useState)(!1),Ge=()=>{var He=document.createElement("div");He.innerHTML=ce.current.getValue();var Et=He.innerText;return kt&&kt(Et),Et};(0,ge.useImperativeHandle)(ee,()=>({getData:Ge}));const nt=He=>{He.preventDefault();const Et=He.clientX-fe,tt=He.clientY-be;document.body.onmousemove=Ot=>{let gt=Ot.clientX-Et,Ht=Ot.clientY-tt;const Xt=document.getElementsByClassName("markdown-popup-form")[0],Ut=window.innerWidth-Xt.offsetWidth,it=window.innerHeight-Xt.offsetHeight;gt=Math.max(0,Math.min(gt,Ut)),Ht=Math.max(0,Math.min(Ht,it)),Je(Ot.clientX,Ot.clientY,Et,tt)&&(ye(gt),Te(Ht))},document.body.onmouseup=function(){document.body.onmousemove=null}},Je=(He,Et,tt,Ot)=>{const gt=document.body.clientHeight,Ht=document.body.clientWidth;return He<20&&tt>He||He>Ht-20&&tt<He||Et<20&&Ot>Et||Et>gt-20&&Ot<Et?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,ge.useEffect)(()=>{Be&&setTimeout(()=>{const He=document.getElementsByClassName("markdown-popup-form")[0],Et=window.innerWidth/2-He.offsetWidth/2,tt=window.innerHeight/2-He.offsetHeight/2;ye(Et),Te(tt)},0)},[Be]);const xt=()=>{lt||yt||ze(!0)};return st.createElement("div",{style:ne},st.createElement("div",{style:{width:bt||"100%",position:"relative"},className:`${Re.Z.mathFillWrap} ${lt||yt?"cursorDefault":""}`,onClick:()=>xt()},st.createElement("math-field",{disabled:lt,locale:"zh_cn",class:`${Re.Z.mathField} ${jt}`,readOnly:yt,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:ce,style:{width:"100%",fontSize:Ae?18:14},value:Ae||""})),st.createElement(Ke.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:fe,top:be},title:st.createElement("div",{style:{cursor:"move"},onMouseDown:nt},"\u8F93\u5165\u516C\u5F0F"),open:Be,onOk:()=>{const He=se.current.getData();ce.current.setValue(He),Ue(He),ze(!1)},onCancel:()=>{ze(!1)},destroyOnClose:!0,className:"markdown-popup-form"},st.createElement(dt.Z,{value:Ae,ref:se,onChange:Ue,showSaveButton:!1})))});Cn.Z=Me},41588:function(Vn,Cn,pe){"use strict";var ge=pe(59301),Re=pe(95237),Ve=pe(43604),dt=pe(99313),Ke=pe(3113),st=pe(85149),Me=pe(88010),kt=pe(48136),bt=pe(59301);const Ue=(0,ge.forwardRef)(({callback:lt,showSaveButton:yt,value:jt=""},Ae)=>{const ne=(0,ge.useRef)(),ee=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],ce=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
|
y=b + r\\text{sin}\\theta \r
|
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\left\\{\\begin{matrix} \r
|
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
|
\\end{matrix}\\right. \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\perp \\alpha \\ \r
|
|
|
b \\perp \\alpha \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
|
a \\perp m,a \\perp n \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
|
a^{2}+b^{2}=c^{2} \r
|
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R^{+} \\ \r
|
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R \\ \r
|
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
|
P \\left( S \\right) =1 \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
\\forall A \\in S \\\\ \r
|
|
|
P \\left( A \\right) \\ge 0 \r
|
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
P_{n}=n! \\\\ \r
|
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
|
\\end{array}`}]}]}],se=be=>{ne.current.setValue(ne.current.getValue()+" "+be.value+" ")},fe=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:bt.createElement(Re.Z,{className:Me.Z.lists,gutter:[10,10]},ee.map((be,Te)=>bt.createElement(Ve.Z,{flex:"110px",className:Me.Z.item},bt.createElement("div",null,bt.createElement(st.Z,{value:`$$${be.value}$$`}),be.name),bt.createElement("div",{className:Me.Z.children},be.children.map((Be,ze)=>bt.createElement("div",{key:ze},bt.createElement("h1",null,Be.name),bt.createElement(Re.Z,{gutter:[10,10]},Be.data.map((Ge,nt)=>bt.createElement(Ve.Z,{key:nt,onClick:()=>se(Ge),className:Me.Z.diamond},bt.createElement(st.Z,{value:"`$$"+Ge.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:bt.createElement(Re.Z,{className:Me.Z.lists,gutter:[10,10]},ce.map((be,Te)=>bt.createElement(Ve.Z,{flex:"110px",className:Me.Z.item},bt.createElement("div",null,bt.createElement(st.Z,{value:"`$$"+be.value+"$$`"}),be.name),bt.createElement("div",{className:Me.Z.children},be.children.map((Be,ze)=>bt.createElement("div",{key:ze},Be.name&&bt.createElement("h1",null,Be.name),bt.createElement(Re.Z,{gutter:[10,10]},Be.data.map((Ge,nt)=>bt.createElement(Ve.Z,{key:nt,onClick:()=>se(Ge),className:Me.Z.diamond},bt.createElement(st.Z,{value:"`$$"+Ge.value+"$$`"}))))))))))}],ye=()=>{var be=document.createElement("div");be.innerHTML=ne.current.getValue();var Te=be.innerText;return lt&<(Te),Te};return(0,ge.useImperativeHandle)(Ae,()=>({getData:ye})),bt.createElement("div",{className:Me.Z.mathWrap},bt.createElement(dt.default,{defaultActiveKey:"1",items:fe}),bt.createElement("math-field",{locale:"zh_cn",className:Me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ne,style:{width:800,marginTop:30,fontSize:18}},jt||""),yt&&bt.createElement("div",{className:Me.Z.button},bt.createElement(Ke.ZP,{size:"large",onClick:ye,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Cn.Z=Ue},87198:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return yt}});var ge=pe(59301),Re=pe(78241),Ve=pe(43418),dt=pe(92832),Ke=pe(87169),st=pe(99064),Me={publicQuest:"publicQuest___iYvzo",publicQuestContent:"publicQuestContent___vgbKh",public_tips:"public_tips___UX0Dn",concat:"concat___wOfND"},kt=pe(86918),bt=pe(59301),Ue=(jt,Ae,ne)=>new Promise((ee,ce)=>{var se=be=>{try{ye(ne.next(be))}catch(Te){ce(Te)}},fe=be=>{try{ye(ne.throw(be))}catch(Te){ce(Te)}},ye=be=>be.done?ee(be.value):Promise.resolve(be.value).then(se,fe);ye((ne=ne.apply(jt,Ae)).next())}),yt=({type:jt="subject",open:Ae,onCancel:ne,onOkClick:ee,subDisciplineId:ce})=>{const[se]=Re.default.useForm(),[fe,ye]=(0,ge.useState)([]),[be,Te]=(0,ge.useState)(!1);(0,ge.useEffect)(()=>{},[]);const Be=()=>Ue(void 0,null,function*(){if(jt){const ze=yield(0,st.ZP)("/api/disciplines.json",{method:"get",params:{source:jt}});ye(ze.disciplines||[])}});return bt.createElement(Ve.default,{title:bt.createElement("div",{style:{fontWeight:"bold"}},"\u65B0\u5EFA\u77E5\u8BC6\u70B9"),open:Ae,width:558,centered:!0,className:Me.publicQuest,onCancel:()=>{ne(),se.resetFields()},onOk:()=>{se.validateFields().then(ze=>Ue(void 0,null,function*(){const Ge=yield(0,st.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:ze==null?void 0:ze.name,sub_discipline_id:ce}});(Ge==null?void 0:Ge.status)===0&&ee({name:ze==null?void 0:ze.name,id:Ge==null?void 0:Ge.tag_discipline_id,public:!1,type:"personal"}),se.resetFields(),ne()}))}},bt.createElement("div",{className:Me.publicQuestContent},bt.createElement("div",{className:Me.public_tips},bt.createElement(Ke.Z,{style:{color:"#FF8C29",marginRight:10,paddingTop:5}}),"\u65B0\u5EFA\u7684\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\u3002 \u5E73\u53F0\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF0C\u8BF7\u8BA4\u771F\u586B\u5199\u77E5\u8BC6\u70B9\u540D\u79F0\u3002"),bt.createElement(Re.default,{labelAlign:"left",form:se,colon:!1},bt.createElement(Re.default.Item,{label:"\u77E5\u8BC6\u70B9\u540D\u79F0",name:"name",rules:[{required:!0}]},bt.createElement(dt.default,{showCount:!0,maxLength:20,placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"}))),bt.createElement(kt.Z,{open:be,onCancel:()=>{Te(!1)}})))}},8797:function(Vn,Cn,pe){"use strict";var ge=pe(59301),Re=pe(93314),Ve=pe(3113),dt=Object.defineProperty,Ke=Object.defineProperties,st=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Ue=(Ae,ne,ee)=>ne in Ae?dt(Ae,ne,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Ae[ne]=ee,lt=(Ae,ne)=>{for(var ee in ne||(ne={}))kt.call(ne,ee)&&Ue(Ae,ee,ne[ee]);if(Me)for(var ee of Me(ne))bt.call(ne,ee)&&Ue(Ae,ee,ne[ee]);return Ae},yt=(Ae,ne)=>Ke(Ae,st(ne));const jt=({img:Ae,buttonProps:ne={},styles:ee={},customText:ce,ButtonText:se,ButtonClick:fe,Buttonclass:ye,ButtonTwo:be,imgStyles:Te,loading:Be=!1,className:ze=""})=>ge.createElement("section",{className:`tc animated fadeIn ${ze}`,style:lt({color:"#999",margin:"100px auto",visibility:Be?"hidden":"visible"},ee)},ge.createElement("img",{src:Ae||Re,style:yt(lt({},Te),{pointerEvents:"none",userSelect:"none"})}),ge.createElement("p",{className:"mt20 font14"},ce||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&ge.createElement(Ve.ZP,lt({className:ye,onClick:fe},ne),se),be&&be);Cn.Z=jt},23210:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return ye}});var ge=pe(59301),Re={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ve=pe(3113),dt=pe(70557),Ke=pe(23954),st=pe(6848),Me=pe(955),kt=pe(94941),bt=pe(8797),Ue=pe(3294),lt=pe(19381),yt=pe(59301),jt=Object.defineProperty,Ae=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ce=(be,Te,Be)=>Te in be?jt(be,Te,{enumerable:!0,configurable:!0,writable:!0,value:Be}):be[Te]=Be,se=(be,Te)=>{for(var Be in Te||(Te={}))ne.call(Te,Be)&&ce(be,Be,Te[Be]);if(Ae)for(var Be of Ae(Te))ee.call(Te,Be)&&ce(be,Be,Te[Be]);return be},fe=(be,Te,Be)=>new Promise((ze,Ge)=>{var nt=He=>{try{xt(Be.next(He))}catch(Et){Ge(Et)}},Je=He=>{try{xt(Be.throw(He))}catch(Et){Ge(Et)}},xt=He=>He.done?ze(He.value):Promise.resolve(He.value).then(nt,Je);xt((Be=Be.apply(be,Te)).next())}),ye=({editOffice:be="view",data:Te,theme:Be,type:ze,filename:Ge,monacoEditor:nt,className:Je,style:xt,close:He,onClose:Et,hasMask:tt,disabledDownload:Ot,onImgDimensions:gt,showNodata:Ht,recordInfo:Xt})=>{const[Ut,it]=(0,ge.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[_e,Wt]=(0,ge.useState)(""),[Dn,Bn]=(0,ge.useState)(),$t=window.ENV==="build"?"/react/build":"",ln=location.host.startsWith("localhost")?Ue.Z.PROXY_SERVER:Ue.Z.API_SERVER,ei=10*(1024*1024),Ln=(0,ge.useRef)();Te!=null&&Te.startsWith("/api")&&ze!=="txt"&&(Te=Ue.Z.API_SERVER+Te);const Yn=Yt=>Yt.substring(Yt.lastIndexOf("/")+1).split(".").pop();Ge&&nt&&(nt.filename=Ge),(0,ge.useEffect)(()=>{var Yt,tn;const Gt=(tn=(Yt=document.cookie)==null?void 0:Yt.replace(/\s/g,""))==null?void 0:tn.split(";");Gt==null||Gt.map(Tt=>{let ot=Tt.split("=");ot[0]==="_educoder_session"&&Wt(ot[1])})},[]),(0,ge.useEffect)(()=>{ze==="office"&&(Te.indexOf("bigfilescdn.")>-1||Te.indexOf("bigfiles1")>-1?Bn({url:Te,fileType:Yn(Te),model:Te.indexOf("model=edit")?"edit":"view"}):zt())},[ze,Te]);const zt=()=>fe(void 0,null,function*(){console.log("data:",Te);let Yt=Te;Te.startsWith("http")||(Yt=location.origin+Yt);let tn=new URL(Yt).pathname.split("/").pop();const Gt=yield(0,kt.gJ)({attachment_id:tn});Gt.url=ln+Gt.url,Bn(Gt)}),wn=()=>{if(Te.startsWith("http")||Te.startsWith("blob:")){$n();return}(0,Me.Sv)(Ge||"educoder",Te,Ge)},$n=()=>{Xt&&(0,lt.fc)({id:Xt==null?void 0:Xt.id,watch_type:1,course_id:Xt==null?void 0:Xt.course_id}),(0,Me.Nd)(Ge||"educoder",decodeURIComponent(Te))};return yt.createElement("div",{style:se({},xt||{}),className:`${tt&&Re.bgBlack} ${ze?Re.wrp:"hide"}`},He&&yt.createElement("div",{className:Re.close,ref:Ln},!!gt&&yt.createElement(st.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Ln.current},yt.createElement("span",{onClick:()=>{Et(),gt()}},yt.createElement("i",{className:"icon-yulanpizhu"}))),!Ot&&yt.createElement(st.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Ln.current},yt.createElement("span",{onClick:$n},yt.createElement("i",{className:"icon-quxiaozhiding"}))),yt.createElement(st.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Ln.current},yt.createElement("span",{className:"",onClick:Et},yt.createElement("i",{className:"icon-guanbi1"})))),yt.createElement("div",{className:`${Re[Je]} ${Je} ${Re.monaco} ${ze==="txt"?"show":"hide"}`},ze==="txt"&&yt.createElement(yt.Fragment,null,yt.createElement(Ke.ZP,se({},nt)))),ze==="audio"&&yt.createElement("audio",{src:`${(Te==null?void 0:Te.indexOf("http://"))>-1||(Te==null?void 0:Te.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Te}`,autoPlay:!0}),ze==="video"&&yt.createElement(yt.Fragment,null,(Te==null?void 0:Te.indexOf("http"))>-1?yt.createElement("video",{controls:!0,src:`${Te}`,autoPlay:!0}):yt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Te}`,autoPlay:!0})),ze==="office"&&Dn&&yt.createElement("iframe",{src:`${$t}/office.html?key=${Dn.key}&url=${btoa(Dn.url)}&callbackUrl=${ln+(Dn.callbackUrl||"")}&fileType=${Dn.fileType}&title=${Dn.title||""}&model=${be}&officeServer=${Ue.Z.ONLYOFFICE}&disabledDownload=${!!Ot}`}),ze==="html"&&yt.createElement("iframe",{src:Te+"&disposition=inline"}),ze==="pdf"&&yt.createElement("iframe",{src:`${$t}/js/pdfview/index.html?filename=${Ge||"educoder.pdf"}&url=${encodeURIComponent(Te)}&disabledDownload=${!!Ot}`}),ze==="image"&&yt.createElement("img",{src:`${(Te==null?void 0:Te.indexOf("http://"))>-1||(Te==null?void 0:Te.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Te}`}),(ze==="other"||ze==="download")&&yt.createElement(yt.Fragment,null,Ht?yt.createElement(bt.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:yt.createElement(Ve.ZP,{icon:yt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:wn,disabled:Ot},"\u4E0B\u8F7D")}):yt.createElement(Ve.ZP,{type:"primary",size:"middle",onClick:wn,disabled:Ot},yt.createElement(dt.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},67248:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Q:function(){return bt},Z:function(){return lt}});var ge=pe(59301),Re={flex_box_center:"flex_box_center___VcCAZ",flex_space_between:"flex_space_between___I3jjO",flex_box_vertical_center:"flex_box_vertical_center___Rm_54",flex_box_center_end:"flex_box_center_end___nTsdc",flex_box_column:"flex_box_column___UVpzN",tags:"tags___kRRoe",text:"text___IyyEa",tagWrap:"tagWrap___v63mB",tag:"tag___X7wE6",c:"c___mZMPq",cpp:"cpp___eaTie",java:"java___gL98T",python:"python___eNRkk",edit:"edit___tbVu0"},Ve=pe(92310),dt=pe.n(Ve),Ke=pe(43418),st=pe(8591),Me=pe(24905),kt=(yt,jt,Ae)=>new Promise((ne,ee)=>{var ce=ye=>{try{fe(Ae.next(ye))}catch(be){ee(be)}},se=ye=>{try{fe(Ae.throw(ye))}catch(be){ee(be)}},fe=ye=>ye.done?ne(ye.value):Promise.resolve(ye.value).then(ce,se);fe((Ae=Ae.apply(yt,jt)).next())});const bt=({title:yt="\u8BBE\u7F6E\u7F16\u7A0B\u8BED\u8A00",dataSource:jt=[],visible:Ae,setVisible:ne,tip:ee,onOk:ce})=>{const[se,fe]=(0,ge.useState)([]),[ye,be]=(0,ge.useState)(!1);return(0,ge.useEffect)(()=>{Ae&&fe(jt)},[Ae]),ge.createElement(Ke.default,{centered:!0,open:Ae,title:yt,confirmLoading:ye,width:564,onOk:()=>kt(void 0,null,function*(){if(!se.length){st.ZP.warning("\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00");return}be(!0),yield ce(se),be(!1)}),onCancel:()=>ne(!1)},!!ee&&ge.createElement("div",{className:"c-grey-666 font16 mb10"},ee),ge.createElement("div",{style:{background:"#F6F7F9",padding:"20px 20px 20px 26px"}},ge.createElement(Me.default.Group,{value:se,options:[{label:"C\u8BED\u8A00",value:"C"},{label:"C++\u8BED\u8A00",value:"C++",style:{marginLeft:30}},{label:"Java\u8BED\u8A00",value:"Java",style:{marginLeft:30}},{label:"Python\u8BED\u8A00",value:"Python",style:{marginLeft:30}}],onChange:Te=>{fe(Te)}})))};var lt=({title:yt="\u5141\u8BB8\u7F16\u7A0B\u7684\u8BED\u8A00",className:jt,style:Ae={},onEdit:ne,dataSource:ee=[]})=>{const ce={C:ge.createElement("div",{className:Re.c},"C"),"C++":ge.createElement("div",{className:Re.cpp},"C++"),Java:ge.createElement("div",{className:Re.java},"Java"),Python:ge.createElement("div",{className:Re.python},"Python")};return ge.createElement("div",{className:dt()(Re.tags,jt),style:Ae},!!yt&&ge.createElement("div",{className:Re.text},yt),ge.createElement("div",{className:Re.tagWrap},ee==null?void 0:ee.map(se=>ge.createElement(ge.Fragment,{key:se},ce[se]))),!!ne&&ge.createElement("div",{onClick:ne,className:`iconfont icon-bianji_Hover ${Re.edit}`}))}},90502:function(Vn,Cn,pe){"use strict";pe.d(Cn,{t:function(){return Gt}});var ge=pe(59301),Re=pe(92832),Ve=pe(78241),dt=pe(43418),Ke=pe(95237),st=pe(43604),Me=pe(5871),kt=pe(57809),bt=pe(5112),Ue=pe(41984),lt=pe(89070),yt=pe(43809),jt=pe(8591),Ae=pe(3113),ne=pe(71418),ee=pe(24334),ce={flex_box_center:"flex_box_center___kOQ8P",flex_space_between:"flex_space_between___fY6jt",flex_box_vertical_center:"flex_box_vertical_center___bDSSI",flex_box_center_end:"flex_box_center_end___mQ6mU",flex_box_column:"flex_box_column___F15G0",result:"result___UYRo8",left:"left___TRaH5",right:"right___twp9s",box:"box___vwndt",li:"li___hRe2d"},se=pe(99064),fe=pe(88264),ye=pe(12290),be=pe(56102),Te=pe(74440),Be=pe(59301),ze=Object.defineProperty,Ge=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Et=(Tt,ot,Ze)=>ot in Tt?ze(Tt,ot,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):Tt[ot]=Ze,tt=(Tt,ot)=>{for(var Ze in ot||(ot={}))xt.call(ot,Ze)&&Et(Tt,Ze,ot[Ze]);if(Je)for(var Ze of Je(ot))He.call(ot,Ze)&&Et(Tt,Ze,ot[Ze]);return Tt},Ot=(Tt,ot)=>Ge(Tt,nt(ot)),gt=(Tt,ot,Ze)=>new Promise((At,Dt)=>{var rt=Pe=>{try{Oe(Ze.next(Pe))}catch(ve){Dt(ve)}},et=Pe=>{try{Oe(Ze.throw(Pe))}catch(ve){Dt(ve)}},Oe=Pe=>Pe.done?At(Pe.value):Promise.resolve(Pe.value).then(rt,et);Oe((Ze=Ze.apply(Tt,ot)).next())}),Xt=({buttonProps:Tt,buttonText:ot,form:Ze,hackIdentifier:At="",answerKey:Dt,data:rt})=>{const[et,Oe]=(0,ge.useState)(!1),[Pe,ve]=(0,ge.useState)(!1),[Fe,We]=(0,ge.useState)(!1),[Ne,ft]=(0,ge.useState)({}),[sn,un]=(0,ge.useState)(""),[Pt,qt]=(0,ge.useState)(""),Mn=(0,ge.useRef)(At),hn=(0,ge.useRef)(""),fn=(0,ge.useRef)(!1);(0,ge.useEffect)(()=>{Fe&&bi()},[Fe]),(0,ge.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const ui=()=>new Date().getTime(),gi=rt==null?void 0:rt.code,fi=()=>{var Wi,vr;let fr=gi?rt==null?void 0:rt.code:(Wi=Ze.getFieldValue("hack_codes"))==null?void 0:Wi.code,zi=gi?rt==null?void 0:rt.answer_content:Ze.getFieldValue(Dt),Er=gi?rt==null?void 0:rt.input:(vr=Ze.getFieldValue("hack_sets"))==null?void 0:vr.input;zi==null||zi.forEach(Kn=>{const Le=Kn.value||Kn.answer_text||"";fr=fr.replace(/(@▁@|@▁▁@)/,Le)}),qt(Er),un(fr),ft({}),We(!0)},bi=()=>gt(void 0,null,function*(){var Wi,vr,fr,zi;const Er=ui(),Kn=gi?rt==null?void 0:rt.time_limit:(Wi=Ze.getFieldsValue())==null?void 0:Wi.hack.time_limit,Le=gi?(vr=rt==null?void 0:rt.answer_content)==null?void 0:vr.length:(zi=(fr=Ze.getFieldsValue())==null?void 0:fr.standard_answers)==null?void 0:zi.length;Oe(!0),yield(0,fe.bM)(hn.current,{test_hack_code:sn,test_input:Pt});function Ei(){return gt(this,null,function*(){const{status:Ri,data:an}=yield(0,fe.rX)(hn.current,"submit"),yi=ui()-Er>(Kn+3)*1e3*Le;if(fn.current){if(yi){jt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),Oe(!1);return}if(Ri===0){Oe(!1),ft(Ot(tt({},an),{showText:!0}));return}setTimeout(Ei,1e3)}})}Ei()}),_i=()=>gt(void 0,null,function*(){var Wi,vr,fr,zi,Er,Kn,Le;if(!rt){try{yield Ze.validateFields()}catch(di){(fr=(vr=(Wi=di==null?void 0:di.errorFields)==null?void 0:Wi[0])==null?void 0:vr.name)!=null&&fr.includes("standard_answers")?jt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):jt.ZP.error(di.errorFields[0].errors[0]),Ze.scrollToField(di.errorFields[0].name,{behavior:"smooth",block:"center"});return}ve(!0);let Ri="";const an=Ze.getFieldsValue();Mn.current?Ri=yield(0,se.ZP)(`/api/problems/${Mn.current}.json`,{method:"put",body:Ot(tt({},an),{hack:Ot(tt({},an==null?void 0:an.hack),{sub_discipline_id:(Le=(Kn=an==null?void 0:an.hack)==null?void 0:Kn.sub_discipline_id)==null?void 0:Le[1],difficult:an.difficulty,item_banks_group_id:an.item_banks_group_id}),hack_codes:Ot(tt({},an.hack_codes),{code:ee.Base64.encode(an.hack_codes.code)}),update_hack_sets:[tt({},an.hack_sets)],is_blank:!0})}):(Ri=yield(0,se.ZP)("/api/problems.json",{method:"post",body:Ot(tt({},an),{hack:Ot(tt({},an==null?void 0:an.hack),{sub_discipline_id:(Er=(zi=an==null?void 0:an.hack)==null?void 0:zi.sub_discipline_id)==null?void 0:Er[1],difficult:an.difficulty,item_banks_group_id:an.item_banks_group_id}),hack_codes:Ot(tt({},an.hack_codes),{code:ee.Base64.encode(an.hack_codes.code)}),hack_sets:[tt({},an.hack_sets)],is_blank:!0})}),Mn.current=Ri==null?void 0:Ri.identifier,sessionStorage.projectFill=Ri==null?void 0:Ri.identifier)}const Ei=yield(0,se.ZP)(`/api/problems/${Mn.current}/start.json`,{method:"get"});if((Ei==null?void 0:Ei.status)===0){hn.current=Ei==null?void 0:Ei.identifier,fn.current=!0,ve(!1),fi();return}ve(!1)}),rr=Wi=>{const{status:vr,error_msg:fr,execute_time:zi,output:Er,input:Kn,expected_output:Le}=Wi;let Ei=null;switch(vr){case Te.h.OK:Ei=Be.createElement(Be.Fragment,null,Be.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",zi/1e3,"\u79D2"),Be.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Te.h.NOMATCH:Ei=Be.createElement(Be.Fragment,null,Be.createElement("div",null,"\u8F93\u5165\uFF1A"),Be.createElement("pre",{style:{fontFamily:"initial"}},Kn),Be.createElement("div",null,"\u8F93\u51FA\uFF1A"),Be.createElement("pre",{style:{fontFamily:"initial"}},Er&&ee.Base64.decode(Er)),Be.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Be.createElement("pre",{style:{fontFamily:"initial"}},Le&&ee.Base64.decode(Le)));break;case Te.h.EXECUTEFAILURE:Ei=Be.createElement(Be.Fragment,null,Be.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Be.createElement("pre",null,Kn)),Be.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Be.createElement("pre",{className:"error"},ee.Base64.decode(fr)));break;case Te.h.COMPILEFAILURE:Ei=Be.createElement(Be.Fragment,null,Be.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Be.createElement("pre",null,Kn)),Be.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Be.createElement("pre",{className:"error"},ee.Base64.decode(fr)));break;case Te.h.PODFAILURE:Ei=Be.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Te.h.TIMEOUT:Ei=Be.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Be.createElement(Be.Fragment,null," ",Ei," ")};return Be.createElement("div",null,Be.createElement(Ae.ZP,Ot(tt({loading:Pe},Tt),{onClick:_i}),ot),Be.createElement(dt.default,{open:Fe,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:et,cancelButtonProps:{style:{display:"none"}},onOk:()=>bi(),onCancel:()=>{fn.current=!1,We(!1)}},Be.createElement("div",{className:ce.result},Be.createElement("div",{className:ce.left},Be.createElement("div",{className:"mb20"},Be.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!rt&&Be.createElement(be.CopyToClipboard,{text:sn,onCopy:()=>jt.ZP.success("\u590D\u5236\u6210\u529F")},Be.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Be.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Be.createElement(ye.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:sn,onChange:Wi=>un(Wi)})),Be.createElement("div",{className:ce.right},Be.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Be.createElement("div",{className:ce.box},Be.createElement("div",{className:ce.li},Be.createElement(Re.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:Pt,onChange:Wi=>qt(Wi.target.value),bordered:!1,style:{height:180}}))),Be.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Be.createElement("div",{className:ce.box},Be.createElement(ne.Z,{spinning:et,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Be.createElement("div",{className:ce.li,style:{height:196,overflow:"auto",padding:10}},rr(Ne))))))))},Ut=pe(87169),it=pe(59301),_e=Object.defineProperty,Wt=Object.defineProperties,Dn=Object.getOwnPropertyDescriptors,Bn=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable,Tn=(Tt,ot,Ze)=>ot in Tt?_e(Tt,ot,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):Tt[ot]=Ze,ei=(Tt,ot)=>{for(var Ze in ot||(ot={}))$t.call(ot,Ze)&&Tn(Tt,Ze,ot[Ze]);if(Bn)for(var Ze of Bn(ot))ln.call(ot,Ze)&&Tn(Tt,Ze,ot[Ze]);return Tt},Ln=(Tt,ot)=>Wt(Tt,Dn(ot)),Yn=(Tt,ot)=>{var Ze={};for(var At in Tt)$t.call(Tt,At)&&ot.indexOf(At)<0&&(Ze[At]=Tt[At]);if(Tt!=null&&Bn)for(var At of Bn(Tt))ot.indexOf(At)<0&&ln.call(Tt,At)&&(Ze[At]=Tt[At]);return Ze};const{TextArea:zt}=Re.default,wn=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],$n=({value:Tt,onChange:ot})=>it.createElement(Switch,{checked:Tt,onChange:Ze=>{ot(Ze)}}),Yt="@\u2581@",tn="@\u2581\u2581@",Gt=({questionTitlePlaceholder:Tt,form:ot,scoreByBlank:Ze=!1,hackidentifier:At,answerKey:Dt})=>{const[rt,et]=(0,ge.useState)(!1),[Oe,Pe]=(0,ge.useState)(!1),Fe=(0,lt.useParams)().type==="edit",We=(hn,fn)=>{const ui=fn.line;let gi=0;for(let bi=0;bi<ui;bi++)gi+=hn.getLine(bi).split(Yt).length-1;for(let bi=0;bi<ui;bi++)gi+=hn.getLine(bi).split(tn).length-1;const fi=hn.getLine(ui).substring(0,fn.ch);return gi+=fi.split(Yt).length-1,gi+=fi.split(tn).length-1,gi},Ne=(hn,fn,ui,gi)=>{const fi=hn.getRange(fn.from,fn.to);let bi=0;if(fn.text.forEach(_i=>{bi+=_i.split(Yt).length-1}),fn.text.forEach(_i=>{bi+=_i.split(tn).length-1}),fn.origin!=="setValue"){if(fi&&(fi.indexOf(Yt)!==-1||fi.indexOf(tn)!==-1)){const _i=fi.split(Yt).length-1+fi.split(tn).length-1,rr=We(hn,fn.from);if(console.log(`\u5220\u9664${_i}\u4E2A\uFF0C \u524D\u9762\u6709${rr}\u4E2A\uFF0C\u65B0\u589E${bi}\u4E2A`),_i>1){const Wi=Array.from({length:_i},(vr,fr)=>rr+fr);gi(Wi)}else gi(rr)}else if(bi>0){const _i=We(hn,fn.from);console.log(`\u65B0\u589E${bi}\u4E2A\uFF0C\u4E4B\u524D\u6709${_i}\u4E2A`),ui(bi,_i)}}},ft=()=>{const hn=ot.getFieldValue(Dt);ot.setFieldsValue({[Dt]:hn==null?void 0:hn.map((fn,ui)=>Ln(ei({},fn),{position:ui+1}))})},sn=(0,ge.useRef)(),un=(hn,fn)=>{for(let ui=0;ui<hn;ui++)sn.current({position:null,answer_text:""},fn+ui);ft()},Pt=(0,ge.useRef)(),qt=hn=>{Pt.current(hn),ft()},Mn=Ve.default.useWatch(Dt,ot);return it.createElement("div",{className:yt.Z.wrap},it.createElement(Ve.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},it.createElement(Ue.h,{scrollId:"name",watch:!0,height:140})),it.createElement("div",{className:yt.Z.questionTitleEditorWrap},it.createElement(Ve.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},it.createElement(Ue.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(hn,fn)=>{const ui=ot.getFieldValue(Dt);console.log("--preAnswerData",ui,fn),ot.setFieldsValue({[Dt]:ui==null?void 0:ui.map((gi,fi)=>{var bi;return Ln(ei({},gi),{position:fi+1,multi_line:(bi=fn==null?void 0:fn[fi])==null?void 0:bi.multiLine})})})},placeholder:Tt,onCMBeforeChange:(hn,fn)=>{Ne(hn,fn,un,qt)}}))),it.createElement(Ve.default.List,{name:Dt,rules:[{validator(hn,fn){if(!(fn!=null&&fn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const ui of fn){const{answer_text:gi}=ui||{};if((gi==null?void 0:gi.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(hn,{add:fn,remove:ui},{errors:gi})=>(sn.current=fn,Pt.current=ui,it.createElement(it.Fragment,null,it.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},it.createElement(Ve.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),it.createElement("div",{onClick:()=>{dt.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:it.createElement("div",null,it.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",it.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),it.createElement("div",{style:{marginTop:10}},"2.\u8BD5\u9898\u7B97\u5206\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u5C06\u7A0B\u5E8F\u91CC\u9762\u7684\u6240\u6709\u7A7A\u66FF\u6362\u6210\u5B66\u751F\u7684\u7B54\u6848\u8FDB\u884C\u8BC4\u6D4B\u3002\u8F93\u51FA\u7684\u7ED3\u679C\u4E0E\u6D4B\u8BD5\u96C6\u6BD4\u5BF9\uFF0C\u5B8C\u5168\u6B63\u786E\u5219\u5F97\u6EE1\u5206\uFF1B\u82E5\u4E0D\u5B8C\u5168\u6B63\u786E\uFF0C\u5219\u4F9D\u6B21\u5C06\u6BCF\u4E2A\u7A7A\u6362\u6210\u5B66\u751F\u63D0\u4EA4\u7684\u7B54\u6848\uFF0C\u540C\u65F6\u5C06\u5176\u4ED6\u7A7A\u66FF\u6362\u6210\u6807\u51C6\u7B54\u6848\uFF0C\u8FD0\u884C\u7A0B\u5E8F\u3002\u5982\u679C\u8FD9\u4E2A\u7A7A\u7684\u5B66\u751F\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7ED3\u5408\u80FD\u5F97\u5230\u6B63\u786E\u8F93\u51FA\uFF0C\u5219\u8FD9\u4E2A\u7A7A\u5F97\u5230\u8BE5\u7A7A\u7684\u6EE1\u5206\uFF0C\u5426\u5219\u8BE5\u7A7A\u5F970\u5206\u3002"))})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"}},it.createElement(Ut.Z,{style:{marginRight:3,color:"#3061D0"}}),it.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),hn.map((fi,bi)=>{var _i=fi,{key:rr,name:Wi}=_i,vr=Yn(_i,["key","name"]),fr,zi;return it.createElement(Ke.Z,{className:"mb20",key:rr,align:"middle",wrap:!1},it.createElement(st.Z,{flex:"0 0 auto",className:`${yt.Z.blankIndex}`},"\u586B\u7A7A\u9879",bi+1),it.createElement(st.Z,{flex:1},it.createElement(Ke.Z,{align:"top",justify:"space-between",wrap:!1},it.createElement(st.Z,null,it.createElement(Ve.default.Item,Ln(ei({},vr),{name:[Wi,"answer_text"],noStyle:!0}),(fr=Mn==null?void 0:Mn[Wi])!=null&&fr.multi_line||(zi=Mn==null?void 0:Mn[Wi])!=null&&zi.multiLine?it.createElement(zt,{spellCheck:!1,style:{marginLeft:10,width:550}}):it.createElement(Re.default,{style:{marginLeft:10,width:550},className:yt.Z.blankInput,size:"large",maxLength:1e3,onBlur:Er=>{}}))),Ze&&it.createElement(st.Z,{flex:"224px"},it.createElement(Ve.default.Item,Ln(ei({},vr),{name:[Wi,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),it.createElement(Me.Z,{size:"large",className:yt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),it.createElement("div",{onClick:()=>et(!0)},it.createElement(Ve.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},it.createElement(Ue.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:rt}))),it.createElement(Ve.default.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},it.createElement(kt.default,{size:"large"},wn.map(hn=>it.createElement(kt.default.Option,{key:hn.title,value:hn.key}," ",hn.title)))),it.createElement(Ve.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},it.createElement(Ve.default.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],noStyle:!0},it.createElement(Me.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),it.createElement("span",{className:"ml10 font14"},"\u79D2")),it.createElement(Ve.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},it.createElement(bt.ZP.Group,{style:{marginTop:-10}},it.createElement(bt.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),it.createElement(bt.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),it.createElement(bt.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),it.createElement(Ve.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),it.createElement("div",{style:{background:"#F6F7F9",padding:15}},it.createElement(Ve.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},it.createElement(zt,{rows:4})),it.createElement(Ve.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},it.createElement(zt,{rows:4}))),it.createElement(Xt,{form:ot,answerKey:Dt,hackIdentifier:At,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:it.createElement("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}}))}},65357:function(Vn,Cn,pe){"use strict";pe.d(Cn,{u:function(){return Be}});var ge=pe(59301),Re=pe(95237),Ve=pe(43604),dt=pe(6848),Ke=pe(78241),st=pe(43809),Me=pe(32134),kt=pe(12893),bt=pe(41984),Ue=pe(59301),lt=Object.defineProperty,yt=Object.defineProperties,jt=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ce=(ze,Ge,nt)=>Ge in ze?lt(ze,Ge,{enumerable:!0,configurable:!0,writable:!0,value:nt}):ze[Ge]=nt,se=(ze,Ge)=>{for(var nt in Ge||(Ge={}))ne.call(Ge,nt)&&ce(ze,nt,Ge[nt]);if(Ae)for(var nt of Ae(Ge))ee.call(Ge,nt)&&ce(ze,nt,Ge[nt]);return ze},fe=(ze,Ge)=>yt(ze,jt(Ge)),ye=(ze,Ge)=>{var nt={};for(var Je in ze)ne.call(ze,Je)&&Ge.indexOf(Je)<0&&(nt[Je]=ze[Je]);if(ze!=null&&Ae)for(var Je of Ae(ze))Ge.indexOf(Je)<0&&ee.call(ze,Je)&&(nt[Je]=ze[Je]);return nt};const be=["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"],Te=({value:ze,onChange:Ge,choiceTextKey:nt,answerKey:Je,index:xt,isEdit:He,setInputActive:Et,form:tt,choiceOptionsPath:Ot,allowChangeMode:gt,showAddIcon:Ht,addItem:Xt,deleteItem:Ut})=>{console.log(ze,"value");const it=(ze==null?void 0:ze[Je])===1,_e=()=>{const Dn=tt.getFieldValue(Ot);tt.setFieldValue(Ot,Dn.map(Bn=>fe(se({},Bn),{[Je]:0})))},Wt=()=>{it?Ge(fe(se({},ze),{[Je]:0})):(gt||_e(),Ge(fe(se({},ze),{[Je]:1})))};return Ue.createElement(Re.Z,{className:st.Z.choiceWrap,align:"middle",wrap:!1},Ue.createElement(Ve.Z,{onClick:Wt,className:`${st.Z.choiceIndex} ${it?st.Z.activeAnswer:""}`},be[xt]),Ue.createElement(Ve.Z,{flex:1,className:`${st.Z.editorWrap} ml15`,onClick:Et},Ue.createElement(bt.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:He,value:ze==null?void 0:ze[nt],onChange:Dn=>{Ge(fe(se({},ze),{[nt]:Dn}))}})),Ue.createElement(Ve.Z,{flex:"0 0 auto",className:"ml15"},Ue.createElement("div",{onClick:Wt,className:`${st.Z.setAnswerBtn} ${it?st.Z.activeAnswer:""}`},it?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),Ue.createElement(Ve.Z,{className:st.Z.actionWrapper},Ue.createElement(dt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},Ue.createElement(Me.Z,{className:st.Z.addIcon,onClick:Xt,style:{visibility:Ht?"visible":"hidden"}})),Ue.createElement(dt.Z,{title:"\u5220\u9664"},Ue.createElement(kt.Z,{className:st.Z.deleteIcon,onClick:Ut,style:{visibility:xt>1?"visible":"hidden"}}))))},Be=({questionTitlePlaceholder:ze,titleKey:Ge,choiceKey:nt,analysisKey:Je,choiceTextKey:xt,answerKey:He,choiceOptionsPath:Et,allowChangeMode:tt=!0,form:Ot,showAnalysis:gt=!0})=>{const[Ht,Xt]=(0,ge.useState)(),[Ut,it]=(0,ge.useState)(!1);return Ue.createElement("div",{className:st.Z.wrap},Ue.createElement("div",{className:st.Z.questionTitleEditorWrap},Ue.createElement(Ke.default.Item,{label:"\u9898\u5E72",name:Ge,labelCol:{span:24},rules:[{required:!0}]},Ue.createElement(bt.h,{scrollId:Array.isArray(Ge)?Ge.join("_"):`${Ge}`,watch:!0,height:140,placeholder:ze}))),Ue.createElement(Ke.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Ue.createElement(Ke.default.List,{name:nt,rules:[{validator(_e,Wt){const Dn=Wt.some($t=>$t[He]===1),Bn=Wt.findIndex($t=>{var ln;return((ln=$t[xt])==null?void 0:ln.length)<=0});return Bn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${be[Bn]}\u9009\u9879\u7684\u5185\u5BB9`)):Dn?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(_e,{add:Wt,remove:Dn})=>Ue.createElement("div",{id:Array.isArray(Et)?Et.join("_"):`${Et}`},_e.map((Bn,$t)=>{var ln=Bn,{key:Tn,name:ei}=ln,Ln=ye(ln,["key","name"]);const Yn=Ht===Tn,zt=()=>{Xt(Tn)},wn=$t<7&&$t===_e.length-1,$n=()=>Wt({[xt]:"",[He]:0}),Yt=()=>Dn(ei);return Ue.createElement(Ke.default.Item,fe(se({},Ln),{key:Tn,name:ei,className:st.Z.choiceListWrap,rules:[{validator(tn,Gt){return Gt!=null&&Gt.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${be[$t]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),Ue.createElement(Te,{choiceTextKey:xt,answerKey:He,index:$t,isEdit:Yn,setInputActive:zt,form:Ot,choiceOptionsPath:Et,allowChangeMode:tt,showAddIcon:wn,addItem:$n,deleteItem:Yt}))}),_e.length<8&&Ue.createElement("div",{className:`${st.Z.addBtn} mb30`,onClick:()=>Wt({[xt]:"",[He]:0})},"\u6DFB\u52A0\u9009\u9879"))),gt&&Ue.createElement("div",{onClick:()=>it(!0)},Ue.createElement(Ke.default.Item,{name:Je,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ue.createElement(bt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ut}))))}},70472:function(Vn,Cn,pe){"use strict";pe.d(Cn,{u:function(){return tt}});var ge=pe(59301),Re=pe(43418),Ve=pe(95237),dt=pe(43604),Ke=pe(92832),st=pe(6848),Me=pe(78673),kt=pe(78241),bt=pe(5112),Ue=pe(5871),lt=pe(41984),yt=pe(12893),jt=pe(61485),Ae=pe(43809),ne=pe(59879),ee=pe(59301),ce=Object.defineProperty,se=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Be=(Ot,gt,Ht)=>gt in Ot?ce(Ot,gt,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):Ot[gt]=Ht,ze=(Ot,gt)=>{for(var Ht in gt||(gt={}))be.call(gt,Ht)&&Be(Ot,Ht,gt[Ht]);if(ye)for(var Ht of ye(gt))Te.call(gt,Ht)&&Be(Ot,Ht,gt[Ht]);return Ot},Ge=(Ot,gt)=>se(Ot,fe(gt)),nt=(Ot,gt)=>{var Ht={};for(var Xt in Ot)be.call(Ot,Xt)&>.indexOf(Xt)<0&&(Ht[Xt]=Ot[Xt]);if(Ot!=null&&ye)for(var Xt of ye(Ot))gt.indexOf(Xt)<0&&Te.call(Ot,Xt)&&(Ht[Xt]=Ot[Xt]);return Ht};const Je=({value:Ot,onChange:gt})=>{const Ht=Ut=>{Re.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Ae.Z.modal,onOk:()=>{const it=[...Ot];it.splice(Ut,1),gt(it)}})},Xt=()=>{const Ut=[...Ot];Ut.push(""),gt(Ut)};return ee.createElement(Ve.Z,{className:"ml20"},ee.createElement(dt.Z,{flex:1},Ot==null?void 0:Ot.map((Ut,it)=>ee.createElement(Ve.Z,{key:`${Ut}_${it}`,className:"mb20"},ee.createElement(Ke.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Ut,autoSize:{maxRows:3},maxLength:1e3,onBlur:_e=>{const Wt=[...Ot],Dn=_e.target.value.trim();Wt[it]=Dn,gt(Wt)}}),ee.createElement(st.Z,{title:"\u5220\u9664"},ee.createElement(yt.Z,{className:Ae.Z.deleteIcon,style:{marginLeft:15,visibility:it>0?"visible":"hidden"},onClick:()=>Ht(it)}))))),ee.createElement(dt.Z,null,ee.createElement("div",{className:`${Ae.Z.addBtn}`,onClick:()=>{Xt()}},"\u65B0\u589E\u7B54\u6848")))},xt=({value:Ot,onChange:gt})=>{const Ht=Ut=>{Re.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Ae.Z.modal,onOk:()=>{const it=[...Ot];it.splice(Ut,1),gt(it)}})},Xt=()=>{const Ut=[...Ot];Ut.push(""),gt(Ut)};return ee.createElement(Ve.Z,{className:"ml20"},ee.createElement(dt.Z,{flex:1},Ot==null?void 0:Ot.map((Ut,it)=>ee.createElement(Ve.Z,{key:`${Ut}_${it}`,align:"middle",className:"mb20"},ee.createElement(ne.Z,{value:Ut,style:{flex:1},onChange:_e=>{const Wt=[...Ot];Wt[it]=_e,gt(Wt)}}),ee.createElement(st.Z,{title:"\u5220\u9664"},ee.createElement(yt.Z,{className:Ae.Z.deleteIcon,style:{marginLeft:15,visibility:it>0?"visible":"hidden"},onClick:()=>Ht(it)}))))),ee.createElement(dt.Z,null,ee.createElement("div",{className:`${Ae.Z.addBtn}`,onClick:()=>{Xt()}},"\u65B0\u589E\u7B54\u6848")))},He=({value:Ot=!0,onChange:gt})=>ee.createElement(Me.Z,{checked:!Ot,onChange:Ht=>{gt(!Ht)}}),Et="\u2581",tt=({questionTitlePlaceholder:Ot,form:gt,scoreByBlank:Ht=!1,answerKey:Xt})=>{const[Ut,it]=(0,ge.useState)(!1),_e=(Ln,Yn)=>{const zt=Yn.line;let wn=0;for(let Yt=0;Yt<zt;Yt++)wn+=Ln.getLine(Yt).split(Et).length-1;const $n=Ln.getLine(zt).substring(0,Yn.ch);return wn+=$n.split(Et).length-1,wn},Wt=(Ln,Yn,zt,wn)=>{const $n=Ln.getRange(Yn.from,Yn.to);let Yt=0;if(Yn.text.forEach(tn=>{Yt+=tn.split(Et).length-1}),Yn.origin!=="setValue"){if($n&&$n.indexOf(Et)!==-1){const tn=$n.split(Et).length-1,Gt=_e(Ln,Yn.from);if(console.log(`\u5220\u9664${tn}\u4E2A\uFF0C \u524D\u9762\u6709${Gt}\u4E2A\uFF0C\u65B0\u589E${Yt}\u4E2A`),tn>1){const Tt=Array.from({length:tn},(ot,Ze)=>Gt+Ze);wn(Tt)}else wn(Gt)}else if(Yt>0){const tn=_e(Ln,Yn.from);console.log(`\u65B0\u589E${Yt}\u4E2A\uFF0C\u4E4B\u524D\u6709${tn}\u4E2A`),zt(Yt,tn)}}},Dn=()=>{const Ln=gt.getFieldValue(Xt);gt.setFieldsValue({[Xt]:Ln.map((Yn,zt)=>Ge(ze({},Yn),{position:zt+1}))})},Bn=(0,ge.useRef)(),$t=(Ln,Yn)=>{for(let zt=0;zt<Ln;zt++)Bn.current({position:null,answer_text:[""],model:1},Yn+zt);Dn()},ln=(0,ge.useRef)(),Tn=Ln=>{ln.current(Ln),Dn()},ei=kt.default.useWatch(Xt,gt);return ee.createElement("div",{className:Ae.Z.wrap},ee.createElement("div",{className:Ae.Z.questionTitleEditorWrap},ee.createElement(kt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(lt.h,{scrollId:"name",watch:!0,height:140,placeholder:Ot,showNullButton:!0,onCMBeforeChange:(Ln,Yn)=>{Wt(Ln,Yn,$t,Tn)}}))),ee.createElement(kt.default.List,{name:Xt,rules:[{validator(Ln,Yn){if(!(Yn!=null&&Yn.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const zt of Yn){const{answer_text:wn}=zt||{};if(wn!=null&&wn.some($n=>($n==null?void 0:$n.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Ln,{add:Yn,remove:zt},{errors:wn})=>(Bn.current=Yn,ln.current=zt,ee.createElement(ee.Fragment,null,ee.createElement(kt.default.Item,{label:ee.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(Ln!=null&&Ln.length)&&ee.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),Ln.map(($n,Yt)=>{var tn=$n,{key:Gt,name:Tt}=tn,ot=nt(tn,["key","name"]),Ze,At;return ee.createElement("div",{style:{marginBottom:10},key:Gt},ee.createElement(Ve.Z,{className:"mb20",align:"middle",wrap:!1},ee.createElement(dt.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${Ae.Z.blankIndex}`},"\u586B\u7A7A\u9879",Yt+1),ee.createElement(kt.default.Item,Ge(ze({},ot),{name:[Tt,"model"],noStyle:!0}),ee.createElement(bt.ZP.Group,{onChange:()=>{const Dt=gt.getFieldValue(Xt);gt.setFieldsValue({[Xt]:Dt.map((rt,et)=>Ge(ze({},rt),{answer_text:Tt===et?[""]:rt.answer_text}))})}},ee.createElement(bt.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",ee.createElement(st.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},ee.createElement(jt.Z,null))),ee.createElement(bt.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",ee.createElement(st.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},ee.createElement(jt.Z,null)))))),ee.createElement(Ve.Z,{style:{marginLeft:20},align:"middle",wrap:!1},ee.createElement(dt.Z,{flex:1},ee.createElement(Ve.Z,{align:"top",justify:"space-between",wrap:!1},ee.createElement(dt.Z,{flex:1},ee.createElement(kt.default.Item,Ge(ze({},ot),{name:[Tt,"answer_text"],noStyle:!0}),((At=(Ze=gt.getFieldValue(Xt))==null?void 0:Ze[Tt])==null?void 0:At.model)===1?ee.createElement(Je,null):ee.createElement(xt,null))),Ht&&ee.createElement(dt.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},ee.createElement(kt.default.Item,Ge(ze({},ot),{name:[Tt,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ae.Z.blankInputNumberWrapper}),ee.createElement(Ue.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),ee.createElement(kt.default.Item,Ge(ze({},ot),{name:[Tt,"position"],noStyle:!0}),ee.createElement(Ke.default,{type:"hidden"})))))})))),ee.createElement(Ve.Z,{align:"middle"},ee.createElement(kt.default.Item,{name:"downcase",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(dt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ee.createElement(Ve.Z,{align:"middle"},ee.createElement(kt.default.Item,{name:"no_space",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(dt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(ei==null?void 0:ei.length)>1&&ee.createElement(Ve.Z,{align:"middle",className:(ei==null?void 0:ei.length)>1?"mb30":`${Ae.Z.hide}`},ee.createElement(kt.default.Item,{name:"is_ordered"},ee.createElement(He,null)),ee.createElement(dt.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),ee.createElement("div",{onClick:()=>it(!0)},ee.createElement(kt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(lt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ut}))))}},11832:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return ye}});var ge=pe(59301),Re=pe(95237),Ve=pe(43604),dt=pe(78241),Ke=pe(43809),st=pe(41984),Me=pe(59301),kt=Object.defineProperty,bt=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Ae=(be,Te,Be)=>Te in be?kt(be,Te,{enumerable:!0,configurable:!0,writable:!0,value:Be}):be[Te]=Be,ne=(be,Te)=>{for(var Be in Te||(Te={}))yt.call(Te,Be)&&Ae(be,Be,Te[Be]);if(lt)for(var Be of lt(Te))jt.call(Te,Be)&&Ae(be,Be,Te[Be]);return be},ee=(be,Te)=>bt(be,Ue(Te)),ce=(be,Te)=>{var Be={};for(var ze in be)yt.call(be,ze)&&Te.indexOf(ze)<0&&(Be[ze]=be[ze]);if(be!=null&<)for(var ze of lt(be))Te.indexOf(ze)<0&&jt.call(be,ze)&&(Be[ze]=be[ze]);return Be};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},fe=({value:be,onChange:Te,form:Be})=>{const ze=(be==null?void 0:be.is_answer)===1,Ge=be==null?void 0:be.choice_text,nt=()=>{const Je=Be.getFieldsValue().choices.map(xt=>({choice_text:xt.choice_text,is_answer:0}));Be.setFieldsValue({choices:Je}),Te(ee(ne({},be),{is_answer:1}))};return Me.createElement(Re.Z,{className:Ke.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Me.createElement(Ve.Z,{onClick:nt,className:`${Ke.Z.choiceIndex} ${Ke.Z.judgementIndex} ${ze?Ke.Z.activeAnswer:""}`},se[Ge]),Me.createElement(Ve.Z,{flex:1,className:`${Ke.Z.editorWrap} ml15`},Me.createElement("div",{className:`${Ke.Z.inputBorder} ${Ke.Z.placeholder} ${ze?Ke.Z.activeJudgementAnswer:""}`},Ge)),Me.createElement(Ve.Z,{flex:"0 0 auto",className:"ml15"},Me.createElement("div",{onClick:nt,className:`${Ke.Z.setAnswerBtn} ${ze?Ke.Z.activeAnswer:""}`},ze?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ye=({questionTitlePlaceholder:be,choiceKey:Te,form:Be})=>{const[ze,Ge]=(0,ge.useState)(!1);return Me.createElement("div",{className:Ke.Z.wrap},Me.createElement("div",{className:Ke.Z.questionTitleEditorWrap},Me.createElement(dt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Me.createElement(st.h,{scrollId:"name",watch:!0,height:140,placeholder:be}))),Me.createElement(dt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Me.createElement(dt.default.List,{name:"choices",rules:[{validator(nt,Je){return Je.some(He=>(He==null?void 0:He.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},nt=>Me.createElement("div",{id:"choices"},nt.map(Je=>{var xt=Je,{key:He,name:Et}=xt,tt=ce(xt,["key","name"]);return Me.createElement(dt.default.Item,ee(ne({},tt),{key:He,name:Et,noStyle:!0}),Me.createElement(fe,{form:Be}))})))),Me.createElement("div",{onClick:()=>Ge(!0)},Me.createElement(dt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Me.createElement(st.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ze}))))}},41984:function(Vn,Cn,pe){"use strict";pe.d(Cn,{h:function(){return ne},x:function(){return ee}});var ge=pe(12290),Re=pe(43809),Ve=pe(85149),dt=pe(59301),Ke=Object.defineProperty,st=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,lt=(ce,se,fe)=>se in ce?Ke(ce,se,{enumerable:!0,configurable:!0,writable:!0,value:fe}):ce[se]=fe,yt=(ce,se)=>{for(var fe in se||(se={}))bt.call(se,fe)&<(ce,fe,se[fe]);if(kt)for(var fe of kt(se))Ue.call(se,fe)&<(ce,fe,se[fe]);return ce},jt=(ce,se)=>st(ce,Me(se)),Ae=(ce,se)=>{var fe={};for(var ye in ce)bt.call(ce,ye)&&se.indexOf(ye)<0&&(fe[ye]=ce[ye]);if(ce!=null&&kt)for(var ye of kt(ce))se.indexOf(ye)<0&&Ue.call(ce,ye)&&(fe[ye]=ce[ye]);return fe};const ne=ce=>{var se=ce,{value:fe,onChange:ye,scrollId:be}=se,Te=Ae(se,["value","onChange","scrollId"]);return dt.createElement("div",{id:be||""},dt.createElement(ge.Z,jt(yt({},Te),{defaultValue:fe,onChange:(Be,ze)=>{ze!=null&&ze.length?ye(Be,ze):ye(Be)}})))},ee=({value:ce,onChange:se,placeholder:fe,height:ye=140,isEdit:be,miniToolbar:Te,watch:Be=!0})=>be?dt.createElement(ge.Z,{watch:Be,isFocus:!0,height:ye||void 0,placeholder:fe,defaultValue:ce,onChange:se,miniToolbar:Te}):dt.createElement("div",{style:{cursor:"pointer"}},ce?dt.createElement(Ve.Z,{className:Re.Z.inputBorder,value:ce}):dt.createElement("div",{className:`${Re.Z.inputBorder} ${Re.Z.placeholder} inputBorderError`},fe))},35173:function(Vn,Cn,pe){"use strict";pe.d(Cn,{W:function(){return xt}});var ge=pe(59301),Re=pe(8591),Ve=pe(12563),dt=pe(78241),Ke=pe(78673),st=pe(95237),Me=pe(43604),kt=pe(6848),bt=pe(92832),Ue=pe(5871),lt=pe(43809),yt=pe(41984),jt=pe(12290),Ae=pe(61485),ne=Object.defineProperty,ee=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,be=(He,Et,tt)=>Et in He?ne(He,Et,{enumerable:!0,configurable:!0,writable:!0,value:tt}):He[Et]=tt,Te=(He,Et)=>{for(var tt in Et||(Et={}))fe.call(Et,tt)&&be(He,tt,Et[tt]);if(se)for(var tt of se(Et))ye.call(Et,tt)&&be(He,tt,Et[tt]);return He},Be=(He,Et)=>ee(He,ce(Et)),ze=(He,Et)=>{var tt={};for(var Ot in He)fe.call(He,Ot)&&Et.indexOf(Ot)<0&&(tt[Ot]=He[Ot]);if(He!=null&&se)for(var Ot of se(He))Et.indexOf(Ot)<0&&ye.call(He,Ot)&&(tt[Ot]=He[Ot]);return tt};const Ge=He=>{var Et=He,{value:tt,onChange:Ot}=Et,gt=ze(Et,["value","onChange"]);const Ht=Xt=>{Ot([Xt])};return ge.createElement(jt.Z,Be(Te({},gt),{defaultValue:tt==null?void 0:tt[0],onChange:Ht}))},nt=He=>{if(!He)return!1;if(/^s*$/.test(He)||He.trim()===""){Re.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Et=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return He==="|"?(Re.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Je=({value:He=[],onClose:Et})=>ge.createElement(Ve.default,{closable:!0,onClose:Et,className:lt.Z.keywordTag},ge.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},He.join(" \u6216 "))),xt=({questionTitlePlaceholder:He,form:Et,showKeywords:tt,isMustKeyWords:Ot=tt})=>{const[gt,Ht]=(0,ge.useState)(!1),[Xt,Ut]=(0,ge.useState)(""),it=dt.default.useWatch("use_keywords",Et),_e=dt.default.useWatch("question_score",Et);return ge.createElement("div",{className:lt.Z.wrap},ge.createElement("div",{className:lt.Z.questionTitleEditorWrap},ge.createElement(dt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ge.createElement(yt.h,{scrollId:"name",watch:!0,height:140,placeholder:He}))),ge.createElement(dt.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},ge.createElement(Ge,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),tt&&!Ot&&ge.createElement(dt.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},ge.createElement(Ke.Z,{defaultChecked:!0})),tt&&Ot&&ge.createElement(st.Z,{align:"middle",className:"mb30"},ge.createElement(dt.default.Item,{name:"use_keywords",valuePropName:"checked"},ge.createElement(Ke.Z,null)),ge.createElement(Me.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ge.createElement(Me.Z,null,ge.createElement(kt.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},ge.createElement(Ae.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(it||!Ot)&&ge.createElement(dt.default.List,{name:"keywords",rules:[{validator(Wt,Dn){return Ot?Dn!=null&&Dn.length?(Dn==null?void 0:Dn.reduce(($t,ln)=>$t+ln.score,0))>parseFloat(_e)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(Wt,{add:Dn,remove:Bn})=>ge.createElement(ge.Fragment,null,ge.createElement("div",{className:`${lt.Z.title} mb10`},Ot?"\u5173\u952E\u8BCD":ge.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ge.createElement(st.Z,{align:"middle",className:"font14 mb30"},ge.createElement(Me.Z,{flex:1},ge.createElement(bt.default,{value:Xt,onChange:$t=>{Ut($t.target.value)},maxLength:50,allowClear:!0,onPressEnter:$t=>{var ln,Tn,ei,Ln;const Yn=`${(ln=$t.target)==null?void 0:ln.value}`,zt=(ei=(Tn=Yn==null?void 0:Yn.split("|"))==null?void 0:Tn.filter(Yt=>!!Yt))==null?void 0:ei.map(Yt=>Yt==null?void 0:Yt.trim()),wn=Et.getFieldValue("keywords"),$n=((Ln=wn==null?void 0:wn.map(Yt=>Yt==null?void 0:Yt.keyword))==null?void 0:Ln.flat())||[];for(const Yt of zt)if($n.includes(Yt)){Re.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}nt(Yn)&&(Dn({keyword:zt,score:1}),Ut(""))},className:lt.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),ge.createElement(Me.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Wt.map($t=>{var ln=$t,{key:Tn,name:ei}=ln,Ln=ze(ln,["key","name"]);return ge.createElement(st.Z,{key:Tn,className:"mb20",style:{marginRight:148}},ge.createElement(Me.Z,{flex:1},ge.createElement(st.Z,{align:"middle",justify:"space-between"},ge.createElement(dt.default.Item,Be(Te({},Ln),{name:[ei,"keyword"]}),ge.createElement(Je,{onClose:()=>Bn(ei)})),Ot&&ge.createElement(dt.default.Item,Be(Te({},Ln),{name:[ei,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:lt.Z.blankInputNumberWrapper}),ge.createElement(Ue.Z,{className:lt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ge.createElement("div",{onClick:()=>Ht(!0)},ge.createElement(dt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ge.createElement(yt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:gt}))))}},27693:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Ke}});var ge={text:"text___bQulM",sup:"sup___rX_Y3"},Re=pe(78241),Ve=pe(59301),Ke=({text:st,name:Me="question_score"})=>{const kt=({value:bt})=>Ve.createElement("div",{className:ge.text},Ve.createElement("span",{className:ge.sup},"*"),Ve.createElement("span",{className:"mr10"},"\u5206\u503C"),Ve.createElement("span",null,bt||"--"),Ve.createElement("span",{className:"c-grey-999"},st));return Ve.createElement(Re.default.Item,{noStyle:!0,name:Me},Ve.createElement(kt,null))}},85149:function(Vn,Cn,pe){"use strict";pe.d(Cn,{z:function(){return ze},Z:function(){return Ge}});var ge=pe(59301),Re=pe(50304),Ve=pe(24768),dt=pe(64018),Ke=pe(40846),st=pe(3294),Me=pe(955),kt=pe(15342),bt=pe(1012),Ue=pe(23210),lt=pe(59301),jt=({html:nt})=>{const Je=(0,ge.useRef)(null),xt=(0,ge.useRef)(null),He=`.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,ge.useEffect)(()=>{const Et=Je.current.attachShadow({mode:"open"});xt.current=document.createElement("div"),xt.current.className="markdown-body",xt.current.innerHTML=nt,Et.appendChild(xt.current);const tt=document.createElement("style");return tt.textContent=He,Et.appendChild(tt),()=>{Et.innerHTML=""}},[]),(0,ge.useEffect)(()=>{xt.current&&(xt.current.innerHTML=nt)},[nt]),lt.createElement("div",{ref:Je})},Ae=Object.defineProperty,ne=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,se=(nt,Je,xt)=>Je in nt?Ae(nt,Je,{enumerable:!0,configurable:!0,writable:!0,value:xt}):nt[Je]=xt,fe=(nt,Je)=>{for(var xt in Je||(Je={}))ee.call(Je,xt)&&se(nt,xt,Je[xt]);if(ne)for(var xt of ne(Je))ce.call(Je,xt)&&se(nt,xt,Je[xt]);return nt};const ye="@\u2581\u2581@",be="@\u2581@",Te=/<pre[^>]*>/g;function Be(nt){let Je=document.createElement("div");return Je.innerHTML=nt,Je.childNodes.length===0?"":Je.childNodes[0].nodeValue}const ze=(nt,Je)=>{nt=nt||"";const xt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,He=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Et=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,tt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Je?nt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(xt,(Ot,gt,Ht,Xt,Ut,it,_e)=>{const Wt=gt||Xt||it,Dn=Ht||Ut||_e||"?";return st.Z.API_SERVER+"/api/attachments/"+Wt+Dn+"&t="+(0,Me.Jn)(Wt,Date.now())+(Ot.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(nt=nt.replace(tt,(Ot,gt,Ht,Xt,Ut,it,_e)=>{const Wt=gt||Xt||it,Dn=Ht||Ut||_e||"?";return st.Z.API_SERVER+"/attachments/download/"+Wt+Dn+"&t="+(0,Me.Jn)(Wt,Date.now())+(Ot.indexOf(")")>-1?")":"&")}).replace(xt,(Ot,gt,Ht,Xt,Ut,it,_e)=>{const Wt=gt||Xt||it,Dn=Ht||Ut||_e||"?";return st.Z.API_SERVER+"/api/attachments/"+Wt+Dn+"&t="+(0,Me.Jn)(Wt,Date.now())+(Ot.indexOf(")")>-1?")":"&")}).replace(He,(Ot,gt,Ht,Xt,Ut)=>{const it=gt||Xt,_e=Ht||Ut||"";return'"'+st.Z.API_SERVER+"/api/attachments/"+it+_e+it+_e+"&t="+(0,Me.Jn)(it,Date.now())}).replace(Et,(Ot,gt,Ht,Xt,Ut)=>{const it=gt||Xt,_e=Ht||Ut||"";return"("+st.Z.API_SERVER+"/files/uploads/"+it+_e+it+_e+"&t="+(0,Me.Jn)(it,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,`
|
|
|
`),nt)};var Ge=({value:nt="",className:Je,showTextOnly:xt,showLines:He,style:Et={},stylesPrev:tt={},highlightKeywords:Ot,showProgramFill:gt,isProgramFill:Ht,disabledFill:Xt=!1,programFillValue:Ut,onFillChange:it=Dn=>{},onFillBlur:_e=()=>{},onFillFocus:Wt=()=>{}})=>{let Dn=String(nt);const[Bn,$t]=(0,ge.useState)(""),[ln,Tn]=(0,ge.useState)("office"),[ei,Ln]=(0,ge.useState)([]),Yn=(0,ge.useRef)("a"+(0,bt.Z)()),zt={},wn=(Oe,Pe,ve)=>{const Fe=document.createElement(Oe===be?"input":"textarea");Fe.style.width="100%",Fe.style.height=Oe===be?"40px":"151px",Fe.rows=5,Fe.spellcheck=!1,Fe.name="edu-program-fill",Fe.placeholder="\u8BF7\u8F93\u5165",Fe.dataset.id=Pe;const We=Object.keys(zt).length;return zt[We]=Fe,`<span class="edu-program-fill-wrap ${Oe===be?"":"show"}" style="width:${Oe===be?"400px":"100%"}" title=${ve||""}><span>${Fe.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function $n(Oe){return Oe=Oe.replace(/!\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(/\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Oe=Oe.replace(/<embed.*?>/g,""),Oe=Oe.replace(/<img.*?>/g,""),Oe=Oe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Oe=Oe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Oe=Oe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Oe=Oe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Oe}const Yt=Oe=>Oe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Pe,ve){let Fe=ve.replace(/(\n|\r)/g,"").split("}"),We=[];return Fe.map(Ne=>{Ne!=""&&We.push(`.${Yn.current} ${Ne}`)}),`<style>${We.join("}")}</style>`}),tn=(0,ge.useMemo)(()=>{try{const Fe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,We=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ne=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,ft=/\(\/attachments\/download\//g;Dn=Dn.replace(ft,"("+st.Z.API_SERVER+"/attachments/download/").replace(Fe,"("+st.Z.API_SERVER+"/api/attachments/").replace(We,'"'+st.Z.API_SERVER+"/api/attachments/").replace(Ne,'"'+st.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(Fe){}if(gt){let Fe=-1;return Dn=Dn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(We,Ne,ft){var sn;return++Fe,wn(We,Fe,(sn=Ut==null?void 0:Ut[Fe])==null?void 0:sn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Yt(Dn||"")}</pre>`}let Oe=Yt(Dn);Oe=(0,Ve.ZP)(Oe);const Pe=(0,Ve.ez)();Dn.match(/\[TOC\]/)&&(Oe=Oe.replace("<p>[TOC]</p>",(0,Ve.Qv)()),(0,Ve.Iy)()),Oe=Oe.replace(/(__special_katext_id_\d+__)/g,(Fe,We)=>{const{type:Ne,expression:ft}=Pe[We];return(0,kt.renderToString)(Be(ft)||"",{displayMode:Ne==="block",throwOnError:!1,output:"html"})}),Oe=Oe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ve.AL)();const ve=document.createElement("div");if(ve.innerHTML=Oe,xt)return ve.innerText;if(Ot){const Fe=Ot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ze(ve,Fe),ve.innerHTML}return setTimeout(()=>rt(),500),ve.innerHTML},[Dn,Ot]);(0,ge.useEffect)(()=>{At.current&&At.current.querySelectorAll(["input","textarea"]).forEach(Pe=>{Pe.oninput=Gt,Pe.onblur=Tt,Pe.onfocus=ot})},[ei]),(0,ge.useEffect)(()=>{var Oe,Pe,ve,Fe,We;if(Ut!=null&&Ut.length)try{const Ne=At.current.querySelectorAll(".edu-program-fill-score"),ft=At.current.querySelectorAll('[name="edu-program-fill"]');for(const[sn,un]of ft.entries())un.value=((Oe=Ut==null?void 0:Ut[sn])==null?void 0:Oe.value)||"",((Pe=Ut==null?void 0:Ut[sn])==null?void 0:Pe.type)==="warning"?un.className="program-fill-warning":((ve=Ut==null?void 0:Ut[sn])==null?void 0:ve.type)==="success"?un.className="program-fill-success":un.className="";for(const[sn,un]of Ne.entries())un.innerHTML=(Fe=Ut==null?void 0:Ut[sn])!=null&&Fe.score?`${(We=Ut==null?void 0:Ut[sn])==null?void 0:We.score}\u5206`:"";Ln(Ut)}catch(Ne){console.log(Ne,"error")}},[Ut]);const Gt=Oe=>{ei[Oe.target.dataset.id]=ei[Oe.target.dataset.id]||{},ei[Oe.target.dataset.id].value=Oe.target.value,Ln([...ei]),it(ei,Oe.target.dataset.id)},Tt=Oe=>{ei[Oe.target.dataset.id]=ei[Oe.target.dataset.id]||{},ei[Oe.target.dataset.id].value=Oe.target.value,Ln([...ei]),_e(ei,Oe.target.dataset.id)},ot=Oe=>{ei[Oe.target.dataset.id]=ei[Oe.target.dataset.id]||{},ei[Oe.target.dataset.id].value=Oe.target.value,Ln([...ei]),Wt(ei,Oe.target.dataset.id)};function Ze(Oe,Pe){return Oe.childNodes.forEach(ve=>{var Fe;if(ve.childNodes.length>0)Ze(ve,Pe);else if(ve.nodeName!=="IMG")if(ve.innerHTML)ve.innerHTML=(Fe=ve.innerHTML)==null?void 0:Fe.replace(new RegExp(Pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const We=document.createElement("span");We.innerHTML=ve.textContent.replace(new RegExp(Pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ve.replaceWith(We)}})}const At=(0,ge.useRef)();Ve.jb.WebkitLineClamp=He,He&&(Et=fe(fe({},Et),Ve.jb));function Dt(Oe){let Pe=Oe.target;if(Pe.tagName.toUpperCase()==="A"){let ve=Pe.getAttribute("href");if(ve.indexOf("office")>-1)Oe.preventDefault(),$t(ve),Tn("office");else if(ve.indexOf("application/pdf")>-1)Oe.preventDefault(),$t(ve),Tn("pdf");else if(ve.indexOf("text/html")>-1)Oe.preventDefault(),$t(ve),Tn("html");else if(ve.startsWith("#")){Oe.preventDefault();let Fe=document.getElementById(ve.replace("#",""));Fe&&Fe.scrollIntoView(!0)}}}const rt=()=>{var Oe;const Pe=(Oe=At.current)==null?void 0:Oe.querySelectorAll("video");Pe==null||Pe.forEach(ve=>{if(ve.oncontextmenu=()=>!1,ve.src.indexOf(".m3u8")>-1&&!ve.canPlayType("application/vnd.apple.mpegurl")){if(Ke.ZP.isSupported()){var Fe=new Ke.ZP;Fe.loadSource(ve.src),Fe.attachMedia(ve)}}})};(0,ge.useEffect)(()=>{if(At.current&&tn&&tn.match(Te)&&window.PR.prettyPrint(),At.current)return At.current.addEventListener("click",Dt),()=>{var Oe;(Oe=At.current)==null||Oe.removeEventListener("click",Dt),(0,Ve.AL)(),(0,Ve.Iy)()}},[tn,At.current,Dt]),(0,ge.useEffect)(()=>{var Oe;const Pe=ve=>{ve.preventDefault(),ve.clipboardData.setData("text",window.getSelection().toString())};return(Oe=At.current)==null||Oe.addEventListener("copy",Pe),()=>{var ve;(ve=At.current)==null||ve.removeEventListener("copy",Pe)}},[At.current]);const et=Oe=>/<style[\s\S]*?>/i.test(Oe||"");return ge.createElement(ge.Fragment,null,xt&&ge.createElement("div",{ref:At},tn),!xt&&!et(tn)&&ge.createElement("div",{ref:At,style:fe({},Et),className:`${Je||""} ${Xt?"disabled-fill":""} markdown-body ${Yn.current}`,dangerouslySetInnerHTML:{__html:tn}}),!xt&&et(tn)&&ge.createElement(jt,{html:tn}),ge.createElement(Ue.Z,{close:!0,data:Bn,type:Bn!=null&&Bn.length?ln:"",style:fe({},tt),onClose:()=>$t("")}))}},53932:function(Vn,Cn,pe){"use strict";pe.d(Cn,{h:function(){return be},Z:function(){return ye}});var ge=pe(59301),Re=pe(57809),Ve=pe(78241),dt=pe(3113),Ke=pe(89780),st=pe.n(Ke),Me=pe(37036),kt=Object.defineProperty,bt=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Ae=(Te,Be,ze)=>Be in Te?kt(Te,Be,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Te[Be]=ze,ne=(Te,Be)=>{for(var ze in Be||(Be={}))yt.call(Be,ze)&&Ae(Te,ze,Be[ze]);if(lt)for(var ze of lt(Be))jt.call(Be,ze)&&Ae(Te,ze,Be[ze]);return Te},ee=(Te,Be)=>bt(Te,Ue(Be));const ce=Re.default.Option,se={labelCol:{span:4},wrapperCol:{span:20}},fe={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 ye=({callback:Te,onCancel:Be})=>{const[ze,Ge]=(0,ge.useState)("python");function nt(xt){Ge(fe[xt][1])}function Je(xt){Te(xt)}return ge.createElement(Ve.default,ee(ne({},se),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Je,style:{width:500}}),ge.createElement(Ve.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ge.createElement(Re.default,{getPopupContainer:xt=>xt.parentNode,onChange:nt},Object.keys(fe).map(xt=>ge.createElement(ce,{key:xt,value:xt},fe[xt][0])))),ge.createElement(Ve.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ge.createElement(be,{mode:ze})),ge.createElement("div",{className:"flex-container flex-end"},ge.createElement(dt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ge.createElement(dt.ZP,{type:"ghost",onClick:Be},"\u53D6\u6D88")))};function be({value:Te,onChange:Be,mode:ze,options:Ge={}}){const nt=(0,ge.useRef)(),[Je,xt]=(0,ge.useState)();return(0,ge.useEffect)(()=>{if(Je){let He=function(Et){const tt=Et.getValue();Be&&Be(tt)};return Je.on("change",He),()=>{Je.off("change",He)}}},[Je,Be]),(0,ge.useEffect)(()=>{Je&&Je.setOption("mode",ze)},[Je,ze]),(0,ge.useEffect)(()=>{Je&&(Te!==Je.getValue()||Te==="")&&setTimeout(()=>{Je.setValue(Te||"")},300)},[Je,Te]),(0,ge.useEffect)(()=>{if(nt.current&&!Je){const He=st().fromTextArea(nt.current,ne({mode:ze,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ge));xt(He)}},[nt.current,Je]),ge.createElement("div",{className:"my-codemirror-container"},ge.createElement("textarea",{ref:nt}))}},12290:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Un}});var ge=pe(59301),Re=pe(89780),Ve=pe.n(Re),dt=pe(76374),Ke=pe(37036),st=pe(6313),Me=pe(25717),kt=pe(99498),bt=pe(25419),Ue=pe(67549),lt=pe(85149),yt=({value:It="",className:Kt,showTextOnly:Ye,showLines:nn,style:xn={}})=>{const Nt=(0,ge.useMemo)(()=>"",[It]);return ge.createElement(ge.Fragment,null,ge.createElement("div",{dangerouslySetInnerHTML:{__html:Nt}}))},jt=pe(59301),Ae=Object.defineProperty,ne=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,ye=(It,Kt,Ye)=>Kt in It?Ae(It,Kt,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):It[Kt]=Ye,be=(It,Kt)=>{for(var Ye in Kt||(Kt={}))se.call(Kt,Ye)&&ye(It,Ye,Kt[Ye]);if(ce)for(var Ye of ce(Kt))fe.call(Kt,Ye)&&ye(It,Ye,Kt[Ye]);return It},Te=(It,Kt)=>ne(It,ee(Kt));let Be=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function ze({onActionCallback:It,title:Kt,icon:Ye,actionName:nn,className:xn="",children:Nt}){function at(){It(nn)}return jt.createElement("a",{title:Kt,className:xn,onClick:at},jt.createElement("i",{className:`${Ye}`}),Nt)}var Ge=({watch:It,showNullButton:Kt,showNullProgramButton:Ye,onActionCallback:nn,fullScreen:xn,insertTemp:Nt,hidetoolBar:at,extraUse:cn})=>{const Nn=[...Be,{title:`${It?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${It?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return jt.createElement("ul",{className:"markdown-toolbar-container"},!at&&Nn.map((kn,Jn)=>jt.createElement("li",{key:Jn},kn.actionName?jt.createElement(ze,Te(be({},kn),{onActionCallback:nn})):jt.createElement("span",{className:"v-line"}))),Kt?jt.createElement("li",null,jt.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:nn},jt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ye?jt.createElement(jt.Fragment,null,jt.createElement("li",null,jt.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:nn},jt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),jt.createElement("li",null,jt.createElement(ze,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:nn},jt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Nt&&jt.createElement("li",null,jt.createElement(ze,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Nt}`,onActionCallback:nn},jt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),cn&&jt.createElement("li",null,cn),jt.createElement("li",{className:"btn-full-screen"},jt.createElement(ze,{icon:`${xn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:xn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:nn})))},nt=pe(79346),Je=pe(78241),xt=pe(92832),He=pe(3113),Et=Object.defineProperty,tt=Object.defineProperties,Ot=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Ut=(It,Kt,Ye)=>Kt in It?Et(It,Kt,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):It[Kt]=Ye,it=(It,Kt)=>{for(var Ye in Kt||(Kt={}))Ht.call(Kt,Ye)&&Ut(It,Ye,Kt[Ye]);if(gt)for(var Ye of gt(Kt))Xt.call(Kt,Ye)&&Ut(It,Ye,Kt[Ye]);return It},_e=(It,Kt)=>tt(It,Ot(Kt));const Wt={labelCol:{span:4},wrapperCol:{span:20}};var Dn=({callback:It,onCancel:Kt})=>{function Ye(nn){It(nn)}return ge.createElement(Je.default,_e(it({},Wt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ye,style:{width:500}}),ge.createElement(Je.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ge.createElement(xt.default,null)),ge.createElement(Je.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ge.createElement(xt.default,null)),ge.createElement("div",{className:"flex-container flex-end"},ge.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ge.createElement(He.ZP,{type:"ghost",onClick:Kt},"\u53D6\u6D88")))},Bn=pe(53932),$t=pe(28451),ln=pe(43418),Tn=pe(95237),ei=pe(16406),Ln=pe(59301),Yn=({callback:It,onCancel:Kt})=>{const Ye=document.createElement("canvas"),nn=Ye.getContext("2d");Ye.width=1e3,Ye.height=800,nn.fillStyle="#ffffff",nn.fillRect(0,0,Ye.width,Ye.height);const xn=Ye.toDataURL("image/png");return Ln.createElement(ln.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ln.createElement(Tn.Z,{style:{height:"100vh"}},Ln.createElement(ei.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:xn,visible:!0,title:String(Date.now())},onOk:Nt=>{It({src:Nt.url})},onClose:Kt})))},zt=pe(12378);function wn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(wn,go.CommandHandler),wn.prototype.canAlignSelection=function(){var It=this.diagram;return!(It===null||It.isReadOnly||It.isModelReadOnly||It.selection.count<2)},wn.prototype.alignLeft=function(){var It=this.diagram;It.startTransaction("aligning left");var Kt=1/0;It.selection.each(function(Ye){Ye instanceof go.Link||(Kt=Math.min(Ye.position.x,Kt))}),It.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(Kt,Ye.position.y))}),It.commitTransaction("aligning left")},wn.prototype.alignRight=function(){var It=this.diagram;It.startTransaction("aligning right");var Kt=-1/0;It.selection.each(function(Ye){if(!(Ye instanceof go.Link)){var nn=Ye.actualBounds.x+Ye.actualBounds.width;Kt=Math.max(nn,Kt)}}),It.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(Kt-Ye.actualBounds.width,Ye.position.y))}),It.commitTransaction("aligning right")},wn.prototype.alignTop=function(){var It=this.diagram;It.startTransaction("alignTop");var Kt=1/0;It.selection.each(function(Ye){Ye instanceof go.Link||(Kt=Math.min(Ye.position.y,Kt))}),It.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(Ye.position.x,Kt))}),It.commitTransaction("alignTop")},wn.prototype.alignBottom=function(){var It=this.diagram;It.startTransaction("aligning bottom");var Kt=-1/0;It.selection.each(function(Ye){if(!(Ye instanceof go.Link)){var nn=Ye.actualBounds.y+Ye.actualBounds.height;Kt=Math.max(nn,Kt)}}),It.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(Ye.actualBounds.x,Kt-Ye.actualBounds.height))}),It.commitTransaction("aligning bottom")},wn.prototype.alignCenterX=function(){var It=this.diagram,Kt=It.selection.first();if(Kt){It.startTransaction("aligning Center X");var Ye=Kt.actualBounds.x+Kt.actualBounds.width/2;It.selection.each(function(nn){nn instanceof go.Link||nn.move(new go.Point(Ye-nn.actualBounds.width/2,nn.actualBounds.y))}),It.commitTransaction("aligning Center X")}},wn.prototype.alignCenterY=function(){var It=this.diagram,Kt=It.selection.first();if(Kt){It.startTransaction("aligning Center Y");var Ye=Kt.actualBounds.y+Kt.actualBounds.height/2;It.selection.each(function(nn){nn instanceof go.Link||nn.move(new go.Point(nn.actualBounds.x,Ye-nn.actualBounds.height/2))}),It.commitTransaction("aligning Center Y")}},wn.prototype.alignColumn=function(It){var Kt=this.diagram;Kt.startTransaction("align Column"),It===void 0&&(It=0),It=parseFloat(It);var Ye=new Array;Kt.selection.each(function(cn){cn instanceof go.Link||Ye.push(cn)});for(var nn=0;nn<Ye.length-1;nn++){var xn=Ye[nn],Nt=xn.actualBounds.y+xn.actualBounds.height+It,at=Ye[nn+1];at.move(new go.Point(xn.actualBounds.x,Nt))}Kt.commitTransaction("align Column")},wn.prototype.alignRow=function(It){It===void 0&&(It=0),It=parseFloat(It);var Kt=this.diagram;Kt.startTransaction("align Row");var Ye=new Array;Kt.selection.each(function(cn){cn instanceof go.Link||Ye.push(cn)});for(var nn=0;nn<Ye.length-1;nn++){var xn=Ye[nn],Nt=xn.actualBounds.x+xn.actualBounds.width+It,at=Ye[nn+1];at.move(new go.Point(Nt,xn.actualBounds.y))}Kt.commitTransaction("align Row")},wn.prototype.canRotate=function(It){var Kt=this.diagram;return!(Kt===null||Kt.isReadOnly||Kt.isModelReadOnly||Kt.selection.count<1)},wn.prototype.rotate=function(It){It===void 0&&(It=90);var Kt=this.diagram;Kt.startTransaction("rotate "+It.toString());var Kt=this.diagram;Kt.selection.each(function(Ye){Ye instanceof go.Link||Ye instanceof go.Group||(Ye.angle+=It)}),Kt.commitTransaction("rotate "+It.toString())},wn.prototype.pullToFront=function(){var It=this.diagram;It.startTransaction("pullToFront");var Kt=new go.Map;It.selection.each(function(Ye){Kt.set(Ye.layer,0)}),Kt.iteratorKeys.each(function(Ye){var nn=0;Ye.parts.each(function(xn){if(!xn.isSelected){var Nt=xn.zOrder;isNaN(Nt)?xn.zOrder=0:nn=Math.max(nn,Nt)}}),Kt.set(Ye,nn)}),It.selection.each(function(Ye){wn._assignZOrder(Ye,Kt.get(Ye.layer)+1)}),It.commitTransaction("pullToFront")},wn.prototype.pushToBack=function(){var It=this.diagram;It.startTransaction("pushToBack");var Kt=new go.Map;It.selection.each(function(Ye){Kt.set(Ye.layer,0)}),Kt.iteratorKeys.each(function(Ye){var nn=0;Ye.parts.each(function(xn){if(!xn.isSelected){var Nt=xn.zOrder;isNaN(Nt)?xn.zOrder=0:nn=Math.min(nn,Nt)}}),Kt.set(Ye,nn)}),It.selection.each(function(Ye){wn._assignZOrder(Ye,Kt.get(Ye.layer)-1-wn._findGroupDepth(Ye))}),It.commitTransaction("pushToBack")},wn._assignZOrder=function(It,Kt,Ye){Ye===void 0&&(Ye=It),It.layer===Ye.layer&&(It.zOrder=Kt),It instanceof go.Group&&It.memberParts.each(function(nn){wn._assignZOrder(nn,Kt+1,Ye)})},wn._findGroupDepth=function(It){if(It instanceof go.Group){var Kt=0;return It.memberParts.each(function(Ye){Kt=Math.max(Kt,wn._findGroupDepth(Ye))}),Kt+1}else return 0},wn.prototype.doKeyDown=function(){var It=this.diagram;if(It!==null){var Kt=It.lastInput;if(Kt.key==="Up"||Kt.key==="Down"||Kt.key==="Left"||Kt.key==="Right"){var Ye=this.arrowKeyBehavior;if(Ye==="none")return;if(Ye==="select"){this._arrowKeySelect();return}else if(Ye==="move"){this._arrowKeyMove();return}else if(Ye==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},wn.prototype._getAllParts=function(){var It=new Array;return this.diagram.nodes.each(function(Kt){It.push(Kt)}),this.diagram.parts.each(function(Kt){It.push(Kt)}),It},wn.prototype._arrowKeyMove=function(){var It=this.diagram,Kt=It.lastInput,Ye=0,nn=0;if(Kt.control||Kt.meta)Ye=1,nn=1;else if(It.grid!==null){var xn=It.grid.gridCellSize;nn=xn.width,Ye=xn.height}It.startTransaction("arrowKeyMove"),It.selection.each(function(Nt){Kt.key==="Up"?Nt.move(new go.Point(Nt.actualBounds.x,Nt.actualBounds.y-Ye)):Kt.key==="Down"?Nt.move(new go.Point(Nt.actualBounds.x,Nt.actualBounds.y+Ye)):Kt.key==="Left"?Nt.move(new go.Point(Nt.actualBounds.x-nn,Nt.actualBounds.y)):Kt.key==="Right"&&Nt.move(new go.Point(Nt.actualBounds.x+nn,Nt.actualBounds.y))}),It.commitTransaction("arrowKeyMove")},wn.prototype._arrowKeySelect=function(){var It=this.diagram,Kt=It.lastInput,Ye=null;Kt.key==="Up"?Ye=this._findNearestPartTowards(270):Kt.key==="Down"?Ye=this._findNearestPartTowards(90):Kt.key==="Left"?Ye=this._findNearestPartTowards(180):Kt.key==="Right"&&(Ye=this._findNearestPartTowards(0)),Ye!==null&&(Kt.shift?Ye.isSelected=!0:Kt.control||Kt.meta?Ye.isSelected=!Ye.isSelected:It.select(Ye))},wn.prototype._findNearestPartTowards=function(It){var Kt=this.diagram.selection.first();if(Kt===null)return null;for(var Ye=Kt.actualBounds.center,nn=this._getAllParts(),xn=1/0,Nt=Kt,at=0;at<nn.length;at++){var cn=nn[at];if(cn!==Kt&&cn.canSelect()){var Nn=cn.actualBounds.center,kn=Ye.directionPoint(Nn),Jn=this._angleCloseness(kn,It);if(Jn<=45){var St=Ye.distanceSquaredPoint(Nn);St*=1+Math.sin(Jn*Math.PI/180),St<xn&&(xn=St,Nt=cn)}}}return Nt},wn.prototype._angleCloseness=function(It,Kt){return Math.min(Math.abs(Kt-It),Math.min(Math.abs(Kt+360-It),Math.abs(Kt-360-It)))},wn.prototype._arrowKeyTree=function(){var It=this.diagram,Kt=It.selection.first();if(Kt instanceof go.Node){var Ye=It.lastInput;if(Ye.key==="Right"){if(!Kt.isTreeLeaf)if(!Kt.isTreeExpanded)It.commandHandler.canExpandTree(Kt)&&It.commandHandler.expandTree(Kt);else{var nn=this._sortTreeChildrenByY(Kt).first();nn!==null&&It.select(nn)}}else if(Ye.key==="Left")if(!Kt.isTreeLeaf&&Kt.isTreeExpanded)It.commandHandler.canCollapseTree(Kt)&&It.commandHandler.collapseTree(Kt);else{var xn=Kt.findTreeParentNode();xn!==null&&It.select(xn)}else if(Ye.key==="Up"){var xn=Kt.findTreeParentNode();if(xn!==null){var Nt=this._sortTreeChildrenByY(xn),at=Nt.indexOf(Kt);if(at>0){for(var cn=Nt.elt(at-1);cn!==null&&cn.isTreeExpanded&&!cn.isTreeLeaf;){var Nn=this._sortTreeChildrenByY(cn);cn=Nn.last()}cn!==null&&It.select(cn)}else It.select(xn)}}else if(Ye.key==="Down")if(Kt.isTreeExpanded&&!Kt.isTreeLeaf){var nn=this._sortTreeChildrenByY(Kt).first();nn!==null&&It.select(nn)}else for(;Kt!==null;){var xn=Kt.findTreeParentNode();if(xn===null)break;var Nt=this._sortTreeChildrenByY(xn),at=Nt.indexOf(Kt);if(at<Nt.length-1){It.select(Nt.elt(at+1));break}else Kt=xn}var kn=It.selection.first();kn!==null&&It.scrollToRect(kn.actualBounds)}},wn.prototype._sortTreeChildrenByY=function(It){var Kt=new go.List().addAll(It.findTreeChildrenNodes());return Kt.sort(function(Ye,nn){var xn=Ye.location,Nt=nn.location;return xn.y<Nt.y?-1:xn.y>Nt.y?1:xn.x<Nt.x?-1:xn.x>Nt.x?1:0}),Kt},wn.prototype.copyToClipboard=function(It){go.CommandHandler.prototype.copyToClipboard.call(this,It),this._lastPasteOffset.set(this.pasteOffset)},wn.prototype.pasteFromClipboard=function(){var It=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(It,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),It},Object.defineProperty(wn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(It){if(It!=="move"&&It!=="select"&&It!=="scroll"&&It!=="tree"&&It!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+It);this._arrowKeyBehavior=It}}),Object.defineProperty(wn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(It){if(!(It instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+It);this._pasteOffset.set(It)}});var $n=wn,Yt=pe(74413),tn=pe(43604),Gt=pe(99064),Tt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ot=pe(24065),Ze=pe(59301),At=(It,Kt,Ye)=>new Promise((nn,xn)=>{var Nt=Nn=>{try{cn(Ye.next(Nn))}catch(kn){xn(kn)}},at=Nn=>{try{cn(Ye.throw(Nn))}catch(kn){xn(kn)}},cn=Nn=>Nn.done?nn(Nn.value):Promise.resolve(Nn.value).then(Nt,at);cn((Ye=Ye.apply(It,Kt)).next())});function Dt({onCancel:It,callback:Kt}){let Ye=(0,ge.useRef)(),nn=(0,ge.useRef)(),xn=(0,ge.useRef)(),Nt=(0,ge.useRef)(!1);const at=(0,ge.useRef)(!1),[cn,Nn]=(0,ge.useState)(0);function kn(){const St=zt.bx.make,An={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};Ye.current=new zt.S0(nn.current,{padding:20,grid:St(zt.s_,"Grid",St(zt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),St(zt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:oi=>{var Bi=oi.diagram.commandHandler.addTopLevelParts(oi.diagram.selection,!0);Bi||oi.diagram.currentTool.doCancel()},commandHandler:St($n),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:oi=>{var Bi=oi.subject;Bi.location=Bi.location.copy().snapToGridPoint(oi.diagram.grid.gridOrigin,oi.diagram.grid.gridCellSize),setTimeout(()=>{oi.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:oi=>{var Bi=oi.subject;setTimeout(()=>{oi.diagram.commandHandler.editTextBlock()})},LinkRelinked:oi=>{var Bi=oi.parameter.part;Bi.invalidateConnectedLinks();var $i=oi.subject;oi.diagram.toolManager.linkingTool.isForwards?$i.toNode.invalidateConnectedLinks():$i.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ye.current.nodeTemplate=St(zt.NB,"Auto",{locationSpot:zt.z6.Center,locationObjectName:"SHAPE",desiredSize:new zt.$u(120,60),minSize:new zt.$u(40,40),resizable:!0,resizeCellSize:new zt.$u(10,10),rotatable:!0},new zt.KX("location","loc",zt.E9.parse).makeTwoWay(zt.E9.stringify),new zt.KX("desiredSize","size",zt.$u.parse).makeTwoWay(zt.$u.stringify),St(zt.bn,{name:"SHAPE",fill:An.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:zt.z6.AllSides,toSpot:zt.z6.AllSides},new zt.KX("figure"),new zt.KX("fill"),new zt.KX("stroke","borderColor"),new zt.KX("strokeWidth","thickness"),new zt.KX("strokeDashArray","dash")),St(zt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),St(zt.al,{margin:1,textAlign:"center",overflow:zt.al.OverflowEllipsis,editable:!0},new zt.KX("text").makeTwoWay(),new zt.KX("stroke","color"))),Ye.current.nodeTemplate.toolTip=St("ToolTip",St(zt.s_,"Vertical",{maxSize:new zt.$u(200,NaN)},St(zt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new zt.KX("text")),St(zt.al,{font:"10pt sans-serif",textAlign:"center"},new zt.KX("text","details"))));function qn(oi,Bi){var $i=(Ti,Qi)=>{Ti.handled=!0,Ti.diagram.model.commit(pr=>{var hr=Qi.part.adornedPart,Vi=new zt.E9().setRectSpot(hr.actualBounds,oi);Vi.subtract(hr.location),Vi.scale(2,2),Vi.x+=Math.sign(Vi.x)*130,Vi.y+=Math.sign(Vi.y)*130,Vi.add(hr.location),Vi.snapToGridPoint(Ti.diagram.grid.gridOrigin,Ti.diagram.grid.gridCellSize);var xr=pr.copyNodeData(hr.data);pr.setGroupKeyForNodeData(xr,pr.getGroupKeyForNodeData(hr.data)),pr.addNodeData(xr);var Rn={from:hr.key,to:pr.getKeyForNodeData(xr)};pr.addLinkData(Rn);var Br=Ti.diagram.findNodeForData(xr);Br.location=Vi,Ti.diagram.select(Br),setTimeout(()=>{Ti.diagram.commandHandler.editTextBlock()},20)})};return St(zt.bn,{figure:Bi,alignment:oi,alignmentFocus:oi.opposite(),width:oi.equals(zt.z6.Top)||oi.equals(zt.z6.Bottom)?25:18,height:oi.equals(zt.z6.Top)||oi.equals(zt.z6.Bottom)?18:25,fill:"orange",stroke:An.white,strokeWidth:4,mouseEnter:(Ti,Qi)=>Qi.fill="dodgerblue",mouseLeave:(Ti,Qi)=>Qi.fill="orange",isActionable:!0,click:$i,contextClick:$i})}function Si(oi){return St(zt.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:(Bi,$i)=>$i.fill="dodgerblue",mouseLeave:(Bi,$i)=>$i.fill="orange",click:(Bi,$i)=>{Bi.diagram.commandHandler.showContextMenu($i.part.adornedPart)}},oi||{})}Ye.current.nodeTemplate.selectionAdornmentTemplate=St(zt.uz,"Spot",St(zt.Vm,{padding:10}),qn(zt.z6.Top,"TriangleUp"),qn(zt.z6.Left,"TriangleLeft"),qn(zt.z6.Right,"TriangleRight"),qn(zt.z6.Bottom,"TriangleDown"),Si({alignment:new zt.z6(.75,0)}));function rn(oi,Bi){return($i,Ti)=>{$i.handled=!0,$i.diagram.model.commit(Qi=>{Qi.set(Ti.part.adornedPart.data,oi,Bi)})}}function bn(oi,Bi){return Bi||(Bi="color"),St(zt.bn,{width:16,height:16,stroke:"lightgray",fill:oi,margin:1,background:"transparent",mouseEnter:($i,Ti)=>Ti.stroke="dodgerblue",mouseLeave:($i,Ti)=>Ti.stroke="lightgray",click:rn(Bi,oi),contextClick:rn(Bi,oi)})}function Ft(){return[St("ContextMenuButton",St(zt.s_,"Horizontal",bn(An.white,"fill"),bn(An.beige,"fill"),bn(An.extralightblue,"fill"),bn(An.extralightred,"fill"))),St("ContextMenuButton",St(zt.s_,"Horizontal",bn(An.lightgray,"fill"),bn(An.lightgreen,"fill"),bn(An.lightblue,"fill"),bn(An.lightred,"fill")))]}function Pn(){return[St("ContextMenuButton",St(zt.s_,"Horizontal",bn(An.black),bn(An.green),bn(An.blue),bn(An.red))),St("ContextMenuButton",St(zt.s_,"Horizontal",bn(An.white),bn(An.magenta),bn(An.purple),bn(An.orange)))]}function yn(oi,Bi){return Bi||(Bi="thickness"),St(zt.bn,"LineH",{width:16,height:16,strokeWidth:oi,margin:1,background:"transparent",mouseEnter:($i,Ti)=>Ti.background="dodgerblue",mouseLeave:($i,Ti)=>Ti.background="transparent",click:rn(Bi,oi),contextClick:rn(Bi,oi)})}function Sn(oi,Bi){return Bi||(Bi="dash"),St(zt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:oi,margin:1,background:"transparent",mouseEnter:($i,Ti)=>Ti.background="dodgerblue",mouseLeave:($i,Ti)=>Ti.background="transparent",click:rn(Bi,oi),contextClick:rn(Bi,oi)})}function Gn(){return[St("ContextMenuButton",St(zt.s_,"Horizontal",yn(1),yn(2),yn(3),yn(4))),St("ContextMenuButton",St(zt.s_,"Horizontal",Sn(null),Sn([2,4]),Sn([4,4])))]}function Zn(oi,Bi){return Bi||(Bi="figure"),St(zt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:oi,margin:1,background:"transparent",mouseEnter:($i,Ti)=>Ti.fill="dodgerblue",mouseLeave:($i,Ti)=>Ti.fill="lightgray",click:rn(Bi,oi),contextClick:rn(Bi,oi)})}Ye.current.nodeTemplate.contextMenu=St("ContextMenu",St("ContextMenuButton",St(zt.s_,"Horizontal",Zn("Rectangle"),Zn("RoundedRectangle"),Zn("Ellipse"),Zn("Diamond"))),St("ContextMenuButton",St(zt.s_,"Horizontal",Zn("Parallelogram2"),Zn("ManualOperation"),Zn("Procedure"),Zn("Cylinder1"))),St("ContextMenuButton",St(zt.s_,"Horizontal",Zn("Terminator"),Zn("CreateRequest"),Zn("Document"),Zn("TriangleDown"))),Ft(),Pn(),Gn()),Ye.current.groupTemplate=St(zt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:zt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(oi,Bi)=>{var $i=Bi.addMembers(Bi.diagram.selection,!0);$i||Bi.diagram.currentTool.doCancel()},avoidable:!1},new zt.KX("location","loc",zt.E9.parse).makeTwoWay(zt.E9.stringify),St(zt.s_,"Auto",{name:"BODY"},St(zt.bn,{parameter1:10,fill:An.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:zt.z6.AllSides,toSpot:zt.z6.AllSides},new zt.KX("fill"),new zt.KX("stroke","color"),new zt.KX("strokeWidth","thickness"),new zt.KX("strokeDashArray","dash")),St(zt.Vm,{background:"transparent",margin:20})),St(zt.al,{alignment:zt.z6.Top,alignmentFocus:zt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new zt.KX("text"),new zt.KX("stroke","color"))),Ye.current.groupTemplate.selectionAdornmentTemplate=St(zt.uz,"Spot",St(zt.s_,"Auto",St(zt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),St(zt.Vm,{margin:1.5})),Si({alignment:zt.z6.TopRight,alignmentFocus:zt.z6.BottomRight})),Ye.current.groupTemplate.contextMenu=St("ContextMenu",Ft(),Pn(),Gn()),Ye.current.linkTemplate=St(zt.rU,{layerName:"Foreground",routing:zt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new zt.KX("fromSpot","fromSpot",zt.z6.parse),new zt.KX("toSpot","toSpot",zt.z6.parse),new zt.KX("fromShortLength","dir",oi=>oi>=1?10:0),new zt.KX("toShortLength","dir",oi=>oi>=1?10:0),new zt.KX("points").makeTwoWay(),St(zt.bn,{strokeWidth:2},new zt.KX("stroke","color"),new zt.KX("strokeWidth","thickness"),new zt.KX("strokeDashArray","dash")),St(zt.bn,{segmentIndex:0,segmentOffset:new zt.E9(15,0),segmentOrientation:zt.rU.OrientAlong,alignmentFocus:zt.z6.Right,figure:"circle",width:10,strokeWidth:0},new zt.KX("fill","color"),new zt.KX("visible","dir",oi=>oi===1)),St(zt.bn,{segmentIndex:-1,segmentOffset:new zt.E9(-10,6),segmentOrientation:zt.rU.OrientPlus90,alignmentFocus:zt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new zt.KX("fill","color"),new zt.KX("visible","dir",oi=>oi>=1),new zt.KX("width","thickness",oi=>7+3*oi),new zt.KX("height","thickness",oi=>7+3*oi),new zt.KX("segmentOffset","thickness",oi=>new zt.E9(-15,4+1.5*oi))),St(zt.bn,{segmentIndex:0,segmentOffset:new zt.E9(15,-6),segmentOrientation:zt.rU.OrientMinus90,alignmentFocus:zt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new zt.KX("fill","color"),new zt.KX("visible","dir",oi=>oi===2),new zt.KX("width","thickness",oi=>7+3*oi),new zt.KX("height","thickness",oi=>7+3*oi),new zt.KX("segmentOffset","thickness",oi=>new zt.E9(-15,4+1.5*oi))),St(zt.al,{alignmentFocus:new zt.z6(0,1,-4,0),editable:!0},new zt.KX("text").makeTwoWay(),new zt.KX("stroke","color"))),Ye.current.linkTemplate.selectionAdornmentTemplate=St(zt.uz,St(zt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Qn(2)},new zt.KX("pathPattern","thickness",Qn)),Si({alignmentFocus:new zt.z6(0,0,-6,-4)}));function Qn(oi){return St(zt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(oi+4).toString()+" H3"})}function ii(oi){var Bi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return oi===0?Bi="M0 0 M16 16 M0 8 L16 8":oi===2&&(Bi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),St(zt.bn,{geometryString:Bi,margin:2,background:"transparent",mouseEnter:($i,Ti)=>Ti.background="dodgerblue",mouseLeave:($i,Ti)=>Ti.background="transparent",click:rn("dir",oi),contextClick:rn("dir",oi)})}function ji(oi){var Bi=($i,Ti)=>{$i.handled=!0,$i.diagram.model.commit(Qi=>{var pr=Ti.part.adornedPart;Qi.set(pr.data,oi?"toSpot":"fromSpot",zt.z6.stringify(zt.z6.AllSides)),(oi?pr.toNode:pr.fromNode).invalidateConnectedLinks()})};return St(zt.bn,{width:12,height:12,fill:"transparent",mouseEnter:($i,Ti)=>Ti.background="dodgerblue",mouseLeave:($i,Ti)=>Ti.background="transparent",click:Bi,contextClick:Bi})}function pn(oi,Bi){var $i=0,Ti=zt.z6.RightSide;oi.equals(zt.z6.Top)?($i=270,Ti=zt.z6.TopSide):oi.equals(zt.z6.Left)?($i=180,Ti=zt.z6.LeftSide):oi.equals(zt.z6.Bottom)&&($i=90,Ti=zt.z6.BottomSide),Bi||($i-=180);var Qi=(pr,hr)=>{pr.handled=!0,pr.diagram.model.commit(Vi=>{var xr=hr.part.adornedPart;Vi.set(xr.data,Bi?"toSpot":"fromSpot",zt.z6.stringify(Ti)),(Bi?xr.toNode:xr.fromNode).invalidateConnectedLinks()})};return St(zt.bn,{alignment:oi,alignmentFocus:oi.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:$i,background:"transparent",mouseEnter:(pr,hr)=>hr.background="dodgerblue",mouseLeave:(pr,hr)=>hr.background="transparent",click:Qi,contextClick:Qi})}Ye.current.linkTemplate.contextMenu=St("ContextMenu",Pn(),Gn(),St("ContextMenuButton",St(zt.s_,"Horizontal",ii(0),ii(1),ii(2))),St("ContextMenuButton",St(zt.s_,"Horizontal",St(zt.s_,"Spot",ji(!1),pn(zt.z6.Top,!1),pn(zt.z6.Left,!1),pn(zt.z6.Right,!1),pn(zt.z6.Bottom,!1)),St(zt.s_,"Spot",{margin:new zt.Zt(0,0,0,2)},ji(!0),pn(zt.z6.Top,!0),pn(zt.z6.Left,!0),pn(zt.z6.Right,!0),pn(zt.z6.Bottom,!0)))));const Ji=`{ "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 Ki=["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 Gi(oi){return console.log("shapeName:",oi),Ki.indexOf(oi)>=0}var gn=new zt.YI(xn.current,{maxSelectionCount:1,linkTemplate:St(zt.rU,{locationSpot:zt.z6.Center,selectionAdornmentTemplate:St(zt.uz,"Link",{locationSpot:zt.z6.Center},St(zt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),St(zt.bn,{toArrow:"Standard",stroke:null}))},{routing:zt.rU.AvoidsNodes,curve:zt.rU.JumpOver,corner:5,toShortLength:4},new zt.KX("points"),St(zt.bn,{isPanelMain:!0,strokeWidth:2}),St(zt.bn,{toArrow:"Standard",stroke:null})),model:new zt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...zt.bn.getFigureGenerators().toArray().map(oi=>({text:"\u672A\u547D\u540D",size:"100 100",figure:oi.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ye.current.addDiagramListener("TextEdited",function(oi){var Bi;const $i=oi.subject.part;var Ti=(Bi=document.activeElement)==null?void 0:Bi.value;typeof Ti=="string"&&Ti.trim()===""&&Ye.current.model.commit(function(Qi){Qi.set($i.data,"text","\u672A\u547D\u540D"),Ye.current.commandHandler.stopCommand()},"increment")}),gn.nodeTemplate=St(zt.NB,"Auto",{locationSpot:zt.z6.Center},new zt.KX("location","location",zt.E9.parse).makeTwoWay(zt.E9.stringify),St(zt.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 zt.KX("stroke").makeTwoWay(),new zt.KX("fill").makeTwoWay(),new zt.KX("figure")),St(zt.al,{margin:new zt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new zt.$u(16,16),maxSize:new zt.$u(10,NaN),textAlign:"center",editable:!0},new zt.KX("key").makeTwoWay())),setTimeout(()=>{Ye.current.grid=St(zt.s_,"Grid",St(zt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),St(zt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ye.current.grid.visible=!0,Ye.current.grid.gridCellStroke="darkgray",Ye.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ye.current,Ye.current}const Jn=()=>At(this,null,function*(){var St,An=Ye.current.makeImage();const qn=yield(0,Gt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:An.src,file_data:JSON.stringify({login:(St=(0,ot.eY)())==null?void 0:St.login,data:JSON.parse(Ye.current.model.toJson())})}});Kt({src:qn.url})});return(0,ge.useEffect)(()=>(setTimeout(()=>{kn()},500),Nn(cn+1),()=>{Ye.current=null}),[]),Ze.createElement("div",{ref:at,className:Nt.current?`${Tt.maxH60} body-overflow-initial`:"body-overflow-initial"},Ze.createElement(ln.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!cn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Ze.createElement(Tn.Z,null,Ze.createElement(tn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ze.createElement(tn.Z,{onClick:()=>{var St,An,qn=Ye.current.selection.first();if(Nt.current=!Nt.current,document.activeElement&&qn){let Si=(An=(St=document.activeElement)==null?void 0:St.value)==null?void 0:An.trim();typeof Si=="string"&&Ye.current.model.commit(function(rn){rn.set(qn.data,"text",Si||"\u672A\u547D\u540D"),Ye.current.commandHandler.stopCommand()},"increment")}Nn(cn+1)}},Ze.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:It},Ze.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Tt.flowChartWrp},Ze.createElement("div",{style:{display:"flex",height:"100%"}},Ze.createElement("div",{style:{width:"300px",height:"100%"}},Ze.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Ze.createElement("div",{style:{height:"calc(100% - 50px)"},className:Tt.myPaletteDiv,ref:xn})),Ze.createElement("div",{style:{flex:1,position:"relative"}},Ze.createElement("div",{ref:nn,style:{height:"80vh"}}))),Ze.createElement("div",{className:"tr"},Ze.createElement(He.ZP,{size:"large",onClick:Jn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var rt=Dt,et=pe(5112),Oe=pe(5871);const Pe=et.ZP.Group,ve={margin:"0 8px"};var Fe=({callback:It,onCancel:Kt})=>{function Ye(nn){It(nn)}return ge.createElement(Je.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ye},ge.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ge.createElement("span",{style:ve},"\u5355\u5143\u683C\u6570\uFF1A"),ge.createElement("span",{style:ve},"\u884C\u6570"),ge.createElement(Je.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ge.createElement(Oe.Z,null)),ge.createElement("span",{style:ve},"\u5217\u6570"),ge.createElement(Je.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ge.createElement(Oe.Z,null))),ge.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ge.createElement("span",{style:ve},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ge.createElement(Je.default.Item,{name:"align"},ge.createElement(Pe,null,ge.createElement(et.ZP,{value:"default"},ge.createElement("i",{className:"fa fa-align-justify"})),ge.createElement(et.ZP,{value:"left"},ge.createElement("i",{className:"fa fa-align-left"})),ge.createElement(et.ZP,{value:"center"},ge.createElement("i",{className:"fa fa-align-center"})),ge.createElement(et.ZP,{value:"right"},ge.createElement("i",{className:"fa fa-align-right"}))))),ge.createElement("div",{className:"flex-container flex-end"},ge.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ge.createElement(He.ZP,{type:"ghost",onClick:Kt},"\u53D6\u6D88")))},We=pe(78673),Ne=pe(80727),ft=pe.n(Ne),un=(0,ge.forwardRef)(({use3d:It,width:Kt,height:Ye,callback:nn,showSaveButton:xn},Nt)=>{const at=(0,ge.useRef)(),cn=(0,ge.useRef)(),[Nn,kn]=(0,ge.useState)(!1),Jn=(0,ge.useRef)({id:at,appName:"graphing",width:Kt||1e3,height:Ye||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ge.useEffect)(()=>{cn.current=new(ft())(Jn.current,!0),window.onload=function(){cn.current.inject("applet_container")}},[]);const St=()=>{var An=window.ggbApplet.getPNGBase64(1,!0,72);return nn&&nn(An),An};return(0,ge.useEffect)(()=>{Jn.current.appName=Nn?"3D":"graphing",cn.current.inject("applet_container")},[Nn]),(0,ge.useEffect)(()=>{kn(It)},[It]),(0,ge.useImperativeHandle)(Nt,()=>({getImgData:St})),ge.createElement(ge.Fragment,null,ge.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:at}),ge.createElement(Tn.Z,{align:"middle"},ge.createElement(tn.Z,{flex:1},ge.createElement(We.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Nn,onChange:An=>kn(An)})),ge.createElement(tn.Z,null,ge.createElement(He.ZP,{size:"large",onClick:St,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Pt=pe(41588),qt=pe(8591);const Mn="link",hn="upload-image",fn="add-flowchart",ui="draw-image",gi="add-flowchart",fi="code-block",bi="add-table",_i="------------",rr={default:_i,left:`:${_i}`,center:`:${_i}:`,right:`${_i}:`};var Wi=pe(58856);function vr(){}let fr=0;const zi=1e4,Er="\u2581",Kn="@\u2581\u2581@",Le="@\u2581@",Ei=`
|
|
|
**\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`,Ri=["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 an(It){return/^\d+$/.test(It)?`${It}px`:It}const yi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Li={[yi+"-B"]:"bold",[yi+"-I"]:"italic"},On={[Mn]:"\u6DFB\u52A0\u94FE\u63A5",[fi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[hn]:"\u6DFB\u52A0\u56FE\u7247",[ui]:"\u6DFB\u52A0\u753B\u56FE",[fn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[bi]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Un=({defaultValue:It="",onChange:Kt,width:Ye="100%",height:nn=400,miniToolbar:xn=!1,isFocus:Nt=!1,watch:at,insertTemp:cn,mode:Nn="markdown",id:kn="markdown-editor-id",showResizeBar:Jn=!1,noStorage:St=!1,showNullButton:An=!1,showNullProgramButton:qn=!1,hidetoolBar:Si=!1,fullScreen:rn=!1,onBlur:bn,onCMBeforeChange:Ft,onFullScreen:Pn,className:yn="",disablePaste:Sn=!1,disabled:Gn=!1,disabledFill:Zn=!1,placeholder:Qn="",values:ii="",extraUse:ji})=>{const[pn,Ji]=(0,ge.useState)(null),[Ki,Gi]=(0,ge.useState)(It),[gn,oi]=(0,ge.useState)(at),[Bi,$i]=(0,ge.useState)(rn),[Ti,Qi]=(0,ge.useState)(""),[pr,hr]=(0,ge.useState)(0),[Vi,xr]=(0,ge.useState)(nn),[Rn,Br]=(0,ge.useState)(!1),[_n,Or]=(0,ge.useState)(0),[no,br]=(0,ge.useState)(0),mo=(0,ge.useRef)(),Jr=(0,ge.useRef)(),ur=(0,ge.useRef)(),er=(0,ge.useRef)();(0,ge.useEffect)(()=>{const Mr=window.scrollY||window.pageYOffset;Gi(ii),pn==null||pn.setValue(ii),window.scrollTo(0,Mr)},[ii]),(0,ge.useEffect)(()=>{Pn==null||Pn(Bi)},[Bi]),(0,ge.useEffect)(()=>{if(mo.current){let Mr=function(pi,Tr){var Bo;if(Sn){Tr.preventDefault();return}const aa=Tr.clipboardData;if(aa){const Ho=aa.types.toString(),Ao=aa.items;if(Ho==="Files"||aa.types.indexOf("Files")>-1){if(Tr.preventDefault(),Nn=="stex")return;try{let _o=Ao[1];((Bo=Ao[0])==null?void 0:Bo.kind)==="file"&&(_o=Ao[0]);const ta=_o.getAsFile(),Ea=ta.name.split(".").pop();(0,$t.I)(ta,Mt=>{var Pi,_t,Xi;Mt.id?((Pi=ta==null?void 0:ta.type)==null?void 0:Pi.indexOf("image"))>-1?Nr.replaceSelection(`<img width="100%" src="/api/attachments/${Mt.id}?type=${Mt.content_type})" alt="" />`):((_t=ta==null?void 0:ta.type)==null?void 0:_t.indexOf("video"))>-1?Nr.replaceSelection(`<video width="100%" controls src="/api/attachments/${Mt.id}"></video>`):((Xi=ta==null?void 0:ta.type)==null?void 0:Xi.indexOf("pdf"))>-1?Nr.replaceSelection(`<a href="/api/attachments/${Mt.id}?type=${ta.type}&disposition=inline" target="_blank">${ta.name}</a>`):Ri.includes(Ea)?Nr.replaceSelection(`<a href="/api/attachments/${Mt.id}?type=office&disposition=inline" target="_blank">${ta.name}</a>`):Nr.replaceSelection(`[${ta.name}](/api/attachments/${Mt.id}?type=${Mt.content_type})`):(Mt==null?void 0:Mt.status)===401&&(document.location.href="/user/login")})}catch(_o){qt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Nr=Ve().fromTextArea(mo.current,{mode:Nn,lineNumbers:!xn,lineWrapping:!0,value:It,autoCloseTags:!0,autoCloseBrackets:!0});return Nr.on("keyup",function(pi,Tr){Tr.keyCode===8&&(pi.getValue()==""?Nr.setOption("placeholder",Qn):Nr.setOption("placeholder",null))}),Nr.on("keydown",function(pi,Tr){if(Tr.keyCode===8){var Bo=Rr(pi);Bo&&Tr.preventDefault()}}),Nt&&Nr.focus(),Nr.on("paste",Mr),Gn&&Nr.on("beforeChange",function(pi,Tr){(Tr.origin==="paste"||Tr.origin==="+input")&&Tr.cancel()}),Ji(Nr),()=>{Nr.off("paste",Mr)}}},[]);const qi=(0,ge.useCallback)(()=>{if(Jr.current)try{}catch(Mr){console.log(Mr,"---- to set md editor body height")}},[Vi,Jr,Bi]);(0,ge.useEffect)(()=>{function Mr(){let Nr=new dt.Z(pi=>{for(let Tr of pi)(Tr.target.offsetHeight>0||Tr.target.offsetWidth>0)&&(qi(),pn.setSize("100%","100%"),pn.refresh())});return Nr.observe(mo.current.parentElement),Nr}if(pn){const Nr=Mr();return()=>{var pi,Tr;(pi=mo.current)!=null&&pi.parentElement&&Nr.unobserve((Tr=mo.current)==null?void 0:Tr.parentElement)}}},[pn,qi]),(0,ge.useEffect)(()=>{if(pn){let Mr=[];for(const[Nr,pi]of Object.entries(Li)){let Tr={[Nr]:()=>{Ii(pi)}};Mr.push(Tr),pn.addKeyMap(Tr)}return()=>{for(let Nr of Mr)pn.removeKeyMap(Nr)}}},[pn]),(0,ge.useEffect)(()=>{rn!==Bi&&$i(rn)},[rn]),(0,Wi.Z)(()=>{if(!St&&pr>0){let Mr=new Date().getTime(),Nr=window.sessionStorage.getItem(kn);Mr>=pr+zi&&(!Nr||Nr!==Ki)&&(window.sessionStorage.setItem(kn,Ki),Br(!0))}},zi),(0,ge.useEffect)(()=>{oi(at)},[pn,at]),(0,ge.useEffect)(()=>{pn&&Nt&&pn.focus()},[pn,Nt]),(0,ge.useEffect)(()=>{if(gn&&pn){let Mr=function(pi){let Tr=pi.target;if(er.current){let Bo=Tr.scrollTop/Tr.scrollHeight;er.current.scrollTop=er.current.scrollHeight*Bo}};const Nr=pn.getScrollerElement();return Nr.addEventListener("scroll",Mr),()=>{Nr.removeEventListener("scroll",Mr)}}},[pn,gn]),(0,ge.useEffect)(()=>{if(pn&&Ft){let Mr=function(Nr,pi){Ft(Nr,pi)};return pn.on("beforeChange",Mr),()=>{pn.off("beforeChange",Mr)}}},[pn,Ft]),(0,ge.useEffect)(()=>{if(pn&&bn){let Mr=function(){bn(pn.getValue())};return pn.on("blur",Mr),()=>{pn.off("blur",Mr)}}},[pn,bn]);function Rr(Mr,Nr){var pi=Mr.getDoc(),Tr=pi.getCursor(),Bo=pi.getLine(Tr.line),aa=Bo.charAt(Tr.ch-1),Ho=Bo.lastIndexOf("@\u2581@",Tr.ch),Ao=Bo.lastIndexOf("@\u2581\u2581@",Tr.ch),_o=Ho>Ao?Ho:Ao,ta=Ho>Ao?3:4;if(Kn.indexOf(aa)===-1)return null;if(console.log("change1:",Nr,Mr,Bo,Tr,_o,Ho,Ao,aa),_o>=0&&Tr.ch-_o<5){var Ea=_o+ta;return pi.replaceRange("",{line:Tr.line,ch:_o},{line:Tr.line,ch:Ea}),{line:Tr.line,ch:Ea}}return null}(0,ge.useEffect)(()=>{if(pn){let Mr=function(Nr,pi){const Tr=Nr.getValue();Gi(Tr),hr(new Date().getTime()),Nr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Kt&&(qn?Kt(Tr,Fr(Tr)):Kt(Tr))};return pn.on("change",Mr),()=>{pn.off("change",Mr)}}},[pn,Kt]),(0,ge.useEffect)(()=>{if(pn)if(It==null)pn.setValue(""),Gi("");else{const Mr=window.scrollY||window.pageYOffset;It!==pn.getValue()&&(pn.setValue(It),Gi(It),pn.setCursor(Gn?1:pn.lineCount(),0),window.scrollTo(0,Mr))}},[pn,It]);const Ii=(0,ge.useCallback)(Mr=>{const Nr=pn.getCursor(),pi=pn.getSelection();let Tr=pi.split(`
|
|
|
`);switch(Mr){case"bold":return pn.replaceSelection("**"+pi+"**"),pi===""&&pn.setCursor(Nr.line,Nr.ch+2),pn.focus();case"italic":return pn.replaceSelection("*"+pi+"*"),pi===""&&pn.setCursor(Nr.line,Nr.ch+1),pn.focus();case"code":return pn.replaceSelection("`"+pi+"`"),pi===""&&pn.setCursor(Nr.line,Nr.ch+1),pn.focus();case"inline-latex":return Qi("inline-latex"),pn.focus();case"latex":return pn.replaceSelection("```latex\n"+pi+"\n```"),pn.setCursor(Nr.line+1,pi.length+1),pn.focus();case"line-break":return pn.replaceSelection(`<br/>
|
|
|
`),pn.focus();case"list-ul":return pi===""?pn.replaceSelection("- "+pi):pn.replaceSelection(Tr.map(Bo=>Bo===""?"":`- ${Bo}`).join(`
|
|
|
`)),pn.focus();case"list-ol":return pi===""?pn.replaceSelection("1. "+pi):pn.replaceSelection(Tr.map((Bo,aa)=>Bo===""?"":`${aa+1}. ${Bo}`).join(`
|
|
|
`)),pn.focus();case"add-null-ch":return pi===""&&pn.setCursor(Nr.line,Nr.ch),pn.replaceSelection(Er),pn.focus();case"add-signal":return pi===""&&pn.setCursor(Nr.line,Nr.ch),pn.replaceSelection(Le),pn.focus();case"add-multiple":return pi===""&&pn.setCursor(Nr.line,Nr.ch),pn.replaceSelection(Kn),pn.focus();case"inster-template-1":return pi===""&&pn.setCursor(Nr.line,Nr.ch),pn.replaceSelection(Ei),pn.focus();case"eraser":return pn.setValue(""),pn.focus();case"trigger-watch":return oi(!gn),pn.focus();case"trigger-full-screen":return $i(!Bi),pn.focus();case Mn:Qi(Mn);return;case fi:Qi(fi);return;case hn:Qi(hn);return;case ui:Qi(ui);return;case"maths-latex":Qi("maths-latex");return;case fn:Qi(fn);return;case bi:Qi(bi);return;default:throw new Error}},[pn,gn,Bi]),Qe=(0,ge.useCallback)((Mr,Nr)=>{var pi,Tr,Bo,aa,Ho,Ao;switch(Qi(""),Ti){case Mn:const{title:Pi,link:_t}=Mr;return pn.replaceSelection(`[${Pi}](${_t})`),pn.focus();case fi:const{language:Xi,content:wi}=Mr;return pn.replaceSelection(["```"+Xi,wi,"```"].join(`
|
|
|
`)),pn.focus();case"maths-latex":for(var _o=atob(Mr),ta=new Uint8Array(_o.length),Ea=0;Ea<_o.length;Ea++)ta[Ea]=_o.charCodeAt(Ea);var Mt=new Blob([ta],{type:"image/png"});(0,$t.I)(Mt,yr=>{yr.id?pn.replaceSelection(``):(yr==null?void 0:yr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":pn.replaceSelection("`$$"+Mr+"$$`");break;case hn:case ui:case gi:const{src:Sr,alt:Zi}=Mr,Ci=Nr,nr=(Bo=(Tr=(pi=Ci==null?void 0:Ci.name)==null?void 0:pi.split("."))==null?void 0:Tr.pop)==null?void 0:Bo.call(Tr);return((aa=Ci==null?void 0:Ci.type)==null?void 0:aa.indexOf("image"))>-1||!(Ci!=null&&Ci.type)?Ci!=null&&Ci.align||Ci!=null&&Ci.width?pn.replaceSelection(`<p style="text-align:${Ci.align||"initial"}"><img width="${Ci.width?Ci.width+"%":"initial"}" src="${Sr}" alt="${Zi||""}" /></p>`):pn.replaceSelection(`<img width="100%" src="${Sr}" alt="${Zi||""}" />`):((Ho=Ci==null?void 0:Ci.type)==null?void 0:Ho.indexOf("video"))>-1?pn.replaceSelection(`<video width="100%" controls src="${Sr}"></video>`):((Ao=Ci==null?void 0:Ci.type)==null?void 0:Ao.indexOf("pdf"))>-1?pn.replaceSelection(`<a href="${Sr}?type=${Ci.type}&disposition=inline" target="_blank">${Ci.name}</a>`):Ri.includes(nr)?pn.replaceSelection(`<a href="${Sr}?type=office&disposition=inline" target="_blank">${Ci.name}</a>`):pn.replaceSelection(`[${Ci.name}](${Sr})`),pn.focus();case bi:const{row:or,col:cr,align:Pr}=Mr;let Gr=`
|
|
|
`;for(let yr=0;yr<or;yr++){let kr=[],Zr=[];for(let Oi=0;Oi<cr;Oi++)yr===1&&Zr.push(rr[Pr]),kr.push(" ");yr===1&&(Gr+=`| ${Zr.join(" | ")} |
|
|
|
`),Gr+=`| ${kr.join(cr===1?"":" | ")} |
|
|
|
`}return pn.replaceSelection(Gr+`
|
|
|
`),pn.focus();default:throw new Error}},[pn,Ti]),Qr=(0,ge.useMemo)(()=>{switch(Ti){case Mn:return ge.createElement(Dn,{callback:Qe,onCancel:lo});case fi:return ge.createElement(Bn.Z,{callback:Qe,onCancel:lo});case hn:return ge.createElement($t.Z,{callback:Qe,onCancel:lo});case fn:return ge.createElement(rt,{callback:Qe,onCancel:lo});case bi:return ge.createElement(Fe,{callback:Qe,onCancel:lo});case"maths-latex":return ge.createElement(un,{showSaveButton:!0,callback:Qe});case"inline-latex":return ge.createElement(Pt.Z,{showSaveButton:!0,callback:Qe});default:return null}},[Ti]);function lo(){Qi("")}(0,ge.useEffect)(()=>{if(ur.current){let Mr=function(Ho){Bo=!0,aa=Ho.pageY},Nr=function(){Bo=!1},pi=function(Ho){if(Bo){let Ao=Ho.pageY-aa;Ao<0&&(Ao=0),Ao>300&&(Ao=300);let _o=nn+Ao+"px";xr(_o)}},Tr=ur.current,Bo=!1,aa=0;return Tr.addEventListener("mousedown",Mr),document.addEventListener("mousemove",pi),document.addEventListener("mouseup",Nr),()=>{Tr.removeEventListener("mousedown",Mr),document.removeEventListener("mousemove",pi),document.removeEventListener("mouseup",Nr)}}},[pn,ur]),(0,ge.useEffect)(()=>{xr(nn)},[nn]);const jr=an(Ye),vo=an(Vi),po={width:jr,height:vo},Lr=(0,ge.useMemo)(()=>{if(pr){let Mr=new Date(pr),Nr=Mr.getHours(),pi=Mr.getMinutes(),Tr=Mr.getSeconds();return Nr=Nr<10?"0"+Nr:Nr,pi=pi<10?"0"+pi:pi,Tr=Tr<10?"0"+Tr:Tr,`${Nr}:${pi}:${Tr}`}return 0},[pr]),Fr=Mr=>{const Nr=[];if(qn){let pi=-1;Mr=Mr.replace(/(@▁▁@|@▁@)/g,function(Tr,Bo,aa){Nr.push({multiLine:Tr!==Le})})}return Nr};function uo(){window.sessionStorage.removeItem(kn),Br(!1),hr(0)}function qr(){Br(!1),hr(0),pn.setValue(window.sessionStorage.getItem(kn))}(0,ge.useEffect)(()=>{On[Ti]&&Ti!==ui&&Ti!==fn&&setTimeout(()=>{const Mr=document.getElementsByClassName("markdown-popup-form")[0],Nr=window.innerWidth/2-Mr.offsetWidth/2,pi=window.innerHeight/2-Mr.offsetHeight/2;Or(Nr),br(pi)},0)},[Ti]);const zo=Mr=>{Mr.preventDefault();const Nr=Mr.clientX-_n,pi=Mr.clientY-no;document.body.onmousemove=Tr=>{let Bo=Tr.clientX-Nr,aa=Tr.clientY-pi;const Ho=document.getElementsByClassName("markdown-popup-form")[0],Ao=window.innerWidth-Ho.offsetWidth,_o=window.innerHeight-Ho.offsetHeight;Bo=Math.max(0,Math.min(Bo,Ao)),aa=Math.max(0,Math.min(aa,_o)),Ro(Tr.clientX,Tr.clientY,Nr,pi)&&(Or(Bo),br(aa))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ro=(Mr,Nr,pi,Tr)=>{const Bo=document.body.clientHeight,aa=document.body.clientWidth;return Mr<20&&pi>Mr||Mr>aa-20&&pi<Mr||Nr<20&&Tr>Nr||Nr>Bo-20&&Tr<Nr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ge.createElement(ge.Fragment,null,ge.createElement("div",{className:"markdown-editor-wrapper",ref:Jr},ge.createElement("div",{className:`markdown-editor-container ${yn} ${gn?"on-preview":""} ${xn?"mini":""} ${Bi?"full-screen":""}`,style:po},ge.createElement(Ge,{insertTemp:cn,watch:gn,fullScreen:Bi,showNullButton:An,showNullProgramButton:qn,onActionCallback:Ii,hidetoolBar:Si,extraUse:ji}),ge.createElement("div",{className:"markdown-editor-body"},ge.createElement("div",{className:"codemirror-container"},ge.createElement("textarea",{ref:mo,placeholder:Qn})),gn?ge.createElement("div",{ref:er,className:"preview-container"},Nn==="stex"&&ge.createElement(yt,{value:Ki}),Nn!=="stex"&&ge.createElement(lt.Z,{disabledFill:Zn,showProgramFill:qn,value:Ki})):null))),Jn?ge.createElement("a",{ref:ur,className:"editor-resize"}):null,Ti===ui&&ge.createElement(Yn,{callback:Qe,onCancel:lo}),Ti===fn&&ge.createElement(rt,{callback:Qe,onCancel:lo}),ge.createElement(nt.Z,null,On[Ti]&&Ti!==ui&&Ti!==fn?ge.createElement(ln.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:_n,top:no},title:ge.createElement("div",{style:{cursor:"move"},onMouseDown:zo},On[Ti]),open:!0,onCancel:lo,footer:null,destroyOnClose:!0,width:Ti===fn?"1200px":null,height:Ti===fn?"80vh":null,className:"markdown-popup-form"},Qr):null))}},28451:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Be},I:function(){return Ge}});var ge=pe(78241),Re=pe(8591),Ve=pe(92832),dt=pe(81327),Ke=pe(5871),st=pe(5112),Me=pe(3113),kt=pe(77903),bt=pe(59301),Ue=pe(59301),lt=Object.defineProperty,yt=Object.defineProperties,jt=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ce=(nt,Je,xt)=>Je in nt?lt(nt,Je,{enumerable:!0,configurable:!0,writable:!0,value:xt}):nt[Je]=xt,se=(nt,Je)=>{for(var xt in Je||(Je={}))ne.call(Je,xt)&&ce(nt,xt,Je[xt]);if(Ae)for(var xt of Ae(Je))ee.call(Je,xt)&&ce(nt,xt,Je[xt]);return nt},fe=(nt,Je)=>yt(nt,jt(Je));const{useForm:ye}=ge.default,be={width:280,marginRight:10},Te={labelCol:{span:5},wrapperCol:{span:19}};var Be=({callback:nt,onCancel:Je})=>{const[xt]=ye();let He=(0,bt.useRef)();function Et(gt){He.current.width=xt.getFieldValue("width"),He.current.align=xt.getFieldValue("align"),nt(gt,He.current)}function tt(gt,Ht){if(gt.status===-1){Re.ZP.error(gt.message);return}xt.setFieldsValue({src:`/api/attachments/${gt.id}`,type:Ht.type})}function Ot(gt){let Ht=gt.target.files[0];He.current=Ht,Ge(Ht,tt)}return Ue.createElement(ge.default,fe(se({form:xt},Te),{className:"upload-image-panel",onFinish:Et,style:{width:470,overflow:"hidden"}}),Ue.createElement(ge.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Ue.createElement("div",{className:"flex-container"},Ue.createElement(ge.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Ue.createElement(Ve.default,{style:be})),Ue.createElement(ze,{onFileChange:Ot}))),Ue.createElement(ge.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Ue.createElement(Ve.default,{style:{width:264}})),Ue.createElement(ge.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Ue.createElement(dt.Z,null,Ue.createElement(ge.default.Item,{name:"width",style:{margin:0}},Ue.createElement(Ke.Z,{style:{width:264}})),Ue.createElement("span",{className:"ml8"},"%"))),Ue.createElement(ge.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Ue.createElement(st.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"}]})),Ue.createElement("aside",null,Ue.createElement(ge.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Ue.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ue.createElement(Me.ZP,{type:"default",onClick:Je},"\u53D6\u6D88"))))};function ze({onFileChange:nt}){return Ue.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Ue.createElement("input",{type:"file",onChange:nt}))}function Ge(nt,Je){if(!nt)throw new String("\u6CA1\u6709\u6587\u4EF6");let xt=new FormData;xt.append("editormd-image-file",nt),xt.append("file_param_name","editormd-image-file"),xt.append("byxhr","true");var He=new window.XMLHttpRequest;He.withCredentials=!0,He.addEventListener("load",function(Et){Je(JSON.parse(Et.target.responseText),nt)},!1),He.addEventListener("error",function(Et){console.error(Et)},!1),He.open("POST",`${kt.KI}/api/attachments.json`),He.send(xt)}},79346:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Ve}});var ge=pe(59301),Re=pe(4676);class Ve extends ge.Component{constructor(Ke){super(Ke);const st=window.document;this.node=st.createElement("div"),st.body.appendChild(this.node)}render(){const{children:Ke}=this.props;return(0,Re.createPortal)(Ke,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(Vn,Cn,pe){"use strict";pe.d(Cn,{SV:function(){return At},ZP:function(){return Ze}});var ge=pe(59301),Re=pe(76374);const Ve={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"]},dt={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"]},Ke={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(`
|
|
|
`)}]},st={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},Me={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
|
`)}]};var kt=pe(53184),bt=pe.n(kt),Ue=Object.defineProperty,lt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,ee=(Dt,rt,et)=>rt in Dt?Ue(Dt,rt,{enumerable:!0,configurable:!0,writable:!0,value:et}):Dt[rt]=et,ce=(Dt,rt)=>{for(var et in rt||(rt={}))Ae.call(rt,et)&&ee(Dt,et,rt[et]);if(jt)for(var et of jt(rt))ne.call(rt,et)&&ee(Dt,et,rt[et]);return Dt},se=(Dt,rt)=>lt(Dt,yt(rt)),fe=(Dt,rt,et)=>new Promise((Oe,Pe)=>{var ve=Ne=>{try{We(et.next(Ne))}catch(ft){Pe(ft)}},Fe=Ne=>{try{We(et.throw(Ne))}catch(ft){Pe(ft)}},We=Ne=>Ne.done?Oe(Ne.value):Promise.resolve(Ne.value).then(ve,Fe);We((et=et.apply(Dt,rt)).next())});const ye={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"]}},be=(Dt,rt)=>rt.map(et=>({label:et,kind:Dt.languages.CompletionItemKind.Keyword,insertText:et})),Te=Dt=>Object.keys(ye.tables).map(rt=>({label:rt,kind:Dt.languages.CompletionItemKind.Variable,insertText:rt})),Be=(Dt,rt)=>{const et=ye.tables[Dt];return et?et.map(Oe=>({label:Oe,kind:rt.languages.CompletionItemKind.Field,insertText:Oe})):[]};function ze(Dt,rt,et,Oe,Pe){let ve=rt.getWordUntilPosition(et),Fe={startLineNumber:et.lineNumber,endLineNumber:et.lineNumber,startColumn:ve.startColumn,endColumn:ve.endColumn},We=Oe.map(Ne=>({label:Ne,kind:Dt.languages.CompletionItemKind.Keyword,insertText:Ne,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Fe}));return Pe.map(Ne=>{We.push(se(ce({},Ne),{range:Fe}))}),We}var Ge=Dt=>{ye.languages.map(Pe=>(Dt.languages.registerDocumentFormattingEditProvider(Pe,{provideDocumentFormattingEdits(ve,Fe,We){return fe(this,null,function*(){const Ne=bt()(ve.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:ve.getFullModelRange(),text:Ne}]})}}),Pe));const rt=Ke.quickKey.map(Pe=>({label:Pe.label,kind:Dt.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),et=st.quickKey.map(Pe=>({label:Pe.label,kind:Dt.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Oe=dt.quickKey.map(Pe=>({label:Pe.label,kind:Dt.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Dt.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Pe,ve){var Fe=Pe.getWordUntilPosition(ve),We={startLineNumber:ve.lineNumber,endLineNumber:ve.lineNumber,startColumn:Fe.startColumn,endColumn:Fe.endColumn},Ne=Pe.getLineContent(ve.lineNumber).substring(Fe.startColumn-2,Fe.endColumn);return{suggestions:[...Ke.keywords.map(ft=>({label:ft,kind:Dt.languages.CompletionItemKind.Function,documentation:ft,insertText:ft,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We})),...Ke.quickKey.map(ft=>({label:ft.label,kind:Dt.languages.CompletionItemKind.Function,documentation:ft.content,insertText:Ne.startsWith("#")?ft.content.replace(/#/,""):ft.content,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We}))]}}}),Dt.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Pe,ve){var Fe=Pe.getWordUntilPosition(ve),We={startLineNumber:ve.lineNumber,endLineNumber:ve.lineNumber,startColumn:Fe.startColumn,endColumn:Fe.endColumn};return{suggestions:[...Ve.keywords.map(Ne=>({label:Ne,kind:Dt.languages.CompletionItemKind.Function,documentation:Ne,insertText:Ne,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We}))]}}}),Dt.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Pe,ve){var Fe=Pe.getWordUntilPosition(ve),We={startLineNumber:ve.lineNumber,endLineNumber:ve.lineNumber,startColumn:Fe.startColumn,endColumn:Fe.endColumn},Ne=Pe.getLineContent(ve.lineNumber).substring(Fe.startColumn-2,Fe.endColumn);return{suggestions:[...dt.keywords.map(ft=>({label:ft,kind:Dt.languages.CompletionItemKind.Function,documentation:ft,insertText:ft,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We})),...dt.quickKey.map(ft=>({label:ft.label,kind:Dt.languages.CompletionItemKind.Function,documentation:ft.content,insertText:Ne.startsWith("#")?ft.content.replace(/#/,""):ft.content,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We}))]}}}),Dt.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Pe,ve){var Fe=Pe.getWordUntilPosition(ve),We={startLineNumber:ve.lineNumber,endLineNumber:ve.lineNumber,startColumn:Fe.startColumn,endColumn:Fe.endColumn},Ne=Pe.getLineContent(ve.lineNumber).substring(Fe.startColumn-2,Fe.endColumn);return{suggestions:[...Me.keywords.map(ft=>({label:ft,kind:Dt.languages.CompletionItemKind.Function,documentation:ft,insertText:ft,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We})),...Me.quickKey.map(ft=>({label:ft.label,kind:Dt.languages.CompletionItemKind.Function,documentation:ft.content,insertText:Ne.startsWith("#")?ft.content.replace(/#/,""):ft.content,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We}))]}}}),Dt.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Pe,ve){var Fe=Pe.getWordUntilPosition(ve),We={startLineNumber:ve.lineNumber,endLineNumber:ve.lineNumber,startColumn:Fe.startColumn,endColumn:Fe.endColumn},Ne=Pe.getLineContent(ve.lineNumber).substring(Fe.startColumn-2,Fe.endColumn);return{suggestions:[...st.keywords.map(ft=>({label:ft,kind:Dt.languages.CompletionItemKind.Function,documentation:ft,insertText:ft,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We})),...st.quickKey.map(ft=>({label:ft.label,kind:Dt.languages.CompletionItemKind.Function,documentation:ft.content,insertText:Ne.startsWith("#")?ft.content.replace(/#/,""):ft.content,insertTextRules:Dt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We}))]}}})};const nt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Je=Object.defineProperty,xt=(Dt,rt,et)=>rt in Dt?Je(Dt,rt,{enumerable:!0,configurable:!0,writable:!0,value:et}):Dt[rt]=et,He=(Dt,rt,et)=>xt(Dt,typeof rt!="symbol"?rt+"":rt,et);const Et=class mx{constructor(rt,et,Oe){this.placeholder=rt,this.editor=et,this.monaco=Oe,et.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mx.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};He(Et,"ID","editor.widget.placeholderHint");var Ot=Et,gt=pe(96236),Ht=pe(8591),Xt=pe(6848),Ut=pe(89392),it=pe(34604),_e=pe(56102),Wt=Object.defineProperty,Dn=Object.defineProperties,Bn=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,Tn=Object.prototype.propertyIsEnumerable,ei=(Dt,rt,et)=>rt in Dt?Wt(Dt,rt,{enumerable:!0,configurable:!0,writable:!0,value:et}):Dt[rt]=et,Ln=(Dt,rt)=>{for(var et in rt||(rt={}))ln.call(rt,et)&&ei(Dt,et,rt[et]);if($t)for(var et of $t(rt))Tn.call(rt,et)&&ei(Dt,et,rt[et]);return Dt},Yn=(Dt,rt)=>Dn(Dt,Bn(rt)),zt=(Dt,rt)=>{var et={};for(var Oe in Dt)ln.call(Dt,Oe)&&rt.indexOf(Oe)<0&&(et[Oe]=Dt[Oe]);if(Dt!=null&&$t)for(var Oe of $t(Dt))rt.indexOf(Oe)<0&&Tn.call(Dt,Oe)&&(et[Oe]=Dt[Oe]);return et},wn=(Dt,rt,et)=>new Promise((Oe,Pe)=>{var ve=Ne=>{try{We(et.next(Ne))}catch(ft){Pe(ft)}},Fe=Ne=>{try{We(et.throw(Ne))}catch(ft){Pe(ft)}},We=Ne=>Ne.done?Oe(Ne.value):Promise.resolve(Ne.value).then(ve,Fe);We((et=et.apply(Dt,rt)).next())});function $n(Dt){return/^\d+$/.test(Dt)?`${Dt}px`:Dt}function Yt(){}let tn=!1;const Gt={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Tt(Dt=[]){let rt=Dt;if(Array.isArray(Dt)){for(let et=0;et<Dt.length;et++){let Oe=Gt[Dt[et]];if(Oe)return Oe}return rt[0]}return Gt[rt]||rt}let ot=null;var Ze=Dt=>{var rt=Dt,{width:et="100%",height:Oe="100%",value:Pe,language:ve="javascript",style:Fe={},options:We={},overrideServices:Ne={},theme:ft="vs-dark",onEditBlur:sn,isCopy:un=!1,onSave:Pt,autoHeight:qt=!1,forbidCopy:Mn=!1,onChange:hn=Yt,editorDidMount:fn=Yt,onFocus:ui=Yt,onBreakPoint:gi=Yt,breakPointValue:fi=[],filename:bi="educoder.txt",errorLine:_i,errorContent:rr="",highlightLine:Wi,openBreakPoint:vr=!1,placeholder:fr=""}=rt,zi=zt(rt,["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 Er=(0,ge.useRef)(),Kn=(0,ge.useRef)({}),Le=(0,ge.useRef)(),Ei=(0,ge.useRef)(),Ri=(0,ge.useRef)([]),an=(0,ge.useRef)(!1),di=(0,ge.useRef)(),yi=(0,ge.useRef)(),Li=(0,ge.useRef)(!1),[On,Un]=(0,ge.useState)(!1);function It(){let rn;return Er.current&&(rn=new Re.Z(bn=>{for(let Ft of bn)(Ft.target.offsetHeight>0||Ft.target.offsetWidth>0)&&Kn.current.instance.layout()}),rn.observe(Er.current)),rn}function Kt(){Ht.ZP.warning({content:decodeURIComponent(nt),key:"monaco-editor-tip"})}const Ye=()=>{let rn=Kn.current.instance;if(Pe!=null&&rn&&On){const bn=rn.getModel();bn&&Pe!==bn.getValue()&&(tn=!0,bn.setValue(Pe),rn.layout(),tn=!1)}};(0,ge.useEffect)(()=>{const rn=it.Z.subscribe("formatDocument",bn=>{var Ft;let Pn=Kn.current.instance;(Ft=Pn==null?void 0:Pn.getAction)==null||Ft.call(Pn,"editor.action.formatDocument").run()});return window.updateMonacoValue=bn=>{hn(bn)},rn},[]),(0,ge.useEffect)(()=>{var rn;let bn=Kn.current.instance;Ei.current&&clearTimeout(Ei.current),Ei.current=setTimeout(()=>{Ye()},500),Pe&&(Pe!=null&&Pe.length)&&((rn=bn==null?void 0:bn.updateOptions)==null||rn.call(bn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Pe.split(/\r\n|\r|\n/g).length))+3,5)}))},[Pe,On,Kn.current]),(0,ge.useEffect)(()=>{if(_i&&Kn.current&&Kn.current.instance){let bn=Kn.current.instance;bn.changeViewZones(function(Ft){var Pn=document.createElement("div");Pn.style.padding="10px 20px",Pn.style.width="calc(100% - 20px)",Pn.className="my-error-line-wrp",Pn.innerHTML=rr,Ft.addZone({afterLineNumber:_i||11,heightInLines:3,domNode:Pn})});var rn={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}};bn.addOverlayWidget(rn),bn.revealPositionInCenter({lineNumber:20,column:1})}},[_i,Kn.current,On]);const nn=(rn="",bn)=>{if(!rn||rn.trim()==="")return!0;const Pn=Kn.current.instance.getModel().getLineTokens(bn);let yn=!1;for(let Sn=0;Sn<2;Sn++)Pn.getStandardTokenType(Sn)===1&&(yn=!0);return yn};(0,ge.useEffect)(()=>{var rn;const bn=(rn=Kn.current)==null?void 0:rn.instance;if(bn&&On&&Mn){const Ft=bn.onDidBlurEditorWidget(()=>{Li.current=!1}),Pn=bn.onDidFocusEditorText(()=>{Li.current=!0});return()=>{Ft.dispose(),Pn.dispose()}}},[Kn.current,On,Mn]),(0,ge.useEffect)(()=>{var rn;if((rn=Kn.current)!=null&&rn.instance&&On&&vr){let bn=Kn.current.instance,Ft=bn.getModel();if(!Ft)return;(()=>{var Gi;let gn=[],oi=[];const Bi=Ft.getAllDecorations();for(let Ti of Bi)Ti.options.className==="highlighted-line"&&(gn.push((Gi=Ti==null?void 0:Ti.range)==null?void 0:Gi.startLineNumber),oi.push(Ti==null?void 0:Ti.id));if(Wi===gn[0])return;Ft.deltaDecorations(oi,[]);const $i=Ft.getLineCount();Wi&&Wi<=$i&&(bn.deltaDecorations([],[{range:new ot.Range(Wi,1,Wi,Ft.getLineMaxColumn(Wi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),bn.revealLineInCenter(Wi))})();const yn=(Gi=!1)=>{var gn;let oi=[],Bi=[];const $i=Ft.getAllDecorations();for(let Ti of $i)Ti.options.linesDecorationsClassName==="breakpoints-select"&&(oi.push((gn=Ti==null?void 0:Ti.range)==null?void 0:gn.startLineNumber),Bi.push(Ti==null?void 0:Ti.id));if(Gi)return{lines:oi,ids:Bi};gi(oi)},Sn=Gi=>wn(void 0,null,function*(){let gn={range:new ot.Range(Gi,1,Gi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Ft.deltaDecorations([],[gn]),yn()}),Gn=Gi=>wn(void 0,null,function*(){let gn=[];const oi=bn.getLineDecorations(Gi);for(let Bi of oi)Bi.options.linesDecorationsClassName==="breakpoints-select"&&gn.push(Bi.id);yield Ft.deltaDecorations(gn,[]),yn()}),Zn=Gi=>{let gn=bn.getLineDecorations(Gi);for(let oi of gn)if(oi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ut.isEqual)(fi,yn(!0).lines)){Ft.deltaDecorations(yn(!0).ids,[]);const Gi=fi.map(gn=>({range:new ot.Range(gn,1,gn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Ft.deltaDecorations([],Gi)}const Qn=bn.onDidChangeModelContent(Gi=>{let gn=bn.getPosition();if(gn){let oi=gn.lineNumber;clearTimeout(yi.current),yi.current=setTimeout(()=>{nn(Ft.getLineContent(oi),oi)?Gn(oi):Zn(oi)?(Gn(oi),Sn(oi)):yn()},100)}}),ii=bn.onMouseDown(Gi=>{var gn,oi,Bi;if(Gi.target.detail&&((Bi=(oi=(gn=Gi.target)==null?void 0:gn.element)==null?void 0:oi.className)!=null&&Bi.includes("line-numbers"))){let $i=Gi.target.position.lineNumber;if(nn(Ft.getLineContent($i),$i))return;Zn($i)?Gn($i):Sn($i)}}),ji=Gi=>{let gn={range:new ot.Range(Gi,1,Gi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ri.current=bn.deltaDecorations(Ri.current,[gn])},pn=()=>{Ri.current=bn.deltaDecorations(Ri.current,[])},Ji=bn.onMouseMove(Gi=>{var gn,oi,Bi;if(pn(),Gi.target.detail&&((Bi=(oi=(gn=Gi.target)==null?void 0:gn.element)==null?void 0:oi.className)!=null&&Bi.includes("line-numbers"))){let $i=Gi.target.position.lineNumber;if(nn(Ft.getLineContent($i),$i))return;ji($i)}}),Ki=bn.onMouseLeave(()=>{pn()});return()=>{Qn.dispose(),ii.dispose(),Ji.dispose(),Ki.dispose()}}},[Kn.current,On,fi,Wi,vr,ve]),(0,ge.useEffect)(()=>{var rn;(rn=Kn.current)!=null&&rn.instance&&vr&&Kn.current.instance.setPosition({lineNumber:0,column:0})},[Wi]);function xn(){let rn=Kn.current.instance;if(rn){const bn=rn.getSelection(),Ft=Kn.current.pastePos||{},Pn=new ot.Range(Ft.startLineNumber||bn.endLineNumber,Ft.startColumn||bn.endColumn,Ft.endLineNumber||bn.endLineNumber,Ft.endColumn||bn.endColumn);setTimeout(()=>{rn.executeEdits("",[{range:Pn,text:""}])},300)}}function Nt(rn){(window.navigator.platform.match("Mac")?rn.metaKey:rn.ctrlKey)&&rn.keyCode==83&&(rn.preventDefault(),Pt())}const at=()=>{if(qt&&Kn.current.instance){const rn=Kn.current.instance.getContentHeight();qn(rn<Oe?Oe:rn)}else qn(Oe)};function cn(rn){var bn=document.createEvent("MouseEvents");bn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),rn.dispatchEvent(bn)}const Nn=rn=>{if(!Li.current)return;const{keyCode:bn,ctrlKey:Ft,metaKey:Pn,target:yn,type:Sn}=rn;return(Sn==="paste"||(bn===67||bn===86)&&(Pn||Ft))&&yn.nodeName==="TEXTAREA"&&(Kt(),rn.preventDefault()),!1};function kn(rn,bn){var Ft=window.URL||window.webkitURL||window,Pn=new Blob([bn]),yn=document.createElementNS("http://www.w3.org/1999/xhtml","a");yn.href=Ft.createObjectURL(Pn),yn.download=rn,cn(yn)}(0,ge.useEffect)(()=>{at()},[at]),(0,ge.useEffect)(()=>{Er.current&&!On&&Promise.all([pe.e(8909),pe.e(3267)]).then(pe.bind(pe,71448)).then(rn=>{try{ot=rn,Kn.current.instance=ot.editor.create(Er.current,{value:Pe,language:Tt(ve),theme:ft,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Ne);const bn=Kn.current.instance;let yn=[...gt.BH._menuItems].find(Qn=>Qn[0]._debugName=="EditorContext")[1],Sn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Gn=(Qn,ii)=>{var ji,pn;let Ji=Qn._first;do ii.includes((pn=(ji=Ji.element)==null?void 0:ji.command)==null?void 0:pn.id)&&Qn._remove(Ji);while(Ji=Ji.next)};if(fn(bn,ot),setTimeout(()=>{at(),Kn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{kn(bi||"educoder.txt",bn.getValue())}})},500),Kn.current.subscription=bn.onDidChangeModelContent(Qn=>{an.current?clearTimeout(di.current):(at(),hn(bn.getValue(),Qn)),di.current=setTimeout(()=>{an.current=!1},500)}),window.Monaco||Ge(ot,Tt(ve)),Mn&&(Gn(yn,Sn),Er.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Nn),window.removeEventListener("paste",Nn),window.addEventListener("keydown",Nn),window.addEventListener("paste",Nn)),window.Monaco=ot,sn&&bn.onDidBlurEditorWidget(()=>{sn(bn.getValue())}),ui&&bn.onDidFocusEditorText(()=>{ui(bn.getValue())}),Mn)try{bn.onDidPaste(Qn=>{const ii=bn.getSelection(),ji=Kn.current.pastePos||{},pn=new ot.Range(ji.startLineNumber||ii.endLineNumber,ji.startColumn||ii.endColumn,ji.endLineNumber||ii.endLineNumber,ji.endColumn||ii.endColumn);bn.executeEdits("",[{range:Qn.range,text:""}])})}catch(Qn){}let Zn=It();return fr&&typeof fr=="string"&&new Ot(fr,bn,ot),Un(!0),()=>{const Qn=Kn.current.instance;Qn.dispose();const ii=Qn.getModel();ii&&ii.dispose(),Kn.current.subscription&&Kn.current.subscription.dispose(),Zn.unobserve(Er.current)}}catch(bn){}})},[]),(0,ge.useEffect)(()=>{if(Kn.current.instance&&On)return document.addEventListener("keydown",Nt,!1),()=>{document.removeEventListener("keydown",Nt)}},[Pt,On]),(0,ge.useEffect)(()=>{let rn=Kn.current.instance;if(rn&&On){let bn=Tt(ve);ot.editor.setModelLanguage(rn.getModel(),bn)}},[ve,On]),(0,ge.useEffect)(()=>{Kn.current.instance&&On&&ot.editor.setTheme(ft)},[ft,On]),(0,ge.useEffect)(()=>{let rn=Kn.current.instance;Le.current=We,rn&&On&&(rn.updateOptions(Ln({},We)),setTimeout(()=>{rn.getModel().updateOptions(Ln({},We))},200))},[JSON.stringify(We),On]),(0,ge.useEffect)(()=>{let rn=Kn.current.instance;rn&&On&&rn.layout()},[et,Oe,On]);const[Jn,St]=(0,ge.useState)($n(et)),[An,qn]=(0,ge.useState)($n(Oe)),Si=Yn(Ln({},Fe),{width:Jn,height:An,position:"relative"});return ge.createElement("div",{className:"my-monaco-editor",ref:Er,style:Si},un&&ge.createElement(_e.CopyToClipboard,{text:Pe,onCopy:()=>Ht.ZP.success("\u590D\u5236\u6210\u529F")},ge.createElement(Xt.Z,{title:"\u590D\u5236\u4EE3\u7801"},ge.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ge.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function At({width:Dt="100%",height:rt="100%",original:et,modified:Oe,language:Pe,options:ve={}}){const Fe=(0,ge.useRef)(),[We,Ne]=(0,ge.useState)(null);function ft(qt){let Mn;return Fe.current&&(Mn=new Re.Z(hn=>{for(let fn of hn)(fn.target.offsetHeight>0||fn.target.offsetWidth>0)&&qt.layout()}),Mn.observe(Fe.current)),Mn}(0,ge.useEffect)(()=>(Fe.current&&Promise.all([pe.e(8909),pe.e(9404)]).then(pe.bind(pe,2550)).then(qt=>{ot=qt;const Mn=ot.editor.createDiffEditor(Fe.current,Yn(Ln({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},ve),{wordWrap:!0}));Ne(Mn);let hn=ft(Mn);return()=>{Mn.dispose();const fn=Mn.getModel();fn&&fn.dispose(),hn.unobserve(Fe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ge.useEffect)(()=>{We&&We.setModel({original:ot.editor.createModel(et,Pe),modified:ot.editor.createModel(Oe,Pe)})},[et,Oe,Pe,We]);const sn=$n(Dt),un=$n(rt),Pt={width:sn,height:un};return ge.createElement("div",{className:"my-diff-editor",ref:Fe,style:Pt})}},85057:function(Vn,Cn,pe){"use strict";pe.d(Cn,{jL:function(){return Ke},w9:function(){return ln},QD:function(){return hn},cQ:function(){return _e},op:function(){return ft},O5:function(){return Li},_b:function(){return _i},t7:function(){return se},Gi:function(){return wn},YG:function(){return Yn},qp:function(){return lt},vr:function(){return gi},qE:function(){return Pt},Je:function(){return be},wb:function(){return gt},cq:function(){return ot},tp:function(){return Ae}});var ge=pe(59301),Re={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},Ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",Ke=({dataSource:On=[],img:Un,imgWidth:It=346,title:Kt,sunTitle:Ye,bannerExtraContent:nn})=>ge.createElement("div",{className:Re.banner},ge.createElement("div",{className:Re.content},ge.createElement("aside",null,ge.createElement("p",null,ge.createElement("b",null,Kt),ge.createElement("span",null,Ye)),On.length>0&&ge.createElement("div",{className:Re.btns},On.map((xn,Nt)=>ge.createElement("div",{key:Nt,onClick:xn.click},xn.name,xn.sign?ge.createElement("img",{src:Ve,width:39}):null))),nn),Un&&ge.createElement("img",{style:{marginTop:33,marginRight:38},src:Un,width:It}))),st={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},Me=pe(92310),kt=pe.n(Me),bt=pe(89392),lt=({dataSource:On=[],value:Un,onChange:It,onTitleChange:Kt,className:Ye,title:nn,titleWidth:xn=41,style:Nt={},fontColor:at="#6A7283",showCount:cn})=>{const[Nn,kn]=(0,ge.useState)(0),[Jn,St]=(0,ge.useState)(!1),An=(0,ge.useRef)(null),qn=(0,ge.useRef)(null);return(0,ge.useEffect)(()=>{var Si;On.length!==0&&(((Si=An==null?void 0:An.current)==null?void 0:Si.clientHeight)>97?kn(1):kn(0)),On.length===0&&kn(0),St(!1)},[On]),ge.createElement("div",{className:kt()(st.row,Ye),style:Nt},ge.createElement("div",{onClick:(0,bt.throttle)(()=>Kt==null?void 0:Kt(),2e3),style:{width:xn,marginTop:Jn?12:4},className:`${st.title} ${Kt?"current":""}`},nn),ge.createElement("div",{className:Jn?`${st.tagsWrap} ${st.tagsBorderWrap}`:st.tagsWrap},ge.createElement("div",{className:st.bar,ref:qn,style:Nn>0?{height:Nn===1?97:"auto",overflow:Nn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ge.createElement("div",{className:st.tag,ref:An},On==null?void 0:On.map(Si=>ge.createElement("span",{onClick:()=>It(Si.id),key:Si.id,style:{color:at},className:Un===Si.id?st.active:""},ge.createElement("span",{title:Si.name,className:st.name},Si.name),!!cn&&ge.createElement("span",{className:st.num},Si.count))))),!!Nn&&ge.createElement(ge.Fragment,null,Nn===1?ge.createElement("div",{onClick:()=>{var Si;kn(2),((Si=An==null?void 0:An.current)==null?void 0:Si.clientHeight)>245?St(!0):St(!1)},className:st.action},"\u5C55\u5F00",ge.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ge.createElement("div",{onClick:()=>{qn.current.scrollTop=0,kn(1),St(!1)},className:st.action},"\u6536\u8D77",ge.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},yt={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Ae=({dataSource:On=[],value:Un,onChange:It,className:Kt,style:Ye={}})=>ge.createElement("div",{style:Ye,className:kt()(yt.tabs,Kt)},On.map(nn=>ge.createElement("span",{onClick:()=>It(nn.id),className:Un===nn.id?yt.active:"",key:nn.id},nn.name))),ne={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},ee=pe(92832),se=({dataSource:On=[],value:Un="",onChange:It,onInputChange:Kt=()=>{},className:Ye,style:nn={},placeholder:xn,allowClear:Nt=!1})=>{var at;const[cn,Nn]=(0,ge.useState)(""),[kn,Jn]=(0,ge.useState)("");(0,ge.useEffect)(()=>{var qn;let Si=Un;(qn=JSON.stringify(Un))!=null&&qn.includes("{")&&(Nn(Un.id),Si=Un.value||"");try{Jn(decodeURIComponent(Si||""))}catch(rn){Jn(decodeURIComponent(Si||""))}},[Un]);const St=()=>{It(encodeURIComponent(kn),cn||null)},An=qn=>{qn!==cn&&(Nn(qn),It(encodeURIComponent(kn),qn))};return ge.createElement("div",{className:kt()(ne.input,Ye),style:nn},!!On.length&&ge.createElement("div",{className:ne.dropdown},ge.createElement("div",{className:ne.text},(at=On.find(qn=>qn.id===cn))==null?void 0:at.name,ge.createElement("i",{className:"iconfont icon-zhankai4"}),ge.createElement("b",{className:ne.b1}),ge.createElement("b",{className:ne.b2})),ge.createElement("div",{className:ne.menu},On.map((qn,Si)=>ge.createElement("div",{key:Si,onClick:()=>An(qn.id)},qn.name)))),ge.createElement(ee.default,{onPressEnter:St,value:kn,onChange:qn=>{Jn(qn.target.value),Kt(encodeURIComponent(qn.target.value),cn||null)},bordered:!1,placeholder:xn}),ge.createElement("i",{onClick:St,className:"iconfont icon-sousuo9 font14 pl10 current"}))},fe={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},be=({value:On,onChange:Un,className:It,total:Kt,pageSize:Ye,style:nn={}})=>{const xn=On<2,Nt=On>=Math.ceil(Kt/Ye);return Kt<=Ye?ge.createElement(ge.Fragment,null):ge.createElement("div",{className:kt()(fe.quickPager,It),style:nn},ge.createElement("div",{onClick:()=>{xn||Un(On-1,"prev")},className:xn?fe.disabled:""},"\u4E0A\u4E00\u9875"),ge.createElement("div",{onClick:()=>{Nt||Un(On+1,"next")},className:Nt?fe.disabled:""},"\u4E0B\u4E00\u9875"))},Te={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Be=pe(71418),ze=pe(6848),Ge=pe(13570),nt=pe(3294),Je=pe(955),xt=pe(96908),He=pe(57177),Et=pe(81378),tt=pe(8797),gt=({className:On,dataSource:Un=[],col:It=4,right:Kt,bottom:Ye=23,precision:nn=0,wrapWidth:xn=1200,trackEventItems:Nt,loading:at})=>{const cn=Math.floor((xn-(It-1)*Kt)/It);return ge.createElement(Be.Z,{spinning:at},ge.createElement("div",{className:kt()(Te.list,On)},!!Un.length&&Un.map((Nn,kn)=>{const{name:Jn,id:St,identifier:An,power:qn,cover_image_id:Si,pic:rn}=Nn;return ge.createElement("div",{className:Te.wrap,key:St,style:{width:cn,marginRight:(1+kn)%It===0?0:Kt+nn,marginBottom:Ye}},ge.createElement("a",{target:"_blank",href:`/shixuns/${An}/challenges`,className:Te.li,onClick:bn=>{bn.preventDefault(),Nt&&(0,Je.L9)([Nt]),qn&&(0,Je.xg)(`/shixuns/${An}/challenges`)}},ge.createElement("div",{className:Te.img},ge.createElement("img",{className:Te.cover,src:`${rn}`}),Nn.is_jupyter&&ge.createElement("img",{className:Te.sign,src:xt}),Nn.is_jupyter_lab&&ge.createElement("img",{className:Te.sign,src:He}),Nn.is_unity_3d&&ge.createElement("img",{className:Te.sign,src:Et})),ge.createElement("div",{className:Te.name},ge.createElement(ze.Z,{title:Jn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ge.createElement("span",{className:Te.e},Jn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ge.createElement("div",{className:Te.tags},ge.createElement(ze.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},ge.createElement("span",null,ge.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),ge.createElement("span",null,Nn.challenges_count))),!!Nn.myshixuns_count&&ge.createElement(ze.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ge.createElement("span",null,ge.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),ge.createElement("span",null,Nn.myshixuns_count))),ge.createElement(ze.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ge.createElement("span",null,ge.createElement("span",null,Nn.level))),ge.createElement("div",{className:Te.rate},ge.createElement(Ge.Z,{allowHalf:!0,disabled:!0,defaultValue:Nn.score_info}),ge.createElement("span",null,"\xA0",Nn.score_info?`${Nn.score_info}\u5206`:"5\u5206")))),!qn&&ge.createElement("div",{className:Te.lockWrap},ge.createElement("img",{src:`${nt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ge.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Un.length&&ge.createElement(tt.Z,null)))},Ht={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},Xt=pe(24065),Ut=pe(59301),_e=({className:On,dataSource:Un=[],col:It=4,right:Kt,bottom:Ye=23,precision:nn=0,wrapWidth:xn=1200,trackEventItems:Nt,loading:at,onRemove:cn=()=>{},isCurrent:Nn=!0,showAlias:kn=!1})=>{const Jn=Math.floor((xn-(It-1)*Kt)/It),St=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return Ut.createElement(Be.Z,{spinning:at},Ut.createElement("div",{className:kt()(Ht.list,On)},!!(Un!=null&&Un.length)&&(Un==null?void 0:Un.map((An,qn)=>{var Si;const{name:rn,id:bn,identifier:Ft,featured:Pn,school_name:yn,image_url:Sn,excellent:Gn,is_plan:Zn}=An;return Ut.createElement("div",{key:bn,className:Ht.wrap,style:{width:Jn,marginRight:(1+qn)%It===0?0:Kt+nn,marginBottom:Ye}},Ut.createElement("a",{className:Ht.li,onClick:Qn=>{Qn.preventDefault(),Qn.stopPropagation(),Nt&&(0,Je.L9)([Nt]),(0,Je.xg)(`/paths/${Ft}`)}},Ut.createElement("div",{className:Ht.img},Ut.createElement("img",{className:Ht.cover,src:`${Sn}`}),Nn&&(0,Xt.bg)()&&(An==null?void 0:An.studying)&&Ut.createElement("div",{className:`${Ht.movebq} user-path-items`,onClick:Qn=>{Qn.stopPropagation(),cn(An)}},Ut.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Ut.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Si=An==null?void 0:An.subject_tags)==null?void 0:Si.map((Qn,ii)=>{var ji,pn;if(ii===0){const Ki=(ji=St.find(Gi=>Gi.name==Qn))==null?void 0:ji.swimg;return Ut.createElement("img",{className:Ht.sign,src:Ki,style:{left:"-4px"}})}const Ji=(pn=St.find(Ki=>Ki.name==Qn))==null?void 0:pn.ptimg;return Ut.createElement("img",{className:Ht.sign,src:Ji,style:{left:`${48+52*(ii-1)+2*ii}px`}})}),Ut.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(An==null?void 0:An.excellent)&&Ut.createElement("div",{className:Ht.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Ut.createElement("div",{className:Ht.name},Ut.createElement(ze.Z,{title:kn&&(An!=null&&An.excellent_alias_name)?Ut.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${rn}`,Ut.createElement("br",null),Ut.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${An==null?void 0:An.excellent_alias_name}`)):rn},Ut.createElement("span",{className:Ht.e},kn&&(An==null?void 0:An.excellent_alias_name)||rn))),Ut.createElement(ze.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${yn}`},Ut.createElement("div",{className:Ht.unit},Ut.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),yn)),Ut.createElement("div",{className:Ht.tags},Ut.createElement("div",null,Ut.createElement(ze.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Ut.createElement("span",null,Ut.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Ut.createElement("span",null,An.stages_count))),Ut.createElement(ze.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Ut.createElement("span",null,Ut.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Ut.createElement("span",null,An.members_count)))))))})),!Un.length&&Ut.createElement(tt.Z,null)))},Wt={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},Dn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",Bn=pe(59301),ln=({className:On,dataSource:Un=[],col:It=4,right:Kt,bottom:Ye=23,precision:nn=0,wrapWidth:xn=1200,trackEventItems:Nt,loading:at,handleVery:cn=()=>!0})=>{const Nn=Math.floor((xn-(It-1)*Kt)/It);return Bn.createElement(Be.Z,{spinning:at},Bn.createElement("div",{className:kt()(Wt.list,On)},!!Un.length&&Un.map((kn,Jn)=>{const{subject_identifier:St,id:An,identifier:qn,power:Si}=kn,rn=kn.is_public!=0&&kn.is_public;return Bn.createElement("div",{className:Wt.wrap,key:An,style:{width:Nn,marginRight:(1+Jn)%It===0?0:Kt+nn,marginBottom:Ye}},Bn.createElement("a",{className:Wt.li,onClick:bn=>{bn.preventDefault(),cn(kn==null?void 0:kn.first_category_url)&&(Nt&&(0,Je.L9)([Nt]),(0,Je.xg)(kn.first_category_url))}},Bn.createElement("div",{className:Wt.top},Bn.createElement(ze.Z,{title:kn.name},Bn.createElement("div",{className:Wt.name},kn.name)),Bn.createElement("img",{className:Wt.img,src:nt.Z.IMG_SERVER+"/images/"+kn.avatar_url}),Bn.createElement("div",{className:Wt.text,title:kn.creator},kn.creator),St&&Bn.createElement("div",{className:Wt.btns},Bn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Bn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),rn&&Bn.createElement("div",{className:Wt.sign},"\u516C\u5F00")),Bn.createElement("div",{className:Wt.bottom},kn.visits>0&&Bn.createElement(ze.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Bn.createElement("span",null,Bn.createElement("i",{className:"iconfont icon-liulanyan"}),Bn.createElement("span",null,kn.visits))),kn.course_members_count>0&&Bn.createElement(ze.Z,{title:"\u6210\u5458",placement:"bottom"},Bn.createElement("span",null,Bn.createElement("i",{className:"iconfont icon-chengyuan"}),kn.course_members_count)),kn.tasks_count>0&&Bn.createElement(ze.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Bn.createElement("span",null,Bn.createElement("i",{className:"iconfont icon-zuoye"}),kn.tasks_count)),kn.is_end?Bn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Bn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!kn.is_accessible&&Bn.createElement("div",{className:Wt.lockWrap},Bn.createElement("img",{src:`${nt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Bn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Un.length&&Bn.createElement(tt.Z,null)))},Tn={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},ei=pe(89070),Yn=({dataSource:On=[],value:Un,onChange:It,className:Kt,style:Ye={},tabBarExtraContent:nn})=>ge.createElement("div",{className:kt()(Tn.tabs,Kt),style:Ye},ge.createElement("div",{className:Tn.tabsWrap},On.map((xn,Nt)=>!(xn!=null&&xn.hide)&&ge.createElement("aside",{className:Tn.tab,onClick:()=>{It(xn.id),xn.link&&ei.history.push(xn.link)},key:Nt},ge.createElement("div",{className:Un===xn.id?Tn.active:""},xn.name),(xn==null?void 0:xn.resetCount)==null&&(xn==null?void 0:xn.total)!==void 0&&ge.createElement("span",null,"\uFF08",xn==null?void 0:xn.total,"\uFF09"),(xn==null?void 0:xn.resetCount)!==void 0&&(xn==null?void 0:xn.total)!==void 0&&ge.createElement(ze.Z,{title:(xn==null?void 0:xn.tip)!=null?xn==null?void 0:xn.tip:""},ge.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ge.createElement("span",{style:{color:"#000"}},xn==null?void 0:xn.resetCount),"/",ge.createElement("span",null,xn==null?void 0:xn.total),"\uFF09"))))),ge.createElement("div",{className:Tn.tabBar},nn)),wn=({className:On,style:Un={},children:It})=>ge.createElement("div",{className:kt()(On),style:Un},It),$n={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},Yt=pe(38854),tn=pe(20834);const Gt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var ot=({sortValue:On,dropValue:Un,className:It,onSort:Kt,onDrop:Ye,dataSource:nn=Gt})=>{var xn;return ge.createElement("div",{className:kt()($n.orderWrap,It)},ge.createElement(Yt.Z,{dropdownRender:()=>ge.createElement(tn.default,null,nn.map((Nt,at)=>ge.createElement(tn.default.Item,{key:at,onClick:()=>Ye(Nt.id)},Nt.name)))},ge.createElement("span",{className:$n.orderTextWrap},(xn=nn.find(Nt=>Un===Nt.id))==null?void 0:xn.name)),ge.createElement("span",{className:$n.orderIconWrap},ge.createElement("span",{className:$n.orderAsc},ge.createElement("i",{className:On==="asc"?`iconfont icon-sanjiaoxing-up font12 ${$n.cursorPointer} ${$n.active}`:`iconfont icon-sanjiaoxing-up font12 ${$n.cursorPointer}`,onClick:()=>Kt(On==="asc"?"desc":"asc")})),ge.createElement("span",{className:$n.orderDesc},ge.createElement("i",{className:On==="desc"?`iconfont icon-sanjiaoxing-down font12 ${$n.cursorPointer} ${$n.active}`:`iconfont icon-sanjiaoxing-down font12 ${$n.cursorPointer}`,onClick:()=>Kt(On==="asc"?"desc":"asc")}))))},Ze={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},At=pe(3113),Dt=Object.defineProperty,rt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,Pe=(On,Un,It)=>Un in On?Dt(On,Un,{enumerable:!0,configurable:!0,writable:!0,value:It}):On[Un]=It,ve=(On,Un)=>{for(var It in Un||(Un={}))et.call(Un,It)&&Pe(On,It,Un[It]);if(rt)for(var It of rt(Un))Oe.call(Un,It)&&Pe(On,It,Un[It]);return On},Fe=(On,Un)=>{var It={};for(var Kt in On)et.call(On,Kt)&&Un.indexOf(Kt)<0&&(It[Kt]=On[Kt]);if(On!=null&&rt)for(var Kt of rt(On))Un.indexOf(Kt)<0&&Oe.call(On,Kt)&&(It[Kt]=On[Kt]);return It},We=(On,Un,It)=>new Promise((Kt,Ye)=>{var nn=at=>{try{Nt(It.next(at))}catch(cn){Ye(cn)}},xn=at=>{try{Nt(It.throw(at))}catch(cn){Ye(cn)}},Nt=at=>at.done?Kt(at.value):Promise.resolve(at.value).then(nn,xn);Nt((It=It.apply(On,Un)).next())}),ft=On=>{var Un=On,{className:It,style:Kt,children:Ye,loading:nn=!1,openLoading:xn,onClick:Nt=()=>{},size:at="middle",shape:cn="round"}=Un,Nn=Fe(Un,["className","style","children","loading","openLoading","onClick","size","shape"]);const[kn,Jn]=(0,ge.useState)(!1);return ge.createElement(At.ZP,ve({onClick:(0,bt.throttle)(St=>We(void 0,null,function*(){xn&&Jn(!0);try{yield Nt(St)}catch(An){console.log("error",An)}xn&&Jn(!1)}),2e3,{leading:!0,trailing:!1}),className:kt()(Ze.btn,Ze[`${at}-${cn}`],It),style:Kt,size:at,shape:cn,loading:kn||nn},Nn),Ye)},sn={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},Pt=({className:On,style:Un,children:It=null,onClick:Kt,title:Ye})=>ge.createElement("div",{className:kt()(sn.head,On),style:Un},ge.createElement("span",{className:"primary-hover",onClick:Kt},ge.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ge.createElement("b",{title:Ye},Ye),ge.createElement("div",{className:sn.node},It)),qt={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},hn=({confirmShow:On=!0,confirmTitle:Un,confirmClick:It,cancelShow:Kt=!0,cancelTitle:Ye,cancelClick:nn,className:xn,style:Nt,confirmLoading:at=!1})=>ge.createElement("div",{className:kt()(qt.btns,xn),style:Nt},On&&ge.createElement(At.ZP,{loading:at,onClick:It,type:"primary",className:qt.confirm},Un),Kt&&ge.createElement(At.ZP,{onClick:nn,className:qt.cancel},Ye)),fn={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},gi=({className:On,style:Un={},LeftContent:It,children:Kt,RightContent:Ye})=>ge.createElement("div",{className:kt()(fn.fixedBottom,On),style:Un},ge.createElement("div",{className:fn.wrap},ge.createElement("div",{className:fn.left},It),ge.createElement("div",{className:fn.center},Kt),ge.createElement("div",{className:fn.right},Ye))),fi={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},_i=({className:On,style:Un={},dataSource:It=[]})=>ge.createElement("div",{className:kt()(fi.crumbs,On),style:Un},It.map((Kt,Ye)=>Ye<It.length-1?ge.createElement(ge.Fragment,{key:Ye},Kt.path||Kt.onClick?ge.createElement("span",{className:fi.hover,onClick:Kt!=null&&Kt.onClick?Kt.onClick:()=>ei.history.push(Kt.path)},Kt.name):ge.createElement("span",null,Kt.name),ge.createElement("span",null,"\xA0",">","\xA0")):ge.createElement("span",{key:Ye,style:{color:"#5F6368"}},Kt.name))),rr=pe(31797),Wi=Object.defineProperty,vr=Object.defineProperties,fr=Object.getOwnPropertyDescriptors,zi=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable,Le=(On,Un,It)=>Un in On?Wi(On,Un,{enumerable:!0,configurable:!0,writable:!0,value:It}):On[Un]=It,Ei=(On,Un)=>{for(var It in Un||(Un={}))Er.call(Un,It)&&Le(On,It,Un[It]);if(zi)for(var It of zi(Un))Kn.call(Un,It)&&Le(On,It,Un[It]);return On},Ri=(On,Un)=>vr(On,fr(Un)),an=(On,Un)=>{var It={};for(var Kt in On)Er.call(On,Kt)&&Un.indexOf(Kt)<0&&(It[Kt]=On[Kt]);if(On!=null&&zi)for(var Kt of zi(On))Un.indexOf(Kt)<0&&Kn.call(On,Kt)&&(It[Kt]=On[Kt]);return It};const{Countdown:di}=rr.default;var Li=On=>{var Un=On,{onChange:It}=Un,Kt=an(Un,["onChange"]);const[Ye,nn]=(0,ge.useState)(null);(0,ge.useEffect)(()=>{typeof Ye=="number"&&Ye>=0&&It(Ye)},[Ye]);const xn=Nt=>{const at=Math.floor(Nt/1e3);nn(at)};return ge.createElement(di,Ri(Ei({},Kt),{onChange:xn}))}},58856:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Re}});var ge=pe(59301);function Re(Ve,dt){const Ke=(0,ge.useRef)();(0,ge.useEffect)(()=>{Ke.current=Ve}),(0,ge.useEffect)(()=>{function st(){Ke.current()}if(dt!==null){let Me=setInterval(st,dt);return()=>clearInterval(Me)}},[dt])}},42609:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return ne}});var ge=pe(59301),Re=pe(8591),Ve=pe(43418),dt=pe(19842),Ke=pe(54580),st=pe(3113),Me=pe(3294),kt=pe(955),bt=pe(99064),Ue=pe(89070),lt={customModal:"customModal___bVzUV",content:"content___oKhZq",upload:"upload___nPxEL",infoText:"infoText___gZEJF",okBtn:"okBtn___CVo2A",fileList:"fileList___tauGN",fileName:"fileName___T_8JX",selectitems:"selectitems___imW2Y"},yt=pe(59301),jt=(ee,ce,se)=>new Promise((fe,ye)=>{var be=ze=>{try{Be(se.next(ze))}catch(Ge){ye(Ge)}},Te=ze=>{try{Be(se.throw(ze))}catch(Ge){ye(Ge)}},Be=ze=>ze.done?fe(ze.value):Promise.resolve(ze.value).then(be,Te);Be((se=se.apply(ee,ce)).next())}),ne=({visible:ee,onOk:ce,onCancel:se,sub_discipline_id:fe=[]})=>{const[ye,be]=(0,ge.useState)([]),[Te,Be]=(0,ge.useState)(!1),ze=(0,Ue.useParams)(),[Ge,nt]=(0,ge.useState)([]),[Je,xt]=(0,ge.useState)([]);(0,ge.useEffect)(()=>{ee?He():(xt([]),be([]),Be(!1))},[ee]);const He=()=>jt(void 0,null,function*(){const Xt=yield(0,bt.ZP)("/api/disciplines.json",{method:"get",params:{source:"subject"}});nt(Xt.disciplines||[]),xt((fe==null?void 0:fe.length)>0?fe:[])}),Et=()=>{if((Je==null?void 0:Je.length)===0)return Re.ZP.warning("\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B\uFF01");console.log("subDisciplineId",Je),Be(!0),ce(ye,Je[1],()=>{Be(!1)})},tt=()=>{se()},Ot=()=>{const Xt=`${Me.Z.API_SERVER}/api/courses/${ze.coursesId}/exercises/down_template`;(0,kt.Nd)(null,Xt)},gt=Xt=>{const Ut={name:Xt.name,uid:Xt.uid,file:Xt};return be([Ut]),!1},Ht=()=>{be([])};return yt.createElement(Ve.default,{title:"\u5BFC\u5165\u8BD5\u9898",open:ee,onOk:Et,centered:!0,wrapClassName:lt.customModal,onCancel:tt,width:663,okText:"\u786E\u8BA4",okButtonProps:{className:lt.okBtn},cancelText:"\u53D6\u6D88",confirmLoading:Te},yt.createElement("div",{className:lt.content},yt.createElement("aside",null,yt.createElement("div",{style:{fontWeight:600}},"\u6B65\u9AA41"),yt.createElement("ul",null,yt.createElement("li",null,yt.createElement("span",{style:{color:"#5F6367"}},"\u6839\u636E\u6A21\u677F\u8981\u6C42\u7F16\u8F91\u9700\u8981\u4E0A\u4F20\u7684\u8BD5\u9898"),yt.createElement("span",{style:{color:"#0152d9",cursor:"pointer",marginLeft:20},onClick:Ot},"\u4E0B\u8F7D\u8003\u8BD5\u8BD5\u9898\u6A21\u677F"),yt.createElement("i",{className:"iconfont icon-xiazai4 ml10",onClick:Ot,style:{fontSize:14,cursor:"pointer",color:"#0152d9"}})),yt.createElement("li",{style:{color:"#FA6400"},className:"mt10"},"\u63D0\u793A"),yt.createElement("li",{className:lt.infoText},"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Excel\u683C\u5F0F\u6A21\u677F\uFF1B "),yt.createElement("li",{className:lt.infoText},"2\u3001\u4E0D\u652F\u6301\u7EC4\u5408\u9898\u548C\u5B9E\u8BAD\u9898\u5BFC\u5165\uFF1B"),yt.createElement("li",{className:lt.infoText},"3\u3001\u6BCF\u6B21\u6700\u591A\u5BFC\u5165300\u9898\uFF1B"),yt.createElement("li",{className:lt.infoText},"4\u3001\u586B\u7A7A\u9898\u5BFC\u5165\u6700\u591A\u652F\u63018\u4E2A\u586B\u7A7A\u9879\u3002"))),yt.createElement("aside",{style:{marginTop:22}},yt.createElement("div",{style:{fontWeight:600}},"\u6B65\u9AA42"),yt.createElement("ul",{style:{flex:1}},yt.createElement("li",{style:{color:"#5F6367"}},"\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B\uFF0C\u4E0A\u4F20\u7F16\u8F91\u597D\u7684\u8BD5\u9898\u6587\u6863\uFF0C\u786E\u5B9A\u5BFC\u5165"),ee&&yt.createElement(yt.Fragment,null,yt.createElement(dt.Z,{value:Je,className:lt.selectitems,expandTrigger:"hover",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:Ge,fieldNames:{label:"name",value:"id",children:"sub_disciplines"},onChange:(Xt,Ut)=>{xt(Xt||[])}}),yt.createElement("br",null),yt.createElement(Ke.default,{action:`${Me.Z.API_SERVER}/api/attachments.json`,beforeUpload:gt,onRemove:Ht,withCredentials:!0,fileList:ye,accept:".xls,.xlsx",showUploadList:!1},yt.createElement(st.ZP,{className:lt.upload,type:"primary",icon:yt.createElement("i",{className:"iconfont icon-shangchuan3",style:{fontSize:14}})},"\u4E0A\u4F20\u6587\u4EF6"))),ye.map((Xt,Ut)=>yt.createElement("div",{key:Ut,className:lt.fileList},yt.createElement("span",{className:lt.fileName},Xt==null?void 0:Xt.name),yt.createElement("i",{className:"iconfont icon-shanchu12",style:{color:"#F65160",fontSize:16,cursor:"pointer"},onClick:Ht})))))))}},74440:function(Vn,Cn,pe){"use strict";pe.d(Cn,{h:function(){return ge}});var ge=(Re=>(Re[Re.NOMATCH=-1]="NOMATCH",Re[Re.OK=0]="OK",Re[Re.TIMEOUT=2]="TIMEOUT",Re[Re.PODFAILURE=3]="PODFAILURE",Re[Re.COMPILEFAILURE=4]="COMPILEFAILURE",Re[Re.EXECUTEFAILURE=5]="EXECUTEFAILURE",Re[Re.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Re))(ge||{})},88264:function(Vn,Cn,pe){"use strict";pe.d(Cn,{H7:function(){return ne},MK:function(){return Ae},MU:function(){return Ue},X6:function(){return yt},bM:function(){return bt},fi:function(){return ee},fu:function(){return kt},n4:function(){return ce},rX:function(){return jt},vl:function(){return se},zO:function(){return lt}});var ge=pe(99064),Re=Object.defineProperty,Ve=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,st=(fe,ye,be)=>ye in fe?Re(fe,ye,{enumerable:!0,configurable:!0,writable:!0,value:be}):fe[ye]=be,Me=(fe,ye)=>{for(var be in ye||(ye={}))dt.call(ye,be)&&st(fe,be,ye[be]);if(Ve)for(var be of Ve(ye))Ke.call(ye,be)&&st(fe,be,ye[be]);return fe};function kt(fe,ye){return(0,ge.U2)(`myproblems/${fe}.json`,Me({hidePopLogin:!0},ye||{}))}function bt(fe,ye){return(0,ge.v_)(`myproblems/${fe}/code_submit.json`,ye)}function Ue(fe,ye){return(0,ge.v_)(`myproblems/${fe}/code_debug.json`,ye)}function lt(fe,ye){return ye.language&&(ye.language=encodeURIComponent(ye.language)),(0,ge.U2)(`myproblems/${fe}/submit_records.json`,ye)}function yt(fe){return(0,ge.U2)("myproblems/record_detail.json",{id:fe})}function jt(fe,ye){return(0,ge.U2)(`myproblems/${fe}/result.json`,{mode:ye})}function Ae(fe,ye){return(0,ge.v_)(`myproblems/${fe}/add_notes.json`,ye)}function ne(fe,ye){return(0,ge.v_)(`myproblems/${fe}/restore_initial_code.json`,ye)}function ee(fe){return(0,ge.v_)(`myproblems/${fe}/sync_code.json`)}function ce(fe,ye){return(0,ge.v_)(`myproblems/${fe}/update_code.json`,ye)}function se(fe,ye){return(0,ge.v_)(`discusses/${fe}/plus.json`,ye)}},15730:function(Vn,Cn,pe){"use strict";var ge=pe(59301),Re=pe(6848),Ve=pe(92832),dt=pe(8591),Ke=pe(7761),st=pe(59301),Me=(bt,Ue,lt)=>new Promise((yt,jt)=>{var Ae=ce=>{try{ee(lt.next(ce))}catch(se){jt(se)}},ne=ce=>{try{ee(lt.throw(ce))}catch(se){jt(se)}},ee=ce=>ce.done?yt(ce.value):Promise.resolve(ce.value).then(Ae,ne);ee((lt=lt.apply(bt,Ue)).next())});const kt=({defaultValue:bt,onFinish:Ue})=>{const[lt,yt]=(0,ge.useState)(!1),[jt,Ae]=(0,ge.useState)(bt);return(0,ge.useEffect)(()=>{Ae(bt)},[bt]),st.createElement("div",null,lt?st.createElement(Ve.default,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:jt,onChange:ne=>{Ae(ne.target.value)},onBlur:()=>Me(void 0,null,function*(){var ne;if(((ne=jt==null?void 0:jt.replaceAll(" ",""))==null?void 0:ne.length)<=0){dt.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield Ue(jt))&&yt(!1)}),onPressEnter:()=>Me(void 0,null,function*(){var ne;if(((ne=jt==null?void 0:jt.replaceAll(" ",""))==null?void 0:ne.length)<=0){dt.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield Ue(jt))&&yt(!1)})}):st.createElement("div",{className:Ke.Z.title},jt,st.createElement(Re.Z,{title:"\u7F16\u8F91\u8BD5\u5377\u540D\u79F0"},st.createElement("i",{className:`${Ke.Z.editIcon} iconfont icon-bianji_Hover`,onClick:()=>yt(!0)}))))};Cn.Z=kt},86918:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Ue}});var ge=pe(43418),Re={ul:"ul___TdfYY"},Ve=pe(32637),dt=pe(59301),Ke=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,kt=(lt,yt)=>{var jt={};for(var Ae in lt)st.call(lt,Ae)&&yt.indexOf(Ae)<0&&(jt[Ae]=lt[Ae]);if(lt!=null&&Ke)for(var Ae of Ke(lt))yt.indexOf(Ae)<0&&Me.call(lt,Ae)&&(jt[Ae]=lt[Ae]);return jt},Ue=lt=>{var yt=lt,{open:jt,onCancel:Ae}=yt,ne=kt(yt,["open","onCancel"]);return dt.createElement(ge.default,{centered:!0,open:jt,title:dt.createElement("div",{style:{fontWeight:"bold"}},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"),width:"696px",onCancel:Ae,footer:null},dt.createElement("div",null,dt.createElement("div",{className:"tc"},dt.createElement("img",{className:"mt10",src:Ve,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})),dt.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10"},"\u514D\u8D39\u6559\u7814\u52A9\u7406"),dt.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16"},"\u5FAE\u4FE1\u626B\u4E00\u626B\u6DFB\u52A0"),dt.createElement("div",{style:{color:"#333"},className:"pt30 font14"},dt.createElement("ul",{className:Re.ul},dt.createElement("li",null,"1\u3001\u89E3\u7B54\u8001\u5E08\u7591\u60D1\u3001\u5E2E\u52A9\u8001\u5E08\u66F4\u5FEB\u719F\u6089\u548C\u4F7F\u7528\u5E73\u53F0\u6559\u5B66\u3002"),dt.createElement("li",null,"2\u3001\u534F\u52A9\u8001\u5E08\u521B\u5EFA\u8BFE\u5802\u3001\u8BFE\u7A0B\u8BBE\u8BA1\u3001\u505A\u597D\u6559\u5B66\u5DE5\u4F5C\u3002"),dt.createElement("li",null,"3\u3001\u6839\u636E\u8001\u5E08\u6559\u5B66\u65B9\u5411\uFF0C\u5206\u4EAB\u5934\u6B4C\u5E73\u53F0C9\u9662\u6821\u3001985\u9AD8\u6821\u3001211\u9AD8\u6821\u3001\u53CC\u4E00\u6D41\u9AD8\u6821\u8001\u5E08\u7ECF\u5178\u5B9E\u8DF5\u6559\u5B66\u6848\u4F8B\u3002")))))}},88918:function(Vn,Cn,pe){"use strict";pe.d(Cn,{I:function(){return Re}});var ge=pe(59301);const Re=()=>{const[Ve,dt]=(0,ge.useState)("hidden");return{overflow:Ve,handleMouseEnter:()=>dt("auto"),handleMouseLeave:()=>dt("hidden")}}},24768:function(Vn,Cn,pe){"use strict";pe.d(Cn,{AL:function(){return be},Iy:function(){return lt},Qv:function(){return Ae},ez:function(){return ye},jb:function(){return yt}});var ge=pe(32834),Re=pe.n(ge),Ve=pe(11690),dt=pe.n(Ve);let Ke=1;function st(nt,Je){const xt=nt.match(/^(\s+)(?:```)/);if(xt===null)return Je;const He=xt[1];return Je.split(`
|
|
|
`).map(Et=>{const tt=Et.match(/^\s+/);if(tt===null)return Et;const[Ot]=tt;return Ot.length>=He.length?Et.slice(He.length):Et}).join(`
|
|
|
`)}let Me=[],kt=["<ul>"];const bt=new(Re()).Renderer,Ue=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function lt(){Me.length=0,kt=["<ul>"]}const yt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function jt(nt,Je,xt,He){if(Je>=nt.length||nt[Je].level<=xt)return Je;var Et=nt[Je];He.push("<li><a href='#"+Ke+Et.anchor+"'>"+Et.text+"</a>"),Je++;var tt=[];return Je=jt(nt,Je,Et.level,tt),tt.length>0&&(He.push("<ul>"),tt.forEach(function(Ot){He.push(Ot)}),He.push("</ul>")),He.push("</li>"),Je=jt(nt,Je,xt,He),Je}function Ae(){return jt(Me,0,0,kt),kt.push("</ul>"),kt.join("")}const ne={heading(nt){const Je=Ue.exec(nt);if(Ke+=1,Je)return{type:"heading",raw:Je[0],depth:Je[1].length,text:Je[2]}},fences(nt){const Je=this.rules.block.fences.exec(nt);if(Je){const xt=Je[0];let He=st(xt,Je[3]||"");const Et=Je[2]?Je[2].trim():Je[2];if(["latex","katex","math"].indexOf(Et)>=0){const tt=se(),Ot=He;He=tt,fe[tt]={type:"block",expression:Ot}}return{type:"code",raw:xt,lang:Et,text:He}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ce=0;const se=()=>`__special_katext_id_${ce++}__`;let fe={};function ye(){return fe}function be(){ce=0,fe={}}function Te(nt){return nt=nt.replace(ee,(Je,xt)=>{const He=se();return fe[He]={type:"inline",expression:xt},He}),nt}const Be=bt.listitem;bt.listitem=function(nt){return Be(Te(nt))};const ze=bt.paragraph;bt.paragraph=function(nt){return ze(Te(nt))};const Ge=bt.tablecell;bt.tablecell=function(nt,Je){return Ge(Te(nt),Je)},bt.code=function(nt,Je,xt){const He=(Je||"").match(/\S*/)[0];return He?["latex","katex","math"].indexOf(He)>=0?`<p class='editormd-tex'>${nt}</p>`:`<pre class="prettyprint linenums"><code class="language-${Je}">${xt?nt:(0,Ve.escape)(nt,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(xt?nt:(0,Ve.escape)(nt,!0))+"</code></pre>"},bt.heading=function(nt,Je,xt){let He=this.options.headerPrefix+xt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Me.push({anchor:He,level:Je,text:nt}),"<h"+Je+' id="'+Ke+He+'">'+nt+"</h"+Je+">"},Re().setOptions({silent:!0,gfm:!0,pedantic:!1}),Re().use({tokenizer:ne,renderer:bt}),Cn.ZP=Re()},50371:function(Vn,Cn){"use strict";function pe(){const ge=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let Re=1;Re<arguments.length;Re++){const Ve=Re<0||arguments.length<=Re?void 0:arguments[Re];Ve&&Object.keys(Ve).forEach(dt=>{const Ke=Ve[dt];Ke!==void 0&&(ge[dt]=Ke)})}return ge}Cn.Z=pe},77578:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return ge}});const ge=Re=>Re?typeof Re=="function"?Re():Re:null},13845:function(Vn,Cn,pe){"use strict";pe.d(Cn,{F:function(){return ge},Z:function(){return Re}});function ge(Ve){return Ve!=null&&Ve===Ve.window}function Re(Ve,dt){var Ke,st;if(typeof window=="undefined")return 0;const Me=dt?"scrollTop":"scrollLeft";let kt=0;return ge(Ve)?kt=Ve[dt?"pageYOffset":"pageXOffset"]:Ve instanceof Document?kt=Ve.documentElement[Me]:(Ve instanceof HTMLElement||Ve)&&(kt=Ve[Me]),Ve&&!ge(Ve)&&typeof kt!="number"&&(kt=(st=((Ke=Ve.ownerDocument)!==null&&Ke!==void 0?Ke:Ve).documentElement)===null||st===void 0?void 0:st[Me]),kt}},56762:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Re}});var ge=pe(59301);function Re(){const[,Ve]=ge.useReducer(dt=>dt+1,0);return Ve}},68031:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return dt}});var ge=pe(16089);function Re(Ke,st,Me,kt){const bt=Me-st;return Ke/=kt/2,Ke<1?bt/2*Ke*Ke*Ke+st:bt/2*((Ke-=2)*Ke*Ke+2)+st}var Ve=pe(13845);function dt(Ke){let st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Me=()=>window,callback:kt,duration:bt=450}=st,Ue=Me(),lt=(0,Ve.Z)(Ue,!0),yt=Date.now(),jt=()=>{const ne=Date.now()-yt,ee=Re(ne>bt?bt:ne,lt,Ke,bt);(0,Ve.F)(Ue)?Ue.scrollTo(window.pageXOffset,ee):Ue instanceof Document||Ue.constructor.name==="HTMLDocument"?Ue.documentElement.scrollTop=ee:Ue.scrollTop=ee,ne<bt?(0,ge.Z)(jt):typeof kt=="function"&&kt()};(0,ge.Z)(jt)}},66104:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Ot}});var ge=pe(92310),Re=pe.n(ge),Ve=pe(11592),dt=pe(26112),Ke=pe(59301),st=pe(92343),Me=pe(36355),kt=pe(84105),bt=pe(91857);const Ue=gt=>{let{children:Ht}=gt;const{getPrefixCls:Xt}=Ke.useContext(Me.E_),Ut=Xt("breadcrumb");return Ke.createElement("li",{className:`${Ut}-separator`,"aria-hidden":"true"},Ht===""?Ht:Ht||"/")};Ue.__ANT_BREADCRUMB_SEPARATOR=!0;var lt=Ue,yt=function(gt,Ht){var Xt={};for(var Ut in gt)Object.prototype.hasOwnProperty.call(gt,Ut)&&Ht.indexOf(Ut)<0&&(Xt[Ut]=gt[Ut]);if(gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ut=Object.getOwnPropertySymbols(gt);it<Ut.length;it++)Ht.indexOf(Ut[it])<0&&Object.prototype.propertyIsEnumerable.call(gt,Ut[it])&&(Xt[Ut[it]]=gt[Ut[it]]);return Xt};function jt(gt,Ht){if(gt.title===void 0||gt.title===null)return null;const Xt=Object.keys(Ht).join("|");return typeof gt.title=="object"?gt.title:String(gt.title).replace(new RegExp(`:(${Xt})`,"g"),(Ut,it)=>Ht[it]||Ut)}function Ae(gt,Ht,Xt,Ut){if(Xt==null)return null;const{className:it,onClick:_e}=Ht,Wt=yt(Ht,["className","onClick"]),Dn=Object.assign(Object.assign({},(0,dt.Z)(Wt,{data:!0,aria:!0})),{onClick:_e});return Ut!==void 0?Ke.createElement("a",Object.assign({},Dn,{className:Re()(`${gt}-link`,it),href:Ut}),Xt):Ke.createElement("span",Object.assign({},Dn,{className:Re()(`${gt}-link`,it)}),Xt)}function ne(gt,Ht){return(Ut,it,_e,Wt,Dn)=>{if(Ht)return Ht(Ut,it,_e,Wt);const Bn=jt(Ut,it);return Ae(gt,Ut,Bn,Dn)}}var ee=function(gt,Ht){var Xt={};for(var Ut in gt)Object.prototype.hasOwnProperty.call(gt,Ut)&&Ht.indexOf(Ut)<0&&(Xt[Ut]=gt[Ut]);if(gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ut=Object.getOwnPropertySymbols(gt);it<Ut.length;it++)Ht.indexOf(Ut[it])<0&&Object.prototype.propertyIsEnumerable.call(gt,Ut[it])&&(Xt[Ut[it]]=gt[Ut[it]]);return Xt};const ce=gt=>{const{prefixCls:Ht,separator:Xt="/",children:Ut,menu:it,overlay:_e,dropdownProps:Wt,href:Dn}=gt,$t=(ln=>{if(it||_e){const Tn=Object.assign({},Wt);if(it){const ei=it||{},{items:Ln}=ei,Yn=ee(ei,["items"]);Tn.menu=Object.assign(Object.assign({},Yn),{items:Ln==null?void 0:Ln.map((zt,wn)=>{var{key:$n,title:Yt,label:tn,path:Gt}=zt,Tt=ee(zt,["key","title","label","path"]);let ot=tn!=null?tn:Yt;return Gt&&(ot=Ke.createElement("a",{href:`${Dn}${Gt}`},ot)),Object.assign(Object.assign({},Tt),{key:$n!=null?$n:wn,label:ot})})})}else _e&&(Tn.overlay=_e);return Ke.createElement(bt.Z,Object.assign({placement:"bottom"},Tn),Ke.createElement("span",{className:`${Ht}-overlay-link`},ln,Ke.createElement(kt.Z,null)))}return ln})(Ut);return $t!=null?Ke.createElement(Ke.Fragment,null,Ke.createElement("li",null,$t),Xt&&Ke.createElement(lt,null,Xt)):null},se=gt=>{const{prefixCls:Ht,children:Xt,href:Ut}=gt,it=ee(gt,["prefixCls","children","href"]),{getPrefixCls:_e}=Ke.useContext(Me.E_),Wt=_e("breadcrumb",Ht);return Ke.createElement(ce,Object.assign({},it,{prefixCls:Wt}),Ae(Wt,it,Xt,Ut))};se.__ANT_BREADCRUMB_ITEM=!0;var fe=se,ye=pe(17313),be=pe(83116),Te=pe(37613);const Be=gt=>{const{componentCls:Ht,iconCls:Xt}=gt;return{[Ht]:Object.assign(Object.assign({},(0,ye.Wf)(gt)),{color:gt.itemColor,fontSize:gt.fontSize,[Xt]:{fontSize:gt.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:gt.linkColor,transition:`color ${gt.motionDurationMid}`,padding:`0 ${gt.paddingXXS}px`,borderRadius:gt.borderRadiusSM,height:gt.lineHeight*gt.fontSize,display:"inline-block",marginInline:-gt.marginXXS,"&:hover":{color:gt.linkHoverColor,backgroundColor:gt.colorBgTextHover}},(0,ye.Qy)(gt)),"li:last-child":{color:gt.lastItemColor},[`${Ht}-separator`]:{marginInline:gt.separatorMargin,color:gt.separatorColor},[`${Ht}-link`]:{[`
|
|
|
> ${Xt} + span,
|
|
|
> ${Xt} + a
|
|
|
`]:{marginInlineStart:gt.marginXXS}},[`${Ht}-overlay-link`]:{borderRadius:gt.borderRadiusSM,height:gt.lineHeight*gt.fontSize,display:"inline-block",padding:`0 ${gt.paddingXXS}px`,marginInline:-gt.marginXXS,[`> ${Xt}`]:{marginInlineStart:gt.marginXXS,fontSize:gt.fontSizeIcon},"&:hover":{color:gt.linkHoverColor,backgroundColor:gt.colorBgTextHover,a:{color:gt.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${gt.componentCls}-rtl`]:{direction:"rtl"}})}};var ze=(0,be.Z)("Breadcrumb",gt=>{const Ht=(0,Te.TS)(gt,{});return[Be(Ht)]},gt=>({itemColor:gt.colorTextDescription,lastItemColor:gt.colorText,iconFontSize:gt.fontSize,linkColor:gt.colorTextDescription,linkHoverColor:gt.colorText,separatorColor:gt.colorTextDescription,separatorMargin:gt.marginXS})),Ge=function(gt,Ht){var Xt={};for(var Ut in gt)Object.prototype.hasOwnProperty.call(gt,Ut)&&Ht.indexOf(Ut)<0&&(Xt[Ut]=gt[Ut]);if(gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ut=Object.getOwnPropertySymbols(gt);it<Ut.length;it++)Ht.indexOf(Ut[it])<0&&Object.prototype.propertyIsEnumerable.call(gt,Ut[it])&&(Xt[Ut[it]]=gt[Ut[it]]);return Xt};function nt(gt){const{breadcrumbName:Ht,children:Xt}=gt,Ut=Ge(gt,["breadcrumbName","children"]),it=Object.assign({title:Ht},Ut);return Xt&&(it.menu={items:Xt.map(_e=>{var{breadcrumbName:Wt}=_e,Dn=Ge(_e,["breadcrumbName"]);return Object.assign(Object.assign({},Dn),{title:Wt})})}),it}function Je(gt,Ht){return(0,Ke.useMemo)(()=>gt||(Ht?Ht.map(nt):null),[gt,Ht])}var xt=function(gt,Ht){var Xt={};for(var Ut in gt)Object.prototype.hasOwnProperty.call(gt,Ut)&&Ht.indexOf(Ut)<0&&(Xt[Ut]=gt[Ut]);if(gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ut=Object.getOwnPropertySymbols(gt);it<Ut.length;it++)Ht.indexOf(Ut[it])<0&&Object.prototype.propertyIsEnumerable.call(gt,Ut[it])&&(Xt[Ut[it]]=gt[Ut[it]]);return Xt};const He=(gt,Ht)=>{if(Ht===void 0)return Ht;let Xt=(Ht||"").replace(/^\//,"");return Object.keys(gt).forEach(Ut=>{Xt=Xt.replace(`:${Ut}`,gt[Ut])}),Xt},Et=gt=>{const{prefixCls:Ht,separator:Xt="/",style:Ut,className:it,rootClassName:_e,routes:Wt,items:Dn,children:Bn,itemRender:$t,params:ln={}}=gt,Tn=xt(gt,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:ei,direction:Ln,breadcrumb:Yn}=Ke.useContext(Me.E_);let zt;const wn=ei("breadcrumb",Ht),[$n,Yt]=ze(wn),tn=Je(Dn,Wt),Gt=ne(wn,$t);if(tn&&tn.length>0){const Ze=[],At=Dn||Wt;zt=tn.map((Dt,rt)=>{const{path:et,key:Oe,type:Pe,menu:ve,overlay:Fe,onClick:We,className:Ne,separator:ft,dropdownProps:sn}=Dt,un=He(ln,et);un!==void 0&&Ze.push(un);const Pt=Oe!=null?Oe:rt;if(Pe==="separator")return Ke.createElement(lt,{key:Pt},ft);const qt={},Mn=rt===tn.length-1;ve?qt.menu=ve:Fe&&(qt.overlay=Fe);let{href:hn}=Dt;return Ze.length&&un!==void 0&&(hn=`#/${Ze.join("/")}`),Ke.createElement(ce,Object.assign({key:Pt},qt,(0,dt.Z)(Dt,{data:!0,aria:!0}),{className:Ne,dropdownProps:sn,href:hn,separator:Mn?"":Xt,onClick:We,prefixCls:wn}),Gt(Dt,ln,At,Ze,hn))})}else if(Bn){const Ze=(0,Ve.Z)(Bn).length;zt=(0,Ve.Z)(Bn).map((At,Dt)=>{if(!At)return At;const rt=Dt===Ze-1;return(0,st.Tm)(At,{separator:rt?"":Xt,key:Dt})})}const Tt=Re()(wn,Yn==null?void 0:Yn.className,{[`${wn}-rtl`]:Ln==="rtl"},it,_e,Yt),ot=Object.assign(Object.assign({},Yn==null?void 0:Yn.style),Ut);return $n(Ke.createElement("nav",Object.assign({className:Tt,style:ot},Tn),Ke.createElement("ol",null,zt)))};Et.Item=fe,Et.Separator=lt;var tt=Et,Ot=tt},19842:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Ri}});var ge=pe(19127),Re=pe(59301),Ve=pe(33853),dt=pe(58617),Ke=pe(38819),st=pe(92310),Me=pe.n(st),kt=pe(96663),bt=pe(72071),Ue=pe(6620),lt=pe(77861),yt=pe(17115),jt=pe(90782),Ae=pe(6089),ne=pe(18929),ee=Re.createContext(null),ce=ee,se=pe(20135),fe=pe(90493),ye=pe(44127),be="__rc_cascader_search_mark__",Te=function(di,yi,Li){var On=Li.label;return yi.some(function(Un){return String(Un[On]).toLowerCase().includes(di.toLowerCase())})},Be=function(di,yi,Li,On){return yi.map(function(Un){return Un[On.label]}).join(" / ")},ze=function(an,di,yi,Li,On,Un){var It=On.filter,Kt=It===void 0?Te:It,Ye=On.render,nn=Ye===void 0?Be:Ye,xn=On.limit,Nt=xn===void 0?50:xn,at=On.sort;return Re.useMemo(function(){var cn=[];if(!an)return[];function Nn(kn,Jn){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;kn.forEach(function(An){if(!(!at&&Nt!==!1&&Nt>0&&cn.length>=Nt)){var qn=[].concat((0,ge.Z)(Jn),[An]),Si=An[yi.children],rn=St||An.disabled;if((!Si||Si.length===0||Un)&&Kt(an,qn,{label:yi.label})){var bn;cn.push((0,ye.Z)((0,ye.Z)({},An),{},(bn={disabled:rn},(0,fe.Z)(bn,yi.label,nn(an,qn,Li,yi)),(0,fe.Z)(bn,be,qn),(0,fe.Z)(bn,yi.children,void 0),bn)))}Si&&Nn(An[yi.children],qn,rn)}})}return Nn(di,[]),at&&cn.sort(function(kn,Jn){return at(kn[be],Jn[be],an,yi)}),Nt!==!1&&Nt>0?cn.slice(0,Nt):cn},[an,di,yi,Li,nn,Un,Kt,at,Nt])},Ge="__RC_CASCADER_SPLIT__",nt="SHOW_PARENT",Je="SHOW_CHILD";function xt(an){return an.join(Ge)}function He(an){return an.map(xt)}function Et(an){return an.split(Ge)}function tt(an){var di=an||{},yi=di.label,Li=di.value,On=di.children,Un=Li||"value";return{label:yi||"label",value:Un,key:Un,children:On||"children"}}function Ot(an,di){var yi,Li;return(yi=an.isLeaf)!==null&&yi!==void 0?yi:!((Li=an[di.children])!==null&&Li!==void 0&&Li.length)}function gt(an){var di=an.parentElement;if(di){var yi=an.offsetTop-di.offsetTop;yi-di.scrollTop<0?di.scrollTo({top:yi}):yi+an.offsetHeight-di.scrollTop>di.offsetHeight&&di.scrollTo({top:yi+an.offsetHeight-di.offsetHeight})}}function Ht(an,di){return an.map(function(yi){var Li;return(Li=yi[be])===null||Li===void 0?void 0:Li.map(function(On){return On[di.value]})})}function Xt(an,di,yi){var Li=new Set(an),On=di();return an.filter(function(Un){var It=On[Un],Kt=It?It.parent:null,Ye=It?It.children:null;return It&&It.node.disabled?!0:yi===Je?!(Ye&&Ye.some(function(nn){return nn.key&&Li.has(nn.key)})):!(Kt&&!Kt.node.disabled&&Li.has(Kt.key))})}function Ut(an,di,yi){for(var Li=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,On=di,Un=[],It=function(){var nn,xn,Nt,at=an[Kt],cn=(nn=On)===null||nn===void 0?void 0:nn.findIndex(function(kn){var Jn=kn[yi.value];return Li?String(Jn)===String(at):Jn===at}),Nn=cn!==-1?(xn=On)===null||xn===void 0?void 0:xn[cn]:null;Un.push({value:(Nt=Nn==null?void 0:Nn[yi.value])!==null&&Nt!==void 0?Nt:at,index:cn,option:Nn}),On=Nn==null?void 0:Nn[yi.children]},Kt=0;Kt<an.length;Kt+=1)It();return Un}var it=function(an,di,yi,Li,On){return Re.useMemo(function(){var Un=On||function(It){var Kt=Li?It.slice(-1):It,Ye=" / ";return Kt.every(function(nn){return["string","number"].includes((0,se.Z)(nn))})?Kt.join(Ye):Kt.reduce(function(nn,xn,Nt){var at=Re.isValidElement(xn)?Re.cloneElement(xn,{key:Nt}):xn;return Nt===0?[at]:[].concat((0,ge.Z)(nn),[Ye,at])},[])};return an.map(function(It){var Kt,Ye,nn=Ut(It,di,yi),xn=Un(nn.map(function(at){var cn,Nn=at.option,kn=at.value;return(cn=Nn==null?void 0:Nn[yi.label])!==null&&cn!==void 0?cn:kn}),nn.map(function(at){var cn=at.option;return cn})),Nt=xt(It);return{label:xn,value:Nt,key:Nt,valueCells:It,disabled:(Kt=nn[nn.length-1])===null||Kt===void 0||(Ye=Kt.option)===null||Ye===void 0?void 0:Ye.disabled}})},[an,di,yi,On,Li])},_e=pe(71430),Wt=function(an,di){var yi=Re.useRef({options:null,info:null}),Li=Re.useCallback(function(){return yi.current.options!==an&&(yi.current.options=an,yi.current.info=(0,_e.I8)(an,{fieldNames:di,initWrapper:function(Un){return(0,ye.Z)((0,ye.Z)({},Un),{},{pathKeyEntities:{}})},processEntity:function(Un,It){var Kt=Un.nodes.map(function(Ye){return Ye[di.value]}).join(Ge);It.pathKeyEntities[Kt]=Un,Un.key=Kt}})),yi.current.info.pathKeyEntities},[di,an]);return Li},Dn=function(an,di){return Re.useCallback(function(yi){var Li=[],On=[];return yi.forEach(function(Un){var It=Ut(Un,an,di);It.every(function(Kt){return Kt.option})?On.push(Un):Li.push(Un)}),[On,Li]},[an,di])},Bn=pe(48736);function $t(an){return Re.useMemo(function(){if(!an)return[!1,{}];var di={matchInputWidth:!0,limit:50};return an&&(0,se.Z)(an)==="object"&&(di=(0,ye.Z)((0,ye.Z)({},di),an)),di.limit<=0&&delete di.limit,[!0,di]},[an])}var ln=Re.memo(function(an){var di=an.children;return di},function(an,di){return!di.open}),Tn=ln;function ei(an){var di,yi=an.prefixCls,Li=an.checked,On=an.halfChecked,Un=an.disabled,It=an.onClick,Kt=an.disableCheckbox,Ye=Re.useContext(ce),nn=Ye.checkable,xn=typeof nn!="boolean"?nn:null;return Re.createElement("span",{className:Me()("".concat(yi),(di={},(0,fe.Z)(di,"".concat(yi,"-checked"),Li),(0,fe.Z)(di,"".concat(yi,"-indeterminate"),!Li&&On),(0,fe.Z)(di,"".concat(yi,"-disabled"),Un||Kt),di)),onClick:It},xn)}var Ln="__cascader_fix_label__";function Yn(an){var di=an.prefixCls,yi=an.multiple,Li=an.options,On=an.activeValue,Un=an.prevValuePath,It=an.onToggleOpen,Kt=an.onSelect,Ye=an.onActive,nn=an.checkedSet,xn=an.halfCheckedSet,Nt=an.loadingKeys,at=an.isSelectable,cn=an.searchValue,Nn="".concat(di,"-menu"),kn="".concat(di,"-menu-item"),Jn=Re.useContext(ce),St=Jn.fieldNames,An=Jn.changeOnSelect,qn=Jn.expandTrigger,Si=Jn.expandIcon,rn=Jn.loadingIcon,bn=Jn.dropdownMenuColumnStyle,Ft=qn==="hover",Pn=Re.useMemo(function(){return Li.map(function(yn){var Sn,Gn=yn.disabled,Zn=yn.disableCheckbox,Qn=yn[be],ii=(Sn=yn[Ln])!==null&&Sn!==void 0?Sn:yn[St.label],ji=yn[St.value],pn=Ot(yn,St),Ji=Qn?Qn.map(function(Bi){return Bi[St.value]}):[].concat((0,ge.Z)(Un),[ji]),Ki=xt(Ji),Gi=Nt.includes(Ki),gn=nn.has(Ki),oi=xn.has(Ki);return{disabled:Gn,label:ii,value:ji,isLeaf:pn,isLoading:Gi,checked:gn,halfChecked:oi,option:yn,disableCheckbox:Zn,fullPath:Ji,fullPathKey:Ki}})},[Li,nn,St,xn,Nt,Un]);return Re.createElement("ul",{className:Nn,role:"menu"},Pn.map(function(yn){var Sn,Gn=yn.disabled,Zn=yn.label,Qn=yn.value,ii=yn.isLeaf,ji=yn.isLoading,pn=yn.checked,Ji=yn.halfChecked,Ki=yn.option,Gi=yn.fullPath,gn=yn.fullPathKey,oi=yn.disableCheckbox,Bi=function(){if(!(Gn||cn)){var pr=(0,ge.Z)(Gi);Ft&&ii&&pr.pop(),Ye(pr)}},$i=function(){at(Ki)&&Kt(Gi,ii)},Ti;return typeof Ki.title=="string"?Ti=Ki.title:typeof Zn=="string"&&(Ti=Zn),Re.createElement("li",{key:gn,className:Me()(kn,(Sn={},(0,fe.Z)(Sn,"".concat(kn,"-expand"),!ii),(0,fe.Z)(Sn,"".concat(kn,"-active"),On===Qn||On===gn),(0,fe.Z)(Sn,"".concat(kn,"-disabled"),Gn),(0,fe.Z)(Sn,"".concat(kn,"-loading"),ji),Sn)),style:bn,role:"menuitemcheckbox",title:Ti,"aria-checked":pn,"data-path-key":gn,onClick:function(){Bi(),!oi&&(!yi||ii)&&$i()},onDoubleClick:function(){An&&It(!1)},onMouseEnter:function(){Ft&&Bi()},onMouseDown:function(pr){pr.preventDefault()}},yi&&Re.createElement(ei,{prefixCls:"".concat(di,"-checkbox"),checked:pn,halfChecked:Ji,disabled:Gn||oi,disableCheckbox:oi,onClick:function(pr){oi||(pr.stopPropagation(),$i())}}),Re.createElement("div",{className:"".concat(kn,"-content")},Zn),!ji&&Si&&!ii&&Re.createElement("div",{className:"".concat(kn,"-expand-icon")},Si),ji&&rn&&Re.createElement("div",{className:"".concat(kn,"-loading-icon")},rn))}))}var zt=function(){var an=(0,lt.lk)(),di=an.multiple,yi=an.open,Li=Re.useContext(ce),On=Li.values,Un=Re.useState([]),It=(0,bt.Z)(Un,2),Kt=It[0],Ye=It[1];return Re.useEffect(function(){if(yi&&!di){var nn=On[0];Ye(nn||[])}},[yi]),[Kt,Ye]},wn=pe(10228),$n=function(an,di,yi,Li,On,Un){var It=(0,lt.lk)(),Kt=It.direction,Ye=It.searchValue,nn=It.toggleOpen,xn=It.open,Nt=Kt==="rtl",at=Re.useMemo(function(){for(var bn=-1,Ft=di,Pn=[],yn=[],Sn=Li.length,Gn=Ht(di,yi),Zn=function(Ki){var Gi=Ft.findIndex(function(gn,oi){return(Gn[oi]?xt(Gn[oi]):gn[yi.value])===Li[Ki]});if(Gi===-1)return"break";bn=Gi,Pn.push(bn),yn.push(Li[Ki]),Ft=Ft[bn][yi.children]},Qn=0;Qn<Sn&&Ft;Qn+=1){var ii=Zn(Qn);if(ii==="break")break}for(var ji=di,pn=0;pn<Pn.length-1;pn+=1)ji=ji[Pn[pn]][yi.children];return[yn,bn,ji,Gn]},[Li,yi,di]),cn=(0,bt.Z)(at,4),Nn=cn[0],kn=cn[1],Jn=cn[2],St=cn[3],An=function(Ft){On(Ft)},qn=function(Ft){var Pn=Jn.length,yn=kn;yn===-1&&Ft<0&&(yn=Pn);for(var Sn=0;Sn<Pn;Sn+=1){yn=(yn+Ft+Pn)%Pn;var Gn=Jn[yn];if(Gn&&!Gn.disabled){var Zn=Nn.slice(0,-1).concat(St[yn]?xt(St[yn]):Gn[yi.value]);An(Zn);return}}},Si=function(){if(Nn.length>1){var Ft=Nn.slice(0,-1);An(Ft)}else nn(!1)},rn=function(){var Ft,Pn=((Ft=Jn[kn])===null||Ft===void 0?void 0:Ft[yi.children])||[],yn=Pn.find(function(Gn){return!Gn.disabled});if(yn){var Sn=[].concat((0,ge.Z)(Nn),[yn[yi.value]]);An(Sn)}};Re.useImperativeHandle(an,function(){return{onKeyDown:function(Ft){var Pn=Ft.which;switch(Pn){case wn.Z.UP:case wn.Z.DOWN:{var yn=0;Pn===wn.Z.UP?yn=-1:Pn===wn.Z.DOWN&&(yn=1),yn!==0&&qn(yn);break}case wn.Z.LEFT:{if(Ye)break;Nt?rn():Si();break}case wn.Z.RIGHT:{if(Ye)break;Nt?Si():rn();break}case wn.Z.BACKSPACE:{Ye||Si();break}case wn.Z.ENTER:{if(Nn.length){var Sn=Jn[kn],Gn=(Sn==null?void 0:Sn[be])||[];Gn.length?Un(Gn.map(function(Zn){return Zn[yi.value]}),Gn[Gn.length-1]):Un(Nn,Jn[kn])}break}case wn.Z.ESC:nn(!1),xn&&Ft.stopPropagation()}},onKeyUp:function(){}}})},Yt=Re.forwardRef(function(an,di){var yi,Li,On,Un,It=(0,lt.lk)(),Kt=It.prefixCls,Ye=It.multiple,nn=It.searchValue,xn=It.toggleOpen,Nt=It.notFoundContent,at=It.direction,cn=It.open,Nn=Re.useRef(),kn=at==="rtl",Jn=Re.useContext(ce),St=Jn.options,An=Jn.values,qn=Jn.halfValues,Si=Jn.fieldNames,rn=Jn.changeOnSelect,bn=Jn.onSelect,Ft=Jn.searchOptions,Pn=Jn.dropdownPrefixCls,yn=Jn.loadData,Sn=Jn.expandTrigger,Gn=Pn||Kt,Zn=Re.useState([]),Qn=(0,bt.Z)(Zn,2),ii=Qn[0],ji=Qn[1],pn=function(br){if(!(!yn||nn)){var mo=Ut(br,St,Si),Jr=mo.map(function(qi){var Rr=qi.option;return Rr}),ur=Jr[Jr.length-1];if(ur&&!Ot(ur,Si)){var er=xt(br);ji(function(qi){return[].concat((0,ge.Z)(qi),[er])}),yn(Jr)}}};Re.useEffect(function(){ii.length&&ii.forEach(function(no){var br=Et(no),mo=Ut(br,St,Si,!0).map(function(ur){var er=ur.option;return er}),Jr=mo[mo.length-1];(!Jr||Jr[Si.children]||Ot(Jr,Si))&&ji(function(ur){return ur.filter(function(er){return er!==no})})})},[St,ii,Si]);var Ji=Re.useMemo(function(){return new Set(He(An))},[An]),Ki=Re.useMemo(function(){return new Set(He(qn))},[qn]),Gi=zt(),gn=(0,bt.Z)(Gi,2),oi=gn[0],Bi=gn[1],$i=function(br){Bi(br),pn(br)},Ti=function(br){var mo=br.disabled,Jr=Ot(br,Si);return!mo&&(Jr||rn||Ye)},Qi=function(br,mo){var Jr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;bn(br),!Ye&&(mo||rn&&(Sn==="hover"||Jr))&&xn(!1)},pr=Re.useMemo(function(){return nn?Ft:St},[nn,Ft,St]),hr=Re.useMemo(function(){for(var no=[{options:pr}],br=pr,mo=Ht(br,Si),Jr=function(){var Rr=oi[ur],Ii=br.find(function(Qr,lo){return(mo[lo]?xt(mo[lo]):Qr[Si.value])===Rr}),Qe=Ii==null?void 0:Ii[Si.children];if(!(Qe!=null&&Qe.length))return"break";br=Qe,no.push({options:Qe})},ur=0;ur<oi.length;ur+=1){var er=Jr();if(er==="break")break}return no},[pr,oi,Si]),Vi=function(br,mo){Ti(mo)&&Qi(br,Ot(mo,Si),!0)};$n(di,pr,Si,oi,$i,Vi),Re.useEffect(function(){for(var no=0;no<oi.length;no+=1){var br,mo=oi.slice(0,no+1),Jr=xt(mo),ur=(br=Nn.current)===null||br===void 0?void 0:br.querySelector('li[data-path-key="'.concat(Jr.replace(/\\{0,2}"/g,'\\"'),'"]'));ur&>(ur)}},[oi]);var xr=!((yi=hr[0])!==null&&yi!==void 0&&(Li=yi.options)!==null&&Li!==void 0&&Li.length),Rn=[(On={},(0,fe.Z)(On,Si.value,"__EMPTY__"),(0,fe.Z)(On,Ln,Nt),(0,fe.Z)(On,"disabled",!0),On)],Br=(0,ye.Z)((0,ye.Z)({},an),{},{multiple:!xr&&Ye,onSelect:Qi,onActive:$i,onToggleOpen:xn,checkedSet:Ji,halfCheckedSet:Ki,loadingKeys:ii,isSelectable:Ti}),_n=xr?[{options:Rn}]:hr,Or=_n.map(function(no,br){var mo=oi.slice(0,br),Jr=oi[br];return Re.createElement(Yn,(0,kt.Z)({key:br},Br,{searchValue:nn,prefixCls:Gn,options:no.options,prevValuePath:mo,activeValue:Jr}))});return Re.createElement(Tn,{open:cn},Re.createElement("div",{className:Me()("".concat(Gn,"-menus"),(Un={},(0,fe.Z)(Un,"".concat(Gn,"-menu-empty"),xr),(0,fe.Z)(Un,"".concat(Gn,"-rtl"),kn),Un)),ref:Nn},Or))}),tn=Yt;function Gt(an){var di=an.onPopupVisibleChange,yi=an.popupVisible,Li=an.popupClassName,On=an.popupPlacement;warning(!di,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(yi===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(Li===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(On===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Tt(an,di){if(an){var yi=function Li(On){for(var Un=0;Un<On.length;Un++){var It=On[Un];if(It[di==null?void 0:di.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(It[di==null?void 0:di.children])&&Li(It[di==null?void 0:di.children]))return!0}};yi(an)}}var ot=null,Ze=["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 At(an){return Array.isArray(an)&&Array.isArray(an[0])}function Dt(an){return an?At(an)?an:(an.length===0?[]:[an]).map(function(di){return Array.isArray(di)?di:[di]}):[]}var rt=Re.forwardRef(function(an,di){var yi=an.id,Li=an.prefixCls,On=Li===void 0?"rc-cascader":Li,Un=an.fieldNames,It=an.defaultValue,Kt=an.value,Ye=an.changeOnSelect,nn=an.onChange,xn=an.displayRender,Nt=an.checkable,at=an.autoClearSearchValue,cn=at===void 0?!0:at,Nn=an.searchValue,kn=an.onSearch,Jn=an.showSearch,St=an.expandTrigger,An=an.options,qn=an.dropdownPrefixCls,Si=an.loadData,rn=an.popupVisible,bn=an.open,Ft=an.popupClassName,Pn=an.dropdownClassName,yn=an.dropdownMenuColumnStyle,Sn=an.popupPlacement,Gn=an.placement,Zn=an.onDropdownVisibleChange,Qn=an.onPopupVisibleChange,ii=an.expandIcon,ji=ii===void 0?">":ii,pn=an.loadingIcon,Ji=an.children,Ki=an.dropdownMatchSelectWidth,Gi=Ki===void 0?!1:Ki,gn=an.showCheckedStrategy,oi=gn===void 0?nt:gn,Bi=(0,Ue.Z)(an,Ze),$i=(0,yt.ZP)(yi),Ti=!!Nt,Qi=(0,ne.Z)(It,{value:Kt,postState:Dt}),pr=(0,bt.Z)(Qi,2),hr=pr[0],Vi=pr[1],xr=Re.useMemo(function(){return tt(Un)},[JSON.stringify(Un)]),Rn=Re.useMemo(function(){return An||[]},[An]),Br=Wt(Rn,xr),_n=Re.useCallback(function(Ho){var Ao=Br();return Ho.map(function(_o){var ta=Ao[_o].nodes;return ta.map(function(Ea){return Ea[xr.value]})})},[Br,xr]),Or=(0,ne.Z)("",{value:Nn,postState:function(Ao){return Ao||""}}),no=(0,bt.Z)(Or,2),br=no[0],mo=no[1],Jr=function(Ao,_o){mo(Ao),_o.source!=="blur"&&kn&&kn(Ao)},ur=$t(Jn),er=(0,bt.Z)(ur,2),qi=er[0],Rr=er[1],Ii=ze(br,Rn,xr,qn||On,Rr,Ye),Qe=Dn(Rn,xr),Qr=Re.useMemo(function(){var Ho=Qe(hr),Ao=(0,bt.Z)(Ho,2),_o=Ao[0],ta=Ao[1];if(!Ti||!hr.length)return[_o,[],ta];var Ea=He(_o),Mt=Br(),Pi=(0,jt.S)(Ea,!0,Mt),_t=Pi.checkedKeys,Xi=Pi.halfCheckedKeys;return[_n(_t),_n(Xi),ta]},[Ti,hr,Br,_n,Qe]),lo=(0,bt.Z)(Qr,3),jr=lo[0],vo=lo[1],po=lo[2],Lr=Re.useMemo(function(){var Ho=He(jr),Ao=Xt(Ho,Br,oi);return[].concat((0,ge.Z)(po),(0,ge.Z)(_n(Ao)))},[jr,Br,_n,po,oi]),Fr=it(Lr,Rn,xr,Ti,xn),uo=(0,Ae.Z)(function(Ho){if(Vi(Ho),nn){var Ao=Dt(Ho),_o=Ao.map(function(Mt){return Ut(Mt,Rn,xr).map(function(Pi){return Pi.option})}),ta=Ti?Ao:Ao[0],Ea=Ti?_o:_o[0];nn(ta,Ea)}}),qr=(0,Ae.Z)(function(Ho){if((!Ti||cn)&&mo(""),!Ti)uo(Ho);else{var Ao=xt(Ho),_o=He(jr),ta=He(vo),Ea=_o.includes(Ao),Mt=po.some(function(or){return xt(or)===Ao}),Pi=jr,_t=po;if(Mt&&!Ea)_t=po.filter(function(or){return xt(or)!==Ao});else{var Xi=Ea?_o.filter(function(or){return or!==Ao}):[].concat((0,ge.Z)(_o),[Ao]),wi=Br(),Sr;if(Ea){var Zi=(0,jt.S)(Xi,{checked:!1,halfCheckedKeys:ta},wi);Sr=Zi.checkedKeys}else{var Ci=(0,jt.S)(Xi,!0,wi);Sr=Ci.checkedKeys}var nr=Xt(Sr,Br,oi);Pi=_n(nr)}uo([].concat((0,ge.Z)(_t),(0,ge.Z)(Pi)))}}),zo=function(Ao,_o){if(_o.type==="clear"){uo([]);return}var ta=_o.values[0],Ea=ta.valueCells;qr(Ea)},Ro=bn!==void 0?bn:rn,Mr=Pn||Ft,Nr=Gn||Sn,pi=function(Ao){Zn==null||Zn(Ao),Qn==null||Qn(Ao)},Tr=Re.useMemo(function(){return{options:Rn,fieldNames:xr,values:jr,halfValues:vo,changeOnSelect:Ye,onSelect:qr,checkable:Nt,searchOptions:Ii,dropdownPrefixCls:qn,loadData:Si,expandTrigger:St,expandIcon:ji,loadingIcon:pn,dropdownMenuColumnStyle:yn}},[Rn,xr,jr,vo,Ye,qr,Nt,Ii,qn,Si,St,ji,pn,yn]),Bo=!(br?Ii:Rn).length,aa=br&&Rr.matchInputWidth||Bo?{}:{minWidth:"auto"};return Re.createElement(ce.Provider,{value:Tr},Re.createElement(lt.Ac,(0,kt.Z)({},Bi,{ref:di,id:$i,prefixCls:On,autoClearSearchValue:cn,dropdownMatchSelectWidth:Gi,dropdownStyle:aa,displayValues:Fr,onDisplayValuesChange:zo,mode:Ti?"multiple":void 0,searchValue:br,onSearch:Jr,showSearch:qi,OptionList:tn,emptyOptions:Bo,open:Ro,dropdownClassName:Mr,placement:Nr,onDropdownVisibleChange:pi,getRawInputElement:function(){return Ji}})))});rt.SHOW_PARENT=nt,rt.SHOW_CHILD=Je;var et=rt,Oe=et,Pe=pe(2738),ve=pe(62892),Fe=pe(53487),We=pe(19080),Ne=pe(36355),ft=pe(93891),sn=pe(1684),un=pe(19716),Pt=pe(32441),qt=pe(14154),Mn=pe(58582),hn=pe(84443),fn=pe(66339),ui=pe(33234),gi=pe(98447),fi=pe(17313),bi=pe(74207),_i=pe(83116);const rr=an=>{const{prefixCls:di,componentCls:yi,antCls:Li}=an,On=`${yi}-menu-item`,Un=`
|
|
|
&${On}-expand ${On}-expand-icon,
|
|
|
${On}-loading-icon
|
|
|
`;return[{[yi]:{width:an.controlWidth}},{[`${yi}-dropdown`]:[(0,gi.C2)(`${di}-checkbox`,an),{[`&${Li}-select-dropdown`]:{padding:0}},{[yi]:{"&-checkbox":{top:0,marginInlineEnd:an.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${yi}-menu-empty`]:{[`${yi}-menu`]:{width:"100%",height:"auto",[On]:{color:an.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:an.controlItemWidth,height:an.dropdownHeight,margin:0,padding:an.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${an.lineWidth}px ${an.lineType} ${an.colorSplit}`},"&-item":Object.assign(Object.assign({},fi.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:an.optionPadding,lineHeight:an.lineHeight,cursor:"pointer",transition:`all ${an.motionDurationMid}`,borderRadius:an.borderRadiusSM,"&:hover":{background:an.controlItemBgHover},"&-disabled":{color:an.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[Un]:{color:an.colorTextDisabled}},[`&-active:not(${On}-disabled)`]:{"&, &:hover":{fontWeight:an.optionSelectedFontWeight,backgroundColor:an.optionSelectedBg}},"&-content":{flex:"auto"},[Un]:{marginInlineStart:an.paddingXXS,color:an.colorTextDescription,fontSize:an.fontSizeIcon},"&-keyword":{color:an.colorHighlight}})}}}]},{[`${yi}-dropdown-rtl`]:{direction:"rtl"}},(0,bi.c)(an)]};var Wi=(0,_i.Z)("Cascader",an=>[rr(an)],an=>{const di=Math.round((an.controlHeight-an.fontSize*an.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:an.controlItemBgActive,optionSelectedFontWeight:an.fontWeightStrong,optionPadding:`${di}px ${an.paddingSM}px`,menuPadding:an.paddingXXS}}),vr=function(an,di){var yi={};for(var Li in an)Object.prototype.hasOwnProperty.call(an,Li)&&di.indexOf(Li)<0&&(yi[Li]=an[Li]);if(an!=null&&typeof Object.getOwnPropertySymbols=="function")for(var On=0,Li=Object.getOwnPropertySymbols(an);On<Li.length;On++)di.indexOf(Li[On])<0&&Object.prototype.propertyIsEnumerable.call(an,Li[On])&&(yi[Li[On]]=an[Li[On]]);return yi};const{SHOW_CHILD:fr,SHOW_PARENT:zi}=Oe;function Er(an,di,yi){const Li=an.toLowerCase().split(di).reduce((It,Kt,Ye)=>Ye===0?[Kt]:[].concat((0,ge.Z)(It),[di,Kt]),[]),On=[];let Un=0;return Li.forEach((It,Kt)=>{const Ye=Un+It.length;let nn=an.slice(Un,Ye);Un=Ye,Kt%2===1&&(nn=Re.createElement("span",{className:`${yi}-menu-item-keyword`,key:`separator-${Kt}`},nn)),On.push(nn)}),On}const Kn=(an,di,yi,Li)=>{const On=[],Un=an.toLowerCase();return di.forEach((It,Kt)=>{Kt!==0&&On.push(" / ");let Ye=It[Li.label];const nn=typeof Ye;(nn==="string"||nn==="number")&&(Ye=Er(String(Ye),Un,yi)),On.push(Ye)}),On},Le=Re.forwardRef((an,di)=>{const{prefixCls:yi,size:Li,disabled:On,className:Un,rootClassName:It,multiple:Kt,bordered:Ye=!0,transitionName:nn,choiceTransitionName:xn="",popupClassName:Nt,dropdownClassName:at,expandIcon:cn,placement:Nn,showSearch:kn,allowClear:Jn=!0,notFoundContent:St,direction:An,getPopupContainer:qn,status:Si,showArrow:rn,builtinPlacements:bn,style:Ft}=an,Pn=vr(an,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),yn=(0,Pe.Z)(Pn,["suffixIcon"]),{getPopupContainer:Sn,getPrefixCls:Gn,renderEmpty:Zn,direction:Qn,popupOverflow:ii,cascader:ji}=Re.useContext(Ne.E_),pn=An||Qn,Ji=pn==="rtl",{status:Ki,hasFeedback:Gi,isFormItemInput:gn,feedbackIcon:oi}=Re.useContext(Pt.aM),Bi=(0,We.F)(Ki,Si),$i=St||(Zn==null?void 0:Zn("Cascader"))||Re.createElement(ft.Z,{componentName:"Cascader"}),Ti=Gn(),Qi=Gn("select",yi),pr=Gn("cascader",yi),[hr,Vi]=(0,qt.Z)(Qi),[xr]=Wi(pr),{compactSize:Rn,compactItemClassnames:Br}=(0,ui.ri)(Qi,An),_n=Me()(Nt||at,`${pr}-dropdown`,{[`${pr}-dropdown-rtl`]:pn==="rtl"},It,Vi),Or=Re.useMemo(()=>{if(!kn)return kn;let po={render:Kn};return typeof kn=="object"&&(po=Object.assign(Object.assign({},po),kn)),po},[kn]),no=(0,un.Z)(po=>{var Lr;return(Lr=Li!=null?Li:Rn)!==null&&Lr!==void 0?Lr:po}),br=Re.useContext(sn.Z),mo=On!=null?On:br;let Jr=cn;cn||(Jr=Ji?Re.createElement(Ve.Z,null):Re.createElement(Ke.Z,null));const ur=Re.createElement("span",{className:`${Qi}-menu-item-loading-icon`},Re.createElement(dt.Z,{spin:!0})),er=Re.useMemo(()=>Kt?Re.createElement("span",{className:`${pr}-checkbox-inner`}):!1,[Kt]),qi=(0,hn.Z)(an.suffixIcon,rn),{suffixIcon:Rr,removeIcon:Ii,clearIcon:Qe}=(0,fn.Z)(Object.assign(Object.assign({},an),{hasFeedback:Gi,feedbackIcon:oi,showSuffixIcon:qi,multiple:Kt,prefixCls:Qi,componentName:"Cascader"})),Qr=Re.useMemo(()=>Nn!==void 0?Nn:Ji?"bottomRight":"bottomLeft",[Nn,Ji]),lo=(0,Mn.Z)(bn,ii),jr=Jn===!0?{clearIcon:Qe}:Jn,vo=Re.createElement(Oe,Object.assign({prefixCls:Qi,className:Me()(!yi&&pr,{[`${Qi}-lg`]:no==="large",[`${Qi}-sm`]:no==="small",[`${Qi}-rtl`]:Ji,[`${Qi}-borderless`]:!Ye,[`${Qi}-in-form-item`]:gn},(0,We.Z)(Qi,Bi,Gi),Br,ji==null?void 0:ji.className,Un,It,Vi),disabled:mo,style:Object.assign(Object.assign({},ji==null?void 0:ji.style),Ft)},yn,{builtinPlacements:lo,direction:pn,placement:Qr,notFoundContent:$i,allowClear:jr,showSearch:Or,expandIcon:Jr,suffixIcon:Rr,removeIcon:Ii,loadingIcon:ur,checkable:er,dropdownClassName:_n,dropdownPrefixCls:yi||pr,choiceTransitionName:(0,ve.m)(Ti,"",xn),transitionName:(0,ve.m)(Ti,"slide-up",nn),getPopupContainer:qn||Sn,ref:di}));return xr(hr(vo))}),Ei=(0,Fe.Z)(Le);Le.SHOW_PARENT=zi,Le.SHOW_CHILD=fr,Le._InternalPanelDoNotUseOrYouWillBeFired=Ei;var Ri=Le},24905:function(Vn,Cn,pe){"use strict";pe.d(Cn,{default:function(){return ze}});var ge=pe(92310),Re=pe.n(ge),Ve=pe(5630),dt=pe(59301),Ke=pe(36355),st=pe(1684),Me=pe(32441),bt=dt.createContext(null),Ue=pe(98447),lt=pe(14088),yt=pe(4572),jt=function(Ge,nt){var Je={};for(var xt in Ge)Object.prototype.hasOwnProperty.call(Ge,xt)&&nt.indexOf(xt)<0&&(Je[xt]=Ge[xt]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,xt=Object.getOwnPropertySymbols(Ge);He<xt.length;He++)nt.indexOf(xt[He])<0&&Object.prototype.propertyIsEnumerable.call(Ge,xt[He])&&(Je[xt[He]]=Ge[xt[He]]);return Je};const Ae=(Ge,nt)=>{var Je;const{prefixCls:xt,className:He,rootClassName:Et,children:tt,indeterminate:Ot=!1,style:gt,onMouseEnter:Ht,onMouseLeave:Xt,skipGroup:Ut=!1,disabled:it}=Ge,_e=jt(Ge,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Wt,direction:Dn,checkbox:Bn}=dt.useContext(Ke.E_),$t=dt.useContext(bt),{isFormItemInput:ln}=dt.useContext(Me.aM),Tn=dt.useContext(st.Z),ei=(Je=($t==null?void 0:$t.disabled)||it)!==null&&Je!==void 0?Je:Tn,Ln=dt.useRef(_e.value);dt.useEffect(()=>{$t==null||$t.registerValue(_e.value)},[]),dt.useEffect(()=>{if(!Ut)return _e.value!==Ln.current&&($t==null||$t.cancelValue(Ln.current),$t==null||$t.registerValue(_e.value),Ln.current=_e.value),()=>$t==null?void 0:$t.cancelValue(_e.value)},[_e.value]);const Yn=Wt("checkbox",xt),[zt,wn]=(0,Ue.ZP)(Yn),$n=Object.assign({},_e);$t&&!Ut&&($n.onChange=function(){_e.onChange&&_e.onChange.apply(_e,arguments),$t.toggleOption&&$t.toggleOption({label:tt,value:_e.value})},$n.name=$t.name,$n.checked=$t.value.includes(_e.value));const Yt=Re()(`${Yn}-wrapper`,{[`${Yn}-rtl`]:Dn==="rtl",[`${Yn}-wrapper-checked`]:$n.checked,[`${Yn}-wrapper-disabled`]:ei,[`${Yn}-wrapper-in-form-item`]:ln},Bn==null?void 0:Bn.className,He,Et,wn),tn=Re()({[`${Yn}-indeterminate`]:Ot},yt.A,wn),Gt=Ot?"mixed":void 0;return zt(dt.createElement(lt.Z,{component:"Checkbox",disabled:ei},dt.createElement("label",{className:Yt,style:Object.assign(Object.assign({},Bn==null?void 0:Bn.style),gt),onMouseEnter:Ht,onMouseLeave:Xt},dt.createElement(Ve.Z,Object.assign({"aria-checked":Gt},$n,{prefixCls:Yn,className:tn,disabled:ei,ref:nt})),tt!==void 0&&dt.createElement("span",null,tt))))};var ee=dt.forwardRef(Ae),ce=pe(19127),se=pe(2738),fe=function(Ge,nt){var Je={};for(var xt in Ge)Object.prototype.hasOwnProperty.call(Ge,xt)&&nt.indexOf(xt)<0&&(Je[xt]=Ge[xt]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,xt=Object.getOwnPropertySymbols(Ge);He<xt.length;He++)nt.indexOf(xt[He])<0&&Object.prototype.propertyIsEnumerable.call(Ge,xt[He])&&(Je[xt[He]]=Ge[xt[He]]);return Je};const ye=(Ge,nt)=>{const{defaultValue:Je,children:xt,options:He=[],prefixCls:Et,className:tt,rootClassName:Ot,style:gt,onChange:Ht}=Ge,Xt=fe(Ge,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Ut,direction:it}=dt.useContext(Ke.E_),[_e,Wt]=dt.useState(Xt.value||Je||[]),[Dn,Bn]=dt.useState([]);dt.useEffect(()=>{"value"in Xt&&Wt(Xt.value||[])},[Xt.value]);const $t=dt.useMemo(()=>He.map(Tt=>typeof Tt=="string"||typeof Tt=="number"?{label:Tt,value:Tt}:Tt),[He]),ln=Tt=>{Bn(ot=>ot.filter(Ze=>Ze!==Tt))},Tn=Tt=>{Bn(ot=>[].concat((0,ce.Z)(ot),[Tt]))},ei=Tt=>{const ot=_e.indexOf(Tt.value),Ze=(0,ce.Z)(_e);ot===-1?Ze.push(Tt.value):Ze.splice(ot,1),"value"in Xt||Wt(Ze),Ht==null||Ht(Ze.filter(At=>Dn.includes(At)).sort((At,Dt)=>{const rt=$t.findIndex(Oe=>Oe.value===At),et=$t.findIndex(Oe=>Oe.value===Dt);return rt-et}))},Ln=Ut("checkbox",Et),Yn=`${Ln}-group`,[zt,wn]=(0,Ue.ZP)(Ln),$n=(0,se.Z)(Xt,["value","disabled"]),Yt=He.length?$t.map(Tt=>dt.createElement(ee,{prefixCls:Ln,key:Tt.value.toString(),disabled:"disabled"in Tt?Tt.disabled:Xt.disabled,value:Tt.value,checked:_e.includes(Tt.value),onChange:Tt.onChange,className:`${Yn}-item`,style:Tt.style,title:Tt.title},Tt.label)):xt,tn={toggleOption:ei,value:_e,disabled:Xt.disabled,name:Xt.name,registerValue:Tn,cancelValue:ln},Gt=Re()(Yn,{[`${Yn}-rtl`]:it==="rtl"},tt,Ot,wn);return zt(dt.createElement("div",Object.assign({className:Gt,style:gt},$n,{ref:nt}),dt.createElement(bt.Provider,{value:tn},Yt)))},be=dt.forwardRef(ye);var Te=dt.memo(be);const Be=ee;Be.Group=Te,Be.__ANT_CHECKBOX=!0;var ze=Be},98447:function(Vn,Cn,pe){"use strict";pe.d(Cn,{C2:function(){return Ke}});var ge=pe(17313),Re=pe(37613),Ve=pe(83116);const dt=st=>{const{checkboxCls:Me}=st,kt=`${Me}-wrapper`;return[{[`${Me}-group`]:Object.assign(Object.assign({},(0,ge.Wf)(st)),{display:"inline-flex",flexWrap:"wrap",columnGap:st.marginXS,[`> ${st.antCls}-row`]:{flex:1}}),[kt]:Object.assign(Object.assign({},(0,ge.Wf)(st)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${kt}`]:{marginInlineStart:0},[`&${kt}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Me]:Object.assign(Object.assign({},(0,ge.Wf)(st)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:st.borderRadiusSM,alignSelf:"center",[`${Me}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Me}-inner`]:Object.assign({},(0,ge.oN)(st))},[`${Me}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:st.checkboxSize,height:st.checkboxSize,direction:"ltr",backgroundColor:st.colorBgContainer,border:`${st.lineWidth}px ${st.lineType} ${st.colorBorder}`,borderRadius:st.borderRadiusSM,borderCollapse:"separate",transition:`all ${st.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:st.checkboxSize/14*5,height:st.checkboxSize/14*8,border:`${st.lineWidthBold}px solid ${st.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${st.motionDurationFast} ${st.motionEaseInBack}, opacity ${st.motionDurationFast}`}},"& + span":{paddingInlineStart:st.paddingXS,paddingInlineEnd:st.paddingXS}})},{[`
|
|
|
${kt}:not(${kt}-disabled),
|
|
|
${Me}:not(${Me}-disabled)
|
|
|
`]:{[`&:hover ${Me}-inner`]:{borderColor:st.colorPrimary}},[`${kt}:not(${kt}-disabled)`]:{[`&:hover ${Me}-checked:not(${Me}-disabled) ${Me}-inner`]:{backgroundColor:st.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Me}-checked:not(${Me}-disabled):after`]:{borderColor:st.colorPrimaryHover}}},{[`${Me}-checked`]:{[`${Me}-inner`]:{backgroundColor:st.colorPrimary,borderColor:st.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${st.motionDurationMid} ${st.motionEaseOutBack} ${st.motionDurationFast}`}}},[`
|
|
|
${kt}-checked:not(${kt}-disabled),
|
|
|
${Me}-checked:not(${Me}-disabled)
|
|
|
`]:{[`&:hover ${Me}-inner`]:{backgroundColor:st.colorPrimaryHover,borderColor:"transparent"}}},{[Me]:{"&-indeterminate":{[`${Me}-inner`]:{backgroundColor:st.colorBgContainer,borderColor:st.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:st.fontSizeLG/2,height:st.fontSizeLG/2,backgroundColor:st.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${kt}-disabled`]:{cursor:"not-allowed"},[`${Me}-disabled`]:{[`&, ${Me}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Me}-inner`]:{background:st.colorBgContainerDisabled,borderColor:st.colorBorder,"&:after":{borderColor:st.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:st.colorTextDisabled},[`&${Me}-indeterminate ${Me}-inner::after`]:{background:st.colorTextDisabled}}}]};function Ke(st,Me){const kt=(0,Re.TS)(Me,{checkboxCls:`.${st}`,checkboxSize:Me.controlInteractiveSize});return[dt(kt)]}Cn.ZP=(0,Ve.Z)("Checkbox",(st,Me)=>{let{prefixCls:kt}=Me;return[Ke(kt,st)]})},36381:function(Vn,Cn,pe){"use strict";pe.d(Cn,{default:function(){return $n}});var ge=pe(38819),Re=pe(92310),Ve=pe.n(Re),dt=pe(96663),Ke=pe(19127),st=pe(72071),Me=pe(20135),kt=pe(18929),bt=pe(48736),Ue=pe(59301),lt=pe(6620),yt=pe(11592),jt=pe(90493),Ae=pe(77900),ne=pe(10228),ee=Ue.forwardRef(function(Yt,tn){var Gt=Yt.prefixCls,Tt=Yt.forceRender,ot=Yt.className,Ze=Yt.style,At=Yt.children,Dt=Yt.isActive,rt=Yt.role,et=Ue.useState(Dt||Tt),Oe=(0,st.Z)(et,2),Pe=Oe[0],ve=Oe[1];return Ue.useEffect(function(){(Tt||Dt)&&ve(!0)},[Tt,Dt]),Pe?Ue.createElement("div",{ref:tn,className:Ve()("".concat(Gt,"-content"),(0,jt.Z)((0,jt.Z)({},"".concat(Gt,"-content-active"),Dt),"".concat(Gt,"-content-inactive"),!Dt),ot),style:Ze,role:rt},Ue.createElement("div",{className:"".concat(Gt,"-content-box")},At)):null});ee.displayName="PanelContent";var ce=ee,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],fe=Ue.forwardRef(function(Yt,tn){var Gt=Yt.showArrow,Tt=Gt===void 0?!0:Gt,ot=Yt.headerClass,Ze=Yt.isActive,At=Yt.onItemClick,Dt=Yt.forceRender,rt=Yt.className,et=Yt.prefixCls,Oe=Yt.collapsible,Pe=Yt.accordion,ve=Yt.panelKey,Fe=Yt.extra,We=Yt.header,Ne=Yt.expandIcon,ft=Yt.openMotion,sn=Yt.destroyInactivePanel,un=Yt.children,Pt=(0,lt.Z)(Yt,se),qt=Oe==="disabled",Mn=Oe==="header",hn=Oe==="icon",fn=Fe!=null&&typeof Fe!="boolean",ui=function(){At==null||At(ve)},gi=function(vr){(vr.key==="Enter"||vr.keyCode===ne.Z.ENTER||vr.which===ne.Z.ENTER)&&ui()},fi=typeof Ne=="function"?Ne(Yt):Ue.createElement("i",{className:"arrow"});fi&&(fi=Ue.createElement("div",{className:"".concat(et,"-expand-icon"),onClick:["header","icon"].includes(Oe)?ui:void 0},fi));var bi=Ve()((0,jt.Z)((0,jt.Z)((0,jt.Z)({},"".concat(et,"-item"),!0),"".concat(et,"-item-active"),Ze),"".concat(et,"-item-disabled"),qt),rt),_i=Ve()(ot,(0,jt.Z)((0,jt.Z)((0,jt.Z)({},"".concat(et,"-header"),!0),"".concat(et,"-header-collapsible-only"),Mn),"".concat(et,"-icon-collapsible-only"),hn)),rr={className:_i,"aria-expanded":Ze,"aria-disabled":qt,onKeyDown:gi};return!Mn&&!hn&&(rr.onClick=ui,rr.role=Pe?"tab":"button",rr.tabIndex=qt?-1:0),Ue.createElement("div",(0,dt.Z)({},Pt,{ref:tn,className:bi}),Ue.createElement("div",rr,Tt&&fi,Ue.createElement("span",{className:"".concat(et,"-header-text"),onClick:Oe==="header"?ui:void 0},We),fn&&Ue.createElement("div",{className:"".concat(et,"-extra")},Fe)),Ue.createElement(Ae.default,(0,dt.Z)({visible:Ze,leavedClassName:"".concat(et,"-content-hidden")},ft,{forceRender:Dt,removeOnLeave:sn}),function(Wi,vr){var fr=Wi.className,zi=Wi.style;return Ue.createElement(ce,{ref:vr,prefixCls:et,className:fr,style:zi,isActive:Ze,forceRender:Dt,role:Pe?"tabpanel":void 0},un)}))}),ye=fe,be=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Te=function(tn,Gt){var Tt=Gt.prefixCls,ot=Gt.accordion,Ze=Gt.collapsible,At=Gt.destroyInactivePanel,Dt=Gt.onItemClick,rt=Gt.activeKey,et=Gt.openMotion,Oe=Gt.expandIcon;return tn.map(function(Pe,ve){var Fe=Pe.children,We=Pe.label,Ne=Pe.key,ft=Pe.collapsible,sn=Pe.onItemClick,un=Pe.destroyInactivePanel,Pt=(0,lt.Z)(Pe,be),qt=String(Ne!=null?Ne:ve),Mn=ft!=null?ft:Ze,hn=un!=null?un:At,fn=function(fi){Mn!=="disabled"&&(Dt(fi),sn==null||sn(fi))},ui=!1;return ot?ui=rt[0]===qt:ui=rt.indexOf(qt)>-1,Ue.createElement(ye,(0,dt.Z)({},Pt,{prefixCls:Tt,key:qt,panelKey:qt,isActive:ui,accordion:ot,openMotion:et,expandIcon:Oe,header:We,collapsible:Mn,onItemClick:fn,destroyInactivePanel:hn}),Fe)})},Be=function(tn,Gt,Tt){if(!tn)return null;var ot=Tt.prefixCls,Ze=Tt.accordion,At=Tt.collapsible,Dt=Tt.destroyInactivePanel,rt=Tt.onItemClick,et=Tt.activeKey,Oe=Tt.openMotion,Pe=Tt.expandIcon,ve=tn.key||String(Gt),Fe=tn.props,We=Fe.header,Ne=Fe.headerClass,ft=Fe.destroyInactivePanel,sn=Fe.collapsible,un=Fe.onItemClick,Pt=!1;Ze?Pt=et[0]===ve:Pt=et.indexOf(ve)>-1;var qt=sn!=null?sn:At,Mn=function(ui){qt!=="disabled"&&(rt(ui),un==null||un(ui))},hn={key:ve,panelKey:ve,header:We,headerClass:Ne,isActive:Pt,prefixCls:ot,destroyInactivePanel:ft!=null?ft:Dt,openMotion:Oe,accordion:Ze,children:tn.props.children,onItemClick:Mn,expandIcon:Pe,collapsible:qt};return typeof tn.type=="string"?tn:(Object.keys(hn).forEach(function(fn){typeof hn[fn]=="undefined"&&delete hn[fn]}),Ue.cloneElement(tn,hn))};function ze(Yt,tn,Gt){return Array.isArray(Yt)?Te(Yt,Gt):(0,yt.Z)(tn).map(function(Tt,ot){return Be(Tt,ot,Gt)})}var Ge=ze,nt=pe(26112);function Je(Yt){var tn=Yt;if(!Array.isArray(tn)){var Gt=(0,Me.Z)(tn);tn=Gt==="number"||Gt==="string"?[tn]:[]}return tn.map(function(Tt){return String(Tt)})}var xt=Ue.forwardRef(function(Yt,tn){var Gt=Yt.prefixCls,Tt=Gt===void 0?"rc-collapse":Gt,ot=Yt.destroyInactivePanel,Ze=ot===void 0?!1:ot,At=Yt.style,Dt=Yt.accordion,rt=Yt.className,et=Yt.children,Oe=Yt.collapsible,Pe=Yt.openMotion,ve=Yt.expandIcon,Fe=Yt.activeKey,We=Yt.defaultActiveKey,Ne=Yt.onChange,ft=Yt.items,sn=Ve()(Tt,rt),un=(0,kt.Z)([],{value:Fe,onChange:function(gi){return Ne==null?void 0:Ne(gi)},defaultValue:We,postState:Je}),Pt=(0,st.Z)(un,2),qt=Pt[0],Mn=Pt[1],hn=function(gi){return Mn(function(){if(Dt)return qt[0]===gi?[]:[gi];var fi=qt.indexOf(gi),bi=fi>-1;return bi?qt.filter(function(_i){return _i!==gi}):[].concat((0,Ke.Z)(qt),[gi])})};(0,bt.ZP)(!et,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var fn=Ge(ft,et,{prefixCls:Tt,accordion:Dt,openMotion:Pe,expandIcon:ve,collapsible:Oe,destroyInactivePanel:Ze,onItemClick:hn,activeKey:qt});return Ue.createElement("div",(0,dt.Z)({ref:tn,className:sn,style:At,role:Dt?"tablist":void 0},(0,nt.Z)(Yt,{aria:!0,data:!0})),fn)}),He=Object.assign(xt,{Panel:ye}),Et=He,tt=He.Panel,Ot=pe(2738),gt=pe(62892),Ht=pe(92343),Xt=pe(36355),Ut=pe(19716),_e=Ue.forwardRef((Yt,tn)=>{const{getPrefixCls:Gt}=Ue.useContext(Xt.E_),{prefixCls:Tt,className:ot,showArrow:Ze=!0}=Yt,At=Gt("collapse",Tt),Dt=Ve()({[`${At}-no-arrow`]:!Ze},ot);return Ue.createElement(Et.Panel,Object.assign({ref:tn},Yt,{prefixCls:At,className:Dt}))}),Wt=pe(17313),Dn=pe(8378),Bn=pe(83116),$t=pe(37613);const ln=Yt=>{const{componentCls:tn,contentBg:Gt,padding:Tt,headerBg:ot,headerPadding:Ze,collapseHeaderPaddingSM:At,collapseHeaderPaddingLG:Dt,collapsePanelBorderRadius:rt,lineWidth:et,lineType:Oe,colorBorder:Pe,colorText:ve,colorTextHeading:Fe,colorTextDisabled:We,fontSize:Ne,fontSizeLG:ft,lineHeight:sn,marginSM:un,paddingSM:Pt,paddingLG:qt,paddingXS:Mn,motionDurationSlow:hn,fontSizeIcon:fn,contentPadding:ui}=Yt,gi=`${et}px ${Oe} ${Pe}`;return{[tn]:Object.assign(Object.assign({},(0,Wt.Wf)(Yt)),{backgroundColor:ot,border:gi,borderBottom:0,borderRadius:`${rt}px`,"&-rtl":{direction:"rtl"},[`& > ${tn}-item`]:{borderBottom:gi,"&:last-child":{[`
|
|
|
&,
|
|
|
& > ${tn}-header`]:{borderRadius:`0 0 ${rt}px ${rt}px`}},[`> ${tn}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:Ze,color:Fe,lineHeight:sn,cursor:"pointer",transition:`all ${hn}, visibility 0s`,[`> ${tn}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${tn}-expand-icon`]:{height:Ne*sn,display:"flex",alignItems:"center",paddingInlineEnd:un},[`${tn}-arrow`]:Object.assign(Object.assign({},(0,Wt.Ro)()),{fontSize:fn,svg:{transition:`transform ${hn}`}}),[`${tn}-header-text`]:{marginInlineEnd:"auto"}},[`${tn}-header-collapsible-only`]:{cursor:"default",[`${tn}-header-text`]:{flex:"none",cursor:"pointer"}},[`${tn}-icon-collapsible-only`]:{cursor:"default",[`${tn}-expand-icon`]:{cursor:"pointer"}}},[`${tn}-content`]:{color:ve,backgroundColor:Gt,borderTop:gi,[`& > ${tn}-content-box`]:{padding:ui},"&-hidden":{display:"none"}},"&-small":{[`> ${tn}-item`]:{[`> ${tn}-header`]:{padding:At,paddingInlineStart:Mn,[`> ${tn}-expand-icon`]:{marginInlineStart:Pt-Mn}},[`> ${tn}-content > ${tn}-content-box`]:{padding:Pt}}},"&-large":{[`> ${tn}-item`]:{fontSize:ft,[`> ${tn}-header`]:{padding:Dt,paddingInlineStart:Tt,[`> ${tn}-expand-icon`]:{height:ft*sn,marginInlineStart:qt-Tt}},[`> ${tn}-content > ${tn}-content-box`]:{padding:qt}}},[`${tn}-item:last-child`]:{[`> ${tn}-content`]:{borderRadius:`0 0 ${rt}px ${rt}px`}},[`& ${tn}-item-disabled > ${tn}-header`]:{"\n &,\n & > .arrow\n ":{color:We,cursor:"not-allowed"}},[`&${tn}-icon-position-end`]:{[`& > ${tn}-item`]:{[`> ${tn}-header`]:{[`${tn}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:un}}}}})}},Tn=Yt=>{const{componentCls:tn}=Yt,Gt=`> ${tn}-item > ${tn}-header ${tn}-arrow svg`;return{[`${tn}-rtl`]:{[Gt]:{transform:"rotate(180deg)"}}}},ei=Yt=>{const{componentCls:tn,headerBg:Gt,paddingXXS:Tt,colorBorder:ot}=Yt;return{[`${tn}-borderless`]:{backgroundColor:Gt,border:0,[`> ${tn}-item`]:{borderBottom:`1px solid ${ot}`},[`
|
|
|
> ${tn}-item:last-child,
|
|
|
> ${tn}-item:last-child ${tn}-header
|
|
|
`]:{borderRadius:0},[`> ${tn}-item:last-child`]:{borderBottom:0},[`> ${tn}-item > ${tn}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${tn}-item > ${tn}-content > ${tn}-content-box`]:{paddingTop:Tt}}}},Ln=Yt=>{const{componentCls:tn,paddingSM:Gt}=Yt;return{[`${tn}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${tn}-item`]:{borderBottom:0,[`> ${tn}-content`]:{backgroundColor:"transparent",border:0,[`> ${tn}-content-box`]:{paddingBlock:Gt}}}}}};var Yn=(0,Bn.Z)("Collapse",Yt=>{const tn=(0,$t.TS)(Yt,{collapseHeaderPaddingSM:`${Yt.paddingXS}px ${Yt.paddingSM}px`,collapseHeaderPaddingLG:`${Yt.padding}px ${Yt.paddingLG}px`,collapsePanelBorderRadius:Yt.borderRadiusLG});return[ln(tn),ei(tn),Ln(tn),Tn(tn),(0,Dn.Z)(tn)]},Yt=>({headerPadding:`${Yt.paddingSM}px ${Yt.padding}px`,headerBg:Yt.colorFillAlter,contentPadding:`${Yt.padding}px 16px`,contentBg:Yt.colorBgContainer})),wn=Object.assign(Ue.forwardRef((Yt,tn)=>{const{getPrefixCls:Gt,direction:Tt,collapse:ot}=Ue.useContext(Xt.E_),{prefixCls:Ze,className:At,rootClassName:Dt,style:rt,bordered:et=!0,ghost:Oe,size:Pe,expandIconPosition:ve="start",children:Fe,expandIcon:We}=Yt,Ne=(0,Ut.Z)(gi=>{var fi;return(fi=Pe!=null?Pe:gi)!==null&&fi!==void 0?fi:"middle"}),ft=Gt("collapse",Ze),sn=Gt(),[un,Pt]=Yn(ft),qt=Ue.useMemo(()=>ve==="left"?"start":ve==="right"?"end":ve,[ve]),Mn=function(){let gi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const fi=We?We(gi):Ue.createElement(ge.Z,{rotate:gi.isActive?90:void 0});return(0,Ht.Tm)(fi,()=>({className:Ve()(fi.props.className,`${ft}-arrow`)}))},hn=Ve()(`${ft}-icon-position-${qt}`,{[`${ft}-borderless`]:!et,[`${ft}-rtl`]:Tt==="rtl",[`${ft}-ghost`]:!!Oe,[`${ft}-${Ne}`]:Ne!=="middle"},ot==null?void 0:ot.className,At,Dt,Pt),fn=Object.assign(Object.assign({},(0,gt.Z)(sn)),{motionAppear:!1,leavedClassName:`${ft}-content-hidden`}),ui=Ue.useMemo(()=>Fe?(0,yt.Z)(Fe).map((gi,fi)=>{var bi,_i;if(!((bi=gi.props)===null||bi===void 0)&&bi.disabled){const rr=(_i=gi.key)!==null&&_i!==void 0?_i:String(fi),{disabled:Wi,collapsible:vr}=gi.props,fr=Object.assign(Object.assign({},(0,Ot.Z)(gi.props,["disabled"])),{key:rr,collapsible:vr!=null?vr:Wi?"disabled":void 0});return(0,Ht.Tm)(gi,fr)}return gi}):null,[Fe]);return un(Ue.createElement(Et,Object.assign({ref:tn,openMotion:fn},(0,Ot.Z)(Yt,["rootClassName"]),{expandIcon:Mn,prefixCls:ft,className:hn,style:Object.assign(Object.assign({},ot==null?void 0:ot.style),rt)}),ui))}),{Panel:_e}),$n=wn},93891:function(Vn,Cn,pe){"use strict";var ge=pe(59301),Re=pe(36355),Ve=pe(64165);const dt=Ke=>{const{componentName:st}=Ke,{getPrefixCls:Me}=(0,ge.useContext)(Re.E_),kt=Me("empty");switch(st){case"Table":case"List":return ge.createElement(Ve.Z,{image:Ve.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ge.createElement(Ve.Z,{image:Ve.Z.PRESENTED_IMAGE_SIMPLE,className:`${kt}-small`});default:return ge.createElement(Ve.Z,null)}};Cn.Z=dt},43428:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return zt}});var ge=pe(92310),Re=pe.n(ge),Ve=pe(44127),dt=pe(72071),Ke=pe(43403),st=pe(34280),Me=pe(59301),kt=Me.createContext(null),bt=Me.createContext({}),Ue=kt,lt=pe(90493),yt=pe(96663),jt=pe(77900),Ae=pe(10228),ne=pe(26112),ee=pe(70425),ce=function($n){var Yt=$n.prefixCls,tn=$n.className,Gt=$n.style,Tt=$n.children,ot=$n.containerRef,Ze=$n.id,At=$n.onMouseEnter,Dt=$n.onMouseOver,rt=$n.onMouseLeave,et=$n.onClick,Oe=$n.onKeyDown,Pe=$n.onKeyUp,ve={onMouseEnter:At,onMouseOver:Dt,onMouseLeave:rt,onClick:et,onKeyDown:Oe,onKeyUp:Pe},Fe=Me.useContext(bt),We=Fe.panel,Ne=(0,ee.useComposeRef)(We,ot);return Me.createElement(Me.Fragment,null,Me.createElement("div",(0,yt.Z)({id:Ze,className:Re()("".concat(Yt,"-content"),tn),style:(0,Ve.Z)({},Gt),"aria-modal":"true",role:"dialog",ref:Ne},ve),Tt))},se=ce,fe=pe(48736);function ye(wn){return typeof wn=="string"&&String(Number(wn))===wn?((0,fe.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(wn)):wn}function be(wn){warning(!("wrapperClassName"in wn),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!wn.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Te={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Be(wn,$n){var Yt,tn,Gt,Tt,ot=wn.prefixCls,Ze=wn.open,At=wn.placement,Dt=wn.inline,rt=wn.push,et=wn.forceRender,Oe=wn.autoFocus,Pe=wn.keyboard,ve=wn.rootClassName,Fe=wn.rootStyle,We=wn.zIndex,Ne=wn.className,ft=wn.id,sn=wn.style,un=wn.motion,Pt=wn.width,qt=wn.height,Mn=wn.children,hn=wn.contentWrapperStyle,fn=wn.mask,ui=wn.maskClosable,gi=wn.maskMotion,fi=wn.maskClassName,bi=wn.maskStyle,_i=wn.afterOpenChange,rr=wn.onClose,Wi=wn.onMouseEnter,vr=wn.onMouseOver,fr=wn.onMouseLeave,zi=wn.onClick,Er=wn.onKeyDown,Kn=wn.onKeyUp,Le=Me.useRef(),Ei=Me.useRef(),Ri=Me.useRef();Me.useImperativeHandle($n,function(){return Le.current});var an=function(Jn){var St=Jn.keyCode,An=Jn.shiftKey;switch(St){case Ae.Z.TAB:{if(St===Ae.Z.TAB){if(!An&&document.activeElement===Ri.current){var qn;(qn=Ei.current)===null||qn===void 0||qn.focus({preventScroll:!0})}else if(An&&document.activeElement===Ei.current){var Si;(Si=Ri.current)===null||Si===void 0||Si.focus({preventScroll:!0})}}break}case Ae.Z.ESC:{rr&&Pe&&(Jn.stopPropagation(),rr(Jn));break}}};Me.useEffect(function(){if(Ze&&Oe){var kn;(kn=Le.current)===null||kn===void 0||kn.focus({preventScroll:!0})}},[Ze]);var di=Me.useState(!1),yi=(0,dt.Z)(di,2),Li=yi[0],On=yi[1],Un=Me.useContext(Ue),It;rt===!1?It={distance:0}:rt===!0?It={}:It=rt||{};var Kt=(Yt=(tn=(Gt=It)===null||Gt===void 0?void 0:Gt.distance)!==null&&tn!==void 0?tn:Un==null?void 0:Un.pushDistance)!==null&&Yt!==void 0?Yt:180,Ye=Me.useMemo(function(){return{pushDistance:Kt,push:function(){On(!0)},pull:function(){On(!1)}}},[Kt]);Me.useEffect(function(){if(Ze){var kn;Un==null||(kn=Un.push)===null||kn===void 0||kn.call(Un)}else{var Jn;Un==null||(Jn=Un.pull)===null||Jn===void 0||Jn.call(Un)}},[Ze]),Me.useEffect(function(){return function(){var kn;Un==null||(kn=Un.pull)===null||kn===void 0||kn.call(Un)}},[]);var nn=fn&&Me.createElement(jt.default,(0,yt.Z)({key:"mask"},gi,{visible:Ze}),function(kn,Jn){var St=kn.className,An=kn.style;return Me.createElement("div",{className:Re()("".concat(ot,"-mask"),St,fi),style:(0,Ve.Z)((0,Ve.Z)({},An),bi),onClick:ui&&Ze?rr:void 0,ref:Jn})}),xn=typeof un=="function"?un(At):un,Nt={};if(Li&&Kt)switch(At){case"top":Nt.transform="translateY(".concat(Kt,"px)");break;case"bottom":Nt.transform="translateY(".concat(-Kt,"px)");break;case"left":Nt.transform="translateX(".concat(Kt,"px)");break;default:Nt.transform="translateX(".concat(-Kt,"px)");break}At==="left"||At==="right"?Nt.width=ye(Pt):Nt.height=ye(qt);var at={onMouseEnter:Wi,onMouseOver:vr,onMouseLeave:fr,onClick:zi,onKeyDown:Er,onKeyUp:Kn},cn=Me.createElement(jt.default,(0,yt.Z)({key:"panel"},xn,{visible:Ze,forceRender:et,onVisibleChanged:function(Jn){_i==null||_i(Jn)},removeOnLeave:!1,leavedClassName:"".concat(ot,"-content-wrapper-hidden")}),function(kn,Jn){var St=kn.className,An=kn.style;return Me.createElement("div",(0,yt.Z)({className:Re()("".concat(ot,"-content-wrapper"),St),style:(0,Ve.Z)((0,Ve.Z)((0,Ve.Z)({},Nt),An),hn)},(0,ne.Z)(wn,{data:!0})),Me.createElement(se,(0,yt.Z)({id:ft,containerRef:Jn,prefixCls:ot,className:Ne,style:sn},at),Mn))}),Nn=(0,Ve.Z)({},Fe);return We&&(Nn.zIndex=We),Me.createElement(Ue.Provider,{value:Ye},Me.createElement("div",{className:Re()(ot,"".concat(ot,"-").concat(At),ve,(Tt={},(0,lt.Z)(Tt,"".concat(ot,"-open"),Ze),(0,lt.Z)(Tt,"".concat(ot,"-inline"),Dt),Tt)),style:Nn,tabIndex:-1,ref:Le,onKeyDown:an},nn,Me.createElement("div",{tabIndex:0,ref:Ei,style:Te,"aria-hidden":"true","data-sentinel":"start"}),cn,Me.createElement("div",{tabIndex:0,ref:Ri,style:Te,"aria-hidden":"true","data-sentinel":"end"})))}var ze=Me.forwardRef(Be),Ge=ze,nt=function($n){var Yt=$n.open,tn=Yt===void 0?!1:Yt,Gt=$n.prefixCls,Tt=Gt===void 0?"rc-drawer":Gt,ot=$n.placement,Ze=ot===void 0?"right":ot,At=$n.autoFocus,Dt=At===void 0?!0:At,rt=$n.keyboard,et=rt===void 0?!0:rt,Oe=$n.width,Pe=Oe===void 0?378:Oe,ve=$n.mask,Fe=ve===void 0?!0:ve,We=$n.maskClosable,Ne=We===void 0?!0:We,ft=$n.getContainer,sn=$n.forceRender,un=$n.afterOpenChange,Pt=$n.destroyOnClose,qt=$n.onMouseEnter,Mn=$n.onMouseOver,hn=$n.onMouseLeave,fn=$n.onClick,ui=$n.onKeyDown,gi=$n.onKeyUp,fi=$n.panelRef,bi=Me.useState(!1),_i=(0,dt.Z)(bi,2),rr=_i[0],Wi=_i[1],vr=Me.useState(!1),fr=(0,dt.Z)(vr,2),zi=fr[0],Er=fr[1];(0,st.Z)(function(){Er(!0)},[]);var Kn=zi?tn:!1,Le=Me.useRef(),Ei=Me.useRef();(0,st.Z)(function(){Kn&&(Ei.current=document.activeElement)},[Kn]);var Ri=function(On){var Un;if(Wi(On),un==null||un(On),!On&&Ei.current&&!((Un=Le.current)!==null&&Un!==void 0&&Un.contains(Ei.current))){var It;(It=Ei.current)===null||It===void 0||It.focus({preventScroll:!0})}},an=Me.useMemo(function(){return{panel:fi}},[fi]);if(!sn&&!rr&&!Kn&&Pt)return null;var di={onMouseEnter:qt,onMouseOver:Mn,onMouseLeave:hn,onClick:fn,onKeyDown:ui,onKeyUp:gi},yi=(0,Ve.Z)((0,Ve.Z)({},$n),{},{open:Kn,prefixCls:Tt,placement:Ze,autoFocus:Dt,keyboard:et,width:Pe,mask:Fe,maskClosable:Ne,inline:ft===!1,afterOpenChange:Ri,ref:Le},di);return Me.createElement(bt.Provider,{value:an},Me.createElement(Ke.Z,{open:Kn||sn||rr,autoDestroy:!1,getContainer:ft,autoLock:Fe&&(Kn||rr)},Me.createElement(Ge,yi)))},Je=nt,xt=Je,He=pe(62892),Et=pe(36355),tt=pe(32441),Ot=pe(47729),Ht=wn=>{const{prefixCls:$n,title:Yt,footer:tn,extra:Gt,closeIcon:Tt,closable:ot,onClose:Ze,headerStyle:At,drawerStyle:Dt,bodyStyle:rt,footerStyle:et,children:Oe}=wn,Pe=Me.useCallback(ft=>Me.createElement("button",{type:"button",onClick:Ze,"aria-label":"Close",className:`${$n}-close`},ft),[Ze]),[ve,Fe]=(0,Ot.Z)(ot,Tt,Pe,void 0,!0),We=Me.useMemo(()=>!Yt&&!ve?null:Me.createElement("div",{style:At,className:Re()(`${$n}-header`,{[`${$n}-header-close-only`]:ve&&!Yt&&!Gt})},Me.createElement("div",{className:`${$n}-header-title`},Fe,Yt&&Me.createElement("div",{className:`${$n}-title`},Yt)),Gt&&Me.createElement("div",{className:`${$n}-extra`},Gt)),[ve,Fe,Gt,At,$n,Yt]),Ne=Me.useMemo(()=>{if(!tn)return null;const ft=`${$n}-footer`;return Me.createElement("div",{className:ft,style:et},tn)},[tn,et,$n]);return Me.createElement("div",{className:`${$n}-wrapper-body`,style:Dt},We,Me.createElement("div",{className:`${$n}-body`,style:rt},Oe),Ne)},Xt=pe(33234),Ut=pe(83116),it=pe(37613),Wt=wn=>{const{componentCls:$n,motionDurationSlow:Yt}=wn,tn={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${Yt}`}}};return{[$n]:{[`${$n}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${Yt}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${$n}-panel-motion`]:{"&-left":[tn,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[tn,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[tn,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[tn,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Dn=wn=>{const{componentCls:$n,zIndexPopup:Yt,colorBgMask:tn,colorBgElevated:Gt,motionDurationSlow:Tt,motionDurationMid:ot,padding:Ze,paddingLG:At,fontSizeLG:Dt,lineHeightLG:rt,lineWidth:et,lineType:Oe,colorSplit:Pe,marginSM:ve,colorIcon:Fe,colorIconHover:We,colorText:Ne,fontWeightStrong:ft,footerPaddingBlock:sn,footerPaddingInline:un}=wn,Pt=`${$n}-content-wrapper`;return{[$n]:{position:"fixed",inset:0,zIndex:Yt,pointerEvents:"none","&-pure":{position:"relative",background:Gt,[`&${$n}-left`]:{boxShadow:wn.boxShadowDrawerLeft},[`&${$n}-right`]:{boxShadow:wn.boxShadowDrawerRight},[`&${$n}-top`]:{boxShadow:wn.boxShadowDrawerUp},[`&${$n}-bottom`]:{boxShadow:wn.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${$n}-mask`]:{position:"absolute",inset:0,zIndex:Yt,background:tn,pointerEvents:"auto"},[Pt]:{position:"absolute",zIndex:Yt,maxWidth:"100vw",transition:`all ${Tt}`,"&-hidden":{display:"none"}},[`&-left > ${Pt}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:wn.boxShadowDrawerLeft},[`&-right > ${Pt}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:wn.boxShadowDrawerRight},[`&-top > ${Pt}`]:{top:0,insetInline:0,boxShadow:wn.boxShadowDrawerUp},[`&-bottom > ${Pt}`]:{bottom:0,insetInline:0,boxShadow:wn.boxShadowDrawerDown},[`${$n}-content`]:{width:"100%",height:"100%",overflow:"auto",background:Gt,pointerEvents:"auto"},[`${$n}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${$n}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Ze}px ${At}px`,fontSize:Dt,lineHeight:rt,borderBottom:`${et}px ${Oe} ${Pe}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${$n}-extra`]:{flex:"none"},[`${$n}-close`]:{display:"inline-block",marginInlineEnd:ve,color:Fe,fontWeight:ft,fontSize:Dt,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${ot}`,textRendering:"auto","&:focus, &:hover":{color:We,textDecoration:"none"}},[`${$n}-title`]:{flex:1,margin:0,color:Ne,fontWeight:wn.fontWeightStrong,fontSize:Dt,lineHeight:rt},[`${$n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:At,overflow:"auto"},[`${$n}-footer`]:{flexShrink:0,padding:`${sn}px ${un}px`,borderTop:`${et}px ${Oe} ${Pe}`},"&-rtl":{direction:"rtl"}}}};var Bn=(0,Ut.Z)("Drawer",wn=>{const $n=(0,it.TS)(wn,{});return[Dn($n),Wt($n)]},wn=>({zIndexPopup:wn.zIndexPopupBase,footerPaddingBlock:wn.paddingXS,footerPaddingInline:wn.padding})),$t=pe(11575),ln=function(wn,$n){var Yt={};for(var tn in wn)Object.prototype.hasOwnProperty.call(wn,tn)&&$n.indexOf(tn)<0&&(Yt[tn]=wn[tn]);if(wn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,tn=Object.getOwnPropertySymbols(wn);Gt<tn.length;Gt++)$n.indexOf(tn[Gt])<0&&Object.prototype.propertyIsEnumerable.call(wn,tn[Gt])&&(Yt[tn[Gt]]=wn[tn[Gt]]);return Yt};const Tn=null,ei={distance:180},Ln=wn=>{var $n;const{rootClassName:Yt,width:tn,height:Gt,size:Tt="default",mask:ot=!0,push:Ze=ei,open:At,afterOpenChange:Dt,onClose:rt,prefixCls:et,getContainer:Oe,style:Pe,className:ve,visible:Fe,afterVisibleChange:We}=wn,Ne=ln(wn,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:ft,getPrefixCls:sn,direction:un,drawer:Pt}=Me.useContext(Et.E_),qt=sn("drawer",et),[Mn,hn]=Bn(qt),fn=Oe===void 0&&ft?()=>ft(document.body):Oe,ui=Re()({"no-mask":!ot,[`${qt}-rtl`]:un==="rtl"},Yt,hn),gi=Me.useMemo(()=>tn!=null?tn:Tt==="large"?736:378,[tn,Tt]),fi=Me.useMemo(()=>Gt!=null?Gt:Tt==="large"?736:378,[Gt,Tt]),bi={motionName:(0,He.m)(qt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},_i=Wi=>({motionName:(0,He.m)(qt,`panel-motion-${Wi}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),rr=(0,$t.H)();return Mn(Me.createElement(Xt.BR,null,Me.createElement(tt.Ux,{status:!0,override:!0},Me.createElement(xt,Object.assign({prefixCls:qt,onClose:rt,maskMotion:bi,motion:_i},Ne,{open:At!=null?At:Fe,mask:ot,push:Ze,width:gi,height:fi,style:Object.assign(Object.assign({},Pt==null?void 0:Pt.style),Pe),className:Re()(Pt==null?void 0:Pt.className,ve),rootClassName:ui,getContainer:fn,afterOpenChange:Dt!=null?Dt:We,panelRef:rr}),Me.createElement(Ht,Object.assign({prefixCls:qt},Ne,{onClose:rt}))))))},Yn=wn=>{const{prefixCls:$n,style:Yt,className:tn,placement:Gt="right"}=wn,Tt=ln(wn,["prefixCls","style","className","placement"]),{getPrefixCls:ot}=Me.useContext(Et.E_),Ze=ot("drawer",$n),[At,Dt]=Bn(Ze),rt=Re()(Ze,`${Ze}-pure`,`${Ze}-${Gt}`,Dt,tn);return At(Me.createElement("div",{className:rt,style:Yt},Me.createElement(Ht,Object.assign({prefixCls:Ze},Tt))))};Ln._InternalPanelDoNotUseOrYouWillBeFired=Yn;var zt=Ln},91857:function(Vn,Cn,pe){"use strict";var ge=pe(59301),Re=pe(38819),Ve=pe(92310),dt=pe.n(Ve),Ke=pe(31561),st=pe(70425),Me=pe(18929),kt=pe(2738),bt=pe(79676),Ue=pe(53487),lt=pe(92343),yt=pe(36355),jt=pe(20834),Ae=pe(40875),ne=pe(88088),ee=pe(47211);const ce=null,se=Te=>{const{menu:Be,arrow:ze,prefixCls:Ge,children:nt,trigger:Je,disabled:xt,dropdownRender:He,getPopupContainer:Et,overlayClassName:tt,rootClassName:Ot,open:gt,onOpenChange:Ht,visible:Xt,onVisibleChange:Ut,mouseEnterDelay:it=.15,mouseLeaveDelay:_e=.1,autoAdjustOverflow:Wt=!0,placement:Dn="",overlay:Bn,transitionName:$t}=Te,{getPopupContainer:ln,getPrefixCls:Tn,direction:ei}=ge.useContext(yt.E_),Ln=ge.useMemo(()=>{const ve=Tn();return $t!==void 0?$t:Dn.includes("top")?`${ve}-slide-down`:`${ve}-slide-up`},[Tn,Dn,$t]),Yn=ge.useMemo(()=>Dn?Dn.includes("Center")?Dn.slice(0,Dn.indexOf("Center")):Dn:ei==="rtl"?"bottomRight":"bottomLeft",[Dn,ei]),zt=Tn("dropdown",Ge),[wn,$n]=(0,ee.Z)(zt),[,Yt]=(0,ne.Z)(),tn=ge.Children.only(nt),Gt=(0,lt.Tm)(tn,{className:dt()(`${zt}-trigger`,{[`${zt}-rtl`]:ei==="rtl"},tn.props.className),disabled:xt}),Tt=xt?[]:Je;let ot;Tt&&Tt.includes("contextMenu")&&(ot=!0);const[Ze,At]=(0,Me.Z)(!1,{value:gt!=null?gt:Xt}),Dt=(0,st.useEvent)(ve=>{Ht==null||Ht(ve),Ut==null||Ut(ve),At(ve)}),rt=dt()(tt,Ot,$n,{[`${zt}-rtl`]:ei==="rtl"}),et=(0,bt.Z)({arrowPointAtCenter:typeof ze=="object"&&ze.pointAtCenter,autoAdjustOverflow:Wt,offset:Yt.marginXXS,arrowWidth:ze?Yt.sizePopupArrow:0,borderRadius:Yt.borderRadius}),Oe=ge.useCallback(()=>{At(!1)},[]),Pe=()=>{let ve;return Be!=null&&Be.items?ve=ge.createElement(jt.default,Object.assign({},Be)):typeof Bn=="function"?ve=Bn():ve=Bn,He&&(ve=He(ve)),ve=ge.Children.only(typeof ve=="string"?ge.createElement("span",null,ve):ve),ge.createElement(Ae.J,{prefixCls:`${zt}-menu`,expandIcon:ge.createElement("span",{className:`${zt}-menu-submenu-arrow`},ge.createElement(Re.Z,{className:`${zt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Oe,validator:Fe=>{let{mode:We}=Fe}},ve)};return wn(ge.createElement(Ke.Z,Object.assign({alignPoint:ot},(0,kt.Z)(Te,["rootClassName"]),{mouseEnterDelay:it,mouseLeaveDelay:_e,visible:Ze,builtinPlacements:et,arrow:!!ze,overlayClassName:rt,prefixCls:zt,getPopupContainer:Et||ln,transitionName:Ln,trigger:Tt,overlay:Pe,placement:Yn,onVisibleChange:Dt}),Gt))};function fe(Te){return Object.assign(Object.assign({},Te),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ye=(0,Ue.Z)(se,"dropdown",Te=>Te,fe),be=Te=>ge.createElement(ye,Object.assign({},Te),ge.createElement("span",null));se._InternalPanelDoNotUseOrYouWillBeFired=be,Cn.Z=se},38854:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return ne}});var ge=pe(91857),Re=pe(92310),Ve=pe.n(Re),dt=pe(59301),Ke=pe(18785),st=pe(3113),Me=pe(36355),kt=pe(81327),bt=pe(33234),Ue=pe(47211),lt=function(ee,ce){var se={};for(var fe in ee)Object.prototype.hasOwnProperty.call(ee,fe)&&ce.indexOf(fe)<0&&(se[fe]=ee[fe]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ye=0,fe=Object.getOwnPropertySymbols(ee);ye<fe.length;ye++)ce.indexOf(fe[ye])<0&&Object.prototype.propertyIsEnumerable.call(ee,fe[ye])&&(se[fe[ye]]=ee[fe[ye]]);return se};const yt=ee=>{const{getPopupContainer:ce,getPrefixCls:se,direction:fe}=dt.useContext(Me.E_),{prefixCls:ye,type:be="default",danger:Te,disabled:Be,loading:ze,onClick:Ge,htmlType:nt,children:Je,className:xt,menu:He,arrow:Et,autoFocus:tt,overlay:Ot,trigger:gt,align:Ht,open:Xt,onOpenChange:Ut,placement:it,getPopupContainer:_e,href:Wt,icon:Dn=dt.createElement(Ke.Z,null),title:Bn,buttonsRender:$t=Pe=>Pe,mouseEnterDelay:ln,mouseLeaveDelay:Tn,overlayClassName:ei,overlayStyle:Ln,destroyPopupOnHide:Yn,dropdownRender:zt}=ee,wn=lt(ee,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),$n=se("dropdown",ye),Yt=`${$n}-button`,[tn,Gt]=(0,Ue.Z)($n),Tt={menu:He,arrow:Et,autoFocus:tt,align:Ht,disabled:Be,trigger:Be?[]:gt,onOpenChange:Ut,getPopupContainer:_e||ce,mouseEnterDelay:ln,mouseLeaveDelay:Tn,overlayClassName:ei,overlayStyle:Ln,destroyPopupOnHide:Yn,dropdownRender:zt},{compactSize:ot,compactItemClassnames:Ze}=(0,bt.ri)($n,fe),At=Ve()(Yt,Ze,xt,Gt);"overlay"in ee&&(Tt.overlay=Ot),"open"in ee&&(Tt.open=Xt),"placement"in ee?Tt.placement=it:Tt.placement=fe==="rtl"?"bottomLeft":"bottomRight";const Dt=dt.createElement(st.ZP,{type:be,danger:Te,disabled:Be,loading:ze,onClick:Ge,htmlType:nt,href:Wt,title:Bn},Je),rt=dt.createElement(st.ZP,{type:be,danger:Te,icon:Dn}),[et,Oe]=$t([Dt,rt]);return tn(dt.createElement(kt.Z.Compact,Object.assign({className:At,size:ot,block:!0},wn),et,dt.createElement(ge.Z,Object.assign({},Tt),Oe)))};yt.__ANT_BUTTON=!0;var jt=yt;const Ae=ge.Z;Ae.Button=jt;var ne=Ae},47211:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return lt}});var ge=pe(17313),Re=pe(13826),Ve=pe(92899),dt=pe(29878),Ke=pe(19447),st=pe(83116),Me=pe(37613),bt=yt=>{const{componentCls:jt,menuCls:Ae,colorError:ne,colorTextLightSolid:ee}=yt,ce=`${Ae}-item`;return{[`${jt}, ${jt}-menu-submenu`]:{[`${Ae} ${ce}`]:{[`&${ce}-danger:not(${ce}-disabled)`]:{color:ne,"&:hover":{color:ee,backgroundColor:ne}}}}}};const Ue=yt=>{const{componentCls:jt,menuCls:Ae,zIndexPopup:ne,dropdownArrowDistance:ee,sizePopupArrow:ce,antCls:se,iconCls:fe,motionDurationMid:ye,dropdownPaddingVertical:be,fontSize:Te,dropdownEdgeChildPadding:Be,colorTextDisabled:ze,fontSizeIcon:Ge,controlPaddingHorizontal:nt,colorBgElevated:Je}=yt;return[{[jt]:Object.assign(Object.assign({},(0,ge.Wf)(yt)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:ne,display:"block","&::before":{position:"absolute",insetBlock:-ee+ce/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${se}-btn`]:{[`& > ${fe}-down, & > ${se}-btn-icon > ${fe}-down`]:{fontSize:Ge}},[`${jt}-wrap`]:{position:"relative",[`${se}-btn > ${fe}-down`]:{fontSize:Ge},[`${fe}-down::before`]:{transition:`transform ${ye}`}},[`${jt}-wrap-open`]:{[`${fe}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${se}-slide-down-enter${se}-slide-down-enter-active${jt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${jt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${jt}-placement-bottom,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${jt}-placement-bottom,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${jt}-placement-bottomRight,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${jt}-placement-bottomRight`]:{animationName:Re.fJ},[`&${se}-slide-up-enter${se}-slide-up-enter-active${jt}-placement-topLeft,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${jt}-placement-topLeft,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${jt}-placement-top,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${jt}-placement-top,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${jt}-placement-topRight,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${jt}-placement-topRight`]:{animationName:Re.Qt},[`&${se}-slide-down-leave${se}-slide-down-leave-active${jt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${jt}-placement-bottom,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${jt}-placement-bottomRight`]:{animationName:Re.Uw},[`&${se}-slide-up-leave${se}-slide-up-leave-active${jt}-placement-topLeft,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${jt}-placement-top,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${jt}-placement-topRight`]:{animationName:Re.ly}})},(0,Ke.ZP)(yt,{colorBg:Je,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${jt} ${Ae}`]:{position:"relative",margin:0},[`${Ae}-submenu-popup`]:{position:"absolute",zIndex:ne,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${jt}, ${jt}-menu-submenu`]:{[Ae]:Object.assign(Object.assign({padding:Be,listStyleType:"none",backgroundColor:Je,backgroundClip:"padding-box",borderRadius:yt.borderRadiusLG,outline:"none",boxShadow:yt.boxShadowSecondary},(0,ge.Qy)(yt)),{[`${Ae}-item-group-title`]:{padding:`${be}px ${nt}px`,color:yt.colorTextDescription,transition:`all ${ye}`},[`${Ae}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ae}-item-icon`]:{minWidth:Te,marginInlineEnd:yt.marginXS,fontSize:yt.fontSizeSM},[`${Ae}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ye}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Ae}-item, ${Ae}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${be}px ${nt}px`,color:yt.colorText,fontWeight:"normal",fontSize:Te,lineHeight:yt.lineHeight,cursor:"pointer",transition:`all ${ye}`,borderRadius:yt.borderRadiusSM,"&:hover, &-active":{backgroundColor:yt.controlItemBgHover}},(0,ge.Qy)(yt)),{"&-selected":{color:yt.colorPrimary,backgroundColor:yt.controlItemBgActive,"&:hover, &-active":{backgroundColor:yt.controlItemBgActiveHover}},"&-disabled":{color:ze,cursor:"not-allowed","&:hover":{color:ze,backgroundColor:Je,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${yt.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:yt.colorSplit},[`${jt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:yt.paddingXS,[`${jt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:yt.colorTextDescription,fontSize:Ge,fontStyle:"normal"}}}),[`${Ae}-item-group-list`]:{margin:`0 ${yt.marginXS}px`,padding:0,listStyle:"none"},[`${Ae}-submenu-title`]:{paddingInlineEnd:nt+yt.fontSizeSM},[`${Ae}-submenu-vertical`]:{position:"relative"},[`${Ae}-submenu${Ae}-submenu-disabled ${jt}-menu-submenu-title`]:{[`&, ${jt}-menu-submenu-arrow-icon`]:{color:ze,backgroundColor:Je,cursor:"not-allowed"}},[`${Ae}-submenu-selected ${jt}-menu-submenu-title`]:{color:yt.colorPrimary}})}},[(0,Re.oN)(yt,"slide-up"),(0,Re.oN)(yt,"slide-down"),(0,Ve.Fm)(yt,"move-up"),(0,Ve.Fm)(yt,"move-down"),(0,dt._y)(yt,"zoom-big")]]};var lt=(0,st.Z)("Dropdown",(yt,jt)=>{let{rootPrefixCls:Ae}=jt;const{marginXXS:ne,sizePopupArrow:ee,controlHeight:ce,fontSize:se,lineHeight:fe,paddingXXS:ye,componentCls:be,borderRadiusLG:Te}=yt,Be=(ce-se*fe)/2,{dropdownArrowOffset:ze}=(0,Ke.fS)({contentRadius:Te}),Ge=(0,Me.TS)(yt,{menuCls:`${be}-menu`,rootPrefixCls:Ae,dropdownArrowDistance:ee/2+ne,dropdownArrowOffset:ze,dropdownPaddingVertical:Be,dropdownEdgeChildPadding:ye});return[Ue(Ge),bt(Ge)]},yt=>({zIndexPopup:yt.zIndexPopupBase+50}))},64165:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return ye}});var ge=pe(92310),Re=pe.n(ge),Ve=pe(59301),dt=pe(36355),Ke=pe(9763),st=pe(64993),Me=pe(88088),bt=()=>{const[,be]=(0,Me.Z)(),Be=new st.C(be.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Ve.createElement("svg",{style:Be,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Ve.createElement("g",{fill:"none",fillRule:"evenodd"},Ve.createElement("g",{transform:"translate(24 31.67)"},Ve.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Ve.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"}),Ve.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)"}),Ve.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"}),Ve.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"})),Ve.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"}),Ve.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Ve.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Ve.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},lt=()=>{const[,be]=(0,Me.Z)(),{colorFill:Te,colorFillTertiary:Be,colorFillQuaternary:ze,colorBgContainer:Ge}=be,{borderColor:nt,shadowColor:Je,contentColor:xt}=(0,Ve.useMemo)(()=>({borderColor:new st.C(Te).onBackground(Ge).toHexShortString(),shadowColor:new st.C(Be).onBackground(Ge).toHexShortString(),contentColor:new st.C(ze).onBackground(Ge).toHexShortString()}),[Te,Be,ze,Ge]);return Ve.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Ve.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Ve.createElement("ellipse",{fill:Je,cx:"32",cy:"33",rx:"32",ry:"7"}),Ve.createElement("g",{fillRule:"nonzero",stroke:nt},Ve.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"}),Ve.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:xt}))))},yt=pe(83116),jt=pe(37613);const Ae=be=>{const{componentCls:Te,margin:Be,marginXS:ze,marginXL:Ge,fontSize:nt,lineHeight:Je}=be;return{[Te]:{marginInline:ze,fontSize:nt,lineHeight:Je,textAlign:"center",[`${Te}-image`]:{height:be.emptyImgHeight,marginBottom:ze,opacity:be.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Te}-description`]:{color:be.colorText},[`${Te}-footer`]:{marginTop:Be},"&-normal":{marginBlock:Ge,color:be.colorTextDisabled,[`${Te}-description`]:{color:be.colorTextDisabled},[`${Te}-image`]:{height:be.emptyImgHeightMD}},"&-small":{marginBlock:ze,color:be.colorTextDisabled,[`${Te}-image`]:{height:be.emptyImgHeightSM}}}}};var ne=(0,yt.Z)("Empty",be=>{const{componentCls:Te,controlHeightLG:Be}=be,ze=(0,jt.TS)(be,{emptyImgCls:`${Te}-img`,emptyImgHeight:Be*2.5,emptyImgHeightMD:Be,emptyImgHeightSM:Be*.875});return[Ae(ze)]}),ee=function(be,Te){var Be={};for(var ze in be)Object.prototype.hasOwnProperty.call(be,ze)&&Te.indexOf(ze)<0&&(Be[ze]=be[ze]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,ze=Object.getOwnPropertySymbols(be);Ge<ze.length;Ge++)Te.indexOf(ze[Ge])<0&&Object.prototype.propertyIsEnumerable.call(be,ze[Ge])&&(Be[ze[Ge]]=be[ze[Ge]]);return Be};const ce=Ve.createElement(bt,null),se=Ve.createElement(lt,null),fe=be=>{var{className:Te,rootClassName:Be,prefixCls:ze,image:Ge=ce,description:nt,children:Je,imageStyle:xt,style:He}=be,Et=ee(be,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:tt,direction:Ot,empty:gt}=Ve.useContext(dt.E_),Ht=tt("empty",ze),[Xt,Ut]=ne(Ht),[it]=(0,Ke.Z)("Empty"),_e=typeof nt!="undefined"?nt:it==null?void 0:it.description,Wt=typeof _e=="string"?_e:"empty";let Dn=null;return typeof Ge=="string"?Dn=Ve.createElement("img",{alt:Wt,src:Ge}):Dn=Ge,Xt(Ve.createElement("div",Object.assign({className:Re()(Ut,Ht,gt==null?void 0:gt.className,{[`${Ht}-normal`]:Ge===se,[`${Ht}-rtl`]:Ot==="rtl"},Te,Be),style:Object.assign(Object.assign({},gt==null?void 0:gt.style),He)},Et),Ve.createElement("div",{className:`${Ht}-image`,style:xt},Dn),_e&&Ve.createElement("div",{className:`${Ht}-description`},_e),Je&&Ve.createElement("div",{className:`${Ht}-footer`},Je)))};fe.PRESENTED_IMAGE_DEFAULT=ce,fe.PRESENTED_IMAGE_SIMPLE=se;var ye=fe},78241:function(Vn,Cn,pe){"use strict";pe.d(Cn,{default:function(){return Kt}});var ge=pe(19127),Re=pe(92310),Ve=pe.n(Re),dt=pe(77900),Ke=pe(59301),st=pe(62892),Me=pe(32441);function kt(Ye){const[nn,xn]=Ke.useState(Ye);return Ke.useEffect(()=>{const Nt=setTimeout(()=>{xn(Ye)},Ye.length?0:10);return()=>{clearTimeout(Nt)}},[Ye]),nn}var bt=pe(17313),Ue=pe(29878),lt=pe(8378),yt=pe(37613),jt=pe(83116),ne=Ye=>{const{componentCls:nn}=Ye,xn=`${nn}-show-help`,Nt=`${nn}-show-help-item`;return{[xn]:{transition:`opacity ${Ye.motionDurationSlow} ${Ye.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Nt]:{overflow:"hidden",transition:`height ${Ye.motionDurationSlow} ${Ye.motionEaseInOut},
|
|
|
opacity ${Ye.motionDurationSlow} ${Ye.motionEaseInOut},
|
|
|
transform ${Ye.motionDurationSlow} ${Ye.motionEaseInOut} !important`,[`&${Nt}-appear, &${Nt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Nt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Ye=>({legend:{display:"block",width:"100%",marginBottom:Ye.marginLG,padding:0,color:Ye.colorTextDescription,fontSize:Ye.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Ye.lineWidth}px ${Ye.lineType} ${Ye.colorBorder}`},label:{fontSize:Ye.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 ${Ye.controlOutlineWidth}px ${Ye.controlOutline}`},output:{display:"block",paddingTop:15,color:Ye.colorText,fontSize:Ye.fontSize,lineHeight:Ye.lineHeight}}),ce=(Ye,nn)=>{const{formItemCls:xn}=Ye;return{[xn]:{[`${xn}-label > label`]:{height:nn},[`${xn}-control-input`]:{minHeight:nn}}}},se=Ye=>{const{componentCls:nn}=Ye;return{[Ye.componentCls]:Object.assign(Object.assign(Object.assign({},(0,bt.Wf)(Ye)),ee(Ye)),{[`${nn}-text`]:{display:"inline-block",paddingInlineEnd:Ye.paddingSM},"&-small":Object.assign({},ce(Ye,Ye.controlHeightSM)),"&-large":Object.assign({},ce(Ye,Ye.controlHeightLG))})}},fe=Ye=>{const{formItemCls:nn,iconCls:xn,componentCls:Nt,rootPrefixCls:at,labelRequiredMarkColor:cn,labelColor:Nn,labelFontSize:kn,labelHeight:Jn,labelColonMarginInlineStart:St,labelColonMarginInlineEnd:An,itemMarginBottom:qn}=Ye;return{[nn]:Object.assign(Object.assign({},(0,bt.Wf)(Ye)),{marginBottom:qn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${at}-row`]:{display:"none"},"&-has-warning":{[`${nn}-split`]:{color:Ye.colorError}},"&-has-error":{[`${nn}-split`]:{color:Ye.colorWarning}},[`${nn}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Ye.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Jn,color:Nn,fontSize:kn,[`> ${xn}`]:{fontSize:Ye.fontSize,verticalAlign:"top"},[`&${nn}-required:not(${nn}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Ye.marginXXS,color:cn,fontSize:Ye.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Nt}-hide-required-mark &`]:{display:"none"}},[`${nn}-optional`]:{display:"inline-block",marginInlineStart:Ye.marginXXS,color:Ye.colorTextDescription,[`${Nt}-hide-required-mark &`]:{display:"none"}},[`${nn}-tooltip`]:{color:Ye.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ye.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:St,marginInlineEnd:An},[`&${nn}-no-colon::after`]:{content:'"\\a0"'}}},[`${nn}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${at}-col-'"]):not([class*="' ${at}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ye.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[nn]:{"&-explain, &-extra":{clear:"both",color:Ye.colorTextDescription,fontSize:Ye.fontSize,lineHeight:Ye.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ye.controlHeightSM,transition:`color ${Ye.motionDurationMid} ${Ye.motionEaseOut}`},"&-explain":{"&-error":{color:Ye.colorError},"&-warning":{color:Ye.colorWarning}}},[`&-with-help ${nn}-explain`]:{height:"auto",opacity:1},[`${nn}-feedback-icon`]:{fontSize:Ye.fontSize,textAlign:"center",visibility:"visible",animationName:Ue.kr,animationDuration:Ye.motionDurationMid,animationTimingFunction:Ye.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ye.colorSuccess},"&-error":{color:Ye.colorError},"&-warning":{color:Ye.colorWarning},"&-validating":{color:Ye.colorPrimary}}})}},ye=Ye=>{const{componentCls:nn,formItemCls:xn}=Ye;return{[`${nn}-horizontal`]:{[`${xn}-label`]:{flexGrow:0},[`${xn}-control`]:{flex:"1 1 0",minWidth:0},[`${xn}-label[class$='-24'], ${xn}-label[class*='-24 ']`]:{[`& + ${xn}-control`]:{minWidth:"unset"}}}}},be=Ye=>{const{componentCls:nn,formItemCls:xn}=Ye;return{[`${nn}-inline`]:{display:"flex",flexWrap:"wrap",[xn]:{flex:"none",marginInlineEnd:Ye.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${xn}-label,
|
|
|
> ${xn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${xn}-label`]:{flex:"none"},[`${nn}-text`]:{display:"inline-block"},[`${xn}-has-feedback`]:{display:"inline-block"}}}}},Te=Ye=>({padding:Ye.verticalLabelPadding,margin:Ye.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Be=Ye=>{const{componentCls:nn,formItemCls:xn,rootPrefixCls:Nt}=Ye;return{[`${xn} ${xn}-label`]:Te(Ye),[nn]:{[xn]:{flexWrap:"wrap",[`${xn}-label, ${xn}-control`]:{[`&:not([class*=" ${Nt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ze=Ye=>{const{componentCls:nn,formItemCls:xn,rootPrefixCls:Nt}=Ye;return{[`${nn}-vertical`]:{[xn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${nn}-item-control`]:{width:"100%"}}},[`${nn}-vertical ${xn}-label,
|
|
|
.${Nt}-col-24${xn}-label,
|
|
|
.${Nt}-col-xl-24${xn}-label`]:Te(Ye),[`@media (max-width: ${Ye.screenXSMax}px)`]:[Be(Ye),{[nn]:{[`.${Nt}-col-xs-24${xn}-label`]:Te(Ye)}}],[`@media (max-width: ${Ye.screenSMMax}px)`]:{[nn]:{[`.${Nt}-col-sm-24${xn}-label`]:Te(Ye)}},[`@media (max-width: ${Ye.screenMDMax}px)`]:{[nn]:{[`.${Nt}-col-md-24${xn}-label`]:Te(Ye)}},[`@media (max-width: ${Ye.screenLGMax}px)`]:{[nn]:{[`.${Nt}-col-lg-24${xn}-label`]:Te(Ye)}}}},Ge=(Ye,nn)=>(0,yt.TS)(Ye,{formItemCls:`${Ye.componentCls}-item`,rootPrefixCls:nn});var nt=(0,jt.Z)("Form",(Ye,nn)=>{let{rootPrefixCls:xn}=nn;const Nt=Ge(Ye,xn);return[se(Nt),fe(Nt),ne(Nt),ye(Nt),be(Nt),ze(Nt),(0,lt.Z)(Nt),Ue.kr]},Ye=>({labelRequiredMarkColor:Ye.colorError,labelColor:Ye.colorTextHeading,labelFontSize:Ye.fontSize,labelHeight:Ye.controlHeight,labelColonMarginInlineStart:Ye.marginXXS/2,labelColonMarginInlineEnd:Ye.marginXS,itemMarginBottom:Ye.marginLG,verticalLabelPadding:`0 0 ${Ye.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Je=[];function xt(Ye,nn,xn){let Nt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ye=="string"?Ye:`${nn}-${Nt}`,error:Ye,errorStatus:xn}}var Et=Ye=>{let{help:nn,helpStatus:xn,errors:Nt=Je,warnings:at=Je,className:cn,fieldId:Nn,onVisibleChanged:kn}=Ye;const{prefixCls:Jn}=Ke.useContext(Me.Rk),St=`${Jn}-item-explain`,[,An]=nt(Jn),qn=(0,Ke.useMemo)(()=>(0,st.Z)(Jn),[Jn]),Si=kt(Nt),rn=kt(at),bn=Ke.useMemo(()=>nn!=null?[xt(nn,"help",xn)]:[].concat((0,ge.Z)(Si.map((Pn,yn)=>xt(Pn,"error","error",yn))),(0,ge.Z)(rn.map((Pn,yn)=>xt(Pn,"warning","warning",yn)))),[nn,xn,Si,rn]),Ft={};return Nn&&(Ft.id=`${Nn}_help`),Ke.createElement(dt.default,{motionDeadline:qn.motionDeadline,motionName:`${Jn}-show-help`,visible:!!bn.length,onVisibleChanged:kn},Pn=>{const{className:yn,style:Sn}=Pn;return Ke.createElement("div",Object.assign({},Ft,{className:Ve()(St,yn,cn,An),style:Sn,role:"alert"}),Ke.createElement(dt.CSSMotionList,Object.assign({keys:bn},(0,st.Z)(Jn),{motionName:`${Jn}-show-help-item`,component:!1}),Gn=>{const{key:Zn,error:Qn,errorStatus:ii,className:ji,style:pn}=Gn;return Ke.createElement("div",{key:Zn,className:Ve()(ji,{[`${St}-${ii}`]:ii}),style:pn},Qn)}))})},tt=pe(95013),Ot=pe(36355),gt=pe(1684),Ht=pe(52946),Xt=pe(19716),Ut=pe(16722);const it=["parentNode"],_e="form_item";function Wt(Ye){return Ye===void 0||Ye===!1?[]:Array.isArray(Ye)?Ye:[Ye]}function Dn(Ye,nn){if(!Ye.length)return;const xn=Ye.join("_");return nn?`${nn}_${xn}`:it.includes(xn)?`${_e}_${xn}`:xn}function Bn(Ye,nn,xn,Nt,at,cn){let Nn=Nt;return cn!==void 0?Nn=cn:xn.validating?Nn="validating":Ye.length?Nn="error":nn.length?Nn="warning":(xn.touched||at&&xn.validated)&&(Nn="success"),Nn}function $t(Ye){return Wt(Ye).join("_")}function ln(Ye){const[nn]=(0,tt.useForm)(),xn=Ke.useRef({}),Nt=Ke.useMemo(()=>Ye!=null?Ye:Object.assign(Object.assign({},nn),{__INTERNAL__:{itemRef:at=>cn=>{const Nn=$t(at);cn?xn.current[Nn]=cn:delete xn.current[Nn]}},scrollToField:function(at){let cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Nn=Wt(at),kn=Dn(Nn,Nt.__INTERNAL__.name),Jn=kn?document.getElementById(kn):null;Jn&&(0,Ut.Z)(Jn,Object.assign({scrollMode:"if-needed",block:"nearest"},cn))},getFieldInstance:at=>{const cn=$t(at);return xn.current[cn]}}),[Ye,nn]);return[Nt]}var Tn=pe(28726),ei=function(Ye,nn){var xn={};for(var Nt in Ye)Object.prototype.hasOwnProperty.call(Ye,Nt)&&nn.indexOf(Nt)<0&&(xn[Nt]=Ye[Nt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Nt=Object.getOwnPropertySymbols(Ye);at<Nt.length;at++)nn.indexOf(Nt[at])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Nt[at])&&(xn[Nt[at]]=Ye[Nt[at]]);return xn};const Ln=(Ye,nn)=>{const xn=Ke.useContext(gt.Z),{getPrefixCls:Nt,direction:at,form:cn}=Ke.useContext(Ot.E_),{prefixCls:Nn,className:kn,rootClassName:Jn,size:St,disabled:An=xn,form:qn,colon:Si,labelAlign:rn,labelWrap:bn,labelCol:Ft,wrapperCol:Pn,hideRequiredMark:yn,layout:Sn="horizontal",scrollToFirstError:Gn,requiredMark:Zn,onFinishFailed:Qn,name:ii,style:ji,feedbackIcons:pn}=Ye,Ji=ei(Ye,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Ki=(0,Xt.Z)(St),Gi=Ke.useContext(Tn.Z),gn=(0,Ke.useMemo)(()=>Zn!==void 0?Zn:cn&&cn.requiredMark!==void 0?cn.requiredMark:!yn,[yn,Zn,cn]),oi=Si!=null?Si:cn==null?void 0:cn.colon,Bi=Nt("form",Nn),[$i,Ti]=nt(Bi),Qi=Ve()(Bi,`${Bi}-${Sn}`,{[`${Bi}-hide-required-mark`]:gn===!1,[`${Bi}-rtl`]:at==="rtl",[`${Bi}-${Ki}`]:Ki},Ti,cn==null?void 0:cn.className,kn,Jn),[pr]=ln(qn),{__INTERNAL__:hr}=pr;hr.name=ii;const Vi=(0,Ke.useMemo)(()=>({name:ii,labelAlign:rn,labelCol:Ft,labelWrap:bn,wrapperCol:Pn,vertical:Sn==="vertical",colon:oi,requiredMark:gn,itemRef:hr.itemRef,form:pr,feedbackIcons:pn}),[ii,rn,Ft,Pn,Sn,oi,gn,pr,pn]);Ke.useImperativeHandle(nn,()=>pr);const xr=(Br,_n)=>{if(Br){let Or={block:"nearest"};typeof Br=="object"&&(Or=Br),pr.scrollToField(_n,Or)}},Rn=Br=>{if(Qn==null||Qn(Br),Br.errorFields.length){const _n=Br.errorFields[0].name;if(Gn!==void 0){xr(Gn,_n);return}cn&&cn.scrollToFirstError!==void 0&&xr(cn.scrollToFirstError,_n)}};return $i(Ke.createElement(gt.n,{disabled:An},Ke.createElement(Ht.q,{size:Ki},Ke.createElement(Me.RV,Object.assign({},{validateMessages:Gi}),Ke.createElement(Me.q3.Provider,{value:Vi},Ke.createElement(tt.default,Object.assign({id:ii},Ji,{name:ii,onFinishFailed:Rn,form:pr,style:Object.assign(Object.assign({},cn==null?void 0:cn.style),ji),className:Qi})))))))};var zt=Ke.forwardRef(Ln),wn=pe(41799),$n=pe(8654),Yt=pe(92343),tn=pe(11592);function Gt(Ye){if(typeof Ye=="function")return Ye;const nn=(0,tn.Z)(Ye);return nn.length<=1?nn[0]:nn}const Tt=()=>{const{status:Ye,errors:nn=[],warnings:xn=[]}=(0,Ke.useContext)(Me.aM);return{status:Ye,errors:nn,warnings:xn}};Tt.Context=Me.aM;var ot=Tt,Ze=pe(16089);function At(Ye){const[nn,xn]=Ke.useState(Ye),Nt=(0,Ke.useRef)(null),at=(0,Ke.useRef)([]),cn=(0,Ke.useRef)(!1);Ke.useEffect(()=>(cn.current=!1,()=>{cn.current=!0,Ze.Z.cancel(Nt.current),Nt.current=null}),[]);function Nn(kn){cn.current||(Nt.current===null&&(at.current=[],Nt.current=(0,Ze.Z)(()=>{Nt.current=null,xn(Jn=>{let St=Jn;return at.current.forEach(An=>{St=An(St)}),St})})),at.current.push(kn))}return[nn,Nn]}function Dt(){const{itemRef:Ye}=Ke.useContext(Me.q3),nn=Ke.useRef({});function xn(Nt,at){const cn=at&&typeof at=="object"&&at.ref,Nn=Nt.join("_");return(nn.current.name!==Nn||nn.current.originRef!==cn)&&(nn.current.name=Nn,nn.current.originRef=cn,nn.current.ref=(0,$n.sQ)(Ye(Nt),cn)),nn.current.ref}return xn}var rt=pe(29194),et=pe(34280),Oe=pe(2738),Pe=pe(27382),ve=pe(37028);const Fe=Ye=>{const{formItemCls:nn}=Ye;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${nn}-control`]:{display:"flex"}}}};var We=(0,jt.b)(["Form","item-item"],(Ye,nn)=>{let{rootPrefixCls:xn}=nn;const Nt=Ge(Ye,xn);return[Fe(Nt)]}),ft=Ye=>{const{prefixCls:nn,status:xn,wrapperCol:Nt,children:at,errors:cn,warnings:Nn,_internalItemRender:kn,extra:Jn,help:St,fieldId:An,marginBottom:qn,onErrorVisibleChanged:Si}=Ye,rn=`${nn}-item`,bn=Ke.useContext(Me.q3),Ft=Nt||bn.wrapperCol||{},Pn=Ve()(`${rn}-control`,Ft.className),yn=Ke.useMemo(()=>Object.assign({},bn),[bn]);delete yn.labelCol,delete yn.wrapperCol;const Sn=Ke.createElement("div",{className:`${rn}-control-input`},Ke.createElement("div",{className:`${rn}-control-input-content`},at)),Gn=Ke.useMemo(()=>({prefixCls:nn,status:xn}),[nn,xn]),Zn=qn!==null||cn.length||Nn.length?Ke.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Ke.createElement(Me.Rk.Provider,{value:Gn},Ke.createElement(Et,{fieldId:An,errors:cn,warnings:Nn,help:St,helpStatus:xn,className:`${rn}-explain-connected`,onVisibleChanged:Si})),!!qn&&Ke.createElement("div",{style:{width:0,height:qn}})):null,Qn={};An&&(Qn.id=`${An}_extra`);const ii=Jn?Ke.createElement("div",Object.assign({},Qn,{className:`${rn}-extra`}),Jn):null,ji=kn&&kn.mark==="pro_table_render"&&kn.render?kn.render(Ye,{input:Sn,errorList:Zn,extra:ii}):Ke.createElement(Ke.Fragment,null,Sn,Zn,ii);return Ke.createElement(Me.q3.Provider,{value:yn},Ke.createElement(ve.Z,Object.assign({},Ft,{className:Pn}),ji),Ke.createElement(We,{prefixCls:nn}))},sn=pe(61485),un=pe(31724),Pt=pe(9763),qt=pe(6848),Mn=function(Ye,nn){var xn={};for(var Nt in Ye)Object.prototype.hasOwnProperty.call(Ye,Nt)&&nn.indexOf(Nt)<0&&(xn[Nt]=Ye[Nt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Nt=Object.getOwnPropertySymbols(Ye);at<Nt.length;at++)nn.indexOf(Nt[at])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Nt[at])&&(xn[Nt[at]]=Ye[Nt[at]]);return xn};function hn(Ye){return Ye?typeof Ye=="object"&&!Ke.isValidElement(Ye)?Ye:{title:Ye}:null}var ui=Ye=>{let{prefixCls:nn,label:xn,htmlFor:Nt,labelCol:at,labelAlign:cn,colon:Nn,required:kn,requiredMark:Jn,tooltip:St}=Ye;var An;const[qn]=(0,Pt.Z)("Form"),{vertical:Si,labelAlign:rn,labelCol:bn,labelWrap:Ft,colon:Pn}=Ke.useContext(Me.q3);if(!xn)return null;const yn=at||bn||{},Sn=cn||rn,Gn=`${nn}-item-label`,Zn=Ve()(Gn,Sn==="left"&&`${Gn}-left`,yn.className,{[`${Gn}-wrap`]:!!Ft});let Qn=xn;const ii=Nn===!0||Pn!==!1&&Nn!==!1;ii&&!Si&&typeof xn=="string"&&xn.trim()!==""&&(Qn=xn.replace(/[:|:]\s*$/,""));const pn=hn(St);if(pn){const{icon:gn=Ke.createElement(sn.Z,null)}=pn,oi=Mn(pn,["icon"]),Bi=Ke.createElement(qt.Z,Object.assign({},oi),Ke.cloneElement(gn,{className:`${nn}-item-tooltip`,title:""}));Qn=Ke.createElement(Ke.Fragment,null,Qn,Bi)}const Ji=Jn==="optional",Ki=typeof Jn=="function";Ki?Qn=Jn(Qn,{required:!!kn}):Ji&&!kn&&(Qn=Ke.createElement(Ke.Fragment,null,Qn,Ke.createElement("span",{className:`${nn}-item-optional`,title:""},(qn==null?void 0:qn.optional)||((An=un.Z.Form)===null||An===void 0?void 0:An.optional))));const Gi=Ve()({[`${nn}-item-required`]:kn,[`${nn}-item-required-mark-optional`]:Ji||Ki,[`${nn}-item-no-colon`]:!ii});return Ke.createElement(ve.Z,Object.assign({},yn,{className:Zn}),Ke.createElement("label",{htmlFor:Nt,className:Gi,title:typeof xn=="string"?xn:""},Qn))},gi=pe(29679),fi=pe(19248),bi=pe(96512),_i=pe(58617);const rr={success:gi.Z,warning:bi.Z,error:fi.Z,validating:_i.Z};function Wi(Ye){let{children:nn,errors:xn,warnings:Nt,hasFeedback:at,validateStatus:cn,prefixCls:Nn,meta:kn,noStyle:Jn}=Ye;const St=`${Nn}-item`,{feedbackIcons:An}=Ke.useContext(Me.q3),qn=Bn(xn,Nt,kn,null,!!at,cn),{isFormItemInput:Si,status:rn}=Ke.useContext(Me.aM),bn=Ke.useMemo(()=>{var Ft;let Pn;if(at){const Gn=at!==!0&&at.icons||An,Zn=qn&&((Ft=Gn==null?void 0:Gn({status:qn,errors:xn,warnings:Nt}))===null||Ft===void 0?void 0:Ft[qn]),Qn=qn&&rr[qn];Pn=Zn!==!1&&Qn?Ke.createElement("span",{className:Ve()(`${St}-feedback-icon`,`${St}-feedback-icon-${qn}`)},Zn||Ke.createElement(Qn,null)):null}let yn=!0,Sn=qn||"";return Jn&&(yn=Si,Sn=(qn!=null?qn:rn)||""),{status:Sn,errors:xn,warnings:Nt,hasFeedback:!!at,feedbackIcon:Pn,isFormItemInput:yn}},[qn,at,Jn,Si,rn]);return Ke.createElement(Me.aM.Provider,{value:bn},nn)}var vr=function(Ye,nn){var xn={};for(var Nt in Ye)Object.prototype.hasOwnProperty.call(Ye,Nt)&&nn.indexOf(Nt)<0&&(xn[Nt]=Ye[Nt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Nt=Object.getOwnPropertySymbols(Ye);at<Nt.length;at++)nn.indexOf(Nt[at])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Nt[at])&&(xn[Nt[at]]=Ye[Nt[at]]);return xn};function fr(Ye){const{prefixCls:nn,className:xn,rootClassName:Nt,style:at,help:cn,errors:Nn,warnings:kn,validateStatus:Jn,meta:St,hasFeedback:An,hidden:qn,children:Si,fieldId:rn,required:bn,isRequired:Ft,onSubItemMetaChange:Pn}=Ye,yn=vr(Ye,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Sn=`${nn}-item`,{requiredMark:Gn}=Ke.useContext(Me.q3),Zn=Ke.useRef(null),Qn=kt(Nn),ii=kt(kn),ji=cn!=null,pn=!!(ji||Nn.length||kn.length),Ji=!!Zn.current&&(0,rt.Z)(Zn.current),[Ki,Gi]=Ke.useState(null);(0,et.Z)(()=>{if(pn&&Zn.current){const Ti=getComputedStyle(Zn.current);Gi(parseInt(Ti.marginBottom,10))}},[pn,Ji]);const gn=Ti=>{Ti||Gi(null)},Bi=function(){let Ti=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Qi=Ti?Qn:St.errors,pr=Ti?ii:St.warnings;return Bn(Qi,pr,St,"",!!An,Jn)}(),$i=Ve()(Sn,xn,Nt,{[`${Sn}-with-help`]:ji||Qn.length||ii.length,[`${Sn}-has-feedback`]:Bi&&An,[`${Sn}-has-success`]:Bi==="success",[`${Sn}-has-warning`]:Bi==="warning",[`${Sn}-has-error`]:Bi==="error",[`${Sn}-is-validating`]:Bi==="validating",[`${Sn}-hidden`]:qn});return Ke.createElement("div",{className:$i,style:at,ref:Zn},Ke.createElement(Pe.Z,Object.assign({className:`${Sn}-row`},(0,Oe.Z)(yn,["_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"])),Ke.createElement(ui,Object.assign({htmlFor:rn},Ye,{requiredMark:Gn,required:bn!=null?bn:Ft,prefixCls:nn})),Ke.createElement(ft,Object.assign({},Ye,St,{errors:Qn,warnings:ii,prefixCls:nn,status:Bi,help:cn,marginBottom:Ki,onErrorVisibleChanged:gn}),Ke.createElement(Me.qI.Provider,{value:Pn},Ke.createElement(Wi,{prefixCls:nn,meta:St,errors:St.errors,warnings:St.warnings,hasFeedback:An,validateStatus:Bi},Si)))),!!Ki&&Ke.createElement("div",{className:`${Sn}-margin-offset`,style:{marginBottom:-Ki}}))}const zi="__SPLIT__",Er=null,Kn=Ke.memo(Ye=>{let{children:nn}=Ye;return nn},(Ye,nn)=>Ye.value===nn.value&&Ye.update===nn.update&&Ye.childProps.length===nn.childProps.length&&Ye.childProps.every((xn,Nt)=>xn===nn.childProps[Nt]));function Le(Ye){return Ye!=null}function Ei(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Ri(Ye){const{name:nn,noStyle:xn,className:Nt,dependencies:at,prefixCls:cn,shouldUpdate:Nn,rules:kn,children:Jn,required:St,label:An,messageVariables:qn,trigger:Si="onChange",validateTrigger:rn,hidden:bn,help:Ft}=Ye,{getPrefixCls:Pn}=Ke.useContext(Ot.E_),{name:yn}=Ke.useContext(Me.q3),Sn=Gt(Jn),Gn=typeof Sn=="function",Zn=Ke.useContext(Me.qI),{validateTrigger:Qn}=Ke.useContext(tt.FieldContext),ii=rn!==void 0?rn:Qn,ji=Le(nn),pn=Pn("form",cn),[Ji,Ki]=nt(pn),Gi=Ke.useContext(tt.ListContext),gn=Ke.useRef(),[oi,Bi]=At({}),[$i,Ti]=(0,wn.Z)(()=>Ei()),Qi=_n=>{const Or=Gi==null?void 0:Gi.getKey(_n.name);if(Ti(_n.destroy?Ei():_n,!0),xn&&Ft!==!1&&Zn){let no=_n.name;if(_n.destroy)no=gn.current||no;else if(Or!==void 0){const[br,mo]=Or;no=[br].concat((0,ge.Z)(mo)),gn.current=no}Zn(_n,no)}},pr=(_n,Or)=>{Bi(no=>{const br=Object.assign({},no),Jr=[].concat((0,ge.Z)(_n.name.slice(0,-1)),(0,ge.Z)(Or)).join(zi);return _n.destroy?delete br[Jr]:br[Jr]=_n,br})},[hr,Vi]=Ke.useMemo(()=>{const _n=(0,ge.Z)($i.errors),Or=(0,ge.Z)($i.warnings);return Object.values(oi).forEach(no=>{_n.push.apply(_n,(0,ge.Z)(no.errors||[])),Or.push.apply(Or,(0,ge.Z)(no.warnings||[]))}),[_n,Or]},[oi,$i.errors,$i.warnings]),xr=Dt();function Rn(_n,Or,no){return xn&&!bn?Ke.createElement(Wi,{prefixCls:pn,hasFeedback:Ye.hasFeedback,validateStatus:Ye.validateStatus,meta:$i,errors:hr,warnings:Vi,noStyle:!0},_n):Ke.createElement(fr,Object.assign({key:"row"},Ye,{className:Ve()(Nt,Ki),prefixCls:pn,fieldId:Or,isRequired:no,errors:hr,warnings:Vi,meta:$i,onSubItemMetaChange:pr}),_n)}if(!ji&&!Gn&&!at)return Ji(Rn(Sn));let Br={};return typeof An=="string"?Br.label=An:nn&&(Br.label=String(nn)),qn&&(Br=Object.assign(Object.assign({},Br),qn)),Ji(Ke.createElement(tt.Field,Object.assign({},Ye,{messageVariables:Br,trigger:Si,validateTrigger:ii,onMetaChange:Qi}),(_n,Or,no)=>{const br=Wt(nn).length&&Or?Or.name:[],mo=Dn(br,yn),Jr=St!==void 0?St:!!(kn&&kn.some(qi=>{if(qi&&typeof qi=="object"&&qi.required&&!qi.warningOnly)return!0;if(typeof qi=="function"){const Rr=qi(no);return Rr&&Rr.required&&!Rr.warningOnly}return!1})),ur=Object.assign({},_n);let er=null;if(Array.isArray(Sn)&&ji)er=Sn;else if(!(Gn&&(!(Nn||at)||ji))){if(!(at&&!Gn&&!ji))if((0,Yt.l$)(Sn)){const qi=Object.assign(Object.assign({},Sn.props),ur);if(qi.id||(qi.id=mo),Ft||hr.length>0||Vi.length>0||Ye.extra){const Qe=[];(Ft||hr.length>0)&&Qe.push(`${mo}_help`),Ye.extra&&Qe.push(`${mo}_extra`),qi["aria-describedby"]=Qe.join(" ")}hr.length>0&&(qi["aria-invalid"]="true"),Jr&&(qi["aria-required"]="true"),(0,$n.Yr)(Sn)&&(qi.ref=xr(br,Sn)),new Set([].concat((0,ge.Z)(Wt(Si)),(0,ge.Z)(Wt(ii)))).forEach(Qe=>{qi[Qe]=function(){for(var Qr,lo,jr,vo,po,Lr=arguments.length,Fr=new Array(Lr),uo=0;uo<Lr;uo++)Fr[uo]=arguments[uo];(jr=ur[Qe])===null||jr===void 0||(Qr=jr).call.apply(Qr,[ur].concat(Fr)),(po=(vo=Sn.props)[Qe])===null||po===void 0||(lo=po).call.apply(lo,[vo].concat(Fr))}});const Ii=[qi["aria-required"],qi["aria-invalid"],qi["aria-describedby"]];er=Ke.createElement(Kn,{value:ur[Ye.valuePropName||"value"],update:Sn,childProps:Ii},(0,Yt.Tm)(Sn,qi))}else Gn&&(Nn||at)&&!ji?er=Sn(no):er=Sn}return Rn(er,mo,Jr)}))}const an=Ri;an.useStatus=ot;var di=an,yi=function(Ye,nn){var xn={};for(var Nt in Ye)Object.prototype.hasOwnProperty.call(Ye,Nt)&&nn.indexOf(Nt)<0&&(xn[Nt]=Ye[Nt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Nt=Object.getOwnPropertySymbols(Ye);at<Nt.length;at++)nn.indexOf(Nt[at])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Nt[at])&&(xn[Nt[at]]=Ye[Nt[at]]);return xn},On=Ye=>{var{prefixCls:nn,children:xn}=Ye,Nt=yi(Ye,["prefixCls","children"]);const{getPrefixCls:at}=Ke.useContext(Ot.E_),cn=at("form",nn),Nn=Ke.useMemo(()=>({prefixCls:cn,status:"error"}),[cn]);return Ke.createElement(tt.List,Object.assign({},Nt),(kn,Jn,St)=>Ke.createElement(Me.Rk.Provider,{value:Nn},xn(kn.map(An=>Object.assign(Object.assign({},An),{fieldKey:An.key})),Jn,{errors:St.errors,warnings:St.warnings})))};function Un(){const{form:Ye}=(0,Ke.useContext)(Me.q3);return Ye}const It=zt;It.Item=di,It.List=On,It.ErrorList=Et,It.useForm=ln,It.useFormInstance=Un,It.useWatch=tt.useWatch,It.Provider=Me.RV,It.create=()=>{};var Kt=It},8628:function(Vn,Cn,pe){"use strict";var ge=pe(59301),Re=pe(34280),Ve=pe(56762),dt=pe(69507);function Ke(){let st=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Me=(0,ge.useRef)({}),kt=(0,Ve.Z)(),bt=(0,dt.ZP)();return(0,Re.Z)(()=>{const Ue=bt.subscribe(lt=>{Me.current=lt,st&&kt()});return()=>bt.unsubscribe(Ue)},[]),Me.current}Cn.Z=Ke},9432:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return fe},n:function(){return ce}});var ge=pe(19248),Re=pe(92310),Ve=pe.n(Re),dt=pe(93681),Ke=pe(8654),st=pe(59301),Me=pe(19080),kt=pe(36355),bt=pe(1684),Ue=pe(19716),lt=pe(32441),yt=pe(33234),jt=pe(59412),Ae=pe(9937);function ne(ye){return!!(ye.prefix||ye.suffix||ye.allowClear)}var ee=function(ye,be){var Te={};for(var Be in ye)Object.prototype.hasOwnProperty.call(ye,Be)&&be.indexOf(Be)<0&&(Te[Be]=ye[Be]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,Be=Object.getOwnPropertySymbols(ye);ze<Be.length;ze++)be.indexOf(Be[ze])<0&&Object.prototype.propertyIsEnumerable.call(ye,Be[ze])&&(Te[Be[ze]]=ye[Be[ze]]);return Te};function ce(ye,be){if(!ye)return;ye.focus(be);const{cursor:Te}=be||{};if(Te){const Be=ye.value.length;switch(Te){case"start":ye.setSelectionRange(0,0);break;case"end":ye.setSelectionRange(Be,Be);break;default:ye.setSelectionRange(0,Be);break}}}var fe=(0,st.forwardRef)((ye,be)=>{var Te;const{prefixCls:Be,bordered:ze=!0,status:Ge,size:nt,disabled:Je,onBlur:xt,onFocus:He,suffix:Et,allowClear:tt,addonAfter:Ot,addonBefore:gt,className:Ht,style:Xt,styles:Ut,rootClassName:it,onChange:_e,classNames:Wt}=ye,Dn=ee(ye,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Bn,direction:$t,input:ln}=st.useContext(kt.E_),Tn=Bn("input",Be),ei=(0,st.useRef)(null),[Ln,Yn]=(0,Ae.ZP)(Tn),{compactSize:zt,compactItemClassnames:wn}=(0,yt.ri)(Tn,$t),$n=(0,Ue.Z)(We=>{var Ne;return(Ne=nt!=null?nt:zt)!==null&&Ne!==void 0?Ne:We}),Yt=st.useContext(bt.Z),tn=Je!=null?Je:Yt,{status:Gt,hasFeedback:Tt,feedbackIcon:ot}=(0,st.useContext)(lt.aM),Ze=(0,Me.F)(Gt,Ge),At=ne(ye)||!!Tt,Dt=(0,st.useRef)(At);(0,st.useEffect)(()=>{var We;At&&Dt.current,Dt.current=At},[At]);const rt=(0,jt.Z)(ei,!0),et=We=>{rt(),xt==null||xt(We)},Oe=We=>{rt(),He==null||He(We)},Pe=We=>{rt(),_e==null||_e(We)},ve=(Tt||Et)&&st.createElement(st.Fragment,null,Et,Tt&&ot);let Fe;return typeof tt=="object"&&(tt!=null&&tt.clearIcon)?Fe=tt:tt&&(Fe={clearIcon:st.createElement(ge.Z,null)}),Ln(st.createElement(dt.default,Object.assign({ref:(0,Ke.sQ)(be,ei),prefixCls:Tn,autoComplete:ln==null?void 0:ln.autoComplete},Dn,{disabled:tn,onBlur:et,onFocus:Oe,style:Object.assign(Object.assign({},ln==null?void 0:ln.style),Xt),styles:Object.assign(Object.assign({},ln==null?void 0:ln.styles),Ut),suffix:ve,allowClear:Fe,className:Ve()(Ht,it,wn,ln==null?void 0:ln.className),onChange:Pe,addonAfter:Ot&&st.createElement(yt.BR,null,st.createElement(lt.Ux,{override:!0,status:!0},Ot)),addonBefore:gt&&st.createElement(yt.BR,null,st.createElement(lt.Ux,{override:!0,status:!0},gt)),classNames:Object.assign(Object.assign(Object.assign({},Wt),ln==null?void 0:ln.classNames),{input:Ve()({[`${Tn}-sm`]:$n==="small",[`${Tn}-lg`]:$n==="large",[`${Tn}-rtl`]:$t==="rtl",[`${Tn}-borderless`]:!ze},!At&&(0,Me.Z)(Tn,Ze),Wt==null?void 0:Wt.input,(Te=ln==null?void 0:ln.classNames)===null||Te===void 0?void 0:Te.input,Yn)}),classes:{affixWrapper:Ve()({[`${Tn}-affix-wrapper-sm`]:$n==="small",[`${Tn}-affix-wrapper-lg`]:$n==="large",[`${Tn}-affix-wrapper-rtl`]:$t==="rtl",[`${Tn}-affix-wrapper-borderless`]:!ze},(0,Me.Z)(`${Tn}-affix-wrapper`,Ze,Tt),Yn),wrapper:Ve()({[`${Tn}-group-rtl`]:$t==="rtl"},Yn),group:Ve()({[`${Tn}-group-wrapper-sm`]:$n==="small",[`${Tn}-group-wrapper-lg`]:$n==="large",[`${Tn}-group-wrapper-rtl`]:$t==="rtl",[`${Tn}-group-wrapper-disabled`]:tn},(0,Me.Z)(`${Tn}-group-wrapper`,Ze,Tt),Yn)}})))})},1643:function(Vn,Cn,pe){"use strict";var ge=pe(19248),Re=pe(92310),Ve=pe.n(Re),dt=pe(9296),Ke=pe(59301),st=pe(19080),Me=pe(36355),kt=pe(1684),bt=pe(19716),Ue=pe(32441),lt=pe(9432),yt=pe(9937),jt=function(ne,ee){var ce={};for(var se in ne)Object.prototype.hasOwnProperty.call(ne,se)&&ee.indexOf(se)<0&&(ce[se]=ne[se]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fe=0,se=Object.getOwnPropertySymbols(ne);fe<se.length;fe++)ee.indexOf(se[fe])<0&&Object.prototype.propertyIsEnumerable.call(ne,se[fe])&&(ce[se[fe]]=ne[se[fe]]);return ce};const Ae=(0,Ke.forwardRef)((ne,ee)=>{const{prefixCls:ce,bordered:se=!0,size:fe,disabled:ye,status:be,allowClear:Te,showCount:Be,classNames:ze,rootClassName:Ge,className:nt}=ne,Je=jt(ne,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:xt,direction:He}=Ke.useContext(Me.E_),Et=(0,bt.Z)(fe),tt=Ke.useContext(kt.Z),Ot=ye!=null?ye:tt,{status:gt,hasFeedback:Ht,feedbackIcon:Xt}=Ke.useContext(Ue.aM),Ut=(0,st.F)(gt,be),it=Ke.useRef(null);Ke.useImperativeHandle(ee,()=>{var $t;return{resizableTextArea:($t=it.current)===null||$t===void 0?void 0:$t.resizableTextArea,focus:ln=>{var Tn,ei;(0,lt.n)((ei=(Tn=it.current)===null||Tn===void 0?void 0:Tn.resizableTextArea)===null||ei===void 0?void 0:ei.textArea,ln)},blur:()=>{var ln;return(ln=it.current)===null||ln===void 0?void 0:ln.blur()}}});const _e=xt("input",ce);let Wt;typeof Te=="object"&&(Te!=null&&Te.clearIcon)?Wt=Te:Te&&(Wt={clearIcon:Ke.createElement(ge.Z,null)});const[Dn,Bn]=(0,yt.ZP)(_e);return Dn(Ke.createElement(dt.default,Object.assign({},Je,{disabled:Ot,allowClear:Wt,className:Ve()(nt,Ge),classes:{affixWrapper:Ve()(`${_e}-textarea-affix-wrapper`,{[`${_e}-affix-wrapper-rtl`]:He==="rtl",[`${_e}-affix-wrapper-borderless`]:!se,[`${_e}-affix-wrapper-sm`]:Et==="small",[`${_e}-affix-wrapper-lg`]:Et==="large",[`${_e}-textarea-show-count`]:Be},(0,st.Z)(`${_e}-affix-wrapper`,Ut),Bn)},classNames:Object.assign(Object.assign({},ze),{textarea:Ve()({[`${_e}-borderless`]:!se,[`${_e}-sm`]:Et==="small",[`${_e}-lg`]:Et==="large"},(0,st.Z)(_e,Ut),Bn,ze==null?void 0:ze.textarea)}),prefixCls:_e,suffix:Ht&&Ke.createElement("span",{className:`${_e}-textarea-suffix`},Xt),showCount:Be,ref:it})))});Cn.Z=Ae},59412:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Re}});var ge=pe(59301);function Re(Ve,dt){const Ke=(0,ge.useRef)([]),st=()=>{Ke.current.push(setTimeout(()=>{var Me,kt,bt,Ue;!((Me=Ve.current)===null||Me===void 0)&&Me.input&&((kt=Ve.current)===null||kt===void 0?void 0:kt.input.getAttribute("type"))==="password"&&(!((bt=Ve.current)===null||bt===void 0)&&bt.input.hasAttribute("value"))&&((Ue=Ve.current)===null||Ue===void 0||Ue.input.removeAttribute("value"))}))};return(0,ge.useEffect)(()=>(dt&&st(),()=>Ke.current.forEach(Me=>{Me&&clearTimeout(Me)})),[]),st}},92832:function(Vn,Cn,pe){"use strict";pe.d(Cn,{default:function(){return Et}});var ge=pe(92310),Re=pe.n(ge),Ve=pe(59301),dt=pe(36355),Ke=pe(32441),st=pe(9937),kt=tt=>{const{getPrefixCls:Ot,direction:gt}=(0,Ve.useContext)(dt.E_),{prefixCls:Ht,className:Xt}=tt,Ut=Ot("input-group",Ht),it=Ot("input"),[_e,Wt]=(0,st.ZP)(it),Dn=Re()(Ut,{[`${Ut}-lg`]:tt.size==="large",[`${Ut}-sm`]:tt.size==="small",[`${Ut}-compact`]:tt.compact,[`${Ut}-rtl`]:gt==="rtl"},Wt,Xt),Bn=(0,Ve.useContext)(Ke.aM),$t=(0,Ve.useMemo)(()=>Object.assign(Object.assign({},Bn),{isFormItemInput:!1}),[Bn]);return _e(Ve.createElement("span",{className:Dn,style:tt.style,onMouseEnter:tt.onMouseEnter,onMouseLeave:tt.onMouseLeave,onFocus:tt.onFocus,onBlur:tt.onBlur},Ve.createElement(Ke.aM.Provider,{value:$t},tt.children)))},bt=pe(9432),Ue=pe(73331),lt=pe(15277),yt=pe(2738),jt=pe(8654),Ae=pe(59412),ne=function(tt,Ot){var gt={};for(var Ht in tt)Object.prototype.hasOwnProperty.call(tt,Ht)&&Ot.indexOf(Ht)<0&&(gt[Ht]=tt[Ht]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xt=0,Ht=Object.getOwnPropertySymbols(tt);Xt<Ht.length;Xt++)Ot.indexOf(Ht[Xt])<0&&Object.prototype.propertyIsEnumerable.call(tt,Ht[Xt])&&(gt[Ht[Xt]]=tt[Ht[Xt]]);return gt};const ee=tt=>tt?Ve.createElement(lt.Z,null):Ve.createElement(Ue.Z,null),ce={click:"onClick",hover:"onMouseOver"};var fe=Ve.forwardRef((tt,Ot)=>{const{visibilityToggle:gt=!0}=tt,Ht=typeof gt=="object"&>.visible!==void 0,[Xt,Ut]=(0,Ve.useState)(()=>Ht?gt.visible:!1),it=(0,Ve.useRef)(null);Ve.useEffect(()=>{Ht&&Ut(gt.visible)},[Ht,gt]);const _e=(0,Ae.Z)(it),Wt=()=>{const{disabled:tn}=tt;tn||(Xt&&_e(),Ut(Gt=>{var Tt;const ot=!Gt;return typeof gt=="object"&&((Tt=gt.onVisibleChange)===null||Tt===void 0||Tt.call(gt,ot)),ot}))},Dn=tn=>{const{action:Gt="click",iconRender:Tt=ee}=tt,ot=ce[Gt]||"",Ze=Tt(Xt),At={[ot]:Wt,className:`${tn}-icon`,key:"passwordIcon",onMouseDown:Dt=>{Dt.preventDefault()},onMouseUp:Dt=>{Dt.preventDefault()}};return Ve.cloneElement(Ve.isValidElement(Ze)?Ze:Ve.createElement("span",null,Ze),At)},{className:Bn,prefixCls:$t,inputPrefixCls:ln,size:Tn}=tt,ei=ne(tt,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Ln}=Ve.useContext(dt.E_),Yn=Ln("input",ln),zt=Ln("input-password",$t),wn=gt&&Dn(zt),$n=Re()(zt,Bn,{[`${zt}-${Tn}`]:!!Tn}),Yt=Object.assign(Object.assign({},(0,yt.Z)(ei,["suffix","iconRender","visibilityToggle"])),{type:Xt?"text":"password",className:$n,prefixCls:Yn,suffix:wn});return Tn&&(Yt.size=Tn),Ve.createElement(bt.Z,Object.assign({ref:(0,jt.sQ)(Ot,it)},Yt))}),ye=pe(47472),be=pe(92343),Te=pe(3113),Be=pe(19716),ze=pe(33234),Ge=function(tt,Ot){var gt={};for(var Ht in tt)Object.prototype.hasOwnProperty.call(tt,Ht)&&Ot.indexOf(Ht)<0&&(gt[Ht]=tt[Ht]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xt=0,Ht=Object.getOwnPropertySymbols(tt);Xt<Ht.length;Xt++)Ot.indexOf(Ht[Xt])<0&&Object.prototype.propertyIsEnumerable.call(tt,Ht[Xt])&&(gt[Ht[Xt]]=tt[Ht[Xt]]);return gt},Je=Ve.forwardRef((tt,Ot)=>{const{prefixCls:gt,inputPrefixCls:Ht,className:Xt,size:Ut,suffix:it,enterButton:_e=!1,addonAfter:Wt,loading:Dn,disabled:Bn,onSearch:$t,onChange:ln,onCompositionStart:Tn,onCompositionEnd:ei}=tt,Ln=Ge(tt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Yn,direction:zt}=Ve.useContext(dt.E_),wn=Ve.useRef(!1),$n=Yn("input-search",gt),Yt=Yn("input",Ht),{compactSize:tn}=(0,ze.ri)($n,zt),Gt=(0,Be.Z)(ft=>{var sn;return(sn=Ut!=null?Ut:tn)!==null&&sn!==void 0?sn:ft}),Tt=Ve.useRef(null),ot=ft=>{ft&&ft.target&&ft.type==="click"&&$t&&$t(ft.target.value,ft,{source:"clear"}),ln&&ln(ft)},Ze=ft=>{var sn;document.activeElement===((sn=Tt.current)===null||sn===void 0?void 0:sn.input)&&ft.preventDefault()},At=ft=>{var sn,un;$t&&$t((un=(sn=Tt.current)===null||sn===void 0?void 0:sn.input)===null||un===void 0?void 0:un.value,ft,{source:"input"})},Dt=ft=>{wn.current||Dn||At(ft)},rt=typeof _e=="boolean"?Ve.createElement(ye.Z,null):null,et=`${$n}-button`;let Oe;const Pe=_e||{},ve=Pe.type&&Pe.type.__ANT_BUTTON===!0;ve||Pe.type==="button"?Oe=(0,be.Tm)(Pe,Object.assign({onMouseDown:Ze,onClick:ft=>{var sn,un;(un=(sn=Pe==null?void 0:Pe.props)===null||sn===void 0?void 0:sn.onClick)===null||un===void 0||un.call(sn,ft),At(ft)},key:"enterButton"},ve?{className:et,size:Gt}:{})):Oe=Ve.createElement(Te.ZP,{className:et,type:_e?"primary":void 0,size:Gt,disabled:Bn,key:"enterButton",onMouseDown:Ze,onClick:At,loading:Dn,icon:rt},_e),Wt&&(Oe=[Oe,(0,be.Tm)(Wt,{key:"addonAfter"})]);const Fe=Re()($n,{[`${$n}-rtl`]:zt==="rtl",[`${$n}-${Gt}`]:!!Gt,[`${$n}-with-button`]:!!_e},Xt),We=ft=>{wn.current=!0,Tn==null||Tn(ft)},Ne=ft=>{wn.current=!1,ei==null||ei(ft)};return Ve.createElement(bt.Z,Object.assign({ref:(0,jt.sQ)(Tt,Ot),onPressEnter:Dt},Ln,{size:Gt,onCompositionStart:We,onCompositionEnd:Ne,prefixCls:Yt,addonAfter:Oe,suffix:it,onChange:ot,className:Fe,disabled:Bn}))}),xt=pe(1643);const He=bt.Z;He.Group=kt,He.Search=Je,He.TextArea=xt.Z,He.Password=fe;var Et=He},45818:function(Vn,Cn,pe){"use strict";pe.d(Cn,{D:function(){return ye},Z:function(){return Be}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(Ge,nt){return Re.createElement(Ke.Z,(0,ge.Z)({},Ge,{ref:nt,icon:dt}))},Me=Re.forwardRef(st),kt=Me,bt=pe(33853),Ue=pe(38819),lt=pe(92310),yt=pe.n(lt),jt=pe(2738),ne=ze=>!isNaN(parseFloat(ze))&&isFinite(ze),ee=pe(36355),ce=pe(84966),se=function(ze,Ge){var nt={};for(var Je in ze)Object.prototype.hasOwnProperty.call(ze,Je)&&Ge.indexOf(Je)<0&&(nt[Je]=ze[Je]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xt=0,Je=Object.getOwnPropertySymbols(ze);xt<Je.length;xt++)Ge.indexOf(Je[xt])<0&&Object.prototype.propertyIsEnumerable.call(ze,Je[xt])&&(nt[Je[xt]]=ze[Je[xt]]);return nt};const fe={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ye=Re.createContext({}),be=(()=>{let ze=0;return function(){let Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return ze+=1,`${Ge}${ze}`}})();var Be=Re.forwardRef((ze,Ge)=>{const{prefixCls:nt,className:Je,trigger:xt,children:He,defaultCollapsed:Et=!1,theme:tt="dark",style:Ot={},collapsible:gt=!1,reverseArrow:Ht=!1,width:Xt=200,collapsedWidth:Ut=80,zeroWidthTriggerStyle:it,breakpoint:_e,onCollapse:Wt,onBreakpoint:Dn}=ze,Bn=se(ze,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:$t}=(0,Re.useContext)(ce.Gs),[ln,Tn]=(0,Re.useState)("collapsed"in ze?ze.collapsed:Et),[ei,Ln]=(0,Re.useState)(!1);(0,Re.useEffect)(()=>{"collapsed"in ze&&Tn(ze.collapsed)},[ze.collapsed]);const Yn=(Gt,Tt)=>{"collapsed"in ze||Tn(Gt),Wt==null||Wt(Gt,Tt)},zt=(0,Re.useRef)();zt.current=Gt=>{Ln(Gt.matches),Dn==null||Dn(Gt.matches),ln!==Gt.matches&&Yn(Gt.matches,"responsive")},(0,Re.useEffect)(()=>{function Gt(ot){return zt.current(ot)}let Tt;if(typeof window!="undefined"){const{matchMedia:ot}=window;if(ot&&_e&&_e in fe){Tt=ot(`(max-width: ${fe[_e]})`);try{Tt.addEventListener("change",Gt)}catch(Ze){Tt.addListener(Gt)}Gt(Tt)}}return()=>{try{Tt==null||Tt.removeEventListener("change",Gt)}catch(ot){Tt==null||Tt.removeListener(Gt)}}},[_e]),(0,Re.useEffect)(()=>{const Gt=be("ant-sider-");return $t.addSider(Gt),()=>$t.removeSider(Gt)},[]);const wn=()=>{Yn(!ln,"clickTrigger")},{getPrefixCls:$n}=(0,Re.useContext)(ee.E_),Yt=()=>{const Gt=$n("layout-sider",nt),Tt=(0,jt.Z)(Bn,["collapsed"]),ot=ln?Ut:Xt,Ze=ne(ot)?`${ot}px`:String(ot),At=parseFloat(String(Ut||0))===0?Re.createElement("span",{onClick:wn,className:yt()(`${Gt}-zero-width-trigger`,`${Gt}-zero-width-trigger-${Ht?"right":"left"}`),style:it},xt||Re.createElement(kt,null)):null,et={expanded:Ht?Re.createElement(Ue.Z,null):Re.createElement(bt.Z,null),collapsed:Ht?Re.createElement(bt.Z,null):Re.createElement(Ue.Z,null)}[ln?"collapsed":"expanded"],Oe=xt!==null?At||Re.createElement("div",{className:`${Gt}-trigger`,onClick:wn,style:{width:Ze}},xt||et):null,Pe=Object.assign(Object.assign({},Ot),{flex:`0 0 ${Ze}`,maxWidth:Ze,minWidth:Ze,width:Ze}),ve=yt()(Gt,`${Gt}-${tt}`,{[`${Gt}-collapsed`]:!!ln,[`${Gt}-has-trigger`]:gt&&xt!==null&&!At,[`${Gt}-below`]:!!ei,[`${Gt}-zero-width`]:parseFloat(Ze)===0},Je);return Re.createElement("aside",Object.assign({className:ve},Tt,{style:Pe,ref:Ge}),Re.createElement("div",{className:`${Gt}-children`},He),gt||ei&&At?Oe:null)},tn=Re.useMemo(()=>({siderCollapsed:ln}),[ln]);return Re.createElement(ye.Provider,{value:tn},Yt())})},84966:function(Vn,Cn,pe){"use strict";pe.d(Cn,{VY:function(){return ye},$_:function(){return fe},h4:function(){return se},Gs:function(){return jt},ZP:function(){return be}});var ge=pe(19127),Re=pe(92310),Ve=pe.n(Re),dt=pe(2738),Ke=pe(59301),st=pe(36355),Me=pe(83116),bt=Te=>{const{componentCls:Be,bodyBg:ze,lightSiderBg:Ge,lightTriggerBg:nt,lightTriggerColor:Je}=Te;return{[`${Be}-sider-light`]:{background:Ge,[`${Be}-sider-trigger`]:{color:Je,background:nt},[`${Be}-sider-zero-width-trigger`]:{color:Je,background:nt,border:`1px solid ${ze}`,borderInlineStart:0}}}};const Ue=Te=>{const{antCls:Be,componentCls:ze,colorText:Ge,triggerColor:nt,footerBg:Je,triggerBg:xt,headerHeight:He,headerPadding:Et,headerColor:tt,footerPadding:Ot,triggerHeight:gt,zeroTriggerHeight:Ht,zeroTriggerWidth:Xt,motionDurationMid:Ut,motionDurationSlow:it,fontSize:_e,borderRadius:Wt,bodyBg:Dn,headerBg:Bn,siderBg:$t}=Te;return{[ze]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Dn,"&, *":{boxSizing:"border-box"},[`&${ze}-has-sider`]:{flexDirection:"row",[`> ${ze}, > ${ze}-content`]:{width:0}},[`${ze}-header, &${ze}-footer`]:{flex:"0 0 auto"},[`${ze}-sider`]:{position:"relative",minWidth:0,background:$t,transition:`all ${Ut}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Be}-menu${Be}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:gt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:gt,color:nt,lineHeight:`${gt}px`,textAlign:"center",background:xt,cursor:"pointer",transition:`all ${Ut}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:He,insetInlineEnd:-Xt,zIndex:1,width:Xt,height:Ht,color:nt,fontSize:Te.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:$t,borderStartStartRadius:0,borderStartEndRadius:Wt,borderEndEndRadius:Wt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${it} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${it}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Xt,borderStartStartRadius:Wt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Wt}}}}},bt(Te)),{"&-rtl":{direction:"rtl"}}),[`${ze}-header`]:{height:He,padding:Et,color:tt,lineHeight:`${He}px`,background:Bn,[`${Be}-menu`]:{lineHeight:"inherit"}},[`${ze}-footer`]:{padding:Ot,color:Ge,fontSize:_e,background:Je},[`${ze}-content`]:{flex:"auto",minHeight:0}}};var lt=(0,Me.Z)("Layout",Te=>[Ue(Te)],Te=>{const{colorBgLayout:Be,controlHeight:ze,controlHeightLG:Ge,colorText:nt,controlHeightSM:Je,marginXXS:xt,colorTextLightSolid:He,colorBgContainer:Et}=Te,tt=Ge*1.25;return{colorBgHeader:"#001529",colorBgBody:Be,colorBgTrigger:"#002140",bodyBg:Be,headerBg:"#001529",headerHeight:ze*2,headerPadding:`0 ${tt}px`,headerColor:nt,footerPadding:`${Je}px ${tt}px`,footerBg:Be,siderBg:"#001529",triggerHeight:Ge+xt*2,triggerBg:"#002140",triggerColor:He,zeroTriggerWidth:Ge,zeroTriggerHeight:Ge,lightSiderBg:Et,lightTriggerBg:Et,lightTriggerColor:nt}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),yt=function(Te,Be){var ze={};for(var Ge in Te)Object.prototype.hasOwnProperty.call(Te,Ge)&&Be.indexOf(Ge)<0&&(ze[Ge]=Te[Ge]);if(Te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Ge=Object.getOwnPropertySymbols(Te);nt<Ge.length;nt++)Be.indexOf(Ge[nt])<0&&Object.prototype.propertyIsEnumerable.call(Te,Ge[nt])&&(ze[Ge[nt]]=Te[Ge[nt]]);return ze};const jt=Ke.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Ae(Te){let{suffixCls:Be,tagName:ze,displayName:Ge}=Te;return nt=>Ke.forwardRef((xt,He)=>Ke.createElement(nt,Object.assign({ref:He,suffixCls:Be,tagName:ze},xt)))}const ne=Ke.forwardRef((Te,Be)=>{const{prefixCls:ze,suffixCls:Ge,className:nt,tagName:Je}=Te,xt=yt(Te,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:He}=Ke.useContext(st.E_),Et=He("layout",ze),[tt,Ot]=lt(Et),gt=Ge?`${Et}-${Ge}`:Et;return tt(Ke.createElement(Je,Object.assign({className:Ve()(ze||gt,nt,Ot),ref:Be},xt)))}),ee=Ke.forwardRef((Te,Be)=>{const{direction:ze}=Ke.useContext(st.E_),[Ge,nt]=Ke.useState([]),{prefixCls:Je,className:xt,rootClassName:He,children:Et,hasSider:tt,tagName:Ot,style:gt}=Te,Ht=yt(Te,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Xt=(0,dt.Z)(Ht,["suffixCls"]),{getPrefixCls:Ut,layout:it}=Ke.useContext(st.E_),_e=Ut("layout",Je),[Wt,Dn]=lt(_e),Bn=Ve()(_e,{[`${_e}-has-sider`]:typeof tt=="boolean"?tt:Ge.length>0,[`${_e}-rtl`]:ze==="rtl"},it==null?void 0:it.className,xt,He,Dn),$t=Ke.useMemo(()=>({siderHook:{addSider:ln=>{nt(Tn=>[].concat((0,ge.Z)(Tn),[ln]))},removeSider:ln=>{nt(Tn=>Tn.filter(ei=>ei!==ln))}}}),[]);return Wt(Ke.createElement(jt.Provider,{value:$t},Ke.createElement(Ot,Object.assign({ref:Be,className:Bn,style:Object.assign(Object.assign({},it==null?void 0:it.style),gt)},Xt),Et)))}),ce=Ae({tagName:"div",displayName:"Layout"})(ee),se=Ae({suffixCls:"header",tagName:"header",displayName:"Header"})(ne),fe=Ae({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(ne),ye=Ae({suffixCls:"content",tagName:"main",displayName:"Content"})(ne);var be=ce},40875:function(Vn,Cn,pe){"use strict";pe.d(Cn,{J:function(){return st}});var ge=pe(59301),Re=pe(33234),Ve=pe(70425),dt=function(Me,kt){var bt={};for(var Ue in Me)Object.prototype.hasOwnProperty.call(Me,Ue)&&kt.indexOf(Ue)<0&&(bt[Ue]=Me[Ue]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var lt=0,Ue=Object.getOwnPropertySymbols(Me);lt<Ue.length;lt++)kt.indexOf(Ue[lt])<0&&Object.prototype.propertyIsEnumerable.call(Me,Ue[lt])&&(bt[Ue[lt]]=Me[Ue[lt]]);return bt};const Ke=ge.createContext(null),st=ge.forwardRef((Me,kt)=>{const{children:bt}=Me,Ue=dt(Me,["children"]),lt=ge.useContext(Ke),yt=ge.useMemo(()=>Object.assign(Object.assign({},lt),Ue),[lt,Ue.prefixCls,Ue.mode,Ue.selectable]);return ge.createElement(Ke.Provider,{value:yt},ge.createElement(Re.BR,null,(0,Ve.supportNodeRef)(bt)?ge.cloneElement(bt,{ref:kt}):bt))});Cn.Z=Ke},20834:function(Vn,Cn,pe){"use strict";pe.d(Cn,{default:function(){return tn}});var ge=pe(15285),Re=pe(59301),Ve=pe(45818),dt=pe(92310),Ke=pe.n(dt),st=pe(36355),Me=function(Gt,Tt){var ot={};for(var Ze in Gt)Object.prototype.hasOwnProperty.call(Gt,Ze)&&Tt.indexOf(Ze)<0&&(ot[Ze]=Gt[Ze]);if(Gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var At=0,Ze=Object.getOwnPropertySymbols(Gt);At<Ze.length;At++)Tt.indexOf(Ze[At])<0&&Object.prototype.propertyIsEnumerable.call(Gt,Ze[At])&&(ot[Ze[At]]=Gt[Ze[At]]);return ot},bt=Gt=>{const{prefixCls:Tt,className:ot,dashed:Ze}=Gt,At=Me(Gt,["prefixCls","className","dashed"]),{getPrefixCls:Dt}=Re.useContext(st.E_),rt=Dt("menu",Tt),et=Ke()({[`${rt}-item-divider-dashed`]:!!Ze},ot);return Re.createElement(ge.iz,Object.assign({className:et},At))},Ue=pe(11592),lt=pe(2738),yt=pe(6848),jt=pe(92343),ne=(0,Re.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ce=Gt=>{var Tt;const{className:ot,children:Ze,icon:At,title:Dt,danger:rt}=Gt,{prefixCls:et,firstLevel:Oe,direction:Pe,disableMenuItemTitleTooltip:ve,inlineCollapsed:Fe}=Re.useContext(ne),We=qt=>{const Mn=Re.createElement("span",{className:`${et}-title-content`},Ze);return(!At||(0,jt.l$)(Ze)&&Ze.type==="span")&&Ze&&qt&&Oe&&typeof Ze=="string"?Re.createElement("div",{className:`${et}-inline-collapsed-noicon`},Ze.charAt(0)):Mn},{siderCollapsed:Ne}=Re.useContext(Ve.D);let ft=Dt;typeof Dt=="undefined"?ft=Oe?Ze:"":Dt===!1&&(ft="");const sn={title:ft};!Ne&&!Fe&&(sn.title=null,sn.open=!1);const un=(0,Ue.Z)(Ze).length;let Pt=Re.createElement(ge.ck,Object.assign({},(0,lt.Z)(Gt,["title","icon","danger"]),{className:Ke()({[`${et}-item-danger`]:rt,[`${et}-item-only-child`]:(At?un+1:un)===1},ot),title:typeof Dt=="string"?Dt:void 0}),(0,jt.Tm)(At,{className:Ke()((0,jt.l$)(At)?(Tt=At.props)===null||Tt===void 0?void 0:Tt.className:"",`${et}-item-icon`)}),We(Fe));return ve||(Pt=Re.createElement(yt.Z,Object.assign({},sn,{placement:Pe==="rtl"?"left":"right",overlayClassName:`${et}-inline-collapsed-tooltip`}),Pt)),Pt},fe=Gt=>{var Tt;const{popupClassName:ot,icon:Ze,title:At,theme:Dt}=Gt,rt=Re.useContext(ne),{prefixCls:et,inlineCollapsed:Oe,theme:Pe}=rt,ve=(0,ge.Xl)();let Fe;if(!Ze)Fe=Oe&&!ve.length&&At&&typeof At=="string"?Re.createElement("div",{className:`${et}-inline-collapsed-noicon`},At.charAt(0)):Re.createElement("span",{className:`${et}-title-content`},At);else{const Ne=(0,jt.l$)(At)&&At.type==="span";Fe=Re.createElement(Re.Fragment,null,(0,jt.Tm)(Ze,{className:Ke()((0,jt.l$)(Ze)?(Tt=Ze.props)===null||Tt===void 0?void 0:Tt.className:"",`${et}-item-icon`)}),Ne?At:Re.createElement("span",{className:`${et}-title-content`},At))}const We=Re.useMemo(()=>Object.assign(Object.assign({},rt),{firstLevel:!1}),[rt]);return Re.createElement(ne.Provider,{value:We},Re.createElement(ge.Wd,Object.assign({},(0,lt.Z)(Gt,["icon"]),{title:Fe,popupClassName:Ke()(et,ot,`${et}-${Dt||Pe}`)})))},ye=pe(18785),be=pe(70425),Te=pe(62892),Be=pe(40875),ze=function(Gt,Tt){var ot={};for(var Ze in Gt)Object.prototype.hasOwnProperty.call(Gt,Ze)&&Tt.indexOf(Ze)<0&&(ot[Ze]=Gt[Ze]);if(Gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var At=0,Ze=Object.getOwnPropertySymbols(Gt);At<Ze.length;At++)Tt.indexOf(Ze[At])<0&&Object.prototype.propertyIsEnumerable.call(Gt,Ze[At])&&(ot[Ze[At]]=Gt[Ze[At]]);return ot};function Ge(Gt){return(Gt||[]).map((Tt,ot)=>{if(Tt&&typeof Tt=="object"){const Ze=Tt,{label:At,children:Dt,key:rt,type:et}=Ze,Oe=ze(Ze,["label","children","key","type"]),Pe=rt!=null?rt:`tmp-${ot}`;return Dt||et==="group"?et==="group"?Re.createElement(ge.BW,Object.assign({key:Pe},Oe,{title:At}),Ge(Dt)):Re.createElement(fe,Object.assign({key:Pe},Oe,{title:At}),Ge(Dt)):et==="divider"?Re.createElement(bt,Object.assign({key:Pe},Oe)):Re.createElement(ce,Object.assign({key:Pe},Oe),At)}return null}).filter(Tt=>Tt)}function nt(Gt){return Re.useMemo(()=>Gt&&Ge(Gt),[Gt])}var Je=pe(64993),xt=pe(17313),He=pe(8378),Et=pe(13826),tt=pe(29878),Ot=pe(83116),gt=pe(37613),Xt=Gt=>{const{componentCls:Tt,motionDurationSlow:ot,horizontalLineHeight:Ze,colorSplit:At,lineWidth:Dt,lineType:rt,itemPaddingInline:et}=Gt;return{[`${Tt}-horizontal`]:{lineHeight:Ze,border:0,borderBottom:`${Dt}px ${rt} ${At}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Tt}-item, ${Tt}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:et},[`> ${Tt}-item:hover,
|
|
|
> ${Tt}-item-active,
|
|
|
> ${Tt}-submenu ${Tt}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Tt}-item, ${Tt}-submenu-title`]:{transition:[`border-color ${ot}`,`background ${ot}`].join(",")},[`${Tt}-submenu-arrow`]:{display:"none"}}}},it=Gt=>{let{componentCls:Tt,menuArrowOffset:ot}=Gt;return{[`${Tt}-rtl`]:{direction:"rtl"},[`${Tt}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Tt}-rtl${Tt}-vertical,
|
|
|
${Tt}-submenu-rtl ${Tt}-vertical`]:{[`${Tt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${ot})`},"&::after":{transform:`rotate(45deg) translateY(${ot})`}}}}};const _e=Gt=>Object.assign({},(0,xt.oN)(Gt));var Dn=(Gt,Tt)=>{const{componentCls:ot,itemColor:Ze,itemSelectedColor:At,groupTitleColor:Dt,itemBg:rt,subMenuItemBg:et,itemSelectedBg:Oe,activeBarHeight:Pe,activeBarWidth:ve,activeBarBorderWidth:Fe,motionDurationSlow:We,motionEaseInOut:Ne,motionEaseOut:ft,itemPaddingInline:sn,motionDurationMid:un,itemHoverColor:Pt,lineType:qt,colorSplit:Mn,itemDisabledColor:hn,dangerItemColor:fn,dangerItemHoverColor:ui,dangerItemSelectedColor:gi,dangerItemActiveBg:fi,dangerItemSelectedBg:bi,itemHoverBg:_i,itemActiveBg:rr,menuSubMenuBg:Wi,horizontalItemSelectedColor:vr,horizontalItemSelectedBg:fr,horizontalItemBorderRadius:zi,horizontalItemHoverBg:Er,popupBg:Kn}=Gt;return{[`${ot}-${Tt}, ${ot}-${Tt} > ${ot}`]:{color:Ze,background:rt,[`&${ot}-root:focus-visible`]:Object.assign({},_e(Gt)),[`${ot}-item-group-title`]:{color:Dt},[`${ot}-submenu-selected`]:{[`> ${ot}-submenu-title`]:{color:At}},[`${ot}-item-disabled, ${ot}-submenu-disabled`]:{color:`${hn} !important`},[`${ot}-item:not(${ot}-item-selected):not(${ot}-submenu-selected)`]:{[`&:hover, > ${ot}-submenu-title:hover`]:{color:Pt}},[`&:not(${ot}-horizontal)`]:{[`${ot}-item:not(${ot}-item-selected)`]:{"&:hover":{backgroundColor:_i},"&:active":{backgroundColor:rr}},[`${ot}-submenu-title`]:{"&:hover":{backgroundColor:_i},"&:active":{backgroundColor:rr}}},[`${ot}-item-danger`]:{color:fn,[`&${ot}-item:hover`]:{[`&:not(${ot}-item-selected):not(${ot}-submenu-selected)`]:{color:ui}},[`&${ot}-item:active`]:{background:fi}},[`${ot}-item a`]:{"&, &:hover":{color:"inherit"}},[`${ot}-item-selected`]:{color:At,[`&${ot}-item-danger`]:{color:gi},"a, a:hover":{color:"inherit"}},[`& ${ot}-item-selected`]:{backgroundColor:Oe,[`&${ot}-item-danger`]:{backgroundColor:bi}},[`${ot}-item, ${ot}-submenu-title`]:{[`&:not(${ot}-item-disabled):focus-visible`]:Object.assign({},_e(Gt))},[`&${ot}-submenu > ${ot}`]:{backgroundColor:Wi},[`&${ot}-popup > ${ot}`]:{backgroundColor:Kn},[`&${ot}-horizontal`]:Object.assign(Object.assign({},Tt==="dark"?{borderBottom:0}:{}),{[`> ${ot}-item, > ${ot}-submenu`]:{top:Fe,marginTop:-Fe,marginBottom:0,borderRadius:zi,"&::after":{position:"absolute",insetInline:sn,bottom:0,borderBottom:`${Pe}px solid transparent`,transition:`border-color ${We} ${Ne}`,content:'""'},"&:hover, &-active, &-open":{background:Er,"&::after":{borderBottomWidth:Pe,borderBottomColor:vr}},"&-selected":{color:vr,backgroundColor:fr,"&:hover":{backgroundColor:fr},"&::after":{borderBottomWidth:Pe,borderBottomColor:vr}}}}),[`&${ot}-root`]:{[`&${ot}-inline, &${ot}-vertical`]:{borderInlineEnd:`${Fe}px ${qt} ${Mn}`}},[`&${ot}-inline`]:{[`${ot}-sub${ot}-inline`]:{background:et},[`${ot}-item, ${ot}-submenu-title`]:Fe&&ve?{width:`calc(100% + ${Fe}px)`}:{},[`${ot}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ve}px solid ${At}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${un} ${ft}`,`opacity ${un} ${ft}`].join(","),content:'""'},[`&${ot}-item-danger`]:{"&::after":{borderInlineEndColor:gi}}},[`${ot}-selected, ${ot}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${un} ${Ne}`,`opacity ${un} ${Ne}`].join(",")}}}}}};const Bn=Gt=>{const{componentCls:Tt,itemHeight:ot,itemMarginInline:Ze,padding:At,menuArrowSize:Dt,marginXS:rt,itemMarginBlock:et}=Gt,Oe=At+Dt+rt;return{[`${Tt}-item`]:{position:"relative",overflow:"hidden"},[`${Tt}-item, ${Tt}-submenu-title`]:{height:ot,lineHeight:`${ot}px`,paddingInline:At,overflow:"hidden",textOverflow:"ellipsis",marginInline:Ze,marginBlock:et,width:`calc(100% - ${Ze*2}px)`},[`> ${Tt}-item,
|
|
|
> ${Tt}-submenu > ${Tt}-submenu-title`]:{height:ot,lineHeight:`${ot}px`},[`${Tt}-item-group-list ${Tt}-submenu-title,
|
|
|
${Tt}-submenu-title`]:{paddingInlineEnd:Oe}}};var ln=Gt=>{const{componentCls:Tt,iconCls:ot,itemHeight:Ze,colorTextLightSolid:At,dropdownWidth:Dt,controlHeightLG:rt,motionDurationMid:et,motionEaseOut:Oe,paddingXL:Pe,itemMarginInline:ve,fontSizeLG:Fe,motionDurationSlow:We,paddingXS:Ne,boxShadowSecondary:ft,collapsedWidth:sn,collapsedIconSize:un}=Gt,Pt={height:Ze,lineHeight:`${Ze}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Tt]:{"&-inline, &-vertical":Object.assign({[`&${Tt}-root`]:{boxShadow:"none"}},Bn(Gt))},[`${Tt}-submenu-popup`]:{[`${Tt}-vertical`]:Object.assign(Object.assign({},Bn(Gt)),{boxShadow:ft})}},{[`${Tt}-submenu-popup ${Tt}-vertical${Tt}-sub`]:{minWidth:Dt,maxHeight:`calc(100vh - ${rt*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Tt}-inline`]:{width:"100%",[`&${Tt}-root`]:{[`${Tt}-item, ${Tt}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${We}`,`background ${We}`,`padding ${et} ${Oe}`].join(","),[`> ${Tt}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Tt}-sub${Tt}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Tt}-submenu > ${Tt}-submenu-title`]:Pt,[`& ${Tt}-item-group-title`]:{paddingInlineStart:Pe}},[`${Tt}-item`]:Pt}},{[`${Tt}-inline-collapsed`]:{width:sn,[`&${Tt}-root`]:{[`${Tt}-item, ${Tt}-submenu ${Tt}-submenu-title`]:{[`> ${Tt}-inline-collapsed-noicon`]:{fontSize:Fe,textAlign:"center"}}},[`> ${Tt}-item,
|
|
|
> ${Tt}-item-group > ${Tt}-item-group-list > ${Tt}-item,
|
|
|
> ${Tt}-item-group > ${Tt}-item-group-list > ${Tt}-submenu > ${Tt}-submenu-title,
|
|
|
> ${Tt}-submenu > ${Tt}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Fe/2}px - ${ve}px)`,textOverflow:"clip",[`
|
|
|
${Tt}-submenu-arrow,
|
|
|
${Tt}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Tt}-item-icon, ${ot}`]:{margin:0,fontSize:un,lineHeight:`${Ze}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Tt}-item-icon, ${ot}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Tt}-item-icon, ${ot}`]:{display:"none"},"a, a:hover":{color:At}},[`${Tt}-item-group-title`]:Object.assign(Object.assign({},xt.vS),{paddingInline:Ne})}}]};const Tn=Gt=>{const{componentCls:Tt,motionDurationSlow:ot,motionDurationMid:Ze,motionEaseInOut:At,motionEaseOut:Dt,iconCls:rt,iconSize:et,iconMarginInlineEnd:Oe}=Gt;return{[`${Tt}-item, ${Tt}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${ot}`,`background ${ot}`,`padding ${ot} ${At}`].join(","),[`${Tt}-item-icon, ${rt}`]:{minWidth:et,fontSize:et,transition:[`font-size ${Ze} ${Dt}`,`margin ${ot} ${At}`,`color ${ot}`].join(","),"+ span":{marginInlineStart:Oe,opacity:1,transition:[`opacity ${ot} ${At}`,`margin ${ot}`,`color ${ot}`].join(",")}},[`${Tt}-item-icon`]:Object.assign({},(0,xt.Ro)()),[`&${Tt}-item-only-child`]:{[`> ${rt}, > ${Tt}-item-icon`]:{marginInlineEnd:0}}},[`${Tt}-item-disabled, ${Tt}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Tt}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},ei=Gt=>{const{componentCls:Tt,motionDurationSlow:ot,motionEaseInOut:Ze,borderRadius:At,menuArrowSize:Dt,menuArrowOffset:rt}=Gt;return{[`${Tt}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Gt.margin,width:Dt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${ot} ${Ze}, opacity ${ot}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Dt*.6,height:Dt*.15,backgroundColor:"currentcolor",borderRadius:At,transition:[`background ${ot} ${Ze}`,`transform ${ot} ${Ze}`,`top ${ot} ${Ze}`,`color ${ot} ${Ze}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${rt})`},"&::after":{transform:`rotate(-45deg) translateY(${rt})`}}}}},Ln=Gt=>{const{antCls:Tt,componentCls:ot,fontSize:Ze,motionDurationSlow:At,motionDurationMid:Dt,motionEaseInOut:rt,paddingXS:et,padding:Oe,colorSplit:Pe,lineWidth:ve,zIndexPopup:Fe,borderRadiusLG:We,subMenuItemBorderRadius:Ne,menuArrowSize:ft,menuArrowOffset:sn,lineType:un,menuPanelMaskInset:Pt,groupTitleLineHeight:qt,groupTitleFontSize:Mn}=Gt;return[{"":{[`${ot}`]:Object.assign(Object.assign({},(0,xt.dF)()),{"&-hidden":{display:"none"}})},[`${ot}-submenu-hidden`]:{display:"none"}},{[ot]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,xt.Wf)(Gt)),(0,xt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:Ze,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${At} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${ot}-item`]:{flex:"none"}},[`${ot}-item, ${ot}-submenu, ${ot}-submenu-title`]:{borderRadius:Gt.itemBorderRadius},[`${ot}-item-group-title`]:{padding:`${et}px ${Oe}px`,fontSize:Mn,lineHeight:qt,transition:`all ${At}`},[`&-horizontal ${ot}-submenu`]:{transition:[`border-color ${At} ${rt}`,`background ${At} ${rt}`].join(",")},[`${ot}-submenu, ${ot}-submenu-inline`]:{transition:[`border-color ${At} ${rt}`,`background ${At} ${rt}`,`padding ${Dt} ${rt}`].join(",")},[`${ot}-submenu ${ot}-sub`]:{cursor:"initial",transition:[`background ${At} ${rt}`,`padding ${At} ${rt}`].join(",")},[`${ot}-title-content`]:{transition:`color ${At}`},[`${ot}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${ot}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Pe,borderStyle:un,borderWidth:0,borderTopWidth:ve,marginBlock:ve,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Tn(Gt)),{[`${ot}-item-group`]:{[`${ot}-item-group-list`]:{margin:0,padding:0,[`${ot}-item, ${ot}-submenu-title`]:{paddingInline:`${Ze*2}px ${Oe}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Fe,borderRadius:We,boxShadow:"none",transformOrigin:"0 0",[`&${ot}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${Pt}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:Pt},"\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:Gt.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Gt.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Gt.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Gt.paddingXS},[`> ${ot}`]:Object.assign(Object.assign(Object.assign({borderRadius:We},Tn(Gt)),ei(Gt)),{[`${ot}-item, ${ot}-submenu > ${ot}-submenu-title`]:{borderRadius:Ne},[`${ot}-submenu-title::after`]:{transition:`transform ${At} ${rt}`}})}}),ei(Gt)),{[`&-inline-collapsed ${ot}-submenu-arrow,
|
|
|
&-inline ${ot}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${sn})`},"&::after":{transform:`rotate(45deg) translateX(-${sn})`}},[`${ot}-submenu-open${ot}-submenu-inline > ${ot}-submenu-title > ${ot}-submenu-arrow`]:{transform:`translateY(-${ft*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${sn})`},"&::before":{transform:`rotate(45deg) translateX(${sn})`}}})},{[`${Tt}-layout-header`]:{[ot]:{lineHeight:"inherit"}}}]};var Yn=(Gt,Tt)=>(0,Ot.Z)("Menu",Ze=>{if(Tt===!1)return[];const{colorBgElevated:At,colorPrimary:Dt,colorTextLightSolid:rt,controlHeightLG:et,fontSize:Oe,darkItemColor:Pe,darkDangerItemColor:ve,darkItemBg:Fe,darkSubMenuItemBg:We,darkItemSelectedColor:Ne,darkItemSelectedBg:ft,darkDangerItemSelectedBg:sn,darkItemHoverBg:un,darkGroupTitleColor:Pt,darkItemHoverColor:qt,darkItemDisabledColor:Mn,darkDangerItemHoverColor:hn,darkDangerItemSelectedColor:fn,darkDangerItemActiveBg:ui}=Ze,gi=Oe/7*5,fi=(0,gt.TS)(Ze,{menuArrowSize:gi,menuHorizontalHeight:et*1.15,menuArrowOffset:`${gi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:At}),bi=(0,gt.TS)(fi,{itemColor:Pe,itemHoverColor:qt,groupTitleColor:Pt,itemSelectedColor:Ne,itemBg:Fe,popupBg:Fe,subMenuItemBg:We,itemActiveBg:"transparent",itemSelectedBg:ft,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:un,itemDisabledColor:Mn,dangerItemColor:ve,dangerItemHoverColor:hn,dangerItemSelectedColor:fn,dangerItemActiveBg:ui,dangerItemSelectedBg:sn,menuSubMenuBg:We,horizontalItemSelectedColor:rt,horizontalItemSelectedBg:Dt});return[Ln(fi),Xt(fi),ln(fi),Dn(fi,"light"),Dn(bi,"dark"),it(fi),(0,He.Z)(fi),(0,Et.oN)(fi,"slide-up"),(0,Et.oN)(fi,"slide-down"),(0,tt._y)(fi,"zoom-big")]},Ze=>{const{colorPrimary:At,colorError:Dt,colorTextDisabled:rt,colorErrorBg:et,colorText:Oe,colorTextDescription:Pe,colorBgContainer:ve,colorFillAlter:Fe,colorFillContent:We,lineWidth:Ne,lineWidthBold:ft,controlItemBgActive:sn,colorBgTextHover:un,controlHeightLG:Pt,lineHeight:qt,colorBgElevated:Mn,marginXXS:hn,padding:fn,fontSize:ui,controlHeightSM:gi,fontSizeLG:fi,colorTextLightSolid:bi,colorErrorHover:_i}=Ze,rr=new Je.C(bi).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Ze.zIndexPopupBase+50,radiusItem:Ze.borderRadiusLG,itemBorderRadius:Ze.borderRadiusLG,radiusSubMenuItem:Ze.borderRadiusSM,subMenuItemBorderRadius:Ze.borderRadiusSM,colorItemText:Oe,itemColor:Oe,colorItemTextHover:Oe,itemHoverColor:Oe,colorItemTextHoverHorizontal:At,horizontalItemHoverColor:At,colorGroupTitle:Pe,groupTitleColor:Pe,colorItemTextSelected:At,itemSelectedColor:At,colorItemTextSelectedHorizontal:At,horizontalItemSelectedColor:At,colorItemBg:ve,itemBg:ve,colorItemBgHover:un,itemHoverBg:un,colorItemBgActive:We,itemActiveBg:sn,colorSubItemBg:Fe,subMenuItemBg:Fe,colorItemBgSelected:sn,itemSelectedBg:sn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:ft,activeBarHeight:ft,colorActiveBarBorderSize:Ne,activeBarBorderWidth:Ne,colorItemTextDisabled:rt,itemDisabledColor:rt,colorDangerItemText:Dt,dangerItemColor:Dt,colorDangerItemTextHover:Dt,dangerItemHoverColor:Dt,colorDangerItemTextSelected:Dt,dangerItemSelectedColor:Dt,colorDangerItemBgActive:et,dangerItemActiveBg:et,colorDangerItemBgSelected:et,dangerItemSelectedBg:et,itemMarginInline:Ze.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Pt,groupTitleLineHeight:qt,collapsedWidth:Pt*2,popupBg:Mn,itemMarginBlock:hn,itemPaddingInline:fn,horizontalLineHeight:`${Pt*1.15}px`,iconSize:ui,iconMarginInlineEnd:gi-ui,collapsedIconSize:fi,groupTitleFontSize:ui,darkItemDisabledColor:new Je.C(bi).setAlpha(.25).toRgbString(),darkItemColor:rr,darkDangerItemColor:Dt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:bi,darkItemSelectedBg:At,darkDangerItemSelectedBg:Dt,darkItemHoverBg:"transparent",darkGroupTitleColor:rr,darkItemHoverColor:bi,darkDangerItemHoverColor:_i,darkDangerItemSelectedColor:bi,darkDangerItemActiveBg:Dt}},{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"]]})(Gt),zt=function(Gt,Tt){var ot={};for(var Ze in Gt)Object.prototype.hasOwnProperty.call(Gt,Ze)&&Tt.indexOf(Ze)<0&&(ot[Ze]=Gt[Ze]);if(Gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var At=0,Ze=Object.getOwnPropertySymbols(Gt);At<Ze.length;At++)Tt.indexOf(Ze[At])<0&&Object.prototype.propertyIsEnumerable.call(Gt,Ze[At])&&(ot[Ze[At]]=Gt[Ze[At]]);return ot},$n=(0,Re.forwardRef)((Gt,Tt)=>{var ot,Ze;const At=Re.useContext(Be.Z),Dt=At||{},{getPrefixCls:rt,getPopupContainer:et,direction:Oe,menu:Pe}=Re.useContext(st.E_),ve=rt(),{prefixCls:Fe,className:We,style:Ne,theme:ft="light",expandIcon:sn,_internalDisableMenuItemTitleTooltip:un,inlineCollapsed:Pt,siderCollapsed:qt,items:Mn,children:hn,rootClassName:fn,mode:ui,selectable:gi,onClick:fi,overflowedIndicatorPopupClassName:bi}=Gt,_i=zt(Gt,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),rr=(0,lt.Z)(_i,["collapsedWidth"]),Wi=nt(Mn)||hn;(ot=Dt.validator)===null||ot===void 0||ot.call(Dt,{mode:ui});const vr=(0,be.useEvent)(function(){var Li;fi==null||fi.apply(void 0,arguments),(Li=Dt.onClick)===null||Li===void 0||Li.call(Dt)}),fr=Dt.mode||ui,zi=gi!=null?gi:Dt.selectable,Er=Re.useMemo(()=>qt!==void 0?qt:Pt,[Pt,qt]),Kn={horizontal:{motionName:`${ve}-slide-up`},inline:(0,Te.Z)(ve),other:{motionName:`${ve}-zoom-big`}},Le=rt("menu",Fe||Dt.prefixCls),[Ei,Ri]=Yn(Le,!At),an=Ke()(`${Le}-${ft}`,Pe==null?void 0:Pe.className,We);let di;if(typeof sn=="function")di=sn;else if(sn===null||sn===!1)di=null;else if(Dt.expandIcon===null||Dt.expandIcon===!1)di=null;else{const Li=sn!=null?sn:Dt.expandIcon;di=(0,jt.Tm)(Li,{className:Ke()(`${Le}-submenu-expand-icon`,(0,jt.l$)(Li)?(Ze=Li.props)===null||Ze===void 0?void 0:Ze.className:"")})}const yi=Re.useMemo(()=>({prefixCls:Le,inlineCollapsed:Er||!1,direction:Oe,firstLevel:!0,theme:ft,mode:fr,disableMenuItemTitleTooltip:un}),[Le,Er,Oe,un,ft]);return Ei(Re.createElement(Be.Z.Provider,{value:null},Re.createElement(ne.Provider,{value:yi},Re.createElement(ge.ZP,Object.assign({getPopupContainer:et,overflowedIndicator:Re.createElement(ye.Z,null),overflowedIndicatorPopupClassName:Ke()(Le,`${Le}-${ft}`,bi),mode:fr,selectable:zi,onClick:vr},rr,{inlineCollapsed:Er,style:Object.assign(Object.assign({},Pe==null?void 0:Pe.style),Ne),className:an,prefixCls:Le,direction:Oe,defaultMotions:Kn,expandIcon:di,ref:Tt,rootClassName:Ke()(fn,Ri)}),Wi))))});const Yt=(0,Re.forwardRef)((Gt,Tt)=>{const ot=(0,Re.useRef)(null),Ze=Re.useContext(Ve.D);return(0,Re.useImperativeHandle)(Tt,()=>({menu:ot.current,focus:At=>{var Dt;(Dt=ot.current)===null||Dt===void 0||Dt.focus(At)}})),Re.createElement($n,Object.assign({ref:ot},Gt,Ze))});Yt.Item=ce,Yt.SubMenu=fe,Yt.Divider=bt,Yt.ItemGroup=ge.BW;var tn=Yt},58421:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Dt}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(et,Oe){return Re.createElement(Ke.Z,(0,ge.Z)({},et,{ref:Oe,icon:dt}))},Me=Re.forwardRef(st),kt=Me,bt=pe(49198),Ue=pe(33853),lt=pe(38819),yt=pe(92310),jt=pe.n(yt),Ae=pe(90493),ne=pe(44127),ee=pe(52884),ce=pe(95727),se=pe(65711),fe=pe(85745),ye=pe(26112),be={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Te=be,Be=pe(91735),ze=function(rt){(0,se.Z)(Oe,rt);var et=(0,fe.Z)(Oe);function Oe(){var Pe;(0,ee.Z)(this,Oe);for(var ve=arguments.length,Fe=new Array(ve),We=0;We<ve;We++)Fe[We]=arguments[We];return Pe=et.call.apply(et,[this].concat(Fe)),Pe.state={goInputText:""},Pe.getValidValue=function(){var Ne=Pe.state.goInputText;return!Ne||Number.isNaN(Ne)?void 0:Number(Ne)},Pe.buildOptionText=function(Ne){return"".concat(Ne," ").concat(Pe.props.locale.items_per_page)},Pe.changeSize=function(Ne){Pe.props.changeSize(Number(Ne))},Pe.handleChange=function(Ne){Pe.setState({goInputText:Ne.target.value})},Pe.handleBlur=function(Ne){var ft=Pe.props,sn=ft.goButton,un=ft.quickGo,Pt=ft.rootPrefixCls,qt=Pe.state.goInputText;sn||qt===""||(Pe.setState({goInputText:""}),!(Ne.relatedTarget&&(Ne.relatedTarget.className.indexOf("".concat(Pt,"-item-link"))>=0||Ne.relatedTarget.className.indexOf("".concat(Pt,"-item"))>=0))&&un(Pe.getValidValue()))},Pe.go=function(Ne){var ft=Pe.state.goInputText;ft!==""&&(Ne.keyCode===Te.ENTER||Ne.type==="click")&&(Pe.setState({goInputText:""}),Pe.props.quickGo(Pe.getValidValue()))},Pe}return(0,ce.Z)(Oe,[{key:"getPageSizeOptions",value:function(){var ve=this.props,Fe=ve.pageSize,We=ve.pageSizeOptions;return We.some(function(Ne){return Ne.toString()===Fe.toString()})?We:We.concat([Fe.toString()]).sort(function(Ne,ft){var sn=Number.isNaN(Number(Ne))?0:Number(Ne),un=Number.isNaN(Number(ft))?0:Number(ft);return sn-un})}},{key:"render",value:function(){var ve=this,Fe=this.props,We=Fe.pageSize,Ne=Fe.locale,ft=Fe.rootPrefixCls,sn=Fe.changeSize,un=Fe.quickGo,Pt=Fe.goButton,qt=Fe.selectComponentClass,Mn=Fe.buildOptionText,hn=Fe.selectPrefixCls,fn=Fe.disabled,ui=this.state.goInputText,gi="".concat(ft,"-options"),fi=qt,bi=null,_i=null,rr=null;if(!sn&&!un)return null;var Wi=this.getPageSizeOptions();if(sn&&fi){var vr=Wi.map(function(fr,zi){return Re.createElement(fi.Option,{key:zi,value:fr.toString()},(Mn||ve.buildOptionText)(fr))});bi=Re.createElement(fi,{disabled:fn,prefixCls:hn,showSearch:!1,className:"".concat(gi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(We||Wi[0]).toString(),onChange:this.changeSize,getPopupContainer:function(zi){return zi.parentNode},"aria-label":Ne.page_size,defaultOpen:!1},vr)}return un&&(Pt&&(rr=typeof Pt=="boolean"?Re.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:fn,className:"".concat(gi,"-quick-jumper-button")},Ne.jump_to_confirm):Re.createElement("span",{onClick:this.go,onKeyUp:this.go},Pt)),_i=Re.createElement("div",{className:"".concat(gi,"-quick-jumper")},Ne.jump_to,Re.createElement("input",{disabled:fn,type:"text",value:ui,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Ne.page}),Ne.page,rr)),Re.createElement("li",{className:"".concat(gi)},bi,_i)}}]),Oe}(Re.Component);ze.defaultProps={pageSizeOptions:["10","20","50","100"]};var Ge=ze,nt=function(et){var Oe,Pe=et.rootPrefixCls,ve=et.page,Fe=et.active,We=et.className,Ne=et.showTitle,ft=et.onClick,sn=et.onKeyPress,un=et.itemRender,Pt="".concat(Pe,"-item"),qt=jt()(Pt,"".concat(Pt,"-").concat(ve),(Oe={},(0,Ae.Z)(Oe,"".concat(Pt,"-active"),Fe),(0,Ae.Z)(Oe,"".concat(Pt,"-disabled"),!ve),(0,Ae.Z)(Oe,et.className,We),Oe)),Mn=function(){ft(ve)},hn=function(gi){sn(gi,ft,ve)},fn=un(ve,"page",Re.createElement("a",{rel:"nofollow"},ve));return fn?Re.createElement("li",{title:Ne?ve.toString():null,className:qt,onClick:Mn,onKeyPress:hn,tabIndex:0},fn):null},Je=nt;function xt(){}function He(rt){var et=Number(rt);return typeof et=="number"&&!Number.isNaN(et)&&isFinite(et)&&Math.floor(et)===et}var Et=function(et,Oe,Pe){return Pe};function tt(rt,et,Oe){var Pe=typeof rt=="undefined"?et.pageSize:rt;return Math.floor((Oe.total-1)/Pe)+1}var Ot=function(rt){(0,se.Z)(Oe,rt);var et=(0,fe.Z)(Oe);function Oe(Pe){var ve;(0,ee.Z)(this,Oe),ve=et.call(this,Pe),ve.paginationNode=Re.createRef(),ve.getJumpPrevPage=function(){return Math.max(1,ve.state.current-(ve.props.showLessItems?3:5))},ve.getJumpNextPage=function(){return Math.min(tt(void 0,ve.state,ve.props),ve.state.current+(ve.props.showLessItems?3:5))},ve.getItemIcon=function(sn,un){var Pt=ve.props.prefixCls,qt=sn||Re.createElement("button",{type:"button","aria-label":un,className:"".concat(Pt,"-item-link")});return typeof sn=="function"&&(qt=Re.createElement(sn,(0,ne.Z)({},ve.props))),qt},ve.isValid=function(sn){var un=ve.props.total;return He(sn)&&sn!==ve.state.current&&He(un)&&un>0},ve.shouldDisplayQuickJumper=function(){var sn=ve.props,un=sn.showQuickJumper,Pt=sn.total,qt=ve.state.pageSize;return Pt<=qt?!1:un},ve.handleKeyDown=function(sn){(sn.keyCode===Te.ARROW_UP||sn.keyCode===Te.ARROW_DOWN)&&sn.preventDefault()},ve.handleKeyUp=function(sn){var un=ve.getValidValue(sn),Pt=ve.state.currentInputValue;un!==Pt&&ve.setState({currentInputValue:un}),sn.keyCode===Te.ENTER?ve.handleChange(un):sn.keyCode===Te.ARROW_UP?ve.handleChange(un-1):sn.keyCode===Te.ARROW_DOWN&&ve.handleChange(un+1)},ve.handleBlur=function(sn){var un=ve.getValidValue(sn);ve.handleChange(un)},ve.changePageSize=function(sn){var un=ve.state.current,Pt=tt(sn,ve.state,ve.props);un=un>Pt?Pt:un,Pt===0&&(un=ve.state.current),typeof sn=="number"&&("pageSize"in ve.props||ve.setState({pageSize:sn}),"current"in ve.props||ve.setState({current:un,currentInputValue:un})),ve.props.onShowSizeChange(un,sn),"onChange"in ve.props&&ve.props.onChange&&ve.props.onChange(un,sn)},ve.handleChange=function(sn){var un=ve.props,Pt=un.disabled,qt=un.onChange,Mn=ve.state,hn=Mn.pageSize,fn=Mn.current,ui=Mn.currentInputValue;if(ve.isValid(sn)&&!Pt){var gi=tt(void 0,ve.state,ve.props),fi=sn;return sn>gi?fi=gi:sn<1&&(fi=1),"current"in ve.props||ve.setState({current:fi}),fi!==ui&&ve.setState({currentInputValue:fi}),qt(fi,hn),fi}return fn},ve.prev=function(){ve.hasPrev()&&ve.handleChange(ve.state.current-1)},ve.next=function(){ve.hasNext()&&ve.handleChange(ve.state.current+1)},ve.jumpPrev=function(){ve.handleChange(ve.getJumpPrevPage())},ve.jumpNext=function(){ve.handleChange(ve.getJumpNextPage())},ve.hasPrev=function(){return ve.state.current>1},ve.hasNext=function(){return ve.state.current<tt(void 0,ve.state,ve.props)},ve.runIfEnter=function(sn,un){if(sn.key==="Enter"||sn.charCode===13){for(var Pt=arguments.length,qt=new Array(Pt>2?Pt-2:0),Mn=2;Mn<Pt;Mn++)qt[Mn-2]=arguments[Mn];un.apply(void 0,qt)}},ve.runIfEnterPrev=function(sn){ve.runIfEnter(sn,ve.prev)},ve.runIfEnterNext=function(sn){ve.runIfEnter(sn,ve.next)},ve.runIfEnterJumpPrev=function(sn){ve.runIfEnter(sn,ve.jumpPrev)},ve.runIfEnterJumpNext=function(sn){ve.runIfEnter(sn,ve.jumpNext)},ve.handleGoTO=function(sn){(sn.keyCode===Te.ENTER||sn.type==="click")&&ve.handleChange(ve.state.currentInputValue)},ve.renderPrev=function(sn){var un=ve.props,Pt=un.prevIcon,qt=un.itemRender,Mn=qt(sn,"prev",ve.getItemIcon(Pt,"prev page")),hn=!ve.hasPrev();return(0,Re.isValidElement)(Mn)?(0,Re.cloneElement)(Mn,{disabled:hn}):Mn},ve.renderNext=function(sn){var un=ve.props,Pt=un.nextIcon,qt=un.itemRender,Mn=qt(sn,"next",ve.getItemIcon(Pt,"next page")),hn=!ve.hasNext();return(0,Re.isValidElement)(Mn)?(0,Re.cloneElement)(Mn,{disabled:hn}):Mn};var Fe=Pe.onChange!==xt,We="current"in Pe;We&&!Fe&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Ne=Pe.defaultCurrent;"current"in Pe&&(Ne=Pe.current);var ft=Pe.defaultPageSize;return"pageSize"in Pe&&(ft=Pe.pageSize),Ne=Math.min(Ne,tt(ft,void 0,Pe)),ve.state={current:Ne,currentInputValue:Ne,pageSize:ft},ve}return(0,ce.Z)(Oe,[{key:"componentDidUpdate",value:function(ve,Fe){var We=this.props.prefixCls;if(Fe.current!==this.state.current&&this.paginationNode.current){var Ne=this.paginationNode.current.querySelector(".".concat(We,"-item-").concat(Fe.current));if(Ne&&document.activeElement===Ne){var ft;Ne==null||(ft=Ne.blur)===null||ft===void 0||ft.call(Ne)}}}},{key:"getValidValue",value:function(ve){var Fe=ve.target.value,We=tt(void 0,this.state,this.props),Ne=this.state.currentInputValue,ft;return Fe===""?ft=Fe:Number.isNaN(Number(Fe))?ft=Ne:Fe>=We?ft=We:ft=Number(Fe),ft}},{key:"getShowSizeChanger",value:function(){var ve=this.props,Fe=ve.showSizeChanger,We=ve.total,Ne=ve.totalBoundaryShowSizeChanger;return typeof Fe!="undefined"?Fe:We>Ne}},{key:"render",value:function(){var ve=this.props,Fe=ve.prefixCls,We=ve.className,Ne=ve.style,ft=ve.disabled,sn=ve.hideOnSinglePage,un=ve.total,Pt=ve.locale,qt=ve.showQuickJumper,Mn=ve.showLessItems,hn=ve.showTitle,fn=ve.showTotal,ui=ve.simple,gi=ve.itemRender,fi=ve.showPrevNextJumpers,bi=ve.jumpPrevIcon,_i=ve.jumpNextIcon,rr=ve.selectComponentClass,Wi=ve.selectPrefixCls,vr=ve.pageSizeOptions,fr=this.state,zi=fr.current,Er=fr.pageSize,Kn=fr.currentInputValue;if(sn===!0&&un<=Er)return null;var Le=tt(void 0,this.state,this.props),Ei=[],Ri=null,an=null,di=null,yi=null,Li=null,On=qt&&qt.goButton,Un=Mn?1:2,It=zi-1>0?zi-1:0,Kt=zi+1<Le?zi+1:Le,Ye=(0,ye.Z)(this.props,{aria:!0,data:!0}),nn=fn&&Re.createElement("li",{className:"".concat(Fe,"-total-text")},fn(un,[un===0?0:(zi-1)*Er+1,zi*Er>un?un:zi*Er]));if(ui){On&&(typeof On=="boolean"?Li=Re.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Pt.jump_to_confirm):Li=Re.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},On),Li=Re.createElement("li",{title:hn?"".concat(Pt.jump_to).concat(zi,"/").concat(Le):null,className:"".concat(Fe,"-simple-pager")},Li));var xn=this.renderPrev(It);return Re.createElement("ul",(0,ge.Z)({className:jt()(Fe,"".concat(Fe,"-simple"),(0,Ae.Z)({},"".concat(Fe,"-disabled"),ft),We),style:Ne,ref:this.paginationNode},Ye),nn,xn?Re.createElement("li",{title:hn?Pt.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:jt()("".concat(Fe,"-prev"),(0,Ae.Z)({},"".concat(Fe,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},xn):null,Re.createElement("li",{title:hn?"".concat(zi,"/").concat(Le):null,className:"".concat(Fe,"-simple-pager")},Re.createElement("input",{type:"text",value:Kn,disabled:ft,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),Re.createElement("span",{className:"".concat(Fe,"-slash")},"/"),Le),Re.createElement("li",{title:hn?Pt.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:jt()("".concat(Fe,"-next"),(0,Ae.Z)({},"".concat(Fe,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Kt)),Li)}if(Le<=3+Un*2){var Nt={locale:Pt,rootPrefixCls:Fe,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:hn,itemRender:gi};Le||Ei.push(Re.createElement(Je,(0,ge.Z)({},Nt,{key:"noPager",page:1,className:"".concat(Fe,"-item-disabled")})));for(var at=1;at<=Le;at+=1){var cn=zi===at;Ei.push(Re.createElement(Je,(0,ge.Z)({},Nt,{key:at,page:at,active:cn})))}}else{var Nn=Mn?Pt.prev_3:Pt.prev_5,kn=Mn?Pt.next_3:Pt.next_5,Jn=gi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(bi,"prev page")),St=gi(this.getJumpNextPage(),"jump-next",this.getItemIcon(_i,"next page"));fi&&(Ri=Jn?Re.createElement("li",{title:hn?Nn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:jt()("".concat(Fe,"-jump-prev"),(0,Ae.Z)({},"".concat(Fe,"-jump-prev-custom-icon"),!!bi))},Jn):null,an=St?Re.createElement("li",{title:hn?kn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:jt()("".concat(Fe,"-jump-next"),(0,Ae.Z)({},"".concat(Fe,"-jump-next-custom-icon"),!!_i))},St):null),yi=Re.createElement(Je,{locale:Pt,last:!0,rootPrefixCls:Fe,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Le,page:Le,active:!1,showTitle:hn,itemRender:gi}),di=Re.createElement(Je,{locale:Pt,rootPrefixCls:Fe,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:hn,itemRender:gi});var An=Math.max(1,zi-Un),qn=Math.min(zi+Un,Le);zi-1<=Un&&(qn=1+Un*2),Le-zi<=Un&&(An=Le-Un*2);for(var Si=An;Si<=qn;Si+=1){var rn=zi===Si;Ei.push(Re.createElement(Je,{locale:Pt,rootPrefixCls:Fe,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Si,page:Si,active:rn,showTitle:hn,itemRender:gi}))}zi-1>=Un*2&&zi!==3&&(Ei[0]=(0,Re.cloneElement)(Ei[0],{className:"".concat(Fe,"-item-after-jump-prev")}),Ei.unshift(Ri)),Le-zi>=Un*2&&zi!==Le-2&&(Ei[Ei.length-1]=(0,Re.cloneElement)(Ei[Ei.length-1],{className:"".concat(Fe,"-item-before-jump-next")}),Ei.push(an)),An!==1&&Ei.unshift(di),qn!==Le&&Ei.push(yi)}var bn=!this.hasPrev()||!Le,Ft=!this.hasNext()||!Le,Pn=this.renderPrev(It),yn=this.renderNext(Kt);return Re.createElement("ul",(0,ge.Z)({className:jt()(Fe,We,(0,Ae.Z)({},"".concat(Fe,"-disabled"),ft)),style:Ne,ref:this.paginationNode},Ye),nn,Pn?Re.createElement("li",{title:hn?Pt.prev_page:null,onClick:this.prev,tabIndex:bn?null:0,onKeyPress:this.runIfEnterPrev,className:jt()("".concat(Fe,"-prev"),(0,Ae.Z)({},"".concat(Fe,"-disabled"),bn)),"aria-disabled":bn},Pn):null,Ei,yn?Re.createElement("li",{title:hn?Pt.next_page:null,onClick:this.next,tabIndex:Ft?null:0,onKeyPress:this.runIfEnterNext,className:jt()("".concat(Fe,"-next"),(0,Ae.Z)({},"".concat(Fe,"-disabled"),Ft)),"aria-disabled":Ft},yn):null,Re.createElement(Ge,{disabled:ft,locale:Pt,rootPrefixCls:Fe,selectComponentClass:rr,selectPrefixCls:Wi,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:zi,pageSize:Er,pageSizeOptions:vr,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:On}))}}],[{key:"getDerivedStateFromProps",value:function(ve,Fe){var We={};if("current"in ve&&(We.current=ve.current,ve.current!==Fe.current&&(We.currentInputValue=We.current)),"pageSize"in ve&&ve.pageSize!==Fe.pageSize){var Ne=Fe.current,ft=tt(ve.pageSize,Fe,ve);Ne=Ne>ft?ft:Ne,"current"in ve||(We.current=Ne,We.currentInputValue=Ne),We.pageSize=ve.pageSize}return We}}]),Oe}(Re.Component);Ot.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:xt,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:xt,locale:Be.Z,style:{},itemRender:Et,totalBoundaryShowSizeChanger:50};var gt=Ot,Ht=pe(22075),Xt=pe(36355),Ut=pe(19716),it=pe(8628),_e=pe(9763),Wt=pe(57809);const Dn=rt=>Re.createElement(Wt.default,Object.assign({},rt,{showSearch:!0,size:"small"})),Bn=rt=>Re.createElement(Wt.default,Object.assign({},rt,{showSearch:!0,size:"middle"}));Dn.Option=Wt.default.Option,Bn.Option=Wt.default.Option;var $t=pe(9937),ln=pe(17313),Tn=pe(83116),ei=pe(37613);const Ln=rt=>{const{componentCls:et}=rt;return{[`${et}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${et}-item-link`]:{color:rt.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${et}-item-link`]:{color:rt.colorTextDisabled,cursor:"not-allowed"}}},[`&${et}-disabled`]:{cursor:"not-allowed",[`${et}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:rt.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:rt.colorBorder,backgroundColor:rt.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:rt.itemActiveBgDisabled},a:{color:rt.itemActiveColorDisabled}}},[`${et}-item-link`]:{color:rt.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${et}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${et}-simple-pager`]:{color:rt.colorTextDisabled},[`${et}-jump-prev, ${et}-jump-next`]:{[`${et}-item-link-icon`]:{opacity:0},[`${et}-item-ellipsis`]:{opacity:1}}},[`&${et}-simple`]:{[`${et}-prev, ${et}-next`]:{[`&${et}-disabled ${et}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Yn=rt=>{const{componentCls:et}=rt;return{[`&${et}-mini ${et}-total-text, &${et}-mini ${et}-simple-pager`]:{height:rt.itemSizeSM,lineHeight:`${rt.itemSizeSM}px`},[`&${et}-mini ${et}-item`]:{minWidth:rt.itemSizeSM,height:rt.itemSizeSM,margin:0,lineHeight:`${rt.itemSizeSM-2}px`},[`&${et}-mini:not(${et}-disabled) ${et}-item:not(${et}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:rt.colorBgTextHover},"&:active":{backgroundColor:rt.colorBgTextActive}},[`&${et}-mini ${et}-prev, &${et}-mini ${et}-next`]:{minWidth:rt.itemSizeSM,height:rt.itemSizeSM,margin:0,lineHeight:`${rt.itemSizeSM}px`},[`&${et}-mini:not(${et}-disabled)`]:{[`${et}-prev, ${et}-next`]:{[`&:hover ${et}-item-link`]:{backgroundColor:rt.colorBgTextHover},[`&:active ${et}-item-link`]:{backgroundColor:rt.colorBgTextActive},[`&${et}-disabled:hover ${et}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${et}-mini ${et}-prev ${et}-item-link,
|
|
|
&${et}-mini ${et}-next ${et}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:rt.itemSizeSM,lineHeight:`${rt.itemSizeSM}px`}},[`&${et}-mini ${et}-jump-prev, &${et}-mini ${et}-jump-next`]:{height:rt.itemSizeSM,marginInlineEnd:0,lineHeight:`${rt.itemSizeSM}px`},[`&${et}-mini ${et}-options`]:{marginInlineStart:rt.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:rt.miniOptionsSizeChangerTop},"&-quick-jumper":{height:rt.itemSizeSM,lineHeight:`${rt.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,$t.x0)(rt)),{width:rt.paginationMiniQuickJumperInputWidth,height:rt.controlHeightSM})}}}},zt=rt=>{const{componentCls:et}=rt;return{[`
|
|
|
&${et}-simple ${et}-prev,
|
|
|
&${et}-simple ${et}-next
|
|
|
`]:{height:rt.itemSizeSM,lineHeight:`${rt.itemSizeSM}px`,verticalAlign:"top",[`${et}-item-link`]:{height:rt.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:rt.colorBgTextHover},"&:active":{backgroundColor:rt.colorBgTextActive},"&::after":{height:rt.itemSizeSM,lineHeight:`${rt.itemSizeSM}px`}}},[`&${et}-simple ${et}-simple-pager`]:{display:"inline-block",height:rt.itemSizeSM,marginInlineEnd:rt.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:rt.marginXS,padding:`0 ${rt.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:rt.itemInputBg,border:`${rt.lineWidth}px ${rt.lineType} ${rt.colorBorder}`,borderRadius:rt.borderRadius,outline:"none",transition:`border-color ${rt.motionDurationMid}`,color:"inherit","&:hover":{borderColor:rt.colorPrimary},"&:focus":{borderColor:rt.colorPrimaryHover,boxShadow:`${rt.inputOutlineOffset}px 0 ${rt.controlOutlineWidth}px ${rt.controlOutline}`},"&[disabled]":{color:rt.colorTextDisabled,backgroundColor:rt.colorBgContainerDisabled,borderColor:rt.colorBorder,cursor:"not-allowed"}}}}},wn=rt=>{const{componentCls:et}=rt;return{[`${et}-jump-prev, ${et}-jump-next`]:{outline:0,[`${et}-item-container`]:{position:"relative",[`${et}-item-link-icon`]:{color:rt.colorPrimary,fontSize:rt.fontSizeSM,opacity:0,transition:`all ${rt.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${et}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:rt.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:rt.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:rt.paginationEllipsisTextIndent,opacity:1,transition:`all ${rt.motionDurationMid}`}},"&:hover":{[`${et}-item-link-icon`]:{opacity:1},[`${et}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${et}-prev,
|
|
|
${et}-jump-prev,
|
|
|
${et}-jump-next
|
|
|
`]:{marginInlineEnd:rt.marginXS},[`
|
|
|
${et}-prev,
|
|
|
${et}-next,
|
|
|
${et}-jump-prev,
|
|
|
${et}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:rt.itemSize,height:rt.itemSize,color:rt.colorText,fontFamily:rt.fontFamily,lineHeight:`${rt.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:rt.borderRadius,cursor:"pointer",transition:`all ${rt.motionDurationMid}`},[`${et}-prev, ${et}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:rt.colorText,cursor:"pointer",userSelect:"none"},[`${et}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:rt.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${rt.lineWidth}px ${rt.lineType} transparent`,borderRadius:rt.borderRadius,outline:"none",transition:`all ${rt.motionDurationMid}`},[`&:hover ${et}-item-link`]:{backgroundColor:rt.colorBgTextHover},[`&:active ${et}-item-link`]:{backgroundColor:rt.colorBgTextActive},[`&${et}-disabled:hover`]:{[`${et}-item-link`]:{backgroundColor:"transparent"}}},[`${et}-slash`]:{marginInlineEnd:rt.paginationSlashMarginInlineEnd,marginInlineStart:rt.paginationSlashMarginInlineStart},[`${et}-options`]:{display:"inline-block",marginInlineStart:rt.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:rt.controlHeight,marginInlineStart:rt.marginXS,lineHeight:`${rt.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,$t.ik)(rt)),{width:rt.controlHeightLG*1.25,height:rt.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:rt.marginXS,marginInlineEnd:rt.marginXS})}}}},$n=rt=>{const{componentCls:et}=rt;return{[`${et}-item`]:{display:"inline-block",minWidth:rt.itemSize,height:rt.itemSize,marginInlineEnd:rt.marginXS,fontFamily:rt.fontFamily,lineHeight:`${rt.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${rt.lineWidth}px ${rt.lineType} transparent`,borderRadius:rt.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${rt.paginationItemPaddingInline}px`,color:rt.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${et}-item-active)`]:{"&:hover":{transition:`all ${rt.motionDurationMid}`,backgroundColor:rt.colorBgTextHover},"&:active":{backgroundColor:rt.colorBgTextActive}},"&-active":{fontWeight:rt.fontWeightStrong,backgroundColor:rt.itemActiveBg,borderColor:rt.colorPrimary,a:{color:rt.colorPrimary},"&:hover":{borderColor:rt.colorPrimaryHover},"&:hover a":{color:rt.colorPrimaryHover}}}}},Yt=rt=>{const{componentCls:et}=rt;return{[et]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ln.Wf)(rt)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${et}-total-text`]:{display:"inline-block",height:rt.itemSize,marginInlineEnd:rt.marginXS,lineHeight:`${rt.itemSize-2}px`,verticalAlign:"middle"}}),$n(rt)),wn(rt)),zt(rt)),Yn(rt)),Ln(rt)),{[`@media only screen and (max-width: ${rt.screenLG}px)`]:{[`${et}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${rt.screenSM}px)`]:{[`${et}-options`]:{display:"none"}}}),[`&${rt.componentCls}-rtl`]:{direction:"rtl"}}},tn=rt=>{const{componentCls:et}=rt;return{[`${et}${et}-disabled:not(${et}-mini)`]:{"&, &:hover":{[`${et}-item-link`]:{borderColor:rt.colorBorder}},"&:focus-visible":{[`${et}-item-link`]:{borderColor:rt.colorBorder}},[`${et}-item, ${et}-item-link`]:{backgroundColor:rt.colorBgContainerDisabled,borderColor:rt.colorBorder,[`&:hover:not(${et}-item-active)`]:{backgroundColor:rt.colorBgContainerDisabled,borderColor:rt.colorBorder,a:{color:rt.colorTextDisabled}},[`&${et}-item-active`]:{backgroundColor:rt.itemActiveBgDisabled}},[`${et}-prev, ${et}-next`]:{"&:hover button":{backgroundColor:rt.colorBgContainerDisabled,borderColor:rt.colorBorder,color:rt.colorTextDisabled},[`${et}-item-link`]:{backgroundColor:rt.colorBgContainerDisabled,borderColor:rt.colorBorder}}},[`${et}:not(${et}-mini)`]:{[`${et}-prev, ${et}-next`]:{"&:hover button":{borderColor:rt.colorPrimaryHover,backgroundColor:rt.itemBg},[`${et}-item-link`]:{backgroundColor:rt.itemLinkBg,borderColor:rt.colorBorder},[`&:hover ${et}-item-link`]:{borderColor:rt.colorPrimary,backgroundColor:rt.itemBg,color:rt.colorPrimary},[`&${et}-disabled`]:{[`${et}-item-link`]:{borderColor:rt.colorBorder,color:rt.colorTextDisabled}}},[`${et}-item`]:{backgroundColor:rt.itemBg,border:`${rt.lineWidth}px ${rt.lineType} ${rt.colorBorder}`,[`&:hover:not(${et}-item-active)`]:{borderColor:rt.colorPrimary,backgroundColor:rt.itemBg,a:{color:rt.colorPrimary}},"&-active":{borderColor:rt.colorPrimary}}}}},Gt=rt=>{const{componentCls:et}=rt;return{[`${et}:not(${et}-disabled)`]:{[`${et}-item`]:Object.assign({},(0,ln.Qy)(rt)),[`${et}-jump-prev, ${et}-jump-next`]:{"&:focus-visible":Object.assign({[`${et}-item-link-icon`]:{opacity:1},[`${et}-item-ellipsis`]:{opacity:0}},(0,ln.oN)(rt))},[`${et}-prev, ${et}-next`]:{[`&:focus-visible ${et}-item-link`]:Object.assign({},(0,ln.oN)(rt))}}}};var Tt=(0,Tn.Z)("Pagination",rt=>{const et=(0,ei.TS)(rt,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:rt.marginXXS/2,paginationMiniQuickJumperInputWidth:rt.controlHeightLG*1.1,paginationItemPaddingInline:rt.marginXXS*1.5,paginationEllipsisLetterSpacing:rt.marginXXS/2,paginationSlashMarginInlineStart:rt.marginXXS,paginationSlashMarginInlineEnd:rt.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,$t.e5)(rt),(0,$t.TM)(rt));return[Yt(et),Gt(et),rt.wireframe&&tn(et)]},rt=>({itemBg:rt.colorBgContainer,itemSize:rt.controlHeight,itemSizeSM:rt.controlHeightSM,itemActiveBg:rt.colorBgContainer,itemLinkBg:rt.colorBgContainer,itemActiveColorDisabled:rt.colorTextDisabled,itemActiveBgDisabled:rt.controlItemBgActiveDisabled,itemInputBg:rt.colorBgContainer,miniOptionsSizeChangerTop:0})),ot=function(rt,et){var Oe={};for(var Pe in rt)Object.prototype.hasOwnProperty.call(rt,Pe)&&et.indexOf(Pe)<0&&(Oe[Pe]=rt[Pe]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,Pe=Object.getOwnPropertySymbols(rt);ve<Pe.length;ve++)et.indexOf(Pe[ve])<0&&Object.prototype.propertyIsEnumerable.call(rt,Pe[ve])&&(Oe[Pe[ve]]=rt[Pe[ve]]);return Oe},At=rt=>{const{prefixCls:et,selectPrefixCls:Oe,className:Pe,rootClassName:ve,style:Fe,size:We,locale:Ne,selectComponentClass:ft,responsive:sn,showSizeChanger:un}=rt,Pt=ot(rt,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:qt}=(0,it.Z)(sn),{getPrefixCls:Mn,direction:hn,pagination:fn={}}=Re.useContext(Xt.E_),ui=Mn("pagination",et),[gi,fi]=Tt(ui),bi=un!=null?un:fn.showSizeChanger,_i=Re.useMemo(()=>{const Le=Re.createElement("span",{className:`${ui}-item-ellipsis`},"\u2022\u2022\u2022"),Ei=Re.createElement("button",{className:`${ui}-item-link`,type:"button",tabIndex:-1},hn==="rtl"?Re.createElement(lt.Z,null):Re.createElement(Ue.Z,null)),Ri=Re.createElement("button",{className:`${ui}-item-link`,type:"button",tabIndex:-1},hn==="rtl"?Re.createElement(Ue.Z,null):Re.createElement(lt.Z,null)),an=Re.createElement("a",{className:`${ui}-item-link`},Re.createElement("div",{className:`${ui}-item-container`},hn==="rtl"?Re.createElement(bt.Z,{className:`${ui}-item-link-icon`}):Re.createElement(kt,{className:`${ui}-item-link-icon`}),Le)),di=Re.createElement("a",{className:`${ui}-item-link`},Re.createElement("div",{className:`${ui}-item-container`},hn==="rtl"?Re.createElement(kt,{className:`${ui}-item-link-icon`}):Re.createElement(bt.Z,{className:`${ui}-item-link-icon`}),Le));return{prevIcon:Ei,nextIcon:Ri,jumpPrevIcon:an,jumpNextIcon:di}},[hn,ui]),[rr]=(0,_e.Z)("Pagination",Ht.Z),Wi=Object.assign(Object.assign({},rr),Ne),vr=(0,Ut.Z)(We),fr=vr==="small"||!!(qt&&!vr&&sn),zi=Mn("select",Oe),Er=jt()({[`${ui}-mini`]:fr,[`${ui}-rtl`]:hn==="rtl"},fn==null?void 0:fn.className,Pe,ve,fi),Kn=Object.assign(Object.assign({},fn==null?void 0:fn.style),Fe);return gi(Re.createElement(gt,Object.assign({},_i,Pt,{style:Kn,prefixCls:ui,selectPrefixCls:zi,className:Er,selectComponentClass:ft||(fr?Dn:Bn),locale:Wi,showSizeChanger:bi})))},Dt=At},39722:function(Vn,Cn,pe){"use strict";pe.d(Cn,{t5:function(){return Ue}});var ge=pe(92310),Re=pe.n(ge),Ve=pe(55477),dt=pe(59301),Ke=pe(36355),st=pe(77578),Me=pe(17356),kt=function(yt,jt){var Ae={};for(var ne in yt)Object.prototype.hasOwnProperty.call(yt,ne)&&jt.indexOf(ne)<0&&(Ae[ne]=yt[ne]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,ne=Object.getOwnPropertySymbols(yt);ee<ne.length;ee++)jt.indexOf(ne[ee])<0&&Object.prototype.propertyIsEnumerable.call(yt,ne[ee])&&(Ae[ne[ee]]=yt[ne[ee]]);return Ae};const bt=(yt,jt,Ae)=>{if(!(!jt&&!Ae))return dt.createElement(dt.Fragment,null,jt&&dt.createElement("div",{className:`${yt}-title`},(0,st.Z)(jt)),dt.createElement("div",{className:`${yt}-inner-content`},(0,st.Z)(Ae)))},Ue=yt=>{const{hashId:jt,prefixCls:Ae,className:ne,style:ee,placement:ce="top",title:se,content:fe,children:ye}=yt;return dt.createElement("div",{className:Re()(jt,Ae,`${Ae}-pure`,`${Ae}-placement-${ce}`,ne),style:ee},dt.createElement("div",{className:`${Ae}-arrow`}),dt.createElement(Ve.G,Object.assign({},yt,{className:jt,prefixCls:Ae}),ye||bt(Ae,se,fe)))},lt=yt=>{const{prefixCls:jt}=yt,Ae=kt(yt,["prefixCls"]),{getPrefixCls:ne}=dt.useContext(Ke.E_),ee=ne("popover",jt),[ce,se]=(0,Me.Z)(ee);return ce(dt.createElement(Ue,Object.assign({},Ae,{prefixCls:ee,hashId:se})))};Cn.ZP=lt},60324:function(Vn,Cn,pe){"use strict";var ge=pe(92310),Re=pe.n(ge),Ve=pe(59301),dt=pe(77578),Ke=pe(62892),st=pe(36355),Me=pe(6848),kt=pe(39722),bt=pe(17356),Ue=function(jt,Ae){var ne={};for(var ee in jt)Object.prototype.hasOwnProperty.call(jt,ee)&&Ae.indexOf(ee)<0&&(ne[ee]=jt[ee]);if(jt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,ee=Object.getOwnPropertySymbols(jt);ce<ee.length;ce++)Ae.indexOf(ee[ce])<0&&Object.prototype.propertyIsEnumerable.call(jt,ee[ce])&&(ne[ee[ce]]=jt[ee[ce]]);return ne};const lt=jt=>{let{title:Ae,content:ne,prefixCls:ee}=jt;return Ve.createElement(Ve.Fragment,null,Ae&&Ve.createElement("div",{className:`${ee}-title`},(0,dt.Z)(Ae)),Ve.createElement("div",{className:`${ee}-inner-content`},(0,dt.Z)(ne)))},yt=Ve.forwardRef((jt,Ae)=>{const{prefixCls:ne,title:ee,content:ce,overlayClassName:se,placement:fe="top",trigger:ye="hover",mouseEnterDelay:be=.1,mouseLeaveDelay:Te=.1,overlayStyle:Be={}}=jt,ze=Ue(jt,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:Ge}=Ve.useContext(st.E_),nt=Ge("popover",ne),[Je,xt]=(0,bt.Z)(nt),He=Ge(),Et=Re()(se,xt);return Je(Ve.createElement(Me.Z,Object.assign({placement:fe,trigger:ye,mouseEnterDelay:be,mouseLeaveDelay:Te,overlayStyle:Be},ze,{prefixCls:nt,overlayClassName:Et,ref:Ae,overlay:ee||ce?Ve.createElement(lt,{prefixCls:nt,title:ee,content:ce}):null,transitionName:(0,Ke.m)(He,"zoom-big",ze.transitionName),"data-popover-inject":!0})))});yt._InternalPanelDoNotUseOrYouWillBeFired=kt.ZP,Cn.Z=yt},17356:function(Vn,Cn,pe){"use strict";var ge=pe(17313),Re=pe(29878),Ve=pe(19447),dt=pe(33166),Ke=pe(83116),st=pe(37613);const Me=Ue=>{const{componentCls:lt,popoverColor:yt,minWidth:jt,fontWeightStrong:Ae,popoverPadding:ne,boxShadowSecondary:ee,colorTextHeading:ce,borderRadiusLG:se,zIndexPopup:fe,marginXS:ye,colorBgElevated:be,popoverBg:Te}=Ue;return[{[lt]:Object.assign(Object.assign({},(0,ge.Wf)(Ue)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:fe,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":be,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${lt}-content`]:{position:"relative"},[`${lt}-inner`]:{backgroundColor:Te,backgroundClip:"padding-box",borderRadius:se,boxShadow:ee,padding:ne},[`${lt}-title`]:{minWidth:jt,marginBottom:ye,color:ce,fontWeight:Ae},[`${lt}-inner-content`]:{color:yt}})},(0,Ve.ZP)(Ue,{colorBg:"var(--antd-arrow-background-color)"}),{[`${lt}-pure`]:{position:"relative",maxWidth:"none",margin:Ue.sizePopupArrow,display:"inline-block",[`${lt}-content`]:{display:"inline-block"}}}]},kt=Ue=>{const{componentCls:lt}=Ue;return{[lt]:dt.i.map(yt=>{const jt=Ue[`${yt}6`];return{[`&${lt}-${yt}`]:{"--antd-arrow-background-color":jt,[`${lt}-inner`]:{backgroundColor:jt},[`${lt}-arrow`]:{background:"transparent"}}}})}},bt=Ue=>{const{componentCls:lt,lineWidth:yt,lineType:jt,colorSplit:Ae,paddingSM:ne,controlHeight:ee,fontSize:ce,lineHeight:se,padding:fe}=Ue,ye=ee-Math.round(ce*se),be=ye/2,Te=ye/2-yt,Be=fe;return{[lt]:{[`${lt}-inner`]:{padding:0},[`${lt}-title`]:{margin:0,padding:`${be}px ${Be}px ${Te}px`,borderBottom:`${yt}px ${jt} ${Ae}`},[`${lt}-inner-content`]:{padding:`${ne}px ${Be}px`}}}};Cn.Z=(0,Ke.Z)("Popover",Ue=>{const{colorBgElevated:lt,colorText:yt,wireframe:jt}=Ue,Ae=(0,st.TS)(Ue,{popoverPadding:12,popoverBg:lt,popoverColor:yt});return[Me(Ae),kt(Ae),jt&&bt(Ae),(0,Re._y)(Ae,"zoom-big")]},Ue=>({width:177,minWidth:177,zIndexPopup:Ue.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},93948:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return un}});var ge=pe(59301),Re=pe(29679),Ve=pe(40001),dt=pe(19248),Ke=pe(99267),st=pe(92310),Me=pe.n(st),kt=pe(2738),bt=pe(36355),Ue=pe(96663),lt=pe(44127),yt=pe(6620),jt={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ae=function(){var qt=(0,ge.useRef)([]),Mn=(0,ge.useRef)(null);return(0,ge.useEffect)(function(){var hn=Date.now(),fn=!1;qt.current.forEach(function(ui){if(ui){fn=!0;var gi=ui.style;gi.transitionDuration=".3s, .3s, .3s, .06s",Mn.current&&hn-Mn.current<100&&(gi.transitionDuration="0s, 0s")}}),fn&&(Mn.current=Date.now())}),qt.current},ne=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],ee=function(qt){var Mn=(0,lt.Z)((0,lt.Z)({},jt),qt),hn=Mn.className,fn=Mn.percent,ui=Mn.prefixCls,gi=Mn.strokeColor,fi=Mn.strokeLinecap,bi=Mn.strokeWidth,_i=Mn.style,rr=Mn.trailColor,Wi=Mn.trailWidth,vr=Mn.transition,fr=(0,yt.Z)(Mn,ne);delete fr.gapPosition;var zi=Array.isArray(fn)?fn:[fn],Er=Array.isArray(gi)?gi:[gi],Kn=Ae(),Le=bi/2,Ei=100-bi/2,Ri="M ".concat(fi==="round"?Le:0,",").concat(Le,`
|
|
|
L `).concat(fi==="round"?Ei:100,",").concat(Le),an="0 0 100 ".concat(bi),di=0;return ge.createElement("svg",(0,Ue.Z)({className:Me()("".concat(ui,"-line"),hn),viewBox:an,preserveAspectRatio:"none",style:_i},fr),ge.createElement("path",{className:"".concat(ui,"-line-trail"),d:Ri,strokeLinecap:fi,stroke:rr,strokeWidth:Wi||bi,fillOpacity:"0"}),zi.map(function(yi,Li){var On=1;switch(fi){case"round":On=1-bi/100;break;case"square":On=1-bi/2/100;break;default:On=1;break}var Un={strokeDasharray:"".concat(yi*On,"px, 100px"),strokeDashoffset:"-".concat(di,"px"),transition:vr||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},It=Er[Li]||Er[Er.length-1];return di+=yi,ge.createElement("path",{key:Li,className:"".concat(ui,"-line-path"),d:Ri,strokeLinecap:fi,stroke:It,strokeWidth:bi,fillOpacity:"0",ref:function(Ye){Kn[Li]=Ye},style:Un})}))},ce=ee,se=pe(20135),fe=pe(72071),ye=pe(47273),be=0,Te=(0,ye.Z)();function Be(){var Pt;return Te?(Pt=be,be+=1):Pt="TEST_OR_SSR",Pt}var ze=function(Pt){var qt=ge.useState(),Mn=(0,fe.Z)(qt,2),hn=Mn[0],fn=Mn[1];return ge.useEffect(function(){fn("rc_progress_".concat(Be()))},[]),Pt||hn},Ge=function(qt){var Mn=qt.bg,hn=qt.children;return ge.createElement("div",{style:{width:"100%",height:"100%",background:Mn}},hn)};function nt(Pt,qt){return Object.keys(Pt).map(function(Mn){var hn=parseFloat(Mn),fn="".concat(Math.floor(hn*qt),"%");return"".concat(Pt[Mn]," ").concat(fn)})}var Je=ge.forwardRef(function(Pt,qt){var Mn=Pt.prefixCls,hn=Pt.color,fn=Pt.gradientId,ui=Pt.radius,gi=Pt.style,fi=Pt.ptg,bi=Pt.strokeLinecap,_i=Pt.strokeWidth,rr=Pt.size,Wi=Pt.gapDegree,vr=hn&&(0,se.Z)(hn)==="object",fr=vr?"#FFF":void 0,zi=rr/2,Er=ge.createElement("circle",{className:"".concat(Mn,"-circle-path"),r:ui,cx:zi,cy:zi,stroke:fr,strokeLinecap:bi,strokeWidth:_i,opacity:fi===0?0:1,style:gi,ref:qt});if(!vr)return Er;var Kn="".concat(fn,"-conic"),Le=Wi?"".concat(180+Wi/2,"deg"):"0deg",Ei=nt(hn,(360-Wi)/360),Ri=nt(hn,1),an="conic-gradient(from ".concat(Le,", ").concat(Ei.join(", "),")"),di="linear-gradient(to ".concat(Wi?"bottom":"top",", ").concat(Ri.join(", "),")");return ge.createElement(ge.Fragment,null,ge.createElement("mask",{id:Kn},Er),ge.createElement("foreignObject",{x:0,y:0,width:rr,height:rr,mask:"url(#".concat(Kn,")")},ge.createElement(Ge,{bg:di},ge.createElement(Ge,{bg:an}))))}),xt=Je,He=100,Et=function(qt,Mn,hn,fn,ui,gi,fi,bi,_i,rr){var Wi=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,vr=hn/100*360*((360-gi)/360),fr=gi===0?0:{bottom:0,top:180,left:90,right:-90}[fi],zi=(100-fn)/100*Mn;_i==="round"&&fn!==100&&(zi+=rr/2,zi>=Mn&&(zi=Mn-.01));var Er=He/2;return{stroke:typeof bi=="string"?bi:void 0,strokeDasharray:"".concat(Mn,"px ").concat(qt),strokeDashoffset:zi+Wi,transform:"rotate(".concat(ui+vr+fr,"deg)"),transformOrigin:"".concat(Er,"px ").concat(Er,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},tt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Ot(Pt){var qt=Pt!=null?Pt:[];return Array.isArray(qt)?qt:[qt]}var gt=function(qt){var Mn=(0,lt.Z)((0,lt.Z)({},jt),qt),hn=Mn.id,fn=Mn.prefixCls,ui=Mn.steps,gi=Mn.strokeWidth,fi=Mn.trailWidth,bi=Mn.gapDegree,_i=bi===void 0?0:bi,rr=Mn.gapPosition,Wi=Mn.trailColor,vr=Mn.strokeLinecap,fr=Mn.style,zi=Mn.className,Er=Mn.strokeColor,Kn=Mn.percent,Le=(0,yt.Z)(Mn,tt),Ei=He/2,Ri=ze(hn),an="".concat(Ri,"-gradient"),di=Ei-gi/2,yi=Math.PI*2*di,Li=_i>0?90+_i/2:-90,On=yi*((360-_i)/360),Un=(0,se.Z)(ui)==="object"?ui:{count:ui,space:2},It=Un.count,Kt=Un.space,Ye=Ot(Kn),nn=Ot(Er),xn=nn.find(function(St){return St&&(0,se.Z)(St)==="object"}),Nt=xn&&(0,se.Z)(xn)==="object",at=Nt?"butt":vr,cn=Et(yi,On,0,100,Li,_i,rr,Wi,at,gi),Nn=Ae(),kn=function(){var An=0;return Ye.map(function(qn,Si){var rn=nn[Si]||nn[nn.length-1],bn=Et(yi,On,An,qn,Li,_i,rr,rn,at,gi);return An+=qn,ge.createElement(xt,{key:Si,color:rn,ptg:qn,radius:di,prefixCls:fn,gradientId:an,style:bn,strokeLinecap:at,strokeWidth:gi,gapDegree:_i,ref:function(Pn){Nn[Si]=Pn},size:He})}).reverse()},Jn=function(){var An=Math.round(It*(Ye[0]/100)),qn=100/It,Si=0;return new Array(It).fill(null).map(function(rn,bn){var Ft=bn<=An-1?nn[0]:Wi,Pn=Ft&&(0,se.Z)(Ft)==="object"?"url(#".concat(an,")"):void 0,yn=Et(yi,On,Si,qn,Li,_i,rr,Ft,"butt",gi,Kt);return Si+=(On-yn.strokeDashoffset+Kt)*100/On,ge.createElement("circle",{key:bn,className:"".concat(fn,"-circle-path"),r:di,cx:Ei,cy:Ei,stroke:Pn,strokeWidth:gi,opacity:1,style:yn,ref:function(Gn){Nn[bn]=Gn}})})};return ge.createElement("svg",(0,Ue.Z)({className:Me()("".concat(fn,"-circle"),zi),viewBox:"0 0 ".concat(He," ").concat(He),style:fr,id:hn,role:"presentation"},Le),!It&&ge.createElement("circle",{className:"".concat(fn,"-circle-trail"),r:di,cx:Ei,cy:Ei,stroke:Wi,strokeLinecap:at,strokeWidth:fi||gi,style:cn}),It?Jn():kn())},Ht=gt,Xt={Line:ce,Circle:Ht},Ut=pe(6848),it=pe(93398);function _e(Pt){return!Pt||Pt<0?0:Pt>100?100:Pt}function Wt(Pt){let{success:qt,successPercent:Mn}=Pt,hn=Mn;return qt&&"progress"in qt&&(hn=qt.progress),qt&&"percent"in qt&&(hn=qt.percent),hn}const Dn=Pt=>{let{percent:qt,success:Mn,successPercent:hn}=Pt;const fn=_e(Wt({success:Mn,successPercent:hn}));return[fn,_e(_e(qt)-fn)]},Bn=Pt=>{let{success:qt={},strokeColor:Mn}=Pt;const{strokeColor:hn}=qt;return[hn||it.presetPrimaryColors.green,Mn||null]},$t=(Pt,qt,Mn)=>{var hn,fn,ui,gi;let fi=-1,bi=-1;if(qt==="step"){const _i=Mn.steps,rr=Mn.strokeWidth;typeof Pt=="string"||typeof Pt=="undefined"?(fi=Pt==="small"?2:14,bi=rr!=null?rr:8):typeof Pt=="number"?[fi,bi]=[Pt,Pt]:[fi=14,bi=8]=Pt,fi*=_i}else if(qt==="line"){const _i=Mn==null?void 0:Mn.strokeWidth;typeof Pt=="string"||typeof Pt=="undefined"?bi=_i||(Pt==="small"?6:8):typeof Pt=="number"?[fi,bi]=[Pt,Pt]:[fi=-1,bi=8]=Pt}else(qt==="circle"||qt==="dashboard")&&(typeof Pt=="string"||typeof Pt=="undefined"?[fi,bi]=Pt==="small"?[60,60]:[120,120]:typeof Pt=="number"?[fi,bi]=[Pt,Pt]:(fi=(fn=(hn=Pt[0])!==null&&hn!==void 0?hn:Pt[1])!==null&&fn!==void 0?fn:120,bi=(gi=(ui=Pt[0])!==null&&ui!==void 0?ui:Pt[1])!==null&&gi!==void 0?gi:120));return[fi,bi]},ln=3,Tn=Pt=>ln/Pt*100;var Ln=Pt=>{const{prefixCls:qt,trailColor:Mn=null,strokeLinecap:hn="round",gapPosition:fn,gapDegree:ui,width:gi=120,type:fi,children:bi,success:_i,size:rr=gi}=Pt,[Wi,vr]=$t(rr,"circle");let{strokeWidth:fr}=Pt;fr===void 0&&(fr=Math.max(Tn(Wi),6));const zi={width:Wi,height:vr,fontSize:Wi*.15+6},Er=ge.useMemo(()=>{if(ui||ui===0)return ui;if(fi==="dashboard")return 75},[ui,fi]),Kn=fn||fi==="dashboard"&&"bottom"||void 0,Le=Object.prototype.toString.call(Pt.strokeColor)==="[object Object]",Ei=Bn({success:_i,strokeColor:Pt.strokeColor}),Ri=Me()(`${qt}-inner`,{[`${qt}-circle-gradient`]:Le}),an=ge.createElement(Ht,{percent:Dn(Pt),strokeWidth:fr,trailWidth:fr,strokeColor:Ei,strokeLinecap:hn,trailColor:Mn,prefixCls:qt,gapDegree:Er,gapPosition:Kn});return ge.createElement("div",{className:Ri,style:zi},Wi<=20?ge.createElement(Ut.Z,{title:bi},ge.createElement("span",null,an)):ge.createElement(ge.Fragment,null,an,bi))},Yn=function(Pt,qt){var Mn={};for(var hn in Pt)Object.prototype.hasOwnProperty.call(Pt,hn)&&qt.indexOf(hn)<0&&(Mn[hn]=Pt[hn]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fn=0,hn=Object.getOwnPropertySymbols(Pt);fn<hn.length;fn++)qt.indexOf(hn[fn])<0&&Object.prototype.propertyIsEnumerable.call(Pt,hn[fn])&&(Mn[hn[fn]]=Pt[hn[fn]]);return Mn};const zt=Pt=>{let qt=[];return Object.keys(Pt).forEach(Mn=>{const hn=parseFloat(Mn.replace(/%/g,""));isNaN(hn)||qt.push({key:hn,value:Pt[Mn]})}),qt=qt.sort((Mn,hn)=>Mn.key-hn.key),qt.map(Mn=>{let{key:hn,value:fn}=Mn;return`${fn} ${hn}%`}).join(", ")},wn=(Pt,qt)=>{const{from:Mn=it.presetPrimaryColors.blue,to:hn=it.presetPrimaryColors.blue,direction:fn=qt==="rtl"?"to left":"to right"}=Pt,ui=Yn(Pt,["from","to","direction"]);if(Object.keys(ui).length!==0){const gi=zt(ui);return{backgroundImage:`linear-gradient(${fn}, ${gi})`}}return{backgroundImage:`linear-gradient(${fn}, ${Mn}, ${hn})`}};var Yt=Pt=>{const{prefixCls:qt,direction:Mn,percent:hn,size:fn,strokeWidth:ui,strokeColor:gi,strokeLinecap:fi="round",children:bi,trailColor:_i=null,success:rr}=Pt,Wi=gi&&typeof gi!="string"?wn(gi,Mn):{backgroundColor:gi},vr=fi==="square"||fi==="butt"?0:void 0,fr={backgroundColor:_i||void 0,borderRadius:vr},zi=fn!=null?fn:[-1,ui||(fn==="small"?6:8)],[Er,Kn]=$t(zi,"line",{strokeWidth:ui}),Le=Object.assign({width:`${_e(hn)}%`,height:Kn,borderRadius:vr},Wi),Ei=Wt(Pt),Ri={width:`${_e(Ei)}%`,height:Kn,borderRadius:vr,backgroundColor:rr==null?void 0:rr.strokeColor},an={width:Er<0?"100%":Er,height:Kn};return ge.createElement(ge.Fragment,null,ge.createElement("div",{className:`${qt}-outer`,style:an},ge.createElement("div",{className:`${qt}-inner`,style:fr},ge.createElement("div",{className:`${qt}-bg`,style:Le}),Ei!==void 0?ge.createElement("div",{className:`${qt}-success-bg`,style:Ri}):null)),bi)},Gt=Pt=>{const{size:qt,steps:Mn,percent:hn=0,strokeWidth:fn=8,strokeColor:ui,trailColor:gi=null,prefixCls:fi,children:bi}=Pt,_i=Math.round(Mn*(hn/100)),rr=qt==="small"?2:14,Wi=qt!=null?qt:[rr,fn],[vr,fr]=$t(Wi,"step",{steps:Mn,strokeWidth:fn}),zi=vr/Mn,Er=new Array(Mn);for(let Kn=0;Kn<Mn;Kn++){const Le=Array.isArray(ui)?ui[Kn]:ui;Er[Kn]=ge.createElement("div",{key:Kn,className:Me()(`${fi}-steps-item`,{[`${fi}-steps-item-active`]:Kn<=_i-1}),style:{backgroundColor:Kn<=_i-1?Le:gi,width:zi,height:fr}})}return ge.createElement("div",{className:`${fi}-steps-outer`},Er,bi)},Tt=pe(93083),ot=pe(17313),Ze=pe(83116),At=pe(37613);const Dt=Pt=>{const qt=Pt?"100%":"-100%";return new Tt.Keyframes(`antProgress${Pt?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${qt}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${qt}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},rt=Pt=>{const{componentCls:qt,iconCls:Mn}=Pt;return{[qt]:Object.assign(Object.assign({},(0,ot.Wf)(Pt)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:Pt.fontSize,marginInlineEnd:Pt.marginXS,marginBottom:Pt.marginXS},[`${qt}-outer`]:{display:"inline-block",width:"100%"},[`&${qt}-show-info`]:{[`${qt}-outer`]:{marginInlineEnd:`calc(-2em - ${Pt.marginXS}px)`,paddingInlineEnd:`calc(2em + ${Pt.paddingXS}px)`}},[`${qt}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:Pt.remainingColor,borderRadius:Pt.lineBorderRadius},[`${qt}-inner:not(${qt}-circle-gradient)`]:{[`${qt}-circle-path`]:{stroke:Pt.defaultColor}},[`${qt}-success-bg, ${qt}-bg`]:{position:"relative",backgroundColor:Pt.defaultColor,borderRadius:Pt.lineBorderRadius,transition:`all ${Pt.motionDurationSlow} ${Pt.motionEaseInOutCirc}`},[`${qt}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:Pt.colorSuccess},[`${qt}-text`]:{display:"inline-block",width:"2em",marginInlineStart:Pt.marginXS,color:Pt.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[Mn]:{fontSize:Pt.fontSize}},[`&${qt}-status-active`]:{[`${qt}-bg::before`]:{position:"absolute",inset:0,backgroundColor:Pt.colorBgContainer,borderRadius:Pt.lineBorderRadius,opacity:0,animationName:Dt(),animationDuration:Pt.progressActiveMotionDuration,animationTimingFunction:Pt.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${qt}-rtl${qt}-status-active`]:{[`${qt}-bg::before`]:{animationName:Dt(!0)}},[`&${qt}-status-exception`]:{[`${qt}-bg`]:{backgroundColor:Pt.colorError},[`${qt}-text`]:{color:Pt.colorError}},[`&${qt}-status-exception ${qt}-inner:not(${qt}-circle-gradient)`]:{[`${qt}-circle-path`]:{stroke:Pt.colorError}},[`&${qt}-status-success`]:{[`${qt}-bg`]:{backgroundColor:Pt.colorSuccess},[`${qt}-text`]:{color:Pt.colorSuccess}},[`&${qt}-status-success ${qt}-inner:not(${qt}-circle-gradient)`]:{[`${qt}-circle-path`]:{stroke:Pt.colorSuccess}}})}},et=Pt=>{const{componentCls:qt,iconCls:Mn}=Pt;return{[qt]:{[`${qt}-circle-trail`]:{stroke:Pt.remainingColor},[`&${qt}-circle ${qt}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${qt}-circle ${qt}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:Pt.circleTextColor,fontSize:Pt.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[Mn]:{fontSize:`${Pt.fontSize/Pt.fontSizeSM}em`}},[`${qt}-circle&-status-exception`]:{[`${qt}-text`]:{color:Pt.colorError}},[`${qt}-circle&-status-success`]:{[`${qt}-text`]:{color:Pt.colorSuccess}}},[`${qt}-inline-circle`]:{lineHeight:1,[`${qt}-inner`]:{verticalAlign:"bottom"}}}},Oe=Pt=>{const{componentCls:qt}=Pt;return{[qt]:{[`${qt}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:Pt.progressStepMinWidth,marginInlineEnd:Pt.progressStepMarginInlineEnd,backgroundColor:Pt.remainingColor,transition:`all ${Pt.motionDurationSlow}`,"&-active":{backgroundColor:Pt.defaultColor}}}}}},Pe=Pt=>{const{componentCls:qt,iconCls:Mn}=Pt;return{[qt]:{[`${qt}-small&-line, ${qt}-small&-line ${qt}-text ${Mn}`]:{fontSize:Pt.fontSizeSM}}}};var ve=(0,Ze.Z)("Progress",Pt=>{const qt=Pt.marginXXS/2,Mn=(0,At.TS)(Pt,{progressStepMarginInlineEnd:qt,progressStepMinWidth:qt,progressActiveMotionDuration:"2.4s"});return[rt(Mn),et(Mn),Oe(Mn),Pe(Mn)]},Pt=>({circleTextColor:Pt.colorText,defaultColor:Pt.colorInfo,remainingColor:Pt.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),Fe=function(Pt,qt){var Mn={};for(var hn in Pt)Object.prototype.hasOwnProperty.call(Pt,hn)&&qt.indexOf(hn)<0&&(Mn[hn]=Pt[hn]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fn=0,hn=Object.getOwnPropertySymbols(Pt);fn<hn.length;fn++)qt.indexOf(hn[fn])<0&&Object.prototype.propertyIsEnumerable.call(Pt,hn[fn])&&(Mn[hn[fn]]=Pt[hn[fn]]);return Mn};const We=null,Ne=["normal","exception","active","success"];var sn=ge.forwardRef((Pt,qt)=>{const{prefixCls:Mn,className:hn,rootClassName:fn,steps:ui,strokeColor:gi,percent:fi=0,size:bi="default",showInfo:_i=!0,type:rr="line",status:Wi,format:vr,style:fr}=Pt,zi=Fe(Pt,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),Er=ge.useMemo(()=>{var Ye,nn;const xn=Wt(Pt);return parseInt(xn!==void 0?(Ye=xn!=null?xn:0)===null||Ye===void 0?void 0:Ye.toString():(nn=fi!=null?fi:0)===null||nn===void 0?void 0:nn.toString(),10)},[fi,Pt.success,Pt.successPercent]),Kn=ge.useMemo(()=>!Ne.includes(Wi)&&Er>=100?"success":Wi||"normal",[Wi,Er]),{getPrefixCls:Le,direction:Ei,progress:Ri}=ge.useContext(bt.E_),an=Le("progress",Mn),[di,yi]=ve(an),Li=ge.useMemo(()=>{if(!_i)return null;const Ye=Wt(Pt);let nn;const xn=vr||(at=>`${at}%`),Nt=rr==="line";return vr||Kn!=="exception"&&Kn!=="success"?nn=xn(_e(fi),_e(Ye)):Kn==="exception"?nn=Nt?ge.createElement(dt.Z,null):ge.createElement(Ke.Z,null):Kn==="success"&&(nn=Nt?ge.createElement(Re.Z,null):ge.createElement(Ve.Z,null)),ge.createElement("span",{className:`${an}-text`,title:typeof nn=="string"?nn:void 0},nn)},[_i,fi,Er,Kn,rr,an,vr]),On=Array.isArray(gi)?gi[0]:gi,Un=typeof gi=="string"||Array.isArray(gi)?gi:void 0;let It;rr==="line"?It=ui?ge.createElement(Gt,Object.assign({},Pt,{strokeColor:Un,prefixCls:an,steps:ui}),Li):ge.createElement(Yt,Object.assign({},Pt,{strokeColor:On,prefixCls:an,direction:Ei}),Li):(rr==="circle"||rr==="dashboard")&&(It=ge.createElement(Ln,Object.assign({},Pt,{strokeColor:On,prefixCls:an,progressStatus:Kn}),Li));const Kt=Me()(an,`${an}-status-${Kn}`,`${an}-${rr==="dashboard"&&"circle"||ui&&"steps"||rr}`,{[`${an}-inline-circle`]:rr==="circle"&&$t(bi,"circle")[0]<=20,[`${an}-show-info`]:_i,[`${an}-${bi}`]:typeof bi=="string",[`${an}-rtl`]:Ei==="rtl"},Ri==null?void 0:Ri.className,hn,fn,yi);return di(ge.createElement("div",Object.assign({ref:qt,style:Object.assign(Object.assign({},Ri==null?void 0:Ri.style),fr),className:Kt,role:"progressbar","aria-valuenow":Er},(0,kt.Z)(zi,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),It))}),un=sn},13570:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return _e}});var ge=pe(96663),Re=pe(59301),Ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"},dt=Ve,Ke=pe(7657),st=function(Dn,Bn){return Re.createElement(Ke.Z,(0,ge.Z)({},Dn,{ref:Bn,icon:dt}))},Me=Re.forwardRef(st),kt=Me,bt=pe(92310),Ue=pe.n(bt),lt=pe(90493),yt=pe(72071),jt=pe(6620),Ae=pe(18929),ne=pe(10228),ee=pe(26112);function ce(Wt,Dn){var Bn=Wt.disabled,$t=Wt.prefixCls,ln=Wt.character,Tn=Wt.characterRender,ei=Wt.index,Ln=Wt.count,Yn=Wt.value,zt=Wt.allowHalf,wn=Wt.focused,$n=Wt.onHover,Yt=Wt.onClick,tn=function(et){$n(et,ei)},Gt=function(et){Yt(et,ei)},Tt=function(et){et.keyCode===ne.Z.ENTER&&Yt(et,ei)},ot=ei+1,Ze=new Set([$t]);Yn===0&&ei===0&&wn?Ze.add("".concat($t,"-focused")):zt&&Yn+.5>=ot&&Yn<ot?(Ze.add("".concat($t,"-half")),Ze.add("".concat($t,"-active")),wn&&Ze.add("".concat($t,"-focused"))):(ot<=Yn?Ze.add("".concat($t,"-full")):Ze.add("".concat($t,"-zero")),ot===Yn&&wn&&Ze.add("".concat($t,"-focused")));var At=typeof ln=="function"?ln(Wt):ln,Dt=Re.createElement("li",{className:Ue()(Array.from(Ze)),ref:Dn},Re.createElement("div",{onClick:Bn?null:Gt,onKeyDown:Bn?null:Tt,onMouseMove:Bn?null:tn,role:"radio","aria-checked":Yn>ei?"true":"false","aria-posinset":ei+1,"aria-setsize":Ln,tabIndex:Bn?-1:0},Re.createElement("div",{className:"".concat($t,"-first")},At),Re.createElement("div",{className:"".concat($t,"-second")},At)));return Tn&&(Dt=Tn(Dt,Wt)),Dt}var se=Re.forwardRef(ce);function fe(){var Wt=Re.useRef({});function Dn($t){return Wt.current[$t]}function Bn($t){return function(ln){Wt.current[$t]=ln}}return[Dn,Bn]}function ye(Wt){var Dn=Wt.pageXOffset,Bn="scrollLeft";if(typeof Dn!="number"){var $t=Wt.document;Dn=$t.documentElement[Bn],typeof Dn!="number"&&(Dn=$t.body[Bn])}return Dn}function be(Wt){var Dn,Bn,$t=Wt.ownerDocument,ln=$t.body,Tn=$t&&$t.documentElement,ei=Wt.getBoundingClientRect();return Dn=ei.left,Bn=ei.top,Dn-=Tn.clientLeft||ln.clientLeft||0,Bn-=Tn.clientTop||ln.clientTop||0,{left:Dn,top:Bn}}function Te(Wt){var Dn=be(Wt),Bn=Wt.ownerDocument,$t=Bn.defaultView||Bn.parentWindow;return Dn.left+=ye($t),Dn.left}var Be=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function ze(Wt,Dn){var Bn,$t=Wt.prefixCls,ln=$t===void 0?"rc-rate":$t,Tn=Wt.className,ei=Wt.defaultValue,Ln=Wt.value,Yn=Wt.count,zt=Yn===void 0?5:Yn,wn=Wt.allowHalf,$n=wn===void 0?!1:wn,Yt=Wt.allowClear,tn=Yt===void 0?!0:Yt,Gt=Wt.character,Tt=Gt===void 0?"\u2605":Gt,ot=Wt.characterRender,Ze=Wt.disabled,At=Wt.direction,Dt=At===void 0?"ltr":At,rt=Wt.tabIndex,et=rt===void 0?0:rt,Oe=Wt.autoFocus,Pe=Wt.onHoverChange,ve=Wt.onChange,Fe=Wt.onFocus,We=Wt.onBlur,Ne=Wt.onKeyDown,ft=Wt.onMouseLeave,sn=(0,jt.Z)(Wt,Be),un=fe(),Pt=(0,yt.Z)(un,2),qt=Pt[0],Mn=Pt[1],hn=Re.useRef(null),fn=function(){if(!Ze){var at;(at=hn.current)===null||at===void 0||at.focus()}};Re.useImperativeHandle(Dn,function(){return{focus:fn,blur:function(){if(!Ze){var at;(at=hn.current)===null||at===void 0||at.blur()}}}});var ui=(0,Ae.Z)(ei||0,{value:Ln}),gi=(0,yt.Z)(ui,2),fi=gi[0],bi=gi[1],_i=(0,Ae.Z)(null),rr=(0,yt.Z)(_i,2),Wi=rr[0],vr=rr[1],fr=function(at,cn){var Nn=Dt==="rtl",kn=at+1;if($n){var Jn=qt(at),St=Te(Jn),An=Jn.clientWidth;(Nn&&cn-St>An/2||!Nn&&cn-St<An/2)&&(kn-=.5)}return kn},zi=function(at){bi(at),ve==null||ve(at)},Er=Re.useState(!1),Kn=(0,yt.Z)(Er,2),Le=Kn[0],Ei=Kn[1],Ri=function(){Ei(!0),Fe==null||Fe()},an=function(){Ei(!1),We==null||We()},di=Re.useState(null),yi=(0,yt.Z)(di,2),Li=yi[0],On=yi[1],Un=function(at,cn){var Nn=fr(cn,at.pageX);Nn!==Wi&&(On(Nn),vr(null)),Pe==null||Pe(Nn)},It=function(at){Ze||(On(null),vr(null),Pe==null||Pe(void 0)),at&&(ft==null||ft(at))},Kt=function(at,cn){var Nn=fr(cn,at.pageX),kn=!1;tn&&(kn=Nn===fi),It(),zi(kn?0:Nn),vr(kn?Nn:null)},Ye=function(at){var cn=at.keyCode,Nn=Dt==="rtl",kn=fi;cn===ne.Z.RIGHT&&kn<zt&&!Nn?($n?kn+=.5:kn+=1,zi(kn),at.preventDefault()):cn===ne.Z.LEFT&&kn>0&&!Nn||cn===ne.Z.RIGHT&&kn>0&&Nn?($n?kn-=.5:kn-=1,zi(kn),at.preventDefault()):cn===ne.Z.LEFT&&kn<zt&&Nn&&($n?kn+=.5:kn+=1,zi(kn),at.preventDefault()),Ne==null||Ne(at)};Re.useEffect(function(){Oe&&!Ze&&fn()},[]);var nn=new Array(zt).fill(0).map(function(Nt,at){return Re.createElement(se,{ref:Mn(at),index:at,count:zt,disabled:Ze,prefixCls:"".concat(ln,"-star"),allowHalf:$n,value:Li===null?fi:Li,onClick:Kt,onHover:Un,key:Nt||at,character:Tt,characterRender:ot,focused:Le})}),xn=Ue()(ln,Tn,(Bn={},(0,lt.Z)(Bn,"".concat(ln,"-disabled"),Ze),(0,lt.Z)(Bn,"".concat(ln,"-rtl"),Dt==="rtl"),Bn));return Re.createElement("ul",(0,ge.Z)({className:xn,onMouseLeave:It,tabIndex:Ze?-1:et,onFocus:Ze?null:Ri,onBlur:Ze?null:an,onKeyDown:Ze?null:Ye,ref:hn,role:"radiogroup"},(0,ee.Z)(sn,{aria:!0,data:!0,attr:!0})),nn)}var Ge=Re.forwardRef(ze),nt=Ge,Je=pe(36355),xt=pe(6848),He=pe(17313),Et=pe(83116),tt=pe(37613);const Ot=Wt=>{const{componentCls:Dn}=Wt;return{[`${Dn}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:Wt.marginXS},"> div":{transition:`all ${Wt.motionDurationMid}, outline 0s`,"&:hover":{transform:Wt.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${Wt.lineWidth}px dashed ${Wt.starColor}`,transform:Wt.starHoverScale}},"&-first, &-second":{color:Wt.starBg,transition:`all ${Wt.motionDurationMid}`,userSelect:"none",[Wt.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${Dn}-star-first, &-half ${Dn}-star-second`]:{opacity:1},[`&-half ${Dn}-star-first, &-full ${Dn}-star-second`]:{color:"inherit"}}}},gt=Wt=>({[`&-rtl${Wt.componentCls}`]:{direction:"rtl"}}),Ht=Wt=>{const{componentCls:Dn}=Wt;return{[Dn]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,He.Wf)(Wt)),{display:"inline-block",margin:0,padding:0,color:Wt.starColor,fontSize:Wt.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${Dn} ${Dn}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),Ot(Wt)),{[`+ ${Dn}-text`]:{display:"inline-block",marginInlineStart:Wt.marginXS,fontSize:Wt.fontSize}}),gt(Wt))}};var Xt=(0,Et.Z)("Rate",Wt=>{const Dn=(0,tt.TS)(Wt,{});return[Ht(Dn)]},Wt=>({starColor:Wt.yellow6,starSize:Wt.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:Wt.colorFillContent})),Ut=function(Wt,Dn){var Bn={};for(var $t in Wt)Object.prototype.hasOwnProperty.call(Wt,$t)&&Dn.indexOf($t)<0&&(Bn[$t]=Wt[$t]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ln=0,$t=Object.getOwnPropertySymbols(Wt);ln<$t.length;ln++)Dn.indexOf($t[ln])<0&&Object.prototype.propertyIsEnumerable.call(Wt,$t[ln])&&(Bn[$t[ln]]=Wt[$t[ln]]);return Bn},_e=Re.forwardRef((Wt,Dn)=>{const{prefixCls:Bn,className:$t,rootClassName:ln,style:Tn,tooltips:ei,character:Ln=Re.createElement(kt,null)}=Wt,Yn=Ut(Wt,["prefixCls","className","rootClassName","style","tooltips","character"]),zt=(Ze,At)=>{let{index:Dt}=At;return ei?Re.createElement(xt.Z,{title:ei[Dt]},Ze):Ze},{getPrefixCls:wn,direction:$n,rate:Yt}=Re.useContext(Je.E_),tn=wn("rate",Bn),[Gt,Tt]=Xt(tn),ot=Object.assign(Object.assign({},Yt==null?void 0:Yt.style),Tn);return Gt(Re.createElement(nt,Object.assign({ref:Dn,character:Ln,characterRender:zt},Yn,{className:Ue()($t,ln,Tt,Yt==null?void 0:Yt.className),style:ot,prefixCls:tn,direction:$n})))})},57809:function(Vn,Cn,pe){"use strict";var ge=pe(92310),Re=pe.n(ge),Ve=pe(77861),dt=pe(2738),Ke=pe(59301),st=pe(53487),Me=pe(62892),kt=pe(19080),bt=pe(36355),Ue=pe(1684),lt=pe(93891),yt=pe(19716),jt=pe(32441),Ae=pe(33234),ne=pe(14154),ee=pe(58582),ce=pe(84443),se=pe(66339),fe=function(ze,Ge){var nt={};for(var Je in ze)Object.prototype.hasOwnProperty.call(ze,Je)&&Ge.indexOf(Je)<0&&(nt[Je]=ze[Je]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xt=0,Je=Object.getOwnPropertySymbols(ze);xt<Je.length;xt++)Ge.indexOf(Je[xt])<0&&Object.prototype.propertyIsEnumerable.call(ze,Je[xt])&&(nt[Je[xt]]=ze[Je[xt]]);return nt};const ye="SECRET_COMBOBOX_MODE_DO_NOT_USE",be=(ze,Ge)=>{var nt,{prefixCls:Je,bordered:xt=!0,className:He,rootClassName:Et,getPopupContainer:tt,popupClassName:Ot,dropdownClassName:gt,listHeight:Ht=256,placement:Xt,listItemHeight:Ut=24,size:it,disabled:_e,notFoundContent:Wt,status:Dn,builtinPlacements:Bn,dropdownMatchSelectWidth:$t,popupMatchSelectWidth:ln,direction:Tn,style:ei,allowClear:Ln}=ze,Yn=fe(ze,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:zt,getPrefixCls:wn,renderEmpty:$n,direction:Yt,virtual:tn,popupMatchSelectWidth:Gt,popupOverflow:Tt,select:ot}=Ke.useContext(bt.E_),Ze=wn("select",Je),At=wn(),Dt=Tn!=null?Tn:Yt,{compactSize:rt,compactItemClassnames:et}=(0,Ae.ri)(Ze,Dt),[Oe,Pe]=(0,ne.Z)(Ze),ve=Ke.useMemo(()=>{const{mode:Kn}=Yn;if(Kn!=="combobox")return Kn===ye?"combobox":Kn},[Yn.mode]),Fe=ve==="multiple"||ve==="tags",We=(0,ce.Z)(Yn.suffixIcon,Yn.showArrow),Ne=(nt=ln!=null?ln:$t)!==null&&nt!==void 0?nt:Gt,{status:ft,hasFeedback:sn,isFormItemInput:un,feedbackIcon:Pt}=Ke.useContext(jt.aM),qt=(0,kt.F)(ft,Dn);let Mn;Wt!==void 0?Mn=Wt:ve==="combobox"?Mn=null:Mn=($n==null?void 0:$n("Select"))||Ke.createElement(lt.Z,{componentName:"Select"});const{suffixIcon:hn,itemIcon:fn,removeIcon:ui,clearIcon:gi}=(0,se.Z)(Object.assign(Object.assign({},Yn),{multiple:Fe,hasFeedback:sn,feedbackIcon:Pt,showSuffixIcon:We,prefixCls:Ze,showArrow:Yn.showArrow,componentName:"Select"})),fi=Ln===!0?{clearIcon:gi}:Ln,bi=(0,dt.Z)(Yn,["suffixIcon","itemIcon"]),_i=Re()(Ot||gt,{[`${Ze}-dropdown-${Dt}`]:Dt==="rtl"},Et,Pe),rr=(0,yt.Z)(Kn=>{var Le;return(Le=it!=null?it:rt)!==null&&Le!==void 0?Le:Kn}),Wi=Ke.useContext(Ue.Z),vr=_e!=null?_e:Wi,fr=Re()({[`${Ze}-lg`]:rr==="large",[`${Ze}-sm`]:rr==="small",[`${Ze}-rtl`]:Dt==="rtl",[`${Ze}-borderless`]:!xt,[`${Ze}-in-form-item`]:un},(0,kt.Z)(Ze,qt,sn),et,ot==null?void 0:ot.className,He,Et,Pe),zi=Ke.useMemo(()=>Xt!==void 0?Xt:Dt==="rtl"?"bottomRight":"bottomLeft",[Xt,Dt]),Er=(0,ee.Z)(Bn,Tt);return Oe(Ke.createElement(Ve.ZP,Object.assign({ref:Ge,virtual:tn,showSearch:ot==null?void 0:ot.showSearch},bi,{style:Object.assign(Object.assign({},ot==null?void 0:ot.style),ei),dropdownMatchSelectWidth:Ne,builtinPlacements:Er,transitionName:(0,Me.m)(At,"slide-up",Yn.transitionName),listHeight:Ht,listItemHeight:Ut,mode:ve,prefixCls:Ze,placement:zi,direction:Dt,suffixIcon:hn,menuItemSelectedIcon:fn,removeIcon:ui,allowClear:fi,notFoundContent:Mn,className:fr,getPopupContainer:tt||zt,dropdownClassName:_i,disabled:vr})))},Te=Ke.forwardRef(be),Be=(0,st.Z)(Te);Te.SECRET_COMBOBOX_MODE_DO_NOT_USE=ye,Te.Option=Ve.Wx,Te.OptGroup=Ve.Xo,Te._InternalPanelDoNotUseOrYouWillBeFired=Be,Cn.default=Te},14154:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Te}});var ge=pe(17313),Re=pe(74207),Ve=pe(37613),dt=pe(83116),Ke=pe(13826),st=pe(92899);const Me=Be=>{const{optionHeight:ze,optionFontSize:Ge,optionLineHeight:nt,optionPadding:Je}=Be;return{position:"relative",display:"block",minHeight:ze,padding:Je,color:Be.colorText,fontWeight:"normal",fontSize:Ge,lineHeight:nt,boxSizing:"border-box"}};var bt=Be=>{const{antCls:ze,componentCls:Ge}=Be,nt=`${Ge}-item`,Je=`&${ze}-slide-up-enter${ze}-slide-up-enter-active`,xt=`&${ze}-slide-up-appear${ze}-slide-up-appear-active`,He=`&${ze}-slide-up-leave${ze}-slide-up-leave-active`,Et=`${Ge}-dropdown-placement-`;return[{[`${Ge}-dropdown`]:Object.assign(Object.assign({},(0,ge.Wf)(Be)),{position:"absolute",top:-9999,zIndex:Be.zIndexPopup,boxSizing:"border-box",padding:Be.paddingXXS,overflow:"hidden",fontSize:Be.fontSize,fontVariant:"initial",backgroundColor:Be.colorBgElevated,borderRadius:Be.borderRadiusLG,outline:"none",boxShadow:Be.boxShadowSecondary,[`
|
|
|
${Je}${Et}bottomLeft,
|
|
|
${xt}${Et}bottomLeft
|
|
|
`]:{animationName:Ke.fJ},[`
|
|
|
${Je}${Et}topLeft,
|
|
|
${xt}${Et}topLeft,
|
|
|
${Je}${Et}topRight,
|
|
|
${xt}${Et}topRight
|
|
|
`]:{animationName:Ke.Qt},[`${He}${Et}bottomLeft`]:{animationName:Ke.Uw},[`
|
|
|
${He}${Et}topLeft,
|
|
|
${He}${Et}topRight
|
|
|
`]:{animationName:Ke.ly},"&-hidden":{display:"none"},[`${nt}`]:Object.assign(Object.assign({},Me(Be)),{cursor:"pointer",transition:`background ${Be.motionDurationSlow} ease`,borderRadius:Be.borderRadiusSM,"&-group":{color:Be.colorTextDescription,fontSize:Be.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},ge.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${nt}-option-disabled)`]:{backgroundColor:Be.optionActiveBg},[`&-selected:not(${nt}-option-disabled)`]:{color:Be.optionSelectedColor,fontWeight:Be.optionSelectedFontWeight,backgroundColor:Be.optionSelectedBg,[`${nt}-option-state`]:{color:Be.colorPrimary}},"&-disabled":{[`&${nt}-option-selected`]:{backgroundColor:Be.colorBgContainerDisabled},color:Be.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Be.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Ke.oN)(Be,"slide-up"),(0,Ke.oN)(Be,"slide-down"),(0,st.Fm)(Be,"move-up"),(0,st.Fm)(Be,"move-down")]};const Ue=2,lt=Be=>{let{controlHeightSM:ze,controlHeight:Ge,lineWidth:nt}=Be;const Je=(Ge-ze)/2-nt,xt=Math.ceil(Je/2);return[Je,xt]};function yt(Be,ze){const{componentCls:Ge,iconCls:nt}=Be,Je=`${Ge}-selection-overflow`,xt=Be.multipleSelectItemHeight,[He]=lt(Be),Et=ze?`${Ge}-${ze}`:"";return{[`${Ge}-multiple${Et}`]:{fontSize:Be.fontSize,[Je]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ge}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${He-Ue}px ${Ue*2}px`,borderRadius:Be.borderRadius,[`${Ge}-show-search&`]:{cursor:"text"},[`${Ge}-disabled&`]:{background:Be.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Ue}px 0`,lineHeight:`${xt}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${Ge}-show-arrow ${Ge}-selector,
|
|
|
&${Ge}-allow-clear ${Ge}-selector
|
|
|
`]:{paddingInlineEnd:Be.fontSizeIcon+Be.controlPaddingHorizontal},[`${Ge}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:xt,marginTop:Ue,marginBottom:Ue,lineHeight:`${xt-Be.lineWidth*2}px`,background:Be.multipleItemBg,border:`${Be.lineWidth}px ${Be.lineType} ${Be.multipleItemBorderColor}`,borderRadius:Be.borderRadiusSM,cursor:"default",transition:`font-size ${Be.motionDurationSlow}, line-height ${Be.motionDurationSlow}, height ${Be.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Ue*2,paddingInlineStart:Be.paddingXS,paddingInlineEnd:Be.paddingXS/2,[`${Ge}-disabled&`]:{color:Be.multipleItemColorDisabled,borderColor:Be.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Be.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ge.Ro)()),{display:"inline-flex",alignItems:"center",color:Be.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${nt}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Be.colorIconHover}})},[`${Je}-item + ${Je}-item`]:{[`${Ge}-selection-search`]:{marginInlineStart:0}},[`${Ge}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Be.inputPaddingHorizontalBase-He,"\n &-input,\n &-mirror\n ":{height:xt,fontFamily:Be.fontFamily,lineHeight:`${xt}px`,transition:`all ${Be.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Ge}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Be.inputPaddingHorizontalBase,insetInlineEnd:Be.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Be.motionDurationSlow}`}}}}var Ae=Be=>{const{componentCls:ze}=Be,Ge=(0,Ve.TS)(Be,{controlHeight:Be.controlHeightSM,multipleSelectItemHeight:Be.controlHeightXS,borderRadius:Be.borderRadiusSM,borderRadiusSM:Be.borderRadiusXS}),nt=(0,Ve.TS)(Be,{fontSize:Be.fontSizeLG,controlHeight:Be.controlHeightLG,multipleSelectItemHeight:Be.multipleItemHeightLG,borderRadius:Be.borderRadiusLG,borderRadiusSM:Be.borderRadius}),[,Je]=lt(Be);return[yt(Be),yt(Ge,"sm"),{[`${ze}-multiple${ze}-sm`]:{[`${ze}-selection-placeholder`]:{insetInline:Be.controlPaddingHorizontalSM-Be.lineWidth},[`${ze}-selection-search`]:{marginInlineStart:Je}}},yt(nt,"lg")]};function ne(Be,ze){const{componentCls:Ge,inputPaddingHorizontalBase:nt,borderRadius:Je}=Be,xt=Be.controlHeight-Be.lineWidth*2,He=Math.ceil(Be.fontSize*1.25),Et=ze?`${Ge}-${ze}`:"";return{[`${Ge}-single${Et}`]:{fontSize:Be.fontSize,[`${Ge}-selector`]:Object.assign(Object.assign({},(0,ge.Wf)(Be)),{display:"flex",borderRadius:Je,[`${Ge}-selection-search`]:{position:"absolute",top:0,insetInlineStart:nt,insetInlineEnd:nt,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${Ge}-selection-item,
|
|
|
${Ge}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${xt}px`,transition:`all ${Be.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${xt}px`}},[`${Ge}-selection-item`]:{position:"relative",userSelect:"none"},[`${Ge}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ge}-selection-item:after`,`${Ge}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${Ge}-show-arrow ${Ge}-selection-item,
|
|
|
&${Ge}-show-arrow ${Ge}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:He},[`&${Ge}-open ${Ge}-selection-item`]:{color:Be.colorTextPlaceholder},[`&:not(${Ge}-customize-input)`]:{[`${Ge}-selector`]:{width:"100%",height:Be.controlHeight,padding:`0 ${nt}px`,[`${Ge}-selection-search-input`]:{height:xt},"&:after":{lineHeight:`${xt}px`}}},[`&${Ge}-customize-input`]:{[`${Ge}-selector`]:{"&:after":{display:"none"},[`${Ge}-selection-search`]:{position:"static",width:"100%"},[`${Ge}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${nt}px`,"&:after":{display:"none"}}}}}}}function ee(Be){const{componentCls:ze}=Be,Ge=Be.controlPaddingHorizontalSM-Be.lineWidth;return[ne(Be),ne((0,Ve.TS)(Be,{controlHeight:Be.controlHeightSM,borderRadius:Be.borderRadiusSM}),"sm"),{[`${ze}-single${ze}-sm`]:{[`&:not(${ze}-customize-input)`]:{[`${ze}-selection-search`]:{insetInlineStart:Ge,insetInlineEnd:Ge},[`${ze}-selector`]:{padding:`0 ${Ge}px`},[`&${ze}-show-arrow ${ze}-selection-search`]:{insetInlineEnd:Ge+Be.fontSize*1.5},[`
|
|
|
&${ze}-show-arrow ${ze}-selection-item,
|
|
|
&${ze}-show-arrow ${ze}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Be.fontSize*1.5}}}},ne((0,Ve.TS)(Be,{controlHeight:Be.singleItemHeightLG,fontSize:Be.fontSizeLG,borderRadius:Be.borderRadiusLG}),"lg")]}const ce=Be=>{const{componentCls:ze,selectorBg:Ge}=Be;return{position:"relative",backgroundColor:Ge,border:`${Be.lineWidth}px ${Be.lineType} ${Be.colorBorder}`,transition:`all ${Be.motionDurationMid} ${Be.motionEaseInOut}`,input:{cursor:"pointer"},[`${ze}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${ze}-disabled&`]:{color:Be.colorTextDisabled,background:Be.colorBgContainerDisabled,cursor:"not-allowed",[`${ze}-multiple&`]:{background:Be.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},se=function(Be,ze){let Ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:nt,borderHoverColor:Je,outlineColor:xt,antCls:He}=ze,Et=Ge?{[`${nt}-selector`]:{borderColor:Je}}:{};return{[Be]:{[`&:not(${nt}-disabled):not(${nt}-customize-input):not(${He}-pagination-size-changer)`]:Object.assign(Object.assign({},Et),{[`${nt}-focused& ${nt}-selector`]:{borderColor:Je,boxShadow:`0 0 0 ${ze.controlOutlineWidth}px ${xt}`,outline:0},[`&:hover ${nt}-selector`]:{borderColor:Je}})}}},fe=Be=>{const{componentCls:ze}=Be;return{[`${ze}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},ye=Be=>{const{componentCls:ze,inputPaddingHorizontalBase:Ge,iconCls:nt}=Be;return{[ze]:Object.assign(Object.assign({},(0,ge.Wf)(Be)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${ze}-customize-input) ${ze}-selector`]:Object.assign(Object.assign({},ce(Be)),fe(Be)),[`${ze}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},ge.vS),[`${ze}-selection-placeholder`]:Object.assign(Object.assign({},ge.vS),{flex:1,color:Be.colorTextPlaceholder,pointerEvents:"none"}),[`${ze}-arrow`]:Object.assign(Object.assign({},(0,ge.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ge,height:Be.fontSizeIcon,marginTop:-Be.fontSizeIcon/2,color:Be.colorTextQuaternary,fontSize:Be.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[nt]:{verticalAlign:"top",transition:`transform ${Be.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${ze}-suffix)`]:{pointerEvents:"auto"}},[`${ze}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${ze}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ge,zIndex:1,display:"inline-block",width:Be.fontSizeIcon,height:Be.fontSizeIcon,marginTop:-Be.fontSizeIcon/2,color:Be.colorTextQuaternary,fontSize:Be.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Be.clearBg,cursor:"pointer",opacity:0,transition:`color ${Be.motionDurationMid} ease, opacity ${Be.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Be.colorTextTertiary}},"&:hover":{[`${ze}-clear`]:{opacity:1}}}),[`${ze}-has-feedback`]:{[`${ze}-clear`]:{insetInlineEnd:Ge+Be.fontSize+Be.paddingXS}}}},be=Be=>{const{componentCls:ze}=Be;return[{[ze]:{[`&-borderless ${ze}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${ze}-in-form-item`]:{width:"100%"}}},ye(Be),ee(Be),Ae(Be),bt(Be),{[`${ze}-rtl`]:{direction:"rtl"}},se(ze,(0,Ve.TS)(Be,{borderHoverColor:Be.colorPrimaryHover,outlineColor:Be.controlOutline})),se(`${ze}-status-error`,(0,Ve.TS)(Be,{borderHoverColor:Be.colorErrorHover,outlineColor:Be.colorErrorOutline}),!0),se(`${ze}-status-warning`,(0,Ve.TS)(Be,{borderHoverColor:Be.colorWarningHover,outlineColor:Be.colorWarningOutline}),!0),(0,Re.c)(Be,{borderElCls:`${ze}-selector`,focusElCls:`${ze}-focused`})]};var Te=(0,dt.Z)("Select",(Be,ze)=>{let{rootPrefixCls:Ge}=ze;const nt=(0,Ve.TS)(Be,{rootPrefixCls:Ge,inputPaddingHorizontalBase:Be.paddingSM-1,multipleSelectItemHeight:Be.multipleItemHeight});return[be(nt)]},Be=>{const{fontSize:ze,lineHeight:Ge,controlHeight:nt,controlPaddingHorizontal:Je,zIndexPopupBase:xt,colorText:He,fontWeightStrong:Et,controlItemBgActive:tt,controlItemBgHover:Ot,colorBgContainer:gt,colorFillSecondary:Ht,controlHeightLG:Xt,controlHeightSM:Ut,colorBgContainerDisabled:it,colorTextDisabled:_e}=Be;return{zIndexPopup:xt+50,optionSelectedColor:He,optionSelectedFontWeight:Et,optionSelectedBg:tt,optionActiveBg:Ot,optionPadding:`${(nt-ze*Ge)/2}px ${Je}px`,optionFontSize:ze,optionLineHeight:Ge,optionHeight:nt,selectorBg:gt,clearBg:gt,singleItemHeightLG:Xt,multipleItemBg:Ht,multipleItemBorderColor:"transparent",multipleItemHeight:Ut,multipleItemHeightLG:nt,multipleSelectorBgDisabled:it,multipleItemColorDisabled:_e,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Re}});const ge=Ve=>{const Ke={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Ve==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},Ke),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Ke),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Ke),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Ke),{points:["br","tr"],offset:[0,-4]})}};function Re(Ve,dt){return Ve||ge(dt)}},84443:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return ge}});function ge(Re,Ve){return Ve!==void 0?Ve:Re!==null}},66339:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});var ge=pe(40001),Re=pe(19248),Ve=pe(99267),dt=pe(84105),Ke=pe(58617),st=pe(47472),Me=pe(59301);function kt(bt){let{suffixIcon:Ue,clearIcon:lt,menuItemSelectedIcon:yt,removeIcon:jt,loading:Ae,multiple:ne,hasFeedback:ee,prefixCls:ce,showSuffixIcon:se,feedbackIcon:fe,showArrow:ye,componentName:be}=bt;const Te=lt!=null?lt:Me.createElement(Re.Z,null),Be=Je=>Ue===null&&!ee&&!ye?null:Me.createElement(Me.Fragment,null,se!==!1&&Je,ee&&fe);let ze=null;if(Ue!==void 0)ze=Be(Ue);else if(Ae)ze=Be(Me.createElement(Ke.Z,{spin:!0}));else{const Je=`${ce}-suffix`;ze=xt=>{let{open:He,showSearch:Et}=xt;return Be(He&&Et?Me.createElement(st.Z,{className:Je}):Me.createElement(dt.Z,{className:Je}))}}let Ge=null;yt!==void 0?Ge=yt:ne?Ge=Me.createElement(ge.Z,null):Ge=null;let nt=null;return jt!==void 0?nt=jt:nt=Me.createElement(Ve.Z,null),{clearIcon:Te,suffixIcon:ze,itemIcon:Ge,removeIcon:nt}}},61621:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Tt}});var ge=pe(92310),Re=pe.n(ge),Ve=pe(59301),dt=pe(36355),Ke=pe(2738),Me=ot=>{const{prefixCls:Ze,className:At,style:Dt,size:rt,shape:et}=ot,Oe=Re()({[`${Ze}-lg`]:rt==="large",[`${Ze}-sm`]:rt==="small"}),Pe=Re()({[`${Ze}-circle`]:et==="circle",[`${Ze}-square`]:et==="square",[`${Ze}-round`]:et==="round"}),ve=Ve.useMemo(()=>typeof rt=="number"?{width:rt,height:rt,lineHeight:`${rt}px`}:{},[rt]);return Ve.createElement("span",{className:Re()(Ze,Oe,Pe,At),style:Object.assign(Object.assign({},ve),Dt)})},kt=pe(93083),bt=pe(83116),Ue=pe(37613);const lt=new kt.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),yt=ot=>({height:ot,lineHeight:`${ot}px`}),jt=ot=>Object.assign({width:ot},yt(ot)),Ae=ot=>({background:ot.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:lt,animationDuration:ot.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),ne=ot=>Object.assign({width:ot*5,minWidth:ot*5},yt(ot)),ee=ot=>{const{skeletonAvatarCls:Ze,gradientFromColor:At,controlHeight:Dt,controlHeightLG:rt,controlHeightSM:et}=ot;return{[`${Ze}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:At},jt(Dt)),[`${Ze}${Ze}-circle`]:{borderRadius:"50%"},[`${Ze}${Ze}-lg`]:Object.assign({},jt(rt)),[`${Ze}${Ze}-sm`]:Object.assign({},jt(et))}},ce=ot=>{const{controlHeight:Ze,borderRadiusSM:At,skeletonInputCls:Dt,controlHeightLG:rt,controlHeightSM:et,gradientFromColor:Oe}=ot;return{[`${Dt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Oe,borderRadius:At},ne(Ze)),[`${Dt}-lg`]:Object.assign({},ne(rt)),[`${Dt}-sm`]:Object.assign({},ne(et))}},se=ot=>Object.assign({width:ot},yt(ot)),fe=ot=>{const{skeletonImageCls:Ze,imageSizeBase:At,gradientFromColor:Dt,borderRadiusSM:rt}=ot;return{[`${Ze}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Dt,borderRadius:rt},se(At*2)),{[`${Ze}-path`]:{fill:"#bfbfbf"},[`${Ze}-svg`]:Object.assign(Object.assign({},se(At)),{maxWidth:At*4,maxHeight:At*4}),[`${Ze}-svg${Ze}-svg-circle`]:{borderRadius:"50%"}}),[`${Ze}${Ze}-circle`]:{borderRadius:"50%"}}},ye=(ot,Ze,At)=>{const{skeletonButtonCls:Dt}=ot;return{[`${At}${Dt}-circle`]:{width:Ze,minWidth:Ze,borderRadius:"50%"},[`${At}${Dt}-round`]:{borderRadius:Ze}}},be=ot=>Object.assign({width:ot*2,minWidth:ot*2},yt(ot)),Te=ot=>{const{borderRadiusSM:Ze,skeletonButtonCls:At,controlHeight:Dt,controlHeightLG:rt,controlHeightSM:et,gradientFromColor:Oe}=ot;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${At}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Oe,borderRadius:Ze,width:Dt*2,minWidth:Dt*2},be(Dt))},ye(ot,Dt,At)),{[`${At}-lg`]:Object.assign({},be(rt))}),ye(ot,rt,`${At}-lg`)),{[`${At}-sm`]:Object.assign({},be(et))}),ye(ot,et,`${At}-sm`))},Be=ot=>{const{componentCls:Ze,skeletonAvatarCls:At,skeletonTitleCls:Dt,skeletonParagraphCls:rt,skeletonButtonCls:et,skeletonInputCls:Oe,skeletonImageCls:Pe,controlHeight:ve,controlHeightLG:Fe,controlHeightSM:We,gradientFromColor:Ne,padding:ft,marginSM:sn,borderRadius:un,titleHeight:Pt,blockRadius:qt,paragraphLiHeight:Mn,controlHeightXS:hn,paragraphMarginTop:fn}=ot;return{[`${Ze}`]:{display:"table",width:"100%",[`${Ze}-header`]:{display:"table-cell",paddingInlineEnd:ft,verticalAlign:"top",[`${At}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ne},jt(ve)),[`${At}-circle`]:{borderRadius:"50%"},[`${At}-lg`]:Object.assign({},jt(Fe)),[`${At}-sm`]:Object.assign({},jt(We))},[`${Ze}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Dt}`]:{width:"100%",height:Pt,background:Ne,borderRadius:qt,[`+ ${rt}`]:{marginBlockStart:We}},[`${rt}`]:{padding:0,"> li":{width:"100%",height:Mn,listStyle:"none",background:Ne,borderRadius:qt,"+ li":{marginBlockStart:hn}}},[`${rt}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${Ze}-content`]:{[`${Dt}, ${rt} > li`]:{borderRadius:un}}},[`${Ze}-with-avatar ${Ze}-content`]:{[`${Dt}`]:{marginBlockStart:sn,[`+ ${rt}`]:{marginBlockStart:fn}}},[`${Ze}${Ze}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Te(ot)),ee(ot)),ce(ot)),fe(ot)),[`${Ze}${Ze}-block`]:{width:"100%",[`${et}`]:{width:"100%"},[`${Oe}`]:{width:"100%"}},[`${Ze}${Ze}-active`]:{[`
|
|
|
${Dt},
|
|
|
${rt} > li,
|
|
|
${At},
|
|
|
${et},
|
|
|
${Oe},
|
|
|
${Pe}
|
|
|
`]:Object.assign({},Ae(ot))}}};var ze=(0,bt.Z)("Skeleton",ot=>{const{componentCls:Ze}=ot,At=(0,Ue.TS)(ot,{skeletonAvatarCls:`${Ze}-avatar`,skeletonTitleCls:`${Ze}-title`,skeletonParagraphCls:`${Ze}-paragraph`,skeletonButtonCls:`${Ze}-button`,skeletonInputCls:`${Ze}-input`,skeletonImageCls:`${Ze}-image`,imageSizeBase:ot.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${ot.gradientFromColor} 25%, ${ot.gradientToColor} 37%, ${ot.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Be(At)]},ot=>{const{colorFillContent:Ze,colorFill:At}=ot,Dt=Ze,rt=At;return{color:Dt,colorGradientEnd:rt,gradientFromColor:Dt,gradientToColor:rt,titleHeight:ot.controlHeight/2,blockRadius:ot.borderRadiusSM,paragraphMarginTop:ot.marginLG+ot.marginXXS,paragraphLiHeight:ot.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),nt=ot=>{const{prefixCls:Ze,className:At,rootClassName:Dt,active:rt,shape:et="circle",size:Oe="default"}=ot,{getPrefixCls:Pe}=Ve.useContext(dt.E_),ve=Pe("skeleton",Ze),[Fe,We]=ze(ve),Ne=(0,Ke.Z)(ot,["prefixCls","className"]),ft=Re()(ve,`${ve}-element`,{[`${ve}-active`]:rt},At,Dt,We);return Fe(Ve.createElement("div",{className:ft},Ve.createElement(Me,Object.assign({prefixCls:`${ve}-avatar`,shape:et,size:Oe},Ne))))},xt=ot=>{const{prefixCls:Ze,className:At,rootClassName:Dt,active:rt,block:et=!1,size:Oe="default"}=ot,{getPrefixCls:Pe}=Ve.useContext(dt.E_),ve=Pe("skeleton",Ze),[Fe,We]=ze(ve),Ne=(0,Ke.Z)(ot,["prefixCls"]),ft=Re()(ve,`${ve}-element`,{[`${ve}-active`]:rt,[`${ve}-block`]:et},At,Dt,We);return Fe(Ve.createElement("div",{className:ft},Ve.createElement(Me,Object.assign({prefixCls:`${ve}-button`,size:Oe},Ne))))};const He="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var tt=ot=>{const{prefixCls:Ze,className:At,rootClassName:Dt,style:rt,active:et}=ot,{getPrefixCls:Oe}=Ve.useContext(dt.E_),Pe=Oe("skeleton",Ze),[ve,Fe]=ze(Pe),We=Re()(Pe,`${Pe}-element`,{[`${Pe}-active`]:et},At,Dt,Fe);return ve(Ve.createElement("div",{className:We},Ve.createElement("div",{className:Re()(`${Pe}-image`,At),style:rt},Ve.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Pe}-image-svg`},Ve.createElement("path",{d:He,className:`${Pe}-image-path`})))))},gt=ot=>{const{prefixCls:Ze,className:At,rootClassName:Dt,active:rt,block:et,size:Oe="default"}=ot,{getPrefixCls:Pe}=Ve.useContext(dt.E_),ve=Pe("skeleton",Ze),[Fe,We]=ze(ve),Ne=(0,Ke.Z)(ot,["prefixCls"]),ft=Re()(ve,`${ve}-element`,{[`${ve}-active`]:rt,[`${ve}-block`]:et},At,Dt,We);return Fe(Ve.createElement("div",{className:ft},Ve.createElement(Me,Object.assign({prefixCls:`${ve}-input`,size:Oe},Ne))))},Ht=pe(96663),Xt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},Ut=Xt,it=pe(7657),_e=function(Ze,At){return Ve.createElement(it.Z,(0,Ht.Z)({},Ze,{ref:At,icon:Ut}))},Wt=Ve.forwardRef(_e),Dn=Wt,$t=ot=>{const{prefixCls:Ze,className:At,rootClassName:Dt,style:rt,active:et,children:Oe}=ot,{getPrefixCls:Pe}=Ve.useContext(dt.E_),ve=Pe("skeleton",Ze),[Fe,We]=ze(ve),Ne=Re()(ve,`${ve}-element`,{[`${ve}-active`]:et},We,At,Dt),ft=Oe!=null?Oe:Ve.createElement(Dn,null);return Fe(Ve.createElement("div",{className:Ne},Ve.createElement("div",{className:Re()(`${ve}-image`,At),style:rt},ft)))},ln=pe(19127),ei=ot=>{const Ze=Pe=>{const{width:ve,rows:Fe=2}=ot;if(Array.isArray(ve))return ve[Pe];if(Fe-1===Pe)return ve},{prefixCls:At,className:Dt,style:rt,rows:et}=ot,Oe=(0,ln.Z)(Array(et)).map((Pe,ve)=>Ve.createElement("li",{key:ve,style:{width:Ze(ve)}}));return Ve.createElement("ul",{className:Re()(At,Dt),style:rt},Oe)},Yn=ot=>{let{prefixCls:Ze,className:At,width:Dt,style:rt}=ot;return Ve.createElement("h3",{className:Re()(Ze,At),style:Object.assign({width:Dt},rt)})};function zt(ot){return ot&&typeof ot=="object"?ot:{}}function wn(ot,Ze){return ot&&!Ze?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function $n(ot,Ze){return!ot&&Ze?{width:"38%"}:ot&&Ze?{width:"50%"}:{}}function Yt(ot,Ze){const At={};return(!ot||!Ze)&&(At.width="61%"),!ot&&Ze?At.rows=3:At.rows=2,At}const tn=ot=>{const{prefixCls:Ze,loading:At,className:Dt,rootClassName:rt,style:et,children:Oe,avatar:Pe=!1,title:ve=!0,paragraph:Fe=!0,active:We,round:Ne}=ot,{getPrefixCls:ft,direction:sn,skeleton:un}=Ve.useContext(dt.E_),Pt=ft("skeleton",Ze),[qt,Mn]=ze(Pt);if(At||!("loading"in ot)){const hn=!!Pe,fn=!!ve,ui=!!Fe;let gi;if(hn){const _i=Object.assign(Object.assign({prefixCls:`${Pt}-avatar`},wn(fn,ui)),zt(Pe));gi=Ve.createElement("div",{className:`${Pt}-header`},Ve.createElement(Me,Object.assign({},_i)))}let fi;if(fn||ui){let _i;if(fn){const Wi=Object.assign(Object.assign({prefixCls:`${Pt}-title`},$n(hn,ui)),zt(ve));_i=Ve.createElement(Yn,Object.assign({},Wi))}let rr;if(ui){const Wi=Object.assign(Object.assign({prefixCls:`${Pt}-paragraph`},Yt(hn,fn)),zt(Fe));rr=Ve.createElement(ei,Object.assign({},Wi))}fi=Ve.createElement("div",{className:`${Pt}-content`},_i,rr)}const bi=Re()(Pt,{[`${Pt}-with-avatar`]:hn,[`${Pt}-active`]:We,[`${Pt}-rtl`]:sn==="rtl",[`${Pt}-round`]:Ne},un==null?void 0:un.className,Dt,rt,Mn);return qt(Ve.createElement("div",{className:bi,style:Object.assign(Object.assign({},un==null?void 0:un.style),et)},gi,fi))}return typeof Oe!="undefined"?Oe:null};tn.Button=xt,tn.Avatar=nt,tn.Input=gt,tn.Image=tt,tn.Node=$t;var Gt=tn,Tt=Gt},81327:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return ce}});var ge=pe(59301),Re=pe(92310),Ve=pe.n(Re),dt=pe(11592),Ke=pe(36355),st=pe(33234);const Me=ge.createContext({latestIndex:0}),kt=Me.Provider;var Ue=se=>{let{className:fe,index:ye,children:be,split:Te,style:Be}=se;const{latestIndex:ze}=ge.useContext(Me);return be==null?null:ge.createElement(ge.Fragment,null,ge.createElement("div",{className:fe,style:Be},be),ye<ze&&Te&&ge.createElement("span",{className:`${fe}-split`},Te))},lt=pe(2856);function yt(se){return["small","middle","large"].includes(se)}function jt(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}var Ae=function(se,fe){var ye={};for(var be in se)Object.prototype.hasOwnProperty.call(se,be)&&fe.indexOf(be)<0&&(ye[be]=se[be]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Te=0,be=Object.getOwnPropertySymbols(se);Te<be.length;Te++)fe.indexOf(be[Te])<0&&Object.prototype.propertyIsEnumerable.call(se,be[Te])&&(ye[be[Te]]=se[be[Te]]);return ye};const ee=ge.forwardRef((se,fe)=>{var ye,be;const{getPrefixCls:Te,space:Be,direction:ze}=ge.useContext(Ke.E_),{size:Ge=(Be==null?void 0:Be.size)||"small",align:nt,className:Je,rootClassName:xt,children:He,direction:Et="horizontal",prefixCls:tt,split:Ot,style:gt,wrap:Ht=!1,classNames:Xt,styles:Ut}=se,it=Ae(se,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[_e,Wt]=Array.isArray(Ge)?Ge:[Ge,Ge],Dn=yt(Wt),Bn=yt(_e),$t=jt(Wt),ln=jt(_e),Tn=(0,dt.Z)(He,{keepEmpty:!0}),ei=nt===void 0&&Et==="horizontal"?"center":nt,Ln=Te("space",tt),[Yn,zt]=(0,lt.Z)(Ln),wn=Ve()(Ln,Be==null?void 0:Be.className,zt,`${Ln}-${Et}`,{[`${Ln}-rtl`]:ze==="rtl",[`${Ln}-align-${ei}`]:ei,[`${Ln}-gap-row-${Wt}`]:Dn,[`${Ln}-gap-col-${_e}`]:Bn},Je,xt),$n=Ve()(`${Ln}-item`,(ye=Xt==null?void 0:Xt.item)!==null&&ye!==void 0?ye:(be=Be==null?void 0:Be.classNames)===null||be===void 0?void 0:be.item);let Yt=0;const tn=Tn.map((ot,Ze)=>{var At,Dt;ot!=null&&(Yt=Ze);const rt=ot&&ot.key||`${$n}-${Ze}`;return ge.createElement(Ue,{className:$n,key:rt,index:Ze,split:Ot,style:(At=Ut==null?void 0:Ut.item)!==null&&At!==void 0?At:(Dt=Be==null?void 0:Be.styles)===null||Dt===void 0?void 0:Dt.item},ot)}),Gt=ge.useMemo(()=>({latestIndex:Yt}),[Yt]);if(Tn.length===0)return null;const Tt={};return Ht&&(Tt.flexWrap="wrap"),!Bn&&ln&&(Tt.columnGap=_e),!Dn&&$t&&(Tt.rowGap=Wt),Yn(ge.createElement("div",Object.assign({ref:fe,className:wn,style:Object.assign(Object.assign(Object.assign({},Tt),Be==null?void 0:Be.style),gt)},it),ge.createElement(kt,{value:Gt},tn)))});ee.Compact=st.ZP;var ce=ee},31797:function(Vn,Cn,pe){"use strict";pe.d(Cn,{default:function(){return ze}});var ge=pe(59301),Re=pe(56762),Ve=pe(92343),dt=pe(92310),Ke=pe.n(dt),st=pe(36355),Me=pe(61621),bt=Ge=>{const{value:nt,formatter:Je,precision:xt,decimalSeparator:He,groupSeparator:Et="",prefixCls:tt}=Ge;let Ot;if(typeof Je=="function")Ot=Je(nt);else{const gt=String(nt),Ht=gt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Ht||gt==="-")Ot=gt;else{const Xt=Ht[1];let Ut=Ht[2]||"0",it=Ht[4]||"";Ut=Ut.replace(/\B(?=(\d{3})+(?!\d))/g,Et),typeof xt=="number"&&(it=it.padEnd(xt,"0").slice(0,xt>0?xt:0)),it&&(it=`${He}${it}`),Ot=[ge.createElement("span",{key:"int",className:`${tt}-content-value-int`},Xt,Ut),it&&ge.createElement("span",{key:"decimal",className:`${tt}-content-value-decimal`},it)]}}return ge.createElement("span",{className:`${tt}-content-value`},Ot)},Ue=pe(17313),lt=pe(83116),yt=pe(37613);const jt=Ge=>{const{componentCls:nt,marginXXS:Je,padding:xt,colorTextDescription:He,titleFontSize:Et,colorTextHeading:tt,contentFontSize:Ot,fontFamily:gt}=Ge;return{[`${nt}`]:Object.assign(Object.assign({},(0,Ue.Wf)(Ge)),{[`${nt}-title`]:{marginBottom:Je,color:He,fontSize:Et},[`${nt}-skeleton`]:{paddingTop:xt},[`${nt}-content`]:{color:tt,fontSize:Ot,fontFamily:gt,[`${nt}-content-value`]:{display:"inline-block",direction:"ltr"},[`${nt}-content-prefix, ${nt}-content-suffix`]:{display:"inline-block"},[`${nt}-content-prefix`]:{marginInlineEnd:Je},[`${nt}-content-suffix`]:{marginInlineStart:Je}}})}};var Ae=(0,lt.Z)("Statistic",Ge=>{const nt=(0,yt.TS)(Ge,{});return[jt(nt)]},Ge=>{const{fontSizeHeading3:nt,fontSize:Je}=Ge;return{titleFontSize:Je,contentFontSize:nt}}),ee=Ge=>{const{prefixCls:nt,className:Je,rootClassName:xt,style:He,valueStyle:Et,value:tt=0,title:Ot,valueRender:gt,prefix:Ht,suffix:Xt,loading:Ut=!1,onMouseEnter:it,onMouseLeave:_e,decimalSeparator:Wt=".",groupSeparator:Dn=","}=Ge,{getPrefixCls:Bn,direction:$t,statistic:ln}=ge.useContext(st.E_),Tn=Bn("statistic",nt),[ei,Ln]=Ae(Tn),Yn=ge.createElement(bt,Object.assign({decimalSeparator:Wt,groupSeparator:Dn,prefixCls:Tn},Ge,{value:tt})),zt=Ke()(Tn,{[`${Tn}-rtl`]:$t==="rtl"},ln==null?void 0:ln.className,Je,xt,Ln);return ei(ge.createElement("div",{className:zt,style:Object.assign(Object.assign({},ln==null?void 0:ln.style),He),onMouseEnter:it,onMouseLeave:_e},Ot&&ge.createElement("div",{className:`${Tn}-title`},Ot),ge.createElement(Me.Z,{paragraph:!1,loading:Ut,className:`${Tn}-skeleton`},ge.createElement("div",{style:Et,className:`${Tn}-content`},Ht&&ge.createElement("span",{className:`${Tn}-content-prefix`},Ht),gt?gt(Yn):Yn,Xt&&ge.createElement("span",{className:`${Tn}-content-suffix`},Xt)))))};const ce=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function se(Ge,nt){let Je=Ge;const xt=/\[[^\]]*]/g,He=(nt.match(xt)||[]).map(gt=>gt.slice(1,-1)),Et=nt.replace(xt,"[]"),tt=ce.reduce((gt,Ht)=>{let[Xt,Ut]=Ht;if(gt.includes(Xt)){const it=Math.floor(Je/Ut);return Je-=it*Ut,gt.replace(new RegExp(`${Xt}+`,"g"),_e=>{const Wt=_e.length;return it.toString().padStart(Wt,"0")})}return gt},Et);let Ot=0;return tt.replace(xt,()=>{const gt=He[Ot];return Ot+=1,gt})}function fe(Ge,nt){const{format:Je=""}=nt,xt=new Date(Ge).getTime(),He=Date.now(),Et=Math.max(xt-He,0);return se(Et,Je)}const ye=1e3/30;function be(Ge){return new Date(Ge).getTime()}const Te=Ge=>{const{value:nt,format:Je="HH:mm:ss",onChange:xt,onFinish:He}=Ge,Et=(0,Re.Z)(),tt=ge.useRef(null),Ot=()=>{He==null||He(),tt.current&&(clearInterval(tt.current),tt.current=null)},gt=()=>{const Ut=be(nt);Ut>=Date.now()&&(tt.current=setInterval(()=>{Et(),xt==null||xt(Ut-Date.now()),Ut<Date.now()&&Ot()},ye))};ge.useEffect(()=>(gt(),()=>{tt.current&&(clearInterval(tt.current),tt.current=null)}),[nt]);const Ht=(Ut,it)=>fe(Ut,Object.assign(Object.assign({},it),{format:Je})),Xt=Ut=>(0,Ve.Tm)(Ut,{title:void 0});return ge.createElement(ee,Object.assign({},Ge,{valueRender:Xt,formatter:Ht}))};var Be=ge.memo(Te);ee.Countdown=Be;var ze=ee},15969:function(Vn,Cn,pe){"use strict";pe.d(Cn,{N:function(){return ge}});const ge=Re=>({color:Re.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${Re.motionDurationSlow}`,"&:focus, &:hover":{color:Re.colorLinkHover},"&:active":{color:Re.colorLinkActive}})},78673:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Et}});var ge=pe(58617),Re=pe(92310),Ve=pe.n(Re),dt=pe(96663),Ke=pe(90493),st=pe(72071),Me=pe(6620),kt=pe(59301),bt=pe(18929),Ue=pe(10228),lt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],yt=kt.forwardRef(function(tt,Ot){var gt,Ht=tt.prefixCls,Xt=Ht===void 0?"rc-switch":Ht,Ut=tt.className,it=tt.checked,_e=tt.defaultChecked,Wt=tt.disabled,Dn=tt.loadingIcon,Bn=tt.checkedChildren,$t=tt.unCheckedChildren,ln=tt.onClick,Tn=tt.onChange,ei=tt.onKeyDown,Ln=(0,Me.Z)(tt,lt),Yn=(0,bt.Z)(!1,{value:it,defaultValue:_e}),zt=(0,st.Z)(Yn,2),wn=zt[0],$n=zt[1];function Yt(ot,Ze){var At=wn;return Wt||(At=ot,$n(At),Tn==null||Tn(At,Ze)),At}function tn(ot){ot.which===Ue.Z.LEFT?Yt(!1,ot):ot.which===Ue.Z.RIGHT&&Yt(!0,ot),ei==null||ei(ot)}function Gt(ot){var Ze=Yt(!wn,ot);ln==null||ln(Ze,ot)}var Tt=Ve()(Xt,Ut,(gt={},(0,Ke.Z)(gt,"".concat(Xt,"-checked"),wn),(0,Ke.Z)(gt,"".concat(Xt,"-disabled"),Wt),gt));return kt.createElement("button",(0,dt.Z)({},Ln,{type:"button",role:"switch","aria-checked":wn,disabled:Wt,className:Tt,ref:Ot,onKeyDown:tn,onClick:Gt}),Dn,kt.createElement("span",{className:"".concat(Xt,"-inner")},kt.createElement("span",{className:"".concat(Xt,"-inner-checked")},Bn),kt.createElement("span",{className:"".concat(Xt,"-inner-unchecked")},$t)))});yt.displayName="Switch";var jt=yt,Ae=pe(14088),ne=pe(36355),ee=pe(1684),ce=pe(19716),se=pe(64993),fe=pe(17313),ye=pe(83116),be=pe(37613);const Te=tt=>{const{componentCls:Ot,trackHeightSM:gt,trackPadding:Ht,trackMinWidthSM:Xt,innerMinMarginSM:Ut,innerMaxMarginSM:it,handleSizeSM:_e}=tt,Wt=`${Ot}-inner`;return{[Ot]:{[`&${Ot}-small`]:{minWidth:Xt,height:gt,lineHeight:`${gt}px`,[`${Ot}-inner`]:{paddingInlineStart:it,paddingInlineEnd:Ut,[`${Wt}-checked`]:{marginInlineStart:`calc(-100% + ${_e+Ht*2}px - ${it*2}px)`,marginInlineEnd:`calc(100% - ${_e+Ht*2}px + ${it*2}px)`},[`${Wt}-unchecked`]:{marginTop:-gt,marginInlineStart:0,marginInlineEnd:0}},[`${Ot}-handle`]:{width:_e,height:_e},[`${Ot}-loading-icon`]:{top:(_e-tt.switchLoadingIconSize)/2,fontSize:tt.switchLoadingIconSize},[`&${Ot}-checked`]:{[`${Ot}-inner`]:{paddingInlineStart:Ut,paddingInlineEnd:it,[`${Wt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Wt}-unchecked`]:{marginInlineStart:`calc(100% - ${_e+Ht*2}px + ${it*2}px)`,marginInlineEnd:`calc(-100% + ${_e+Ht*2}px - ${it*2}px)`}},[`${Ot}-handle`]:{insetInlineStart:`calc(100% - ${_e+Ht}px)`}},[`&:not(${Ot}-disabled):active`]:{[`&:not(${Ot}-checked) ${Wt}`]:{[`${Wt}-unchecked`]:{marginInlineStart:tt.marginXXS/2,marginInlineEnd:-tt.marginXXS/2}},[`&${Ot}-checked ${Wt}`]:{[`${Wt}-checked`]:{marginInlineStart:-tt.marginXXS/2,marginInlineEnd:tt.marginXXS/2}}}}}}},Be=tt=>{const{componentCls:Ot,handleSize:gt}=tt;return{[Ot]:{[`${Ot}-loading-icon${tt.iconCls}`]:{position:"relative",top:(gt-tt.fontSize)/2,color:tt.switchLoadingIconColor,verticalAlign:"top"},[`&${Ot}-checked ${Ot}-loading-icon`]:{color:tt.switchColor}}}},ze=tt=>{const{componentCls:Ot,motion:gt,trackPadding:Ht,handleBg:Xt,handleShadow:Ut,handleSize:it}=tt,_e=`${Ot}-handle`;return{[Ot]:{[_e]:{position:"absolute",top:Ht,insetInlineStart:Ht,width:it,height:it,transition:`all ${tt.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Xt,borderRadius:it/2,boxShadow:Ut,transition:`all ${tt.switchDuration} ease-in-out`,content:'""'}},[`&${Ot}-checked ${_e}`]:{insetInlineStart:`calc(100% - ${it+Ht}px)`},[`&:not(${Ot}-disabled):active`]:gt?{[`${_e}::before`]:{insetInlineEnd:tt.switchHandleActiveInset,insetInlineStart:0},[`&${Ot}-checked ${_e}::before`]:{insetInlineEnd:0,insetInlineStart:tt.switchHandleActiveInset}}:{}}}},Ge=tt=>{const{componentCls:Ot,trackHeight:gt,trackPadding:Ht,innerMinMargin:Xt,innerMaxMargin:Ut,handleSize:it}=tt,_e=`${Ot}-inner`;return{[Ot]:{[_e]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Ut,paddingInlineEnd:Xt,transition:`padding-inline-start ${tt.switchDuration} ease-in-out, padding-inline-end ${tt.switchDuration} ease-in-out`,[`${_e}-checked, ${_e}-unchecked`]:{display:"block",color:tt.colorTextLightSolid,fontSize:tt.fontSizeSM,transition:`margin-inline-start ${tt.switchDuration} ease-in-out, margin-inline-end ${tt.switchDuration} ease-in-out`,pointerEvents:"none"},[`${_e}-checked`]:{marginInlineStart:`calc(-100% + ${it+Ht*2}px - ${Ut*2}px)`,marginInlineEnd:`calc(100% - ${it+Ht*2}px + ${Ut*2}px)`},[`${_e}-unchecked`]:{marginTop:-gt,marginInlineStart:0,marginInlineEnd:0}},[`&${Ot}-checked ${_e}`]:{paddingInlineStart:Xt,paddingInlineEnd:Ut,[`${_e}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${_e}-unchecked`]:{marginInlineStart:`calc(100% - ${it+Ht*2}px + ${Ut*2}px)`,marginInlineEnd:`calc(-100% + ${it+Ht*2}px - ${Ut*2}px)`}},[`&:not(${Ot}-disabled):active`]:{[`&:not(${Ot}-checked) ${_e}`]:{[`${_e}-unchecked`]:{marginInlineStart:Ht*2,marginInlineEnd:-Ht*2}},[`&${Ot}-checked ${_e}`]:{[`${_e}-checked`]:{marginInlineStart:-Ht*2,marginInlineEnd:Ht*2}}}}}},nt=tt=>{const{componentCls:Ot,trackHeight:gt,trackMinWidth:Ht}=tt;return{[Ot]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(tt)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Ht,height:gt,lineHeight:`${gt}px`,verticalAlign:"middle",background:tt.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${tt.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ot}-disabled)`]:{background:tt.colorTextTertiary}}),(0,fe.Qy)(tt)),{[`&${Ot}-checked`]:{background:tt.switchColor,[`&:hover:not(${Ot}-disabled)`]:{background:tt.colorPrimaryHover}},[`&${Ot}-loading, &${Ot}-disabled`]:{cursor:"not-allowed",opacity:tt.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ot}-rtl`]:{direction:"rtl"}})}};var Je=(0,ye.Z)("Switch",tt=>{const Ot=(0,be.TS)(tt,{switchDuration:tt.motionDurationMid,switchColor:tt.colorPrimary,switchDisabledOpacity:tt.opacityLoading,switchLoadingIconSize:tt.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${tt.opacityLoading})`,switchHandleActiveInset:"-30%"});return[nt(Ot),Ge(Ot),ze(Ot),Be(Ot),Te(Ot)]},tt=>{const{fontSize:Ot,lineHeight:gt,controlHeight:Ht,colorWhite:Xt}=tt,Ut=Ot*gt,it=Ht/2,_e=2,Wt=Ut-_e*2,Dn=it-_e*2;return{trackHeight:Ut,trackHeightSM:it,trackMinWidth:Wt*2+_e*4,trackMinWidthSM:Dn*2+_e*2,trackPadding:_e,handleBg:Xt,handleSize:Wt,handleSizeSM:Dn,handleShadow:`0 2px 4px 0 ${new se.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Wt/2,innerMaxMargin:Wt+_e+_e*2,innerMinMarginSM:Dn/2,innerMaxMarginSM:Dn+_e+_e*2}}),xt=function(tt,Ot){var gt={};for(var Ht in tt)Object.prototype.hasOwnProperty.call(tt,Ht)&&Ot.indexOf(Ht)<0&&(gt[Ht]=tt[Ht]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xt=0,Ht=Object.getOwnPropertySymbols(tt);Xt<Ht.length;Xt++)Ot.indexOf(Ht[Xt])<0&&Object.prototype.propertyIsEnumerable.call(tt,Ht[Xt])&&(gt[Ht[Xt]]=tt[Ht[Xt]]);return gt};const He=kt.forwardRef((tt,Ot)=>{const{prefixCls:gt,size:Ht,disabled:Xt,loading:Ut,className:it,rootClassName:_e,style:Wt}=tt,Dn=xt(tt,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Bn,direction:$t,switch:ln}=kt.useContext(ne.E_),Tn=kt.useContext(ee.Z),ei=(Xt!=null?Xt:Tn)||Ut,Ln=Bn("switch",gt),Yn=kt.createElement("div",{className:`${Ln}-handle`},Ut&&kt.createElement(ge.Z,{className:`${Ln}-loading-icon`})),[zt,wn]=Je(Ln),$n=(0,ce.Z)(Ht),Yt=Ve()(ln==null?void 0:ln.className,{[`${Ln}-small`]:$n==="small",[`${Ln}-loading`]:Ut,[`${Ln}-rtl`]:$t==="rtl"},it,_e,wn),tn=Object.assign(Object.assign({},ln==null?void 0:ln.style),Wt);return zt(kt.createElement(Ae.Z,{component:"Switch"},kt.createElement(jt,Object.assign({},Dn,{prefixCls:Ln,className:Yt,style:tn,disabled:ei,ref:Ot,loadingIcon:Yn}))))});He.__ANT_SWITCH=!0;var Et=He},1710:function(Vn,Cn,pe){"use strict";pe.d(Cn,{default:function(){return dg}});var ge={},Re="rc-table-internal-hook",Ve=pe(72071),dt=pe(6089),Ke=pe(34280),st=pe(13697),Me=pe(59301),kt=pe(4676);function bt(mt){var wt=Me.createContext(void 0),on=function(Hn){var En=Hn.value,si=Hn.children,li=Me.useRef(En);li.current=En;var ti=Me.useState(function(){return{getValue:function(){return li.current},listeners:new Set}}),Mi=(0,Ve.Z)(ti,1),Ai=Mi[0];return(0,Ke.Z)(function(){(0,kt.unstable_batchedUpdates)(function(){Ai.listeners.forEach(function(Ni){Ni(En)})})},[En]),Me.createElement(wt.Provider,{value:Ai},si)};return{Context:wt,Provider:on,defaultValue:mt}}function Ue(mt,wt){var on=(0,dt.Z)(typeof wt=="function"?wt:function(Ni){if(wt===void 0)return Ni;if(!Array.isArray(wt))return Ni[wt];var gr={};return wt.forEach(function(dr){gr[dr]=Ni[dr]}),gr}),dn=Me.useContext(mt==null?void 0:mt.Context),Hn=dn||{},En=Hn.listeners,si=Hn.getValue,li=Me.useRef();li.current=on(dn?si():mt==null?void 0:mt.defaultValue);var ti=Me.useState({}),Mi=(0,Ve.Z)(ti,2),Ai=Mi[1];return(0,Ke.Z)(function(){if(!dn)return;function Ni(gr){var dr=on(gr);(0,st.Z)(li.current,dr,!0)||Ai({})}return En.add(Ni),function(){En.delete(Ni)}},[dn]),li.current}var lt=pe(96663),yt=pe(8654);function jt(){var mt=Me.createContext(null);function wt(){return Me.useContext(mt)}function on(Hn,En){var si=(0,yt.Yr)(Hn),li=function(Mi,Ai){var Ni=si?{ref:Ai}:{},gr=Me.useRef(0),dr=Me.useRef(Mi),ir=wt();return ir!==null?Me.createElement(Hn,(0,lt.Z)({},Mi,Ni)):((!En||En(dr.current,Mi))&&(gr.current+=1),dr.current=Mi,Me.createElement(mt.Provider,{value:gr.current},Me.createElement(Hn,(0,lt.Z)({},Mi,Ni))))};return si?Me.forwardRef(li):li}function dn(Hn,En){var si=(0,yt.Yr)(Hn),li=function(Mi,Ai){var Ni=si?{ref:Ai}:{};return wt(),Me.createElement(Hn,(0,lt.Z)({},Mi,Ni))};return si?Me.memo(Me.forwardRef(li),En):Me.memo(li,En)}return{makeImmutable:on,responseImmutable:dn,useImmutableMark:wt}}var Ae=jt(),ne=Ae.makeImmutable,ee=Ae.responseImmutable,ce=Ae.useImmutableMark,se=jt(),fe=se.makeImmutable,ye=se.responseImmutable,be=se.useImmutableMark,Te=bt(),Be=Te;function ze(mt,wt){var on=Me.useRef(0);on.current+=1;var dn=Me.useRef(mt),Hn=[];Object.keys(mt||{}).map(function(si){var li;(mt==null?void 0:mt[si])!==((li=dn.current)===null||li===void 0?void 0:li[si])&&Hn.push(si)}),dn.current=mt;var En=Me.useRef([]);return Hn.length&&(En.current=Hn),Me.useDebugValue(on.current),Me.useDebugValue(En.current.join(", ")),wt&&console.log("".concat(wt,":"),on.current,En.current),on.current}var Ge=null,nt=Me.memo(function(){var mt=ze();return Me.createElement("h1",null,"Render Times: ",mt)});nt.displayName="RenderBlock";var Je=pe(20135),xt=pe(44127),He=pe(90493),Et=pe(92310),tt=pe.n(Et),Ot=pe(80547),gt=pe(97938),Ht=pe(48736),Xt=Me.createContext({renderWithProps:!1}),Ut=Xt,it="RC_TABLE_KEY";function _e(mt){return mt==null?[]:Array.isArray(mt)?mt:[mt]}function Wt(mt){var wt=[],on={};return mt.forEach(function(dn){for(var Hn=dn||{},En=Hn.key,si=Hn.dataIndex,li=En||_e(si).join("-")||it;on[li];)li="".concat(li,"_next");on[li]=!0,wt.push(li)}),wt}function Dn(mt){return mt!=null}function Bn(mt){return mt&&(0,Je.Z)(mt)==="object"&&!Array.isArray(mt)&&!Me.isValidElement(mt)}function $t(mt,wt,on,dn,Hn,En){var si=Me.useContext(Ut),li=be(),ti=(0,Ot.Z)(function(){if(Dn(dn))return[dn];var Mi=wt==null||wt===""?[]:Array.isArray(wt)?wt:[wt],Ai=(0,gt.Z)(mt,Mi),Ni=Ai,gr=void 0;if(Hn){var dr=Hn(Ai,mt,on);Bn(dr)?(Ni=dr.children,gr=dr.props,si.renderWithProps=!0):Ni=dr}return[Ni,gr]},[li,mt,dn,wt,Hn,on],function(Mi,Ai){if(En){var Ni=(0,Ve.Z)(Mi,2),gr=Ni[1],dr=(0,Ve.Z)(Ai,2),ir=dr[1];return En(ir,gr)}return si.renderWithProps?!0:!(0,st.Z)(Mi,Ai,!0)});return ti}function ln(mt,wt,on,dn){var Hn=mt+wt-1;return mt<=dn&&Hn>=on}function Tn(mt,wt){return Ue(Be,function(on){var dn=ln(mt,wt||1,on.hoverStartRow,on.hoverEndRow);return[dn,on.onHover]})}var ei=function(wt){var on=wt.ellipsis,dn=wt.rowType,Hn=wt.children,En,si=on===!0?{showTitle:!0}:on;return si&&(si.showTitle||dn==="header")&&(typeof Hn=="string"||typeof Hn=="number"?En=Hn.toString():Me.isValidElement(Hn)&&typeof Hn.props.children=="string"&&(En=Hn.props.children)),En};function Ln(mt){var wt,on,dn,Hn,En,si,li,ti,Mi=mt.component,Ai=mt.children,Ni=mt.ellipsis,gr=mt.scope,dr=mt.prefixCls,ir=mt.className,Wr=mt.align,sr=mt.record,zr=mt.render,Ir=mt.dataIndex,eo=mt.renderIndex,xo=mt.shouldCellUpdate,ko=mt.index,$r=mt.rowType,So=mt.colSpan,Xo=mt.rowSpan,_r=mt.fixLeft,co=mt.fixRight,Xr=mt.firstFixLeft,Cr=mt.lastFixLeft,oo=mt.firstFixRight,Mo=mt.lastFixRight,Zo=mt.appendNode,Wo=mt.additionalProps,Kr=Wo===void 0?{}:Wo,Yo=mt.isSticky,ia="".concat(dr,"-cell"),Ta=Ue(Be,["supportSticky","allColumnsFixedLeft"]),pa=Ta.supportSticky,ds=Ta.allColumnsFixedLeft,ja=$t(sr,Ir,eo,Ai,zr,xo),na=(0,Ve.Z)(ja,2),Fo=na[0],Sa=na[1],hs={},Qa=typeof _r=="number"&&pa,Ns=typeof co=="number"&&pa;Qa&&(hs.position="sticky",hs.left=_r),Ns&&(hs.position="sticky",hs.right=co);var $o=(wt=(on=(dn=Sa==null?void 0:Sa.colSpan)!==null&&dn!==void 0?dn:Kr.colSpan)!==null&&on!==void 0?on:So)!==null&&wt!==void 0?wt:1,Io=(Hn=(En=(si=Sa==null?void 0:Sa.rowSpan)!==null&&si!==void 0?si:Kr.rowSpan)!==null&&En!==void 0?En:Xo)!==null&&Hn!==void 0?Hn:1,Go=Tn(ko,Io),Co=(0,Ve.Z)(Go,2),Aa=Co[0],Po=Co[1],Jo=function(Fs){var Ws;sr&&Po(ko,ko+Io-1),Kr==null||(Ws=Kr.onMouseEnter)===null||Ws===void 0||Ws.call(Kr,Fs)},ga=function(Fs){var Ws;sr&&Po(-1,-1),Kr==null||(Ws=Kr.onMouseLeave)===null||Ws===void 0||Ws.call(Kr,Fs)};if($o===0||Io===0)return null;var ma=(li=Kr.title)!==null&&li!==void 0?li:ei({rowType:$r,ellipsis:Ni,children:Fo}),Us=tt()(ia,ir,(ti={},(0,He.Z)(ti,"".concat(ia,"-fix-left"),Qa&&pa),(0,He.Z)(ti,"".concat(ia,"-fix-left-first"),Xr&&pa),(0,He.Z)(ti,"".concat(ia,"-fix-left-last"),Cr&&pa),(0,He.Z)(ti,"".concat(ia,"-fix-left-all"),Cr&&ds&&pa),(0,He.Z)(ti,"".concat(ia,"-fix-right"),Ns&&pa),(0,He.Z)(ti,"".concat(ia,"-fix-right-first"),oo&&pa),(0,He.Z)(ti,"".concat(ia,"-fix-right-last"),Mo&&pa),(0,He.Z)(ti,"".concat(ia,"-ellipsis"),Ni),(0,He.Z)(ti,"".concat(ia,"-with-append"),Zo),(0,He.Z)(ti,"".concat(ia,"-fix-sticky"),(Qa||Ns)&&Yo&&pa),(0,He.Z)(ti,"".concat(ia,"-row-hover"),!Sa&&Aa),ti),Kr.className,Sa==null?void 0:Sa.className),Zs={};Wr&&(Zs.textAlign=Wr);var cl=(0,xt.Z)((0,xt.Z)((0,xt.Z)((0,xt.Z)({},hs),Kr.style),Zs),Sa==null?void 0:Sa.style),ka=Fo;return(0,Je.Z)(ka)==="object"&&!Array.isArray(ka)&&!Me.isValidElement(ka)&&(ka=null),Ni&&(Cr||oo)&&(ka=Me.createElement("span",{className:"".concat(ia,"-content")},ka)),Me.createElement(Mi,(0,lt.Z)({},Sa,Kr,{className:Us,style:cl,title:ma,scope:gr,onMouseEnter:Jo,onMouseLeave:ga,colSpan:$o!==1?$o:null,rowSpan:Io!==1?Io:null}),Zo,ka)}var Yn=Me.memo(Ln);function zt(mt,wt,on,dn,Hn,En){var si=on[mt]||{},li=on[wt]||{},ti,Mi;si.fixed==="left"?ti=dn.left[Hn==="rtl"?wt:mt]:li.fixed==="right"&&(Mi=dn.right[Hn==="rtl"?mt:wt]);var Ai=!1,Ni=!1,gr=!1,dr=!1,ir=on[wt+1],Wr=on[mt-1],sr=!(En!=null&&En.children);if(Hn==="rtl"){if(ti!==void 0){var zr=Wr&&Wr.fixed==="left";dr=!zr&&sr}else if(Mi!==void 0){var Ir=ir&&ir.fixed==="right";gr=!Ir&&sr}}else if(ti!==void 0){var eo=ir&&ir.fixed==="left";Ai=!eo&&sr}else if(Mi!==void 0){var xo=Wr&&Wr.fixed==="right";Ni=!xo&&sr}return{fixLeft:ti,fixRight:Mi,lastFixLeft:Ai,firstFixRight:Ni,lastFixRight:gr,firstFixLeft:dr,isSticky:dn.isSticky}}var wn=Me.createContext({}),$n=wn;function Yt(mt){var wt=mt.className,on=mt.index,dn=mt.children,Hn=mt.colSpan,En=Hn===void 0?1:Hn,si=mt.rowSpan,li=mt.align,ti=Ue(Be,["prefixCls","direction"]),Mi=ti.prefixCls,Ai=ti.direction,Ni=Me.useContext($n),gr=Ni.scrollColumnIndex,dr=Ni.stickyOffsets,ir=Ni.flattenColumns,Wr=Ni.columns,sr=on+En-1,zr=sr+1===gr?En+1:En,Ir=zt(on,on+zr-1,ir,dr,Ai,Wr==null?void 0:Wr[on]);return Me.createElement(Yn,(0,lt.Z)({className:wt,index:on,component:"td",prefixCls:Mi,record:null,dataIndex:null,align:li,colSpan:zr,rowSpan:si,render:function(){return dn}},Ir))}var tn=pe(6620),Gt=["children"];function Tt(mt){var wt=mt.children,on=(0,tn.Z)(mt,Gt);return Me.createElement("tr",on,wt)}function ot(mt){var wt=mt.children;return wt}ot.Row=Tt,ot.Cell=Yt;var Ze=ot;function At(mt){var wt=mt.children,on=mt.stickyOffsets,dn=mt.flattenColumns,Hn=mt.columns,En=Ue(Be,"prefixCls"),si=dn.length-1,li=dn[si],ti=Me.useMemo(function(){return{stickyOffsets:on,flattenColumns:dn,scrollColumnIndex:li!=null&&li.scrollbar?si:null,columns:Hn}},[li,dn,si,on,Hn]);return Me.createElement($n.Provider,{value:ti},Me.createElement("tfoot",{className:"".concat(En,"-summary")},wt))}var Dt=ye(At),rt=Ze,et=pe(70425),Oe=pe(29301),Pe=pe(29194),ve=pe(24514),Fe=pe(75152),We=pe(26112);function Ne(mt,wt,on,dn,Hn,En,si){mt.push({record:wt,indent:on,index:si});var li=En(wt),ti=Hn==null?void 0:Hn.has(li);if(wt&&Array.isArray(wt[dn])&&ti)for(var Mi=0;Mi<wt[dn].length;Mi+=1)Ne(mt,wt[dn][Mi],on+1,dn,Hn,En,Mi)}function ft(mt,wt,on,dn){var Hn=Me.useMemo(function(){if(on!=null&&on.size){for(var En=[],si=0;si<(mt==null?void 0:mt.length);si+=1){var li=mt[si];Ne(En,li,0,wt,on,dn,si)}return En}return mt==null?void 0:mt.map(function(ti,Mi){return{record:ti,indent:0,index:Mi}})},[mt,wt,on,dn]);return Hn}function sn(mt){var wt=mt.prefixCls,on=mt.children,dn=mt.component,Hn=mt.cellComponent,En=mt.className,si=mt.expanded,li=mt.colSpan,ti=mt.isEmpty,Mi=Ue(Be,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Ai=Mi.scrollbarSize,Ni=Mi.fixHeader,gr=Mi.fixColumn,dr=Mi.componentWidth,ir=Mi.horizonScroll,Wr=on;return(ti?ir&&dr:gr)&&(Wr=Me.createElement("div",{style:{width:dr-(Ni?Ai:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(wt,"-expanded-row-fixed")},Wr)),Me.createElement(dn,{className:En,style:{display:si?null:"none"}},Me.createElement(Yn,{component:Hn,prefixCls:wt,colSpan:li},Wr))}var un=sn;function Pt(mt,wt,on,dn){var Hn=Ue(Be,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),En=Hn.flattenColumns,si=Hn.expandableType,li=Hn.expandedKeys,ti=Hn.childrenColumnName,Mi=Hn.onTriggerExpand,Ai=Hn.rowExpandable,Ni=Hn.onRow,gr=Hn.expandRowByClick,dr=Hn.rowClassName,ir=si==="nest",Wr=si==="row"&&(!Ai||Ai(mt)),sr=Wr||ir,zr=li&&li.has(wt),Ir=ti&&mt&&mt[ti],eo=(0,et.useEvent)(Mi),xo=Ni==null?void 0:Ni(mt,on),ko=xo==null?void 0:xo.onClick,$r=function(co){gr&&sr&&Mi(mt,co);for(var Xr=arguments.length,Cr=new Array(Xr>1?Xr-1:0),oo=1;oo<Xr;oo++)Cr[oo-1]=arguments[oo];ko==null||ko.apply(void 0,[co].concat(Cr))},So;typeof dr=="string"?So=dr:typeof dr=="function"&&(So=dr(mt,on,dn));var Xo=Wt(En);return(0,xt.Z)((0,xt.Z)({},Hn),{},{columnsKey:Xo,nestExpandable:ir,expanded:zr,hasNestChildren:Ir,record:mt,onTriggerExpand:eo,rowSupportExpand:Wr,expandable:sr,rowProps:(0,xt.Z)((0,xt.Z)({},xo),{},{className:tt()(So,xo==null?void 0:xo.className),onClick:$r})})}function qt(mt,wt,on,dn,Hn){var En=mt.record,si=mt.prefixCls,li=mt.columnsKey,ti=mt.fixedInfoList,Mi=mt.expandIconColumnIndex,Ai=mt.nestExpandable,Ni=mt.indentSize,gr=mt.expandIcon,dr=mt.expanded,ir=mt.hasNestChildren,Wr=mt.onTriggerExpand,sr=li[on],zr=ti[on],Ir;on===(Mi||0)&&Ai&&(Ir=Me.createElement(Me.Fragment,null,Me.createElement("span",{style:{paddingLeft:"".concat(Ni*dn,"px")},className:"".concat(si,"-row-indent indent-level-").concat(dn)}),gr({prefixCls:si,expanded:dr,expandable:ir,record:En,onExpand:Wr})));var eo;return wt.onCell&&(eo=wt.onCell(En,Hn)),{key:sr,fixedInfo:zr,appendCellNode:Ir,additionalCellProps:eo||{}}}function Mn(mt){var wt=mt.className,on=mt.style,dn=mt.record,Hn=mt.index,En=mt.renderIndex,si=mt.rowKey,li=mt.indent,ti=li===void 0?0:li,Mi=mt.rowComponent,Ai=mt.cellComponent,Ni=mt.scopeCellComponent,gr=Pt(dn,si,Hn,ti),dr=gr.prefixCls,ir=gr.flattenColumns,Wr=gr.expandedRowClassName,sr=gr.expandedRowRender,zr=gr.rowProps,Ir=gr.expanded,eo=gr.rowSupportExpand,xo=Me.useState(!1),ko=(0,Ve.Z)(xo,2),$r=ko[0],So=ko[1];Me.useEffect(function(){Ir&&So(!0)},[Ir]);var Xo=Me.createElement(Mi,(0,lt.Z)({},zr,{"data-row-key":si,className:tt()(wt,"".concat(dr,"-row"),"".concat(dr,"-row-level-").concat(ti),zr==null?void 0:zr.className),style:(0,xt.Z)((0,xt.Z)({},on),zr==null?void 0:zr.style)}),ir.map(function(Cr,oo){var Mo=Cr.render,Zo=Cr.dataIndex,Wo=Cr.className,Kr=qt(gr,Cr,oo,ti,Hn),Yo=Kr.key,ia=Kr.fixedInfo,Ta=Kr.appendCellNode,pa=Kr.additionalCellProps;return Me.createElement(Yn,(0,lt.Z)({className:Wo,ellipsis:Cr.ellipsis,align:Cr.align,scope:Cr.rowScope,component:Cr.rowScope?Ni:Ai,prefixCls:dr,key:Yo,record:dn,index:Hn,renderIndex:En,dataIndex:Zo,render:Mo,shouldCellUpdate:Cr.shouldCellUpdate},ia,{appendNode:Ta,additionalProps:pa}))})),_r;if(eo&&($r||Ir)){var co=sr(dn,Hn,ti+1,Ir),Xr=Wr&&Wr(dn,Hn,ti);_r=Me.createElement(un,{expanded:Ir,className:tt()("".concat(dr,"-expanded-row"),"".concat(dr,"-expanded-row-level-").concat(ti+1),Xr),prefixCls:dr,component:Mi,cellComponent:Ai,colSpan:ir.length,isEmpty:!1},co)}return Me.createElement(Me.Fragment,null,Xo,_r)}Mn.displayName="BodyRow";var hn=ye(Mn);function fn(mt){var wt=mt.columnKey,on=mt.onColumnResize,dn=Me.useRef();return Me.useEffect(function(){dn.current&&on(wt,dn.current.offsetWidth)},[]),Me.createElement(Oe.Z,{data:wt},Me.createElement("td",{ref:dn,style:{padding:0,border:0,height:0}},Me.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ui(mt){var wt=mt.prefixCls,on=mt.columnsKey,dn=mt.onColumnResize;return Me.createElement("tr",{"aria-hidden":"true",className:"".concat(wt,"-measure-row"),style:{height:0,fontSize:0}},Me.createElement(Oe.Z.Collection,{onBatchResize:function(En){En.forEach(function(si){var li=si.data,ti=si.size;dn(li,ti.offsetWidth)})}},on.map(function(Hn){return Me.createElement(fn,{key:Hn,columnKey:Hn,onColumnResize:dn})})))}function gi(mt){var wt=mt.data,on=mt.measureColumnWidth,dn=Ue(Be,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Hn=dn.prefixCls,En=dn.getComponent,si=dn.onColumnResize,li=dn.flattenColumns,ti=dn.getRowKey,Mi=dn.expandedKeys,Ai=dn.childrenColumnName,Ni=dn.emptyNode,gr=ft(wt,Ai,Mi,ti),dr=Me.useRef({renderWithProps:!1}),ir=En(["body","wrapper"],"tbody"),Wr=En(["body","row"],"tr"),sr=En(["body","cell"],"td"),zr=En(["body","cell"],"th"),Ir;wt.length?Ir=gr.map(function(xo,ko){var $r=xo.record,So=xo.indent,Xo=xo.index,_r=ti($r,ko);return Me.createElement(hn,{key:_r,rowKey:_r,record:$r,index:ko,renderIndex:Xo,rowComponent:Wr,cellComponent:sr,scopeCellComponent:zr,getRowKey:ti,indent:So})}):Ir=Me.createElement(un,{expanded:!0,className:"".concat(Hn,"-placeholder"),prefixCls:Hn,component:Wr,cellComponent:sr,colSpan:li.length,isEmpty:!0},Ni);var eo=Wt(li);return Me.createElement(Ut.Provider,{value:dr.current},Me.createElement(ir,{className:"".concat(Hn,"-tbody")},on&&Me.createElement(ui,{prefixCls:Hn,columnsKey:eo,onColumnResize:si}),Ir))}gi.displayName="Body";var fi=ye(gi),bi=["expandable"],_i="RC_TABLE_INTERNAL_COL_DEFINE";function rr(mt){var wt=mt.expandable,on=(0,tn.Z)(mt,bi),dn;return"expandable"in mt?dn=(0,xt.Z)((0,xt.Z)({},on),wt):dn=on,dn.showExpandColumn===!1&&(dn.expandIconColumnIndex=-1),dn}var Wi=["columnType"];function vr(mt){for(var wt=mt.colWidths,on=mt.columns,dn=mt.columCount,Hn=[],En=dn||on.length,si=!1,li=En-1;li>=0;li-=1){var ti=wt[li],Mi=on&&on[li],Ai=Mi&&Mi[_i];if(ti||Ai||si){var Ni=Ai||{},gr=Ni.columnType,dr=(0,tn.Z)(Ni,Wi);Hn.unshift(Me.createElement("col",(0,lt.Z)({key:li,style:{width:ti}},dr))),si=!0}}return Me.createElement("colgroup",null,Hn)}var fr=vr,zi=pe(19127),Er=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Kn(mt,wt){return(0,Me.useMemo)(function(){for(var on=[],dn=0;dn<wt;dn+=1){var Hn=mt[dn];if(Hn!==void 0)on[dn]=Hn;else return null}return on},[mt.join("_"),wt])}var Le=Me.forwardRef(function(mt,wt){var on=mt.className,dn=mt.noData,Hn=mt.columns,En=mt.flattenColumns,si=mt.colWidths,li=mt.columCount,ti=mt.stickyOffsets,Mi=mt.direction,Ai=mt.fixHeader,Ni=mt.stickyTopOffset,gr=mt.stickyBottomOffset,dr=mt.stickyClassName,ir=mt.onScroll,Wr=mt.maxContentScroll,sr=mt.children,zr=(0,tn.Z)(mt,Er),Ir=Ue(Be,["prefixCls","scrollbarSize","isSticky"]),eo=Ir.prefixCls,xo=Ir.scrollbarSize,ko=Ir.isSticky,$r=ko&&!Ai?0:xo,So=Me.useRef(null),Xo=Me.useCallback(function(Wo){(0,yt.mH)(wt,Wo),(0,yt.mH)(So,Wo)},[]);Me.useEffect(function(){var Wo;function Kr(Yo){var ia=Yo,Ta=ia.currentTarget,pa=ia.deltaX;pa&&(ir({currentTarget:Ta,scrollLeft:Ta.scrollLeft+pa}),Yo.preventDefault())}return(Wo=So.current)===null||Wo===void 0||Wo.addEventListener("wheel",Kr),function(){var Yo;(Yo=So.current)===null||Yo===void 0||Yo.removeEventListener("wheel",Kr)}},[]);var _r=Me.useMemo(function(){return En.every(function(Wo){return Wo.width})},[En]),co=En[En.length-1],Xr={fixed:co?co.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(eo,"-cell-scrollbar")}}},Cr=(0,Me.useMemo)(function(){return $r?[].concat((0,zi.Z)(Hn),[Xr]):Hn},[$r,Hn]),oo=(0,Me.useMemo)(function(){return $r?[].concat((0,zi.Z)(En),[Xr]):En},[$r,En]),Mo=(0,Me.useMemo)(function(){var Wo=ti.right,Kr=ti.left;return(0,xt.Z)((0,xt.Z)({},ti),{},{left:Mi==="rtl"?[].concat((0,zi.Z)(Kr.map(function(Yo){return Yo+$r})),[0]):Kr,right:Mi==="rtl"?Wo:[].concat((0,zi.Z)(Wo.map(function(Yo){return Yo+$r})),[0]),isSticky:ko})},[$r,ti,ko]),Zo=Kn(si,li);return Me.createElement("div",{style:(0,xt.Z)({overflow:"hidden"},ko?{top:Ni,bottom:gr}:{}),ref:Xo,className:tt()(on,(0,He.Z)({},dr,!!dr))},Me.createElement("table",{style:{tableLayout:"fixed",visibility:dn||Zo?null:"hidden"}},(!dn||!Wr||_r)&&Me.createElement(fr,{colWidths:Zo?[].concat((0,zi.Z)(Zo),[$r]):[],columCount:li+1,columns:oo}),sr((0,xt.Z)((0,xt.Z)({},zr),{},{stickyOffsets:Mo,columns:Cr,flattenColumns:oo}))))});Le.displayName="FixedHolder";var Ei=Me.memo(Le);function Ri(mt){var wt=mt.cells,on=mt.stickyOffsets,dn=mt.flattenColumns,Hn=mt.rowComponent,En=mt.cellComponent,si=mt.tdCellComponent,li=mt.onHeaderRow,ti=mt.index,Mi=Ue(Be,["prefixCls","direction"]),Ai=Mi.prefixCls,Ni=Mi.direction,gr;li&&(gr=li(wt.map(function(ir){return ir.column}),ti));var dr=Wt(wt.map(function(ir){return ir.column}));return Me.createElement(Hn,gr,wt.map(function(ir,Wr){var sr=ir.column,zr=zt(ir.colStart,ir.colEnd,dn,on,Ni,sr),Ir;return sr&&sr.onHeaderCell&&(Ir=ir.column.onHeaderCell(sr)),Me.createElement(Yn,(0,lt.Z)({},ir,{scope:sr.title?ir.colSpan>1?"colgroup":"col":null,ellipsis:sr.ellipsis,align:sr.align,component:sr.title?En:si,prefixCls:Ai,key:dr[Wr]},zr,{additionalProps:Ir,rowType:"header"}))}))}Ri.displayName="HeaderRow";var an=Ri;function di(mt){var wt=[];function on(si,li){var ti=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;wt[ti]=wt[ti]||[];var Mi=li,Ai=si.filter(Boolean).map(function(Ni){var gr={key:Ni.key,className:Ni.className||"",children:Ni.title,column:Ni,colStart:Mi},dr=1,ir=Ni.children;return ir&&ir.length>0&&(dr=on(ir,Mi,ti+1).reduce(function(Wr,sr){return Wr+sr},0),gr.hasSubColumns=!0),"colSpan"in Ni&&(dr=Ni.colSpan),"rowSpan"in Ni&&(gr.rowSpan=Ni.rowSpan),gr.colSpan=dr,gr.colEnd=gr.colStart+dr-1,wt[ti].push(gr),Mi+=dr,dr});return Ai}on(mt,0);for(var dn=wt.length,Hn=function(li){wt[li].forEach(function(ti){!("rowSpan"in ti)&&!ti.hasSubColumns&&(ti.rowSpan=dn-li)})},En=0;En<dn;En+=1)Hn(En);return wt}function yi(mt){var wt=mt.stickyOffsets,on=mt.columns,dn=mt.flattenColumns,Hn=mt.onHeaderRow,En=Ue(Be,["prefixCls","getComponent"]),si=En.prefixCls,li=En.getComponent,ti=Me.useMemo(function(){return di(on)},[on]),Mi=li(["header","wrapper"],"thead"),Ai=li(["header","row"],"tr"),Ni=li(["header","cell"],"th"),gr=li(["header","cell"],"td");return Me.createElement(Mi,{className:"".concat(si,"-thead")},ti.map(function(dr,ir){var Wr=Me.createElement(an,{key:ir,flattenColumns:dn,cells:dr,stickyOffsets:wt,rowComponent:Ai,cellComponent:Ni,tdCellComponent:gr,onHeaderRow:Hn,index:ir});return Wr}))}var Li=ye(yi),On=pe(11592);function Un(mt){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof wt=="number"?wt:wt.endsWith("%")?mt*parseFloat(wt)/100:null}function It(mt,wt){return Me.useMemo(function(){if(wt&&wt>0){var on=0,dn=0;mt.forEach(function(Mi){var Ai=Un(wt,Mi.width);Ai?on+=Ai:dn+=1});var Hn=wt-on,En=dn,si=Hn/dn,li=0,ti=mt.map(function(Mi){var Ai=(0,xt.Z)({},Mi),Ni=Un(wt,Ai.width);if(Ni)Ai.width=Ni;else{var gr=Math.floor(si);Ai.width=En===1?Hn:gr,Hn-=gr,En-=1}return li+=Ai.width,Ai});return[ti,li]}return[mt,wt]},[mt,wt])}var Kt=["children"],Ye=["fixed"];function nn(mt){return(0,On.Z)(mt).filter(function(wt){return Me.isValidElement(wt)}).map(function(wt){var on=wt.key,dn=wt.props,Hn=dn.children,En=(0,tn.Z)(dn,Kt),si=(0,xt.Z)({key:on},En);return Hn&&(si.children=nn(Hn)),si})}function xn(mt){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return mt.filter(function(on){return on&&(0,Je.Z)(on)==="object"}).reduce(function(on,dn,Hn){var En=dn.fixed,si=En===!0?"left":En,li="".concat(wt,"-").concat(Hn),ti=dn.children;return ti&&ti.length>0?[].concat((0,zi.Z)(on),(0,zi.Z)(xn(ti,li).map(function(Mi){return(0,xt.Z)({fixed:si},Mi)}))):[].concat((0,zi.Z)(on),[(0,xt.Z)((0,xt.Z)({key:li},dn),{},{fixed:si})])},[])}function Nt(mt){for(var wt=!0,on=0;on<mt.length;on+=1){var dn=mt[on];if(wt&&dn.fixed!=="left")wt=!1;else if(!wt&&dn.fixed==="left"){warning(!1,"Index ".concat(on-1," of `columns` missing `fixed='left'` prop."));break}}for(var Hn=!0,En=mt.length-1;En>=0;En-=1){var si=mt[En];if(Hn&&si.fixed!=="right")Hn=!1;else if(!Hn&&si.fixed==="right"){warning(!1,"Index ".concat(En+1," of `columns` missing `fixed='right'` prop."));break}}}function at(mt){return mt.map(function(wt){var on=wt.fixed,dn=(0,tn.Z)(wt,Ye),Hn=on;return on==="left"?Hn="right":on==="right"&&(Hn="left"),(0,xt.Z)({fixed:Hn},dn)})}function cn(mt,wt){var on=mt.prefixCls,dn=mt.columns,Hn=mt.children,En=mt.expandable,si=mt.expandedKeys,li=mt.columnTitle,ti=mt.getRowKey,Mi=mt.onTriggerExpand,Ai=mt.expandIcon,Ni=mt.rowExpandable,gr=mt.expandIconColumnIndex,dr=mt.direction,ir=mt.expandRowByClick,Wr=mt.columnWidth,sr=mt.fixed,zr=mt.scrollWidth,Ir=Me.useMemo(function(){return dn||nn(Hn)},[dn,Hn]),eo=Me.useMemo(function(){if(En){var co,Xr=Ir.slice();if(!Xr.includes(ge)){var Cr=gr||0;Cr>=0&&Xr.splice(Cr,0,ge)}var oo=Xr.indexOf(ge);Xr=Xr.filter(function(Kr,Yo){return Kr!==ge||Yo===oo});var Mo=Ir[oo],Zo;(sr==="left"||sr)&&!gr?Zo="left":(sr==="right"||sr)&&gr===Ir.length?Zo="right":Zo=Mo?Mo.fixed:null;var Wo=(co={},(0,He.Z)(co,_i,{className:"".concat(on,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,He.Z)(co,"title",li),(0,He.Z)(co,"fixed",Zo),(0,He.Z)(co,"className","".concat(on,"-row-expand-icon-cell")),(0,He.Z)(co,"width",Wr),(0,He.Z)(co,"render",function(Yo,ia,Ta){var pa=ti(ia,Ta),ds=si.has(pa),ja=Ni?Ni(ia):!0,na=Ai({prefixCls:on,expanded:ds,expandable:ja,record:ia,onExpand:Mi});return ir?Me.createElement("span",{onClick:function(Sa){return Sa.stopPropagation()}},na):na}),co);return Xr.map(function(Kr){return Kr===ge?Wo:Kr})}return Ir.filter(function(Kr){return Kr!==ge})},[En,Ir,ti,si,Ai,dr]),xo=Me.useMemo(function(){var co=eo;return wt&&(co=wt(co)),co.length||(co=[{render:function(){return null}}]),co},[wt,eo,dr]),ko=Me.useMemo(function(){return dr==="rtl"?at(xn(xo)):xn(xo)},[xo,dr,zr]),$r=It(ko,zr),So=(0,Ve.Z)($r,2),Xo=So[0],_r=So[1];return[xo,Xo,_r]}var Nn=cn;function kn(mt){var wt,on=mt.prefixCls,dn=mt.record,Hn=mt.onExpand,En=mt.expanded,si=mt.expandable,li="".concat(on,"-row-expand-icon");if(!si)return Me.createElement("span",{className:tt()(li,"".concat(on,"-row-spaced"))});var ti=function(Ai){Hn(dn,Ai),Ai.stopPropagation()};return Me.createElement("span",{className:tt()(li,(wt={},(0,He.Z)(wt,"".concat(on,"-row-expanded"),En),(0,He.Z)(wt,"".concat(on,"-row-collapsed"),!En),wt)),onClick:ti})}function Jn(mt,wt,on){var dn=[];function Hn(En){(En||[]).forEach(function(si,li){dn.push(wt(si,li)),Hn(si[on])})}return Hn(mt),dn}function St(mt,wt,on){var dn=rr(mt),Hn=dn.expandIcon,En=dn.expandedRowKeys,si=dn.defaultExpandedRowKeys,li=dn.defaultExpandAllRows,ti=dn.expandedRowRender,Mi=dn.onExpand,Ai=dn.onExpandedRowsChange,Ni=dn.childrenColumnName,gr=Hn||kn,dr=Ni||"children",ir=Me.useMemo(function(){return ti?"row":mt.expandable&&mt.internalHooks===Re&&mt.expandable.__PARENT_RENDER_ICON__||wt.some(function(ko){return ko&&(0,Je.Z)(ko)==="object"&&ko[dr]})?"nest":!1},[!!ti,wt]),Wr=Me.useState(function(){return si||(li?Jn(wt,on,dr):[])}),sr=(0,Ve.Z)(Wr,2),zr=sr[0],Ir=sr[1],eo=Me.useMemo(function(){return new Set(En||zr||[])},[En,zr]),xo=Me.useCallback(function(ko){var $r=on(ko,wt.indexOf(ko)),So,Xo=eo.has($r);Xo?(eo.delete($r),So=(0,zi.Z)(eo)):So=[].concat((0,zi.Z)(eo),[$r]),Ir(So),Mi&&Mi(!Xo,ko),Ai&&Ai(So)},[on,eo,wt,Mi,Ai]);return[dn,ir,eo,gr,dr,xo]}function An(mt,wt,on,dn){var Hn=mt.map(function(En,si){return zt(si,si,mt,wt,on,dn==null?void 0:dn[si])});return(0,Ot.Z)(function(){return Hn},[Hn],function(En,si){return!(0,st.Z)(En,si)})}function qn(mt){var wt=(0,Me.useRef)(mt),on=(0,Me.useState)({}),dn=(0,Ve.Z)(on,2),Hn=dn[1],En=(0,Me.useRef)(null),si=(0,Me.useRef)([]);function li(ti){si.current.push(ti);var Mi=Promise.resolve();En.current=Mi,Mi.then(function(){if(En.current===Mi){var Ai=si.current,Ni=wt.current;si.current=[],Ai.forEach(function(gr){wt.current=gr(wt.current)}),En.current=null,Ni!==wt.current&&Hn({})}})}return(0,Me.useEffect)(function(){return function(){En.current=null}},[]),[wt.current,li]}function Si(mt){var wt=(0,Me.useRef)(mt||null),on=(0,Me.useRef)();function dn(){window.clearTimeout(on.current)}function Hn(si){wt.current=si,dn(),on.current=window.setTimeout(function(){wt.current=null,on.current=void 0},100)}function En(){return wt.current}return(0,Me.useEffect)(function(){return dn},[]),[Hn,En]}function rn(){var mt=Me.useState(-1),wt=(0,Ve.Z)(mt,2),on=wt[0],dn=wt[1],Hn=Me.useState(-1),En=(0,Ve.Z)(Hn,2),si=En[0],li=En[1],ti=Me.useCallback(function(Mi,Ai){dn(Mi),li(Ai)},[]);return[on,si,ti]}var bn=pe(47273),Ft=(0,bn.Z)()?window:null;function Pn(mt,wt){var on=(0,Je.Z)(mt)==="object"?mt:{},dn=on.offsetHeader,Hn=dn===void 0?0:dn,En=on.offsetSummary,si=En===void 0?0:En,li=on.offsetScroll,ti=li===void 0?0:li,Mi=on.getContainer,Ai=Mi===void 0?function(){return Ft}:Mi,Ni=Ai()||Ft;return Me.useMemo(function(){var gr=!!mt;return{isSticky:gr,stickyClassName:gr?"".concat(wt,"-sticky-holder"):"",offsetHeader:Hn,offsetSummary:si,offsetScroll:ti,container:Ni}},[ti,Hn,si,wt,Ni])}function yn(mt,wt,on){var dn=(0,Me.useMemo)(function(){for(var Hn=[],En=[],si=0,li=0,ti=0;ti<wt;ti+=1)if(on==="rtl"){En[ti]=li,li+=mt[ti]||0;var Mi=wt-ti-1;Hn[Mi]=si,si+=mt[Mi]||0}else{Hn[ti]=si,si+=mt[ti]||0;var Ai=wt-ti-1;En[Ai]=li,li+=mt[Ai]||0}return{left:Hn,right:En}},[mt,wt,on]);return dn}var Sn=yn;function Gn(mt){var wt=mt.className,on=mt.children;return Me.createElement("div",{className:wt},on)}var Zn=Gn,Qn=pe(8224),ii=pe(55468),ji=function(wt,on){var dn,Hn,En=wt.scrollBodyRef,si=wt.onScroll,li=wt.offsetScroll,ti=wt.container,Mi=Ue(Be,"prefixCls"),Ai=((dn=En.current)===null||dn===void 0?void 0:dn.scrollWidth)||0,Ni=((Hn=En.current)===null||Hn===void 0?void 0:Hn.clientWidth)||0,gr=Ai&&Ni*(Ni/Ai),dr=Me.useRef(),ir=qn({scrollLeft:0,isHiddenScrollBar:!1}),Wr=(0,Ve.Z)(ir,2),sr=Wr[0],zr=Wr[1],Ir=Me.useRef({delta:0,x:0}),eo=Me.useState(!1),xo=(0,Ve.Z)(eo,2),ko=xo[0],$r=xo[1],So=function(){$r(!1)},Xo=function(oo){oo.persist(),Ir.current.delta=oo.pageX-sr.scrollLeft,Ir.current.x=0,$r(!0),oo.preventDefault()},_r=function(oo){var Mo,Zo=oo||((Mo=window)===null||Mo===void 0?void 0:Mo.event),Wo=Zo.buttons;if(!ko||Wo===0){ko&&$r(!1);return}var Kr=Ir.current.x+oo.pageX-Ir.current.x-Ir.current.delta;Kr<=0&&(Kr=0),Kr+gr>=Ni&&(Kr=Ni-gr),si({scrollLeft:Kr/Ni*(Ai+2)}),Ir.current.x=oo.pageX},co=function(){if(En.current){var oo=(0,ii.os)(En.current).top,Mo=oo+En.current.offsetHeight,Zo=ti===window?document.documentElement.scrollTop+window.innerHeight:(0,ii.os)(ti).top+ti.clientHeight;Mo-(0,Fe.Z)()<=Zo||oo>=Zo-li?zr(function(Wo){return(0,xt.Z)((0,xt.Z)({},Wo),{},{isHiddenScrollBar:!0})}):zr(function(Wo){return(0,xt.Z)((0,xt.Z)({},Wo),{},{isHiddenScrollBar:!1})})}},Xr=function(oo){zr(function(Mo){return(0,xt.Z)((0,xt.Z)({},Mo),{},{scrollLeft:oo/Ai*Ni||0})})};return Me.useImperativeHandle(on,function(){return{setScrollLeft:Xr}}),Me.useEffect(function(){var Cr=(0,Qn.Z)(document.body,"mouseup",So,!1),oo=(0,Qn.Z)(document.body,"mousemove",_r,!1);return co(),function(){Cr.remove(),oo.remove()}},[gr,ko]),Me.useEffect(function(){var Cr=(0,Qn.Z)(ti,"scroll",co,!1),oo=(0,Qn.Z)(window,"resize",co,!1);return function(){Cr.remove(),oo.remove()}},[ti]),Me.useEffect(function(){sr.isHiddenScrollBar||zr(function(Cr){var oo=En.current;return oo?(0,xt.Z)((0,xt.Z)({},Cr),{},{scrollLeft:oo.scrollLeft/oo.scrollWidth*oo.clientWidth}):Cr})},[sr.isHiddenScrollBar]),Ai<=Ni||!gr||sr.isHiddenScrollBar?null:Me.createElement("div",{style:{height:(0,Fe.Z)(),width:Ni,bottom:li},className:"".concat(Mi,"-sticky-scroll")},Me.createElement("div",{onMouseDown:Xo,ref:dr,className:tt()("".concat(Mi,"-sticky-scroll-bar"),(0,He.Z)({},"".concat(Mi,"-sticky-scroll-bar-active"),ko)),style:{width:"".concat(gr,"px"),transform:"translate3d(".concat(sr.scrollLeft,"px, 0, 0)")}}))},pn=Me.forwardRef(ji);function Ji(mt){return null}var Ki=Ji;function Gi(mt){return null}var gn=Gi,oi="rc-table",Bi=[],$i={};function Ti(){return"No Data"}function Qi(mt){var wt,on=(0,xt.Z)({rowKey:"key",prefixCls:oi,emptyText:Ti},mt),dn=on.prefixCls,Hn=on.className,En=on.rowClassName,si=on.style,li=on.data,ti=on.rowKey,Mi=on.scroll,Ai=on.tableLayout,Ni=on.direction,gr=on.title,dr=on.footer,ir=on.summary,Wr=on.caption,sr=on.id,zr=on.showHeader,Ir=on.components,eo=on.emptyText,xo=on.onRow,ko=on.onHeaderRow,$r=on.internalHooks,So=on.transformColumns,Xo=on.internalRefs,_r=on.tailor,co=on.sticky,Xr=li||Bi,Cr=!!Xr.length,oo=$r===Re,Mo=Me.useCallback(function(xa,ls){return(0,gt.Z)(Ir,xa)||ls},[Ir]),Zo=Me.useMemo(function(){return typeof ti=="function"?ti:function(xa){var ls=xa&&xa[ti];return ls}},[ti]),Wo=Mo(["body"]),Kr=rn(),Yo=(0,Ve.Z)(Kr,3),ia=Yo[0],Ta=Yo[1],pa=Yo[2],ds=St(on,Xr,Zo),ja=(0,Ve.Z)(ds,6),na=ja[0],Fo=ja[1],Sa=ja[2],hs=ja[3],Qa=ja[4],Ns=ja[5],$o=Mi==null?void 0:Mi.x,Io=Me.useState(0),Go=(0,Ve.Z)(Io,2),Co=Go[0],Aa=Go[1],Po=Nn((0,xt.Z)((0,xt.Z)((0,xt.Z)({},on),na),{},{expandable:!!na.expandedRowRender,columnTitle:na.columnTitle,expandedKeys:Sa,getRowKey:Zo,onTriggerExpand:Ns,expandIcon:hs,expandIconColumnIndex:na.expandIconColumnIndex,direction:Ni,scrollWidth:oo&&_r&&typeof $o=="number"?$o:null}),oo?So:null),Jo=(0,Ve.Z)(Po,3),ga=Jo[0],ma=Jo[1],Us=Jo[2],Zs=Us!=null?Us:$o,cl=Me.useMemo(function(){return{columns:ga,flattenColumns:ma}},[ga,ma]),ka=Me.useRef(),il=Me.useRef(),Fs=Me.useRef(),Ws=Me.useRef(),uc=Me.useRef(),Ia=Me.useState(!1),$a=(0,Ve.Z)(Ia,2),Oa=$a[0],qa=$a[1],As=Me.useState(!1),da=(0,Ve.Z)(As,2),Xa=da[0],_s=da[1],dl=qn(new Map),hu=(0,Ve.Z)(dl,2),Yl=hu[0],Ds=hu[1],Jl=Wt(ma),Ql=Jl.map(function(xa){return Yl.get(xa)}),za=Me.useMemo(function(){return Ql},[Ql.join("_")]),rl=Sn(za,ma.length,Ni),es=Mi&&Dn(Mi.y),Ya=Mi&&Dn(Zs)||!!na.fixed,fu=Ya&&ma.some(function(xa){var ls=xa.fixed;return ls}),Pc=Me.useRef(),Nu=Pn(co,dn),Fu=Nu.isSticky,gu=Nu.offsetHeader,ql=Nu.offsetSummary,Da=Nu.offsetScroll,rs=Nu.stickyClassName,Bs=Nu.container,os=Me.useMemo(function(){return ir==null?void 0:ir(Xr)},[ir,Xr]),Ca=(es||Fu)&&Me.isValidElement(os)&&os.type===Ze&&os.props.fixed,Ts,Rl,zu;es&&(Rl={overflowY:"scroll",maxHeight:Mi.y}),Ya&&(Ts={overflowX:"auto"},es||(Rl={overflowY:"hidden"}),zu={width:Zs===!0?"auto":Zs,minWidth:"100%"});var Cd=Me.useCallback(function(xa,ls){(0,Pe.Z)(ka.current)&&Ds(function(Sl){if(Sl.get(xa)!==ls){var Au=new Map(Sl);return Au.set(xa,ls),Au}return Sl})},[]),mn=Si(null),Rc=(0,Ve.Z)(mn,2),Xu=Rc[0],af=Rc[1];function bd(xa,ls){ls&&(typeof ls=="function"?ls(xa):ls.scrollLeft!==xa&&(ls.scrollLeft=xa,ls.scrollLeft!==xa&&setTimeout(function(){ls.scrollLeft=xa},0)))}var Ed=(0,dt.Z)(function(xa){var ls=xa.currentTarget,Sl=xa.scrollLeft,Au=Ni==="rtl",Du=typeof Sl=="number"?Sl:ls.scrollLeft,Fd=ls||$i;if(!af()||af()===Fd){var Hc;Xu(Fd),bd(Du,il.current),bd(Du,Fs.current),bd(Du,uc.current),bd(Du,(Hc=Pc.current)===null||Hc===void 0?void 0:Hc.setScrollLeft)}var rh=ls||il.current;if(rh){var Hu=rh.scrollWidth,Cc=rh.clientWidth;if(Hu===Cc){qa(!1),_s(!1);return}Au?(qa(-Du<Hu-Cc),_s(-Du>0)):(qa(Du>0),_s(Du<Hu-Cc))}}),Dh=function(){Ya&&Fs.current?Ed({currentTarget:Fs.current}):(qa(!1),_s(!1))},Qg=function(ls){var Sl=ls.width;Sl!==Co&&(Dh(),Aa(ka.current?ka.current.offsetWidth:Sl))},Gs=Me.useRef(!1);Me.useEffect(function(){Gs.current&&Dh()},[Ya,li,ga.length]),Me.useEffect(function(){Gs.current=!0},[]);var Qd=Me.useState(0),Md=(0,Ve.Z)(Qd,2),qd=Md[0],sf=Md[1],Zf=Me.useState(!0),eh=(0,Ve.Z)(Zf,2),th=eh[0],pu=eh[1];Me.useEffect(function(){(!_r||!oo)&&(Fs.current instanceof Element?sf((0,Fe.o)(Fs.current).width):sf((0,Fe.o)(Ws.current).width)),pu((0,ve.G)("position","sticky"))},[]),Me.useEffect(function(){oo&&Xo&&(Xo.body.current=Fs.current)});var Ld=Me.useCallback(function(xa){return Me.createElement(Me.Fragment,null,Me.createElement(Li,xa),Ca==="top"&&Me.createElement(Dt,xa,os))},[Ca,os]),lf=Me.useCallback(function(xa){return Me.createElement(Dt,xa,os)},[os]),Yu=Mo(["table"],"table"),jc=Me.useMemo(function(){return Ai||(fu?Zs==="max-content"?"auto":"fixed":es||Fu||ma.some(function(xa){var ls=xa.ellipsis;return ls})?"fixed":"auto")},[es,fu,ma,Ai,Fu]),Nd,cd={colWidths:za,columCount:ma.length,stickyOffsets:rl,onHeaderRow:ko,fixHeader:es,scroll:Mi},jl=Me.useMemo(function(){return Cr?null:typeof eo=="function"?eo():eo},[Cr,eo]),dd=Me.createElement(fi,{data:Xr,measureColumnWidth:es||Ya||Fu}),Bh=Me.createElement(fr,{colWidths:ma.map(function(xa){var ls=xa.width;return ls}),columns:ma}),eu=Wr!=null?Me.createElement("caption",{className:"".concat(dn,"-caption")},Wr):void 0,wc=(0,We.Z)(on,{data:!0}),nh=(0,We.Z)(on,{aria:!0});if(es||Fu){var ih;typeof Wo=="function"?(ih=Wo(Xr,{scrollbarSize:qd,ref:Fs,onScroll:Ed}),cd.colWidths=ma.map(function(xa,ls){var Sl=xa.width,Au=ls===ma.length-1?Sl-qd:Sl;return typeof Au=="number"&&!Number.isNaN(Au)?Au:0})):ih=Me.createElement("div",{style:(0,xt.Z)((0,xt.Z)({},Ts),Rl),onScroll:Ed,ref:Fs,className:tt()("".concat(dn,"-body"))},Me.createElement(Yu,(0,lt.Z)({style:(0,xt.Z)((0,xt.Z)({},zu),{},{tableLayout:jc})},nh),eu,Bh,dd,!Ca&&os&&Me.createElement(Dt,{stickyOffsets:rl,flattenColumns:ma,columns:ga},os)));var zc=(0,xt.Z)((0,xt.Z)((0,xt.Z)({noData:!Xr.length,maxContentScroll:Ya&&Zs==="max-content"},cd),cl),{},{direction:Ni,stickyClassName:rs,onScroll:Ed});Nd=Me.createElement(Me.Fragment,null,zr!==!1&&Me.createElement(Ei,(0,lt.Z)({},zc,{stickyTopOffset:gu,className:"".concat(dn,"-header"),ref:il}),Ld),ih,Ca&&Ca!=="top"&&Me.createElement(Ei,(0,lt.Z)({},zc,{stickyBottomOffset:ql,className:"".concat(dn,"-summary"),ref:uc}),lf),Fu&&Me.createElement(pn,{ref:Pc,offsetScroll:Da,scrollBodyRef:Fs,onScroll:Ed,container:Bs}))}else Nd=Me.createElement("div",{style:(0,xt.Z)((0,xt.Z)({},Ts),Rl),className:tt()("".concat(dn,"-content")),onScroll:Ed,ref:Fs},Me.createElement(Yu,(0,lt.Z)({style:(0,xt.Z)((0,xt.Z)({},zu),{},{tableLayout:jc})},nh),eu,Bh,zr!==!1&&Me.createElement(Li,(0,lt.Z)({},cd,cl)),dd,os&&Me.createElement(Dt,{stickyOffsets:rl,flattenColumns:ma,columns:ga},os)));var Cl=Me.createElement("div",(0,lt.Z)({className:tt()(dn,Hn,(wt={},(0,He.Z)(wt,"".concat(dn,"-rtl"),Ni==="rtl"),(0,He.Z)(wt,"".concat(dn,"-ping-left"),Oa),(0,He.Z)(wt,"".concat(dn,"-ping-right"),Xa),(0,He.Z)(wt,"".concat(dn,"-layout-fixed"),Ai==="fixed"),(0,He.Z)(wt,"".concat(dn,"-fixed-header"),es),(0,He.Z)(wt,"".concat(dn,"-fixed-column"),fu),(0,He.Z)(wt,"".concat(dn,"-scroll-horizontal"),Ya),(0,He.Z)(wt,"".concat(dn,"-has-fix-left"),ma[0]&&ma[0].fixed),(0,He.Z)(wt,"".concat(dn,"-has-fix-right"),ma[ma.length-1]&&ma[ma.length-1].fixed==="right"),wt)),style:si,id:sr,ref:ka},wc),gr&&Me.createElement(Zn,{className:"".concat(dn,"-title")},gr(Xr)),Me.createElement("div",{ref:Ws,className:"".concat(dn,"-container")},Nd),dr&&Me.createElement(Zn,{className:"".concat(dn,"-footer")},dr(Xr)));Ya&&(Cl=Me.createElement(Oe.Z,{onResize:Qg},Cl));var Th=An(ma,rl,Ni,ga),$s=Me.useMemo(function(){return{scrollX:Zs,prefixCls:dn,getComponent:Mo,scrollbarSize:qd,direction:Ni,fixedInfoList:Th,isSticky:Fu,supportSticky:th,componentWidth:Co,fixHeader:es,fixColumn:fu,horizonScroll:Ya,tableLayout:jc,rowClassName:En,expandedRowClassName:na.expandedRowClassName,expandIcon:hs,expandableType:Fo,expandRowByClick:na.expandRowByClick,expandedRowRender:na.expandedRowRender,onTriggerExpand:Ns,expandIconColumnIndex:na.expandIconColumnIndex,indentSize:na.indentSize,allColumnsFixedLeft:ma.every(function(xa){return xa.fixed==="left"}),emptyNode:jl,columns:ga,flattenColumns:ma,onColumnResize:Cd,hoverStartRow:ia,hoverEndRow:Ta,onHover:pa,rowExpandable:na.rowExpandable,onRow:xo,getRowKey:Zo,expandedKeys:Sa,childrenColumnName:Qa}},[Zs,dn,Mo,qd,Ni,Th,Fu,th,Co,es,fu,Ya,jc,En,na.expandedRowClassName,hs,Fo,na.expandRowByClick,na.expandedRowRender,Ns,na.expandIconColumnIndex,na.indentSize,jl,ga,ma,Cd,ia,Ta,pa,na.rowExpandable,xo,Zo,Sa,Qa]);return Me.createElement(Be.Provider,{value:$s},Cl)}function pr(mt){return fe(Qi,mt)}var hr=pr();hr.EXPAND_COLUMN=ge,hr.INTERNAL_HOOKS=Re,hr.Column=Ki,hr.ColumnGroup=gn,hr.Summary=rt;var Vi=hr,xr=pe(45680),Rn=bt(null),Br=bt(null);function _n(mt,wt,on){var dn=wt||1;return on[mt+dn]-(on[mt]||0)}function Or(mt){var wt=mt.rowInfo,on=mt.column,dn=mt.colIndex,Hn=mt.indent,En=mt.index,si=mt.renderIndex,li=mt.record,ti=mt.style,Mi=mt.className,Ai=mt.inverse,Ni=mt.getHeight,gr=on.render,dr=on.dataIndex,ir=on.className,Wr=on.width,sr=Ue(Br,["columnsOffset"]),zr=sr.columnsOffset,Ir=qt(wt,on,dn,Hn,En),eo=Ir.key,xo=Ir.fixedInfo,ko=Ir.appendCellNode,$r=Ir.additionalCellProps,So=$r.style,Xo=$r.colSpan,_r=Xo===void 0?1:Xo,co=$r.rowSpan,Xr=co===void 0?1:co,Cr=dn-1,oo=_n(Cr,_r,zr),Mo=_r>1?Wr-oo:0,Zo=(0,xt.Z)((0,xt.Z)((0,xt.Z)({},So),ti),{},{flex:"0 0 ".concat(oo,"px"),width:"".concat(oo,"px"),marginRight:Mo,pointerEvents:"auto"}),Wo=Me.useMemo(function(){return Ai?Xr<=1:_r===0||Xr===0||Xr>1},[Xr,_r,Ai]);Wo?Zo.visibility="hidden":Ai&&(Zo.height=Ni==null?void 0:Ni(Xr));var Kr=Wo?function(){return null}:gr,Yo={};return(Xr===0||_r===0)&&(Yo.rowSpan=1,Yo.colSpan=1),Me.createElement(Yn,(0,lt.Z)({className:tt()(ir,Mi),ellipsis:on.ellipsis,align:on.align,scope:on.rowScope,component:"div",prefixCls:wt.prefixCls,key:eo,record:li,index:En,renderIndex:si,dataIndex:dr,render:Kr,shouldCellUpdate:on.shouldCellUpdate},xo,{appendNode:ko,additionalProps:(0,xt.Z)((0,xt.Z)({},$r),{},{style:Zo},Yo)}))}var no=Or,br=["data","index","className","rowKey","style","extra","getHeight"],mo=Me.forwardRef(function(mt,wt){var on=mt.data,dn=mt.index,Hn=mt.className,En=mt.rowKey,si=mt.style,li=mt.extra,ti=mt.getHeight,Mi=(0,tn.Z)(mt,br),Ai=on.record,Ni=on.indent,gr=on.index,dr=Ue(Be,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),ir=dr.scrollX,Wr=dr.flattenColumns,sr=dr.prefixCls,zr=dr.fixColumn,Ir=dr.componentWidth,eo=Pt(Ai,En,dn,Ni),xo=eo.rowSupportExpand,ko=eo.expanded,$r=eo.rowProps,So=eo.expandedRowRender,Xo=eo.expandedRowClassName,_r;if(xo&&ko){var co=So(Ai,dn,Ni+1,ko),Xr=Xo==null?void 0:Xo(Ai,dn,Ni),Cr={};zr&&(Cr={style:(0,He.Z)({},"--virtual-width","".concat(Ir,"px"))});var oo="".concat(sr,"-expanded-row-cell");_r=Me.createElement("div",{className:tt()("".concat(sr,"-expanded-row"),"".concat(sr,"-expanded-row-level-").concat(Ni+1),Xr)},Me.createElement(Yn,{component:"div",prefixCls:sr,className:tt()(oo,(0,He.Z)({},"".concat(oo,"-fixed"),zr)),additionalProps:Cr},co))}var Mo=(0,xt.Z)((0,xt.Z)({},si),{},{width:ir});li&&(Mo.position="absolute",Mo.pointerEvents="none");var Zo=Me.createElement("div",(0,lt.Z)({},$r,Mi,{ref:xo?null:wt,className:tt()(Hn,"".concat(sr,"-row"),$r==null?void 0:$r.className,(0,He.Z)({},"".concat(sr,"-row-extra"),li)),style:(0,xt.Z)((0,xt.Z)({},Mo),$r==null?void 0:$r.style)}),Wr.map(function(Wo,Kr){return Me.createElement(no,{key:Kr,rowInfo:eo,column:Wo,colIndex:Kr,indent:Ni,index:dn,renderIndex:gr,record:Ai,inverse:li,getHeight:ti})}));return xo?Me.createElement("div",{ref:wt},Zo,_r):Zo}),Jr=ye(mo),ur=Jr,er=Me.forwardRef(function(mt,wt){var on=mt.data,dn=mt.onScroll,Hn=Ue(Be,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),En=Hn.flattenColumns,si=Hn.onColumnResize,li=Hn.getRowKey,ti=Hn.expandedKeys,Mi=Hn.prefixCls,Ai=Hn.childrenColumnName,Ni=Hn.emptyNode,gr=Hn.scrollX,dr=Ue(Rn),ir=dr.scrollY,Wr=dr.listItemHeight,sr=Me.useRef(),zr=ft(on,Ai,ti,li),Ir=Me.useMemo(function(){var _r=0;return En.map(function(co){var Xr=co.width,Cr=co.key;return _r+=Xr,[Cr,Xr,_r]})},[En]),eo=Me.useMemo(function(){return Ir.map(function(_r){return _r[2]})},[Ir]);Me.useEffect(function(){Ir.forEach(function(_r){var co=(0,Ve.Z)(_r,2),Xr=co[0],Cr=co[1];si(Xr,Cr)})},[Ir]),Me.useImperativeHandle(wt,function(){var _r={};return Object.defineProperty(_r,"scrollLeft",{get:function(){var Xr;return((Xr=sr.current)===null||Xr===void 0?void 0:Xr.getScrollInfo().x)||0},set:function(Xr){var Cr;(Cr=sr.current)===null||Cr===void 0||Cr.scrollTo({left:Xr})}}),_r});var xo=function(co,Xr){var Cr,oo=(Cr=zr[Xr])===null||Cr===void 0?void 0:Cr.record,Mo=co.onCell;if(Mo){var Zo,Wo=Mo(oo,Xr);return(Zo=Wo==null?void 0:Wo.rowSpan)!==null&&Zo!==void 0?Zo:1}return 1},ko=function(co){var Xr=co.start,Cr=co.end,oo=co.getSize,Mo=co.offsetY;if(Cr<0)return null;for(var Zo=En.filter(function($o){return xo($o,Xr)===0}),Wo=Xr,Kr=function(Io){if(Zo=Zo.filter(function(Go){return xo(Go,Io)===0}),!Zo.length)return Wo=Io,"break"},Yo=Xr;Yo>=0;Yo-=1){var ia=Kr(Yo);if(ia==="break")break}for(var Ta=En.filter(function($o){return xo($o,Cr)!==1}),pa=Cr,ds=function(Io){if(Ta=Ta.filter(function(Go){return xo(Go,Io)!==1}),!Ta.length)return pa=Math.max(Io-1,Cr),"break"},ja=Cr;ja<zr.length;ja+=1){var na=ds(ja);if(na==="break")break}for(var Fo=[],Sa=function(Io){var Go=zr[Io];if(!Go)return"continue";En.some(function(Co){return xo(Co,Io)>1})&&Fo.push(Io)},hs=Wo;hs<=pa;hs+=1)var Qa=Sa(hs);var Ns=Fo.map(function($o){var Io=zr[$o],Go=li(Io.record,$o),Co=function(Jo){var ga=$o+Jo-1,ma=li(zr[ga].record,ga),Us=oo(Go,ma);return Us.bottom-Us.top},Aa=oo(Go);return Me.createElement(ur,{key:$o,data:Io,rowKey:Go,index:$o,style:{top:-Mo+Aa.top},extra:!0,getHeight:Co})});return Ns},$r=Me.useMemo(function(){return{columnsOffset:eo}},[eo]),So="".concat(Mi,"-tbody"),Xo;return zr.length?Xo=Me.createElement(xr.Z,{fullHeight:!1,ref:sr,className:tt()(So,"".concat(So,"-virtual")),height:ir,itemHeight:Wr||24,data:zr,itemKey:function(co){return li(co.record)},scrollWidth:gr,onVirtualScroll:function(co){var Xr=co.x;dn({scrollLeft:Xr})},extraRender:ko},function(_r,co,Xr){var Cr=li(_r.record,co);return Me.createElement(ur,(0,lt.Z)({data:_r,rowKey:Cr,index:co},Xr))}):Xo=Me.createElement("div",{className:tt()("".concat(Mi,"-placeholder"))},Me.createElement(Yn,{component:"div",prefixCls:Mi},Ni)),Me.createElement(Br.Provider,{value:$r},Xo)}),qi=ye(er),Rr=qi,Ii=function(wt,on){var dn=on.ref,Hn=on.onScroll;return Me.createElement(Rr,{ref:dn,data:wt,onScroll:Hn})},Qe=100;function Qr(mt){var wt=mt.columns,on=mt.scroll,dn=mt.prefixCls,Hn=dn===void 0?oi:dn,En=mt.className,si=mt.listItemHeight,li=on||{},ti=li.x,Mi=li.y;typeof ti!="number"&&(ti=((wt||[]).length+1)*Qe),typeof Mi!="number"&&(Mi=500);var Ai=Me.useMemo(function(){return{scrollY:Mi,listItemHeight:si}},[Mi,si]);return Me.createElement(Rn.Provider,{value:Ai},Me.createElement(Vi,(0,lt.Z)({},mt,{className:tt()(En,"".concat(Hn,"-virtual")),scroll:(0,xt.Z)((0,xt.Z)({},on),{},{x:ti}),components:{body:Ii},columns:wt,internalHooks:Re,tailor:!0})))}function lo(mt){return fe(Qr,mt)}var jr=lo(),vo=null;function po(mt){return null}var Lr=po;function Fr(mt){return null}var uo=Fr,qr=pe(2738),zo=pe(68031),Ro=pe(36355),Mr=pe(93891),Nr=pe(19716),pi=pe(8628),Tr=pe(31724),Bo=pe(58421),aa=pe(71418),Ho=pe(88088);function Ao(mt){return function(on){let{prefixCls:dn,onExpand:Hn,record:En,expanded:si,expandable:li}=on;const ti=`${dn}-row-expand-icon`;return Me.createElement("button",{type:"button",onClick:Mi=>{Hn(En,Mi),Mi.stopPropagation()},className:tt()(ti,{[`${ti}-spaced`]:!li,[`${ti}-expanded`]:li&&si,[`${ti}-collapsed`]:li&&!si}),"aria-label":si?mt.collapse:mt.expand,"aria-expanded":si})}}var _o=Ao;function ta(mt,wt){return"key"in mt&&mt.key!==void 0&&mt.key!==null?mt.key:mt.dataIndex?Array.isArray(mt.dataIndex)?mt.dataIndex.join("."):mt.dataIndex:wt}function Ea(mt,wt){return wt?`${wt}-${mt}`:`${mt}`}function Mt(mt,wt){return typeof mt=="function"?mt(wt):mt}function Pi(mt,wt){const on=Mt(mt,wt);return Object.prototype.toString.call(on)==="[object Object]"?"":on}var _t={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"},Xi=_t,wi=pe(7657),Sr=function(wt,on){return Me.createElement(wi.Z,(0,lt.Z)({},wt,{ref:on,icon:Xi}))},Zi=Me.forwardRef(Sr),Ci=Zi,nr=pe(56762);function or(mt){const wt=Me.useRef(mt),on=(0,nr.Z)();return[()=>wt.current,dn=>{wt.current=dn,on()}]}var cr=pe(3113),Pr=pe(24905),Gr=pe(38854),yr=pe(64165),kr=pe(20834),Zr=pe(40875),Oi=pe(5112),sa=pe(17574),Ra=pe(47472),Ls=pe(92832);function Ys(mt){let{value:wt,onChange:on,filterSearch:dn,tablePrefixCls:Hn,locale:En}=mt;return dn?Me.createElement("div",{className:`${Hn}-filter-dropdown-search`},Me.createElement(Ls.default,{prefix:Me.createElement(Ra.Z,null),placeholder:En.filterSearchPlaceholder,onChange:on,value:wt,htmlSize:1,className:`${Hn}-filter-dropdown-search-input`})):null}var tl=Ys,Ui=pe(10228);const La=mt=>{const{keyCode:wt}=mt;wt===Ui.Z.ENTER&&mt.stopPropagation()};var zs=Me.forwardRef((mt,wt)=>Me.createElement("div",{className:mt.className,onClick:on=>on.stopPropagation(),onKeyDown:La,ref:wt},mt.children));function su(mt){let wt=[];return(mt||[]).forEach(on=>{let{value:dn,children:Hn}=on;wt.push(dn),Hn&&(wt=[].concat((0,zi.Z)(wt),(0,zi.Z)(su(Hn))))}),wt}function lu(mt){return mt.some(wt=>{let{children:on}=wt;return on})}function wo(mt,wt){return typeof wt=="string"||typeof wt=="number"?wt==null?void 0:wt.toString().toLowerCase().includes(mt.trim().toLowerCase()):!1}function yc(mt){let{filters:wt,prefixCls:on,filteredKeys:dn,filterMultiple:Hn,searchValue:En,filterSearch:si}=mt;return wt.map((li,ti)=>{const Mi=String(li.value);if(li.children)return{key:Mi||ti,label:li.text,popupClassName:`${on}-dropdown-submenu`,children:yc({filters:li.children,prefixCls:on,filteredKeys:dn,filterMultiple:Hn,searchValue:En,filterSearch:si})};const Ai=Hn?Pr.default:Oi.ZP,Ni={key:li.value!==void 0?Mi:ti,label:Me.createElement(Me.Fragment,null,Me.createElement(Ai,{checked:dn.includes(Mi)}),Me.createElement("span",null,li.text))};return En.trim()?typeof si=="function"?si(En,li)?Ni:null:wo(En,li.text)?Ni:null:Ni})}function Ml(mt){var wt,on;const{tablePrefixCls:dn,prefixCls:Hn,column:En,dropdownPrefixCls:si,columnKey:li,filterMultiple:ti,filterMode:Mi="menu",filterSearch:Ai=!1,filterState:Ni,triggerFilter:gr,locale:dr,children:ir,getPopupContainer:Wr}=mt,{filterDropdownOpen:sr,onFilterDropdownOpenChange:zr,filterResetToDefaultFilteredValue:Ir,defaultFilteredValue:eo,filterDropdownVisible:xo,onFilterDropdownVisibleChange:ko}=En,[$r,So]=Me.useState(!1),Xo=!!(Ni&&(!((wt=Ni.filteredKeys)===null||wt===void 0)&&wt.length||Ni.forceFiltered)),_r=Po=>{So(Po),zr==null||zr(Po),ko==null||ko(Po)},co=(on=sr!=null?sr:xo)!==null&&on!==void 0?on:$r,Xr=Ni==null?void 0:Ni.filteredKeys,[Cr,oo]=or(Xr||[]),Mo=Po=>{let{selectedKeys:Jo}=Po;oo(Jo)},Zo=(Po,Jo)=>{let{node:ga,checked:ma}=Jo;Mo(ti?{selectedKeys:Po}:{selectedKeys:ma&&ga.key?[ga.key]:[]})};Me.useEffect(()=>{$r&&Mo({selectedKeys:Xr||[]})},[Xr]);const[Wo,Kr]=Me.useState([]),Yo=Po=>{Kr(Po)},[ia,Ta]=Me.useState(""),pa=Po=>{const{value:Jo}=Po.target;Ta(Jo)};Me.useEffect(()=>{$r||Ta("")},[$r]);const ds=Po=>{const Jo=Po&&Po.length?Po:null;if(Jo===null&&(!Ni||!Ni.filteredKeys)||(0,st.Z)(Jo,Ni==null?void 0:Ni.filteredKeys,!0))return null;gr({column:En,key:li,filteredKeys:Jo})},ja=()=>{_r(!1),ds(Cr())},na=function(){let{confirm:Po,closeDropdown:Jo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Po&&ds([]),Jo&&_r(!1),Ta(""),oo(Ir?(eo||[]).map(ga=>String(ga)):[])},Fo=function(){let{closeDropdown:Po}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Po&&_r(!1),ds(Cr())},Sa=Po=>{Po&&Xr!==void 0&&oo(Xr||[]),_r(Po),!Po&&!En.filterDropdown&&ja()},hs=tt()({[`${si}-menu-without-submenu`]:!lu(En.filters||[])}),Qa=Po=>{if(Po.target.checked){const Jo=su(En==null?void 0:En.filters).map(ga=>String(ga));oo(Jo)}else oo([])},Ns=Po=>{let{filters:Jo}=Po;return(Jo||[]).map((ga,ma)=>{const Us=String(ga.value),Zs={title:ga.text,key:ga.value!==void 0?Us:ma};return ga.children&&(Zs.children=Ns({filters:ga.children})),Zs})},$o=Po=>{var Jo;return Object.assign(Object.assign({},Po),{text:Po.title,value:Po.key,children:((Jo=Po.children)===null||Jo===void 0?void 0:Jo.map(ga=>$o(ga)))||[]})};let Io;if(typeof En.filterDropdown=="function")Io=En.filterDropdown({prefixCls:`${si}-custom`,setSelectedKeys:Po=>Mo({selectedKeys:Po}),selectedKeys:Cr(),confirm:Fo,clearFilters:na,filters:En.filters,visible:co,close:()=>{_r(!1)}});else if(En.filterDropdown)Io=En.filterDropdown;else{const Po=Cr()||[],Jo=()=>(En.filters||[]).length===0?Me.createElement(yr.Z,{image:yr.Z.PRESENTED_IMAGE_SIMPLE,description:dr.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Mi==="tree"?Me.createElement(Me.Fragment,null,Me.createElement(tl,{filterSearch:Ai,value:ia,onChange:pa,tablePrefixCls:dn,locale:dr}),Me.createElement("div",{className:`${dn}-filter-dropdown-tree`},ti?Me.createElement(Pr.default,{checked:Po.length===su(En.filters).length,indeterminate:Po.length>0&&Po.length<su(En.filters).length,className:`${dn}-filter-dropdown-checkall`,onChange:Qa},dr.filterCheckall):null,Me.createElement(sa.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:ti,checkStrictly:!ti,className:`${si}-menu`,onCheck:Zo,checkedKeys:Po,selectedKeys:Po,showIcon:!1,treeData:Ns({filters:En.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:ia.trim()?ma=>typeof Ai=="function"?Ai(ia,$o(ma)):wo(ia,ma.title):void 0}))):Me.createElement(Me.Fragment,null,Me.createElement(tl,{filterSearch:Ai,value:ia,onChange:pa,tablePrefixCls:dn,locale:dr}),Me.createElement(kr.default,{selectable:!0,multiple:ti,prefixCls:`${si}-menu`,className:hs,onSelect:Mo,onDeselect:Mo,selectedKeys:Po,getPopupContainer:Wr,openKeys:Wo,onOpenChange:Yo,items:yc({filters:En.filters||[],filterSearch:Ai,prefixCls:Hn,filteredKeys:Cr(),filterMultiple:ti,searchValue:ia})})),ga=()=>Ir?(0,st.Z)((eo||[]).map(ma=>String(ma)),Po,!0):Po.length===0;Io=Me.createElement(Me.Fragment,null,Jo(),Me.createElement("div",{className:`${Hn}-dropdown-btns`},Me.createElement(cr.ZP,{type:"link",size:"small",disabled:ga(),onClick:()=>na()},dr.filterReset),Me.createElement(cr.ZP,{type:"primary",size:"small",onClick:ja},dr.filterConfirm)))}En.filterDropdown&&(Io=Me.createElement(Zr.J,{selectable:void 0},Io));const Go=()=>Me.createElement(zs,{className:`${Hn}-dropdown`},Io);let Co;typeof En.filterIcon=="function"?Co=En.filterIcon(Xo):En.filterIcon?Co=En.filterIcon:Co=Me.createElement(Ci,null);const{direction:Aa}=Me.useContext(Ro.E_);return Me.createElement("div",{className:`${Hn}-column`},Me.createElement("span",{className:`${dn}-column-title`},ir),Me.createElement(Gr.Z,{dropdownRender:Go,trigger:["click"],open:co,onOpenChange:Sa,getPopupContainer:Wr,placement:Aa==="rtl"?"bottomLeft":"bottomRight"},Me.createElement("span",{role:"button",tabIndex:-1,className:tt()(`${Hn}-trigger`,{active:Xo}),onClick:Po=>{Po.stopPropagation()}},Co)))}var as=Ml;function vl(mt,wt,on){let dn=[];return(mt||[]).forEach((Hn,En)=>{var si;const li=Ea(En,on);if(Hn.filters||"filterDropdown"in Hn||"onFilter"in Hn)if("filteredValue"in Hn){let ti=Hn.filteredValue;"filterDropdown"in Hn||(ti=(si=ti==null?void 0:ti.map(String))!==null&&si!==void 0?si:ti),dn.push({column:Hn,key:ta(Hn,li),filteredKeys:ti,forceFiltered:Hn.filtered})}else dn.push({column:Hn,key:ta(Hn,li),filteredKeys:wt&&Hn.defaultFilteredValue?Hn.defaultFilteredValue:void 0,forceFiltered:Hn.filtered});"children"in Hn&&(dn=[].concat((0,zi.Z)(dn),(0,zi.Z)(vl(Hn.children,wt,li))))}),dn}function ju(mt,wt,on,dn,Hn,En,si,li){return on.map((ti,Mi)=>{const Ai=Ea(Mi,li),{filterMultiple:Ni=!0,filterMode:gr,filterSearch:dr}=ti;let ir=ti;if(ir.filters||ir.filterDropdown){const Wr=ta(ir,Ai),sr=dn.find(zr=>{let{key:Ir}=zr;return Wr===Ir});ir=Object.assign(Object.assign({},ir),{title:zr=>Me.createElement(as,{tablePrefixCls:mt,prefixCls:`${mt}-filter`,dropdownPrefixCls:wt,column:ir,columnKey:Wr,filterState:sr,filterMultiple:Ni,filterMode:gr,filterSearch:dr,triggerFilter:En,locale:Hn,getPopupContainer:si},Mt(ti.title,zr))})}return"children"in ir&&(ir=Object.assign(Object.assign({},ir),{children:ju(mt,wt,ir.children,dn,Hn,En,si,Ai)})),ir})}function rc(mt){const wt={};return mt.forEach(on=>{let{key:dn,filteredKeys:Hn,column:En}=on;const{filters:si,filterDropdown:li}=En;if(li)wt[dn]=Hn||null;else if(Array.isArray(Hn)){const ti=su(si);wt[dn]=ti.filter(Mi=>Hn.includes(String(Mi)))}else wt[dn]=null}),wt}function wl(mt,wt){return wt.reduce((on,dn)=>{const{column:{onFilter:Hn,filters:En},filteredKeys:si}=dn;return Hn&&si&&si.length?on.filter(li=>si.some(ti=>{const Mi=su(En),Ai=Mi.findIndex(gr=>String(gr)===String(ti)),Ni=Ai!==-1?Mi[Ai]:ti;return Hn(Ni,li)})):on},mt)}const sl=mt=>mt.flatMap(wt=>"children"in wt?[wt].concat((0,zi.Z)(sl(wt.children||[]))):[wt]);function td(mt){let{prefixCls:wt,dropdownPrefixCls:on,mergedColumns:dn,onFilterChange:Hn,getPopupContainer:En,locale:si}=mt;const li=Me.useMemo(()=>sl(dn||[]),[dn]),[ti,Mi]=Me.useState(()=>vl(li,!0)),Ai=Me.useMemo(()=>{const ir=vl(li,!1);if(ir.length===0)return ir;let Wr=!0,sr=!0;if(ir.forEach(zr=>{let{filteredKeys:Ir}=zr;Ir!==void 0?Wr=!1:sr=!1}),Wr){const zr=(li||[]).map((Ir,eo)=>ta(Ir,Ea(eo)));return ti.filter(Ir=>{let{key:eo}=Ir;return zr.includes(eo)}).map(Ir=>{const eo=li[zr.findIndex(xo=>xo===Ir.key)];return Object.assign(Object.assign({},Ir),{column:Object.assign(Object.assign({},Ir.column),eo),forceFiltered:eo.filtered})})}return ir},[li,ti]),Ni=Me.useMemo(()=>rc(Ai),[Ai]),gr=ir=>{const Wr=Ai.filter(sr=>{let{key:zr}=sr;return zr!==ir.key});Wr.push(ir),Mi(Wr),Hn(rc(Wr),Wr)};return[ir=>ju(wt,on,ir,Ai,si,gr,En),Ai,Ni]}var nd=td;function kc(mt,wt,on){const dn=Me.useRef({});function Hn(En){if(!dn.current||dn.current.data!==mt||dn.current.childrenColumnName!==wt||dn.current.getRowKey!==on){let li=function(ti){ti.forEach((Mi,Ai)=>{const Ni=on(Mi,Ai);si.set(Ni,Mi),Mi&&typeof Mi=="object"&&wt in Mi&&li(Mi[wt]||[])})};const si=new Map;li(mt),dn.current={data:mt,childrenColumnName:wt,kvMap:si,getRowKey:on}}return dn.current.kvMap.get(En)}return[Hn]}var _d=pe(50371),id=function(mt,wt){var on={};for(var dn in mt)Object.prototype.hasOwnProperty.call(mt,dn)&&wt.indexOf(dn)<0&&(on[dn]=mt[dn]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Hn=0,dn=Object.getOwnPropertySymbols(mt);Hn<dn.length;Hn++)wt.indexOf(dn[Hn])<0&&Object.prototype.propertyIsEnumerable.call(mt,dn[Hn])&&(on[dn[Hn]]=mt[dn[Hn]]);return on};const Ic=10;function Js(mt,wt){const on={current:mt.current,pageSize:mt.pageSize};return Object.keys(wt&&typeof wt=="object"?wt:{}).forEach(Hn=>{const En=mt[Hn];typeof En!="function"&&(on[Hn]=En)}),on}function uu(mt,wt,on){const dn=on&&typeof on=="object"?on:{},{total:Hn=0}=dn,En=id(dn,["total"]),[si,li]=(0,Me.useState)(()=>({current:"defaultCurrent"in En?En.defaultCurrent:1,pageSize:"defaultPageSize"in En?En.defaultPageSize:Ic})),ti=(0,_d.Z)(si,En,{total:Hn>0?Hn:mt}),Mi=Math.ceil((Hn||mt)/ti.pageSize);ti.current>Mi&&(ti.current=Mi||1);const Ai=(gr,dr)=>{li({current:gr!=null?gr:1,pageSize:dr||ti.pageSize})},Ni=(gr,dr)=>{var ir;on&&((ir=on.onChange)===null||ir===void 0||ir.call(on,gr,dr)),Ai(gr,dr),wt(gr,dr||(ti==null?void 0:ti.pageSize))};return on===!1?[{},()=>{}]:[Object.assign(Object.assign({},ti),{onChange:Ni}),Ai]}var xd=uu,Eu=pe(84105),Sc=pe(35654),Vo=pe(90782),ya=pe(71430),ll=pe(18929);const Ss={},ms="SELECT_ALL",Ua="SELECT_INVERT",ss="SELECT_NONE",xs=[],vs=(mt,wt)=>{let on=[];return(wt||[]).forEach(dn=>{on.push(dn),dn&&typeof dn=="object"&&mt in dn&&(on=[].concat((0,zi.Z)(on),(0,zi.Z)(vs(mt,dn[mt]))))}),on};var _l=(mt,wt)=>{const{preserveSelectedRowKeys:on,selectedRowKeys:dn,defaultSelectedRowKeys:Hn,getCheckboxProps:En,onChange:si,onSelect:li,onSelectAll:ti,onSelectInvert:Mi,onSelectNone:Ai,onSelectMultiple:Ni,columnWidth:gr,type:dr,selections:ir,fixed:Wr,renderCell:sr,hideSelectAll:zr,checkStrictly:Ir=!0}=wt||{},{prefixCls:eo,data:xo,pageData:ko,getRecordByKey:$r,getRowKey:So,expandType:Xo,childrenColumnName:_r,locale:co,getPopupContainer:Xr}=mt,[Cr,oo]=(0,ll.Z)(dn||Hn||xs,{value:dn}),Mo=Me.useRef(new Map),Zo=(0,Me.useCallback)($o=>{if(on){const Io=new Map;$o.forEach(Go=>{let Co=$r(Go);!Co&&Mo.current.has(Go)&&(Co=Mo.current.get(Go)),Io.set(Go,Co)}),Mo.current=Io}},[$r,on]);Me.useEffect(()=>{Zo(Cr)},[Cr]);const{keyEntities:Wo}=(0,Me.useMemo)(()=>{if(Ir)return{keyEntities:null};let $o=xo;if(on){const Io=new Set(xo.map((Co,Aa)=>So(Co,Aa))),Go=Array.from(Mo.current).reduce((Co,Aa)=>{let[Po,Jo]=Aa;return Io.has(Po)?Co:Co.concat(Jo)},[]);$o=[].concat((0,zi.Z)($o),(0,zi.Z)(Go))}return(0,ya.I8)($o,{externalGetKey:So,childrenPropName:_r})},[xo,So,Ir,_r,on]),Kr=(0,Me.useMemo)(()=>vs(_r,ko),[_r,ko]),Yo=(0,Me.useMemo)(()=>{const $o=new Map;return Kr.forEach((Io,Go)=>{const Co=So(Io,Go),Aa=(En?En(Io):null)||{};$o.set(Co,Aa)}),$o},[Kr,So,En]),ia=(0,Me.useCallback)($o=>{var Io;return!!(!((Io=Yo.get(So($o)))===null||Io===void 0)&&Io.disabled)},[Yo,So]),[Ta,pa]=(0,Me.useMemo)(()=>{if(Ir)return[Cr||[],[]];const{checkedKeys:$o,halfCheckedKeys:Io}=(0,Vo.S)(Cr,!0,Wo,ia);return[$o||[],Io]},[Cr,Ir,Wo,ia]),ds=(0,Me.useMemo)(()=>{const $o=dr==="radio"?Ta.slice(0,1):Ta;return new Set($o)},[Ta,dr]),ja=(0,Me.useMemo)(()=>dr==="radio"?new Set:new Set(pa),[pa,dr]),[na,Fo]=(0,Me.useState)(null);Me.useEffect(()=>{wt||oo(xs)},[!!wt]);const Sa=(0,Me.useCallback)(($o,Io)=>{let Go,Co;Zo($o),on?(Go=$o,Co=$o.map(Aa=>Mo.current.get(Aa))):(Go=[],Co=[],$o.forEach(Aa=>{const Po=$r(Aa);Po!==void 0&&(Go.push(Aa),Co.push(Po))})),oo(Go),si==null||si(Go,Co,{type:Io})},[oo,$r,si,on]),hs=(0,Me.useCallback)(($o,Io,Go,Co)=>{if(li){const Aa=Go.map(Po=>$r(Po));li($r($o),Io,Aa,Co)}Sa(Go,"single")},[li,$r,Sa]),Qa=(0,Me.useMemo)(()=>!ir||zr?null:(ir===!0?[ms,Ua,ss]:ir).map(Io=>Io===ms?{key:"all",text:co.selectionAll,onSelect(){Sa(xo.map((Go,Co)=>So(Go,Co)).filter(Go=>{const Co=Yo.get(Go);return!(Co!=null&&Co.disabled)||ds.has(Go)}),"all")}}:Io===Ua?{key:"invert",text:co.selectInvert,onSelect(){const Go=new Set(ds);ko.forEach((Aa,Po)=>{const Jo=So(Aa,Po),ga=Yo.get(Jo);ga!=null&&ga.disabled||(Go.has(Jo)?Go.delete(Jo):Go.add(Jo))});const Co=Array.from(Go);Mi&&Mi(Co),Sa(Co,"invert")}}:Io===ss?{key:"none",text:co.selectNone,onSelect(){Ai==null||Ai(),Sa(Array.from(ds).filter(Go=>{const Co=Yo.get(Go);return Co==null?void 0:Co.disabled}),"none")}}:Io).map(Io=>Object.assign(Object.assign({},Io),{onSelect:function(){for(var Go,Co,Aa=arguments.length,Po=new Array(Aa),Jo=0;Jo<Aa;Jo++)Po[Jo]=arguments[Jo];(Co=Io.onSelect)===null||Co===void 0||(Go=Co).call.apply(Go,[Io].concat(Po)),Fo(null)}})),[ir,ds,ko,So,Mi,Sa]);return[(0,Me.useCallback)($o=>{var Io;if(!wt)return $o.filter(Ia=>Ia!==Ss);let Go=(0,zi.Z)($o);const Co=new Set(ds),Aa=Kr.map(So).filter(Ia=>!Yo.get(Ia).disabled),Po=Aa.every(Ia=>Co.has(Ia)),Jo=Aa.some(Ia=>Co.has(Ia)),ga=()=>{const Ia=[];Po?Aa.forEach(Oa=>{Co.delete(Oa),Ia.push(Oa)}):Aa.forEach(Oa=>{Co.has(Oa)||(Co.add(Oa),Ia.push(Oa))});const $a=Array.from(Co);ti==null||ti(!Po,$a.map(Oa=>$r(Oa)),Ia.map(Oa=>$r(Oa))),Sa($a,"all"),Fo(null)};let ma;if(dr!=="radio"){let Ia;if(Qa){const da={getPopupContainer:Xr,items:Qa.map((Xa,_s)=>{const{key:dl,text:hu,onSelect:Yl}=Xa;return{key:dl!=null?dl:_s,onClick:()=>{Yl==null||Yl(Aa)},label:hu}})};Ia=Me.createElement("div",{className:`${eo}-selection-extra`},Me.createElement(Gr.Z,{menu:da,getPopupContainer:Xr},Me.createElement("span",null,Me.createElement(Eu.Z,null))))}const $a=Kr.map((da,Xa)=>{const _s=So(da,Xa),dl=Yo.get(_s)||{};return Object.assign({checked:Co.has(_s)},dl)}).filter(da=>{let{disabled:Xa}=da;return Xa}),Oa=!!$a.length&&$a.length===Kr.length,qa=Oa&&$a.every(da=>{let{checked:Xa}=da;return Xa}),As=Oa&&$a.some(da=>{let{checked:Xa}=da;return Xa});ma=!zr&&Me.createElement("div",{className:`${eo}-selection`},Me.createElement(Pr.default,{checked:Oa?qa:!!Kr.length&&Po,indeterminate:Oa?!qa&&As:!Po&&Jo,onChange:ga,disabled:Kr.length===0||Oa,"aria-label":Ia?"Custom selection":"Select all",skipGroup:!0}),Ia)}let Us;dr==="radio"?Us=(Ia,$a,Oa)=>{const qa=So($a,Oa),As=Co.has(qa);return{node:Me.createElement(Oi.ZP,Object.assign({},Yo.get(qa),{checked:As,onClick:da=>da.stopPropagation(),onChange:da=>{Co.has(qa)||hs(qa,!0,[qa],da.nativeEvent)}})),checked:As}}:Us=(Ia,$a,Oa)=>{var qa;const As=So($a,Oa),da=Co.has(As),Xa=ja.has(As),_s=Yo.get(As);let dl;return Xo==="nest"?dl=Xa:dl=(qa=_s==null?void 0:_s.indeterminate)!==null&&qa!==void 0?qa:Xa,{node:Me.createElement(Pr.default,Object.assign({},_s,{indeterminate:dl,checked:da,skipGroup:!0,onClick:hu=>hu.stopPropagation(),onChange:hu=>{let{nativeEvent:Yl}=hu;const{shiftKey:Ds}=Yl;let Jl=-1,Ql=-1;if(Ds&&Ir){const za=new Set([na,As]);Aa.some((rl,es)=>{if(za.has(rl))if(Jl===-1)Jl=es;else return Ql=es,!0;return!1})}if(Ql!==-1&&Jl!==Ql&&Ir){const za=Aa.slice(Jl,Ql+1),rl=[];da?za.forEach(Ya=>{Co.has(Ya)&&(rl.push(Ya),Co.delete(Ya))}):za.forEach(Ya=>{Co.has(Ya)||(rl.push(Ya),Co.add(Ya))});const es=Array.from(Co);Ni==null||Ni(!da,es.map(Ya=>$r(Ya)),rl.map(Ya=>$r(Ya))),Sa(es,"multiple")}else{const za=Ta;if(Ir){const rl=da?(0,Sc._5)(za,As):(0,Sc.L0)(za,As);hs(As,!da,rl,Yl)}else{const rl=(0,Vo.S)([].concat((0,zi.Z)(za),[As]),!0,Wo,ia),{checkedKeys:es,halfCheckedKeys:Ya}=rl;let fu=es;if(da){const Pc=new Set(es);Pc.delete(As),fu=(0,Vo.S)(Array.from(Pc),{checked:!1,halfCheckedKeys:Ya},Wo,ia).checkedKeys}hs(As,!da,fu,Yl)}}Fo(da?null:As)}})),checked:da}};const Zs=(Ia,$a,Oa)=>{const{node:qa,checked:As}=Us(Ia,$a,Oa);return sr?sr(As,$a,Oa,qa):qa};if(!Go.includes(Ss))if(Go.findIndex(Ia=>{var $a;return(($a=Ia[_i])===null||$a===void 0?void 0:$a.columnType)==="EXPAND_COLUMN"})===0){const[Ia,...$a]=Go;Go=[Ia,Ss].concat((0,zi.Z)($a))}else Go=[Ss].concat((0,zi.Z)(Go));const cl=Go.indexOf(Ss);Go=Go.filter((Ia,$a)=>Ia!==Ss||$a===cl);const ka=Go[cl-1],il=Go[cl+1];let Fs=Wr;Fs===void 0&&((il==null?void 0:il.fixed)!==void 0?Fs=il.fixed:(ka==null?void 0:ka.fixed)!==void 0&&(Fs=ka.fixed)),Fs&&ka&&((Io=ka[_i])===null||Io===void 0?void 0:Io.columnType)==="EXPAND_COLUMN"&&ka.fixed===void 0&&(ka.fixed=Fs);const Ws=tt()(`${eo}-selection-col`,{[`${eo}-selection-col-with-dropdown`]:ir&&dr==="checkbox"}),uc={fixed:Fs,width:gr,className:`${eo}-selection-column`,title:wt.columnTitle||ma,render:Zs,onCell:wt.onCell,[_i]:{className:Ws}};return Go.map(Ia=>Ia===Ss?uc:Ia)},[So,Kr,wt,Ta,ds,ja,gr,Qa,Xo,na,Yo,Ni,hs,ia]),ds]},is=pe(89489),bh=pe(59477),Eh=pe(6848);const Uu="ascend",ro="descend";function rd(mt){return typeof mt.sorter=="object"&&typeof mt.sorter.multiple=="number"?mt.sorter.multiple:!1}function en(mt){return typeof mt=="function"?mt:mt&&typeof mt=="object"&&mt.compare?mt.compare:!1}function xi(mt,wt){return wt?mt[mt.indexOf(wt)+1]:mt[0]}function Mh(mt,wt,on){let dn=[];function Hn(En,si){dn.push({column:En,key:ta(En,si),multiplePriority:rd(En),sortOrder:En.sortOrder})}return(mt||[]).forEach((En,si)=>{const li=Ea(si,on);En.children?("sortOrder"in En&&Hn(En,li),dn=[].concat((0,zi.Z)(dn),(0,zi.Z)(Mh(En.children,wt,li)))):En.sorter&&("sortOrder"in En?Hn(En,li):wt&&En.defaultSortOrder&&dn.push({column:En,key:ta(En,li),multiplePriority:rd(En),sortOrder:En.defaultSortOrder}))}),dn}function Lh(mt,wt,on,dn,Hn,En,si,li){return(wt||[]).map((ti,Mi)=>{const Ai=Ea(Mi,li);let Ni=ti;if(Ni.sorter){const gr=Ni.sortDirections||Hn,dr=Ni.showSorterTooltip===void 0?si:Ni.showSorterTooltip,ir=ta(Ni,Ai),Wr=on.find(Xo=>{let{key:_r}=Xo;return _r===ir}),sr=Wr?Wr.sortOrder:null,zr=xi(gr,sr);let Ir;if(ti.sortIcon)Ir=ti.sortIcon({sortOrder:sr});else{const Xo=gr.includes(Uu)&&Me.createElement(bh.Z,{className:tt()(`${mt}-column-sorter-up`,{active:sr===Uu})}),_r=gr.includes(ro)&&Me.createElement(is.Z,{className:tt()(`${mt}-column-sorter-down`,{active:sr===ro})});Ir=Me.createElement("span",{className:tt()(`${mt}-column-sorter`,{[`${mt}-column-sorter-full`]:!!(Xo&&_r)})},Me.createElement("span",{className:`${mt}-column-sorter-inner`,"aria-hidden":"true"},Xo,_r))}const{cancelSort:eo,triggerAsc:xo,triggerDesc:ko}=En||{};let $r=eo;zr===ro?$r=ko:zr===Uu&&($r=xo);const So=typeof dr=="object"?dr:{title:$r};Ni=Object.assign(Object.assign({},Ni),{className:tt()(Ni.className,{[`${mt}-column-sort`]:sr}),title:Xo=>{const _r=Me.createElement("div",{className:`${mt}-column-sorters`},Me.createElement("span",{className:`${mt}-column-title`},Mt(ti.title,Xo)),Ir);return dr?Me.createElement(Eh.Z,Object.assign({},So),_r):_r},onHeaderCell:Xo=>{const _r=ti.onHeaderCell&&ti.onHeaderCell(Xo)||{},co=_r.onClick,Xr=_r.onKeyDown;_r.onClick=Mo=>{dn({column:ti,key:ir,sortOrder:zr,multiplePriority:rd(ti)}),co==null||co(Mo)},_r.onKeyDown=Mo=>{Mo.keyCode===Ui.Z.ENTER&&(dn({column:ti,key:ir,sortOrder:zr,multiplePriority:rd(ti)}),Xr==null||Xr(Mo))};const Cr=Pi(ti.title,{}),oo=Cr==null?void 0:Cr.toString();return sr?_r["aria-sort"]=sr==="ascend"?"ascending":"descending":_r["aria-label"]=oo||"",_r.className=tt()(_r.className,`${mt}-column-has-sorters`),_r.tabIndex=0,ti.ellipsis&&(_r.title=(Cr!=null?Cr:"").toString()),_r}})}return"children"in Ni&&(Ni=Object.assign(Object.assign({},Ni),{children:Lh(mt,Ni.children,on,dn,Hn,En,si,Ai)})),Ni})}function ac(mt){const{column:wt,sortOrder:on}=mt;return{column:wt,order:on,field:wt.dataIndex,columnKey:wt.key}}function cu(mt){const wt=mt.filter(on=>{let{sortOrder:dn}=on;return dn}).map(ac);return wt.length===0&&mt.length?Object.assign(Object.assign({},ac(mt[mt.length-1])),{column:void 0}):wt.length<=1?wt[0]||{}:wt}function Mu(mt,wt,on){const dn=wt.slice().sort((si,li)=>li.multiplePriority-si.multiplePriority),Hn=mt.slice(),En=dn.filter(si=>{let{column:{sorter:li},sortOrder:ti}=si;return en(li)&&ti});return En.length?Hn.sort((si,li)=>{for(let ti=0;ti<En.length;ti+=1){const Mi=En[ti],{column:{sorter:Ai},sortOrder:Ni}=Mi,gr=en(Ai);if(gr&&Ni){const dr=gr(si,li,Ni);if(dr!==0)return Ni===Uu?dr:-dr}}return 0}).map(si=>{const li=si[on];return li?Object.assign(Object.assign({},si),{[on]:Mu(li,wt,on)}):si}):Hn}function Nh(mt){let{prefixCls:wt,mergedColumns:on,onSorterChange:dn,sortDirections:Hn,tableLocale:En,showSorterTooltip:si}=mt;const[li,ti]=Me.useState(Mh(on,!0)),Mi=Me.useMemo(()=>{let ir=!0;const Wr=Mh(on,!1);if(!Wr.length)return li;const sr=[];function zr(eo){ir?sr.push(eo):sr.push(Object.assign(Object.assign({},eo),{sortOrder:null}))}let Ir=null;return Wr.forEach(eo=>{Ir===null?(zr(eo),eo.sortOrder&&(eo.multiplePriority===!1?ir=!1:Ir=!0)):(Ir&&eo.multiplePriority!==!1||(ir=!1),zr(eo))}),sr},[on,li]),Ai=Me.useMemo(()=>{const ir=Mi.map(Wr=>{let{column:sr,sortOrder:zr}=Wr;return{column:sr,order:zr}});return{sortColumns:ir,sortColumn:ir[0]&&ir[0].column,sortOrder:ir[0]&&ir[0].order}},[Mi]);function Ni(ir){let Wr;ir.multiplePriority===!1||!Mi.length||Mi[0].multiplePriority===!1?Wr=[ir]:Wr=[].concat((0,zi.Z)(Mi.filter(sr=>{let{key:zr}=sr;return zr!==ir.key})),[ir]),ti(Wr),dn(cu(Wr),Wr)}return[ir=>Lh(wt,ir,Mi,Ni,Hn,En,si),Mi,Ai,()=>cu(Mi)]}function Pd(mt,wt){return mt.map(on=>{const dn=Object.assign({},on);return dn.title=Mt(on.title,wt),"children"in dn&&(dn.children=Pd(dn.children,wt)),dn})}function ys(mt){return[Me.useCallback(on=>Pd(on,mt),[mt])]}var To=pr((mt,wt)=>{const{_renderTimes:on}=mt,{_renderTimes:dn}=wt;return on!==dn}),yl=lo((mt,wt)=>{const{_renderTimes:on}=mt,{_renderTimes:dn}=wt;return on!==dn}),ul=pe(64993),_a=pe(17313),ra=pe(83116),Hs=pe(37613),Ja=mt=>{const{componentCls:wt}=mt,on=`${mt.lineWidth}px ${mt.lineType} ${mt.tableBorderColor}`,dn=(Hn,En,si)=>({[`&${wt}-${Hn}`]:{[`> ${wt}-container`]:{[`> ${wt}-content, > ${wt}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${wt}-expanded-row-fixed`]:{margin:`-${En}px -${si+mt.lineWidth}px`}}}}}});return{[`${wt}-wrapper`]:{[`${wt}${wt}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${wt}-title`]:{border:on,borderBottom:0},[`> ${wt}-container`]:{borderInlineStart:on,borderTop:on,[`
|
|
|
> ${wt}-content,
|
|
|
> ${wt}-header,
|
|
|
> ${wt}-body,
|
|
|
> ${wt}-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:on},"> thead":{"> tr:not(:last-child) > th":{borderBottom:on},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${wt}-cell-fix-right-first::after`]:{borderInlineEnd:on}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${wt}-expanded-row-fixed`]:{margin:`-${mt.tablePaddingVertical}px -${mt.tablePaddingHorizontal+mt.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:mt.lineWidth,bottom:0,borderInlineEnd:on,content:'""'}}}}}},[`&${wt}-scroll-horizontal`]:{[`> ${wt}-container > ${wt}-body`]:{"> table > tbody":{[`
|
|
|
> tr${wt}-expanded-row,
|
|
|
> tr${wt}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},dn("middle",mt.tablePaddingVerticalMiddle,mt.tablePaddingHorizontalMiddle)),dn("small",mt.tablePaddingVerticalSmall,mt.tablePaddingHorizontalSmall)),{[`> ${wt}-footer`]:{border:on,borderTop:0}}),[`${wt}-cell`]:{[`${wt}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${mt.lineWidth}px 0 ${mt.lineWidth}px ${mt.tableHeaderBg}`}},[`${wt}-bordered ${wt}-cell-scrollbar`]:{borderInlineEnd:on}}}},nl=mt=>{const{componentCls:wt}=mt;return{[`${wt}-wrapper`]:{[`${wt}-cell-ellipsis`]:Object.assign(Object.assign({},_a.vS),{wordBreak:"keep-all",[`
|
|
|
&${wt}-cell-fix-left-last,
|
|
|
&${wt}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${wt}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${wt}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Pa=mt=>{const{componentCls:wt}=mt;return{[`${wt}-wrapper`]:{[`${wt}-tbody > tr${wt}-placeholder`]:{textAlign:"center",color:mt.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:mt.colorBgContainer}}}}},Ll=pe(15969),Va=mt=>{const{componentCls:wt,antCls:on,controlInteractiveSize:dn,motionDurationSlow:Hn,lineWidth:En,paddingXS:si,lineType:li,tableBorderColor:ti,tableExpandIconBg:Mi,tableExpandColumnWidth:Ai,borderRadius:Ni,fontSize:gr,fontSizeSM:dr,lineHeight:ir,tablePaddingVertical:Wr,tablePaddingHorizontal:sr,tableExpandedRowBg:zr,paddingXXS:Ir}=mt,eo=dn/2-En,xo=eo*2+En*3,ko=`${En}px ${li} ${ti}`,$r=Ir-En;return{[`${wt}-wrapper`]:{[`${wt}-expand-icon-col`]:{width:Ai},[`${wt}-row-expand-icon-cell`]:{textAlign:"center",[`${wt}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${wt}-row-indent`]:{height:1,float:"left"},[`${wt}-row-expand-icon`]:Object.assign(Object.assign({},(0,Ll.N)(mt)),{position:"relative",float:"left",boxSizing:"border-box",width:xo,height:xo,padding:0,color:"inherit",lineHeight:`${xo}px`,background:Mi,border:ko,borderRadius:Ni,transform:`scale(${dn/xo})`,transition:`all ${Hn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${Hn} ease-out`,content:'""'},"&::before":{top:eo,insetInlineEnd:$r,insetInlineStart:$r,height:En},"&::after":{top:$r,bottom:$r,insetInlineStart:eo,width:En,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"}}),[`${wt}-row-indent + ${wt}-row-expand-icon`]:{marginTop:(gr*ir-En*3)/2-Math.ceil((dr*1.4-En*3)/2),marginInlineEnd:si},[`tr${wt}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:zr}},[`${on}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${wt}-expanded-row-fixed`]:{position:"relative",margin:`-${Wr}px -${sr}px`,padding:`${Wr}px ${sr}px`}}}},Ps=mt=>{const{componentCls:wt,antCls:on,iconCls:dn,tableFilterDropdownWidth:Hn,tableFilterDropdownSearchWidth:En,paddingXXS:si,paddingXS:li,colorText:ti,lineWidth:Mi,lineType:Ai,tableBorderColor:Ni,tableHeaderIconColor:gr,fontSizeSM:dr,tablePaddingHorizontal:ir,borderRadius:Wr,motionDurationSlow:sr,colorTextDescription:zr,colorPrimary:Ir,tableHeaderFilterActiveBg:eo,colorTextDisabled:xo,tableFilterDropdownBg:ko,tableFilterDropdownHeight:$r,controlItemBgHover:So,controlItemBgActive:Xo,boxShadowSecondary:_r,filterDropdownMenuBg:co}=mt,Xr=`${on}-dropdown`,Cr=`${wt}-filter-dropdown`,oo=`${on}-tree`,Mo=`${Mi}px ${Ai} ${Ni}`;return[{[`${wt}-wrapper`]:{[`${wt}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${wt}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-si,marginInline:`${si}px ${-ir/2}px`,padding:`0 ${si}px`,color:gr,fontSize:dr,borderRadius:Wr,cursor:"pointer",transition:`all ${sr}`,"&:hover":{color:zr,background:eo},"&.active":{color:Ir}}}},{[`${on}-dropdown`]:{[Cr]:Object.assign(Object.assign({},(0,_a.Wf)(mt)),{minWidth:Hn,backgroundColor:ko,borderRadius:Wr,boxShadow:_r,overflow:"hidden",[`${Xr}-menu`]:{maxHeight:$r,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:co,"&:empty::after":{display:"block",padding:`${li}px 0`,color:xo,fontSize:dr,textAlign:"center",content:'"Not Found"'}},[`${Cr}-tree`]:{paddingBlock:`${li}px 0`,paddingInline:li,[oo]:{padding:0},[`${oo}-treenode ${oo}-node-content-wrapper:hover`]:{backgroundColor:So},[`${oo}-treenode-checkbox-checked ${oo}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:Xo}}},[`${Cr}-search`]:{padding:li,borderBottom:Mo,"&-input":{input:{minWidth:En},[dn]:{color:xo}}},[`${Cr}-checkall`]:{width:"100%",marginBottom:si,marginInlineStart:si},[`${Cr}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${li-Mi}px ${li}px`,overflow:"hidden",borderTop:Mo}})}},{[`${on}-dropdown ${Cr}, ${Cr}-submenu`]:{[`${on}-checkbox-wrapper + span`]:{paddingInlineStart:li,color:ti},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},ad=mt=>{const{componentCls:wt,lineWidth:on,colorSplit:dn,motionDurationSlow:Hn,zIndexTableFixed:En,tableBg:si,zIndexTableSticky:li}=mt,ti=dn;return{[`${wt}-wrapper`]:{[`
|
|
|
${wt}-cell-fix-left,
|
|
|
${wt}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:En,background:si},[`
|
|
|
${wt}-cell-fix-left-first::after,
|
|
|
${wt}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-on,width:30,transform:"translateX(100%)",transition:`box-shadow ${Hn}`,content:'""',pointerEvents:"none"},[`${wt}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${wt}-cell-fix-right-first::after,
|
|
|
${wt}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-on,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${Hn}`,content:'""',pointerEvents:"none"},[`${wt}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:li+1,width:30,transition:`box-shadow ${Hn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${wt}-ping-left`]:{[`&:not(${wt}-has-fix-left) ${wt}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${ti}`}},[`
|
|
|
${wt}-cell-fix-left-first::after,
|
|
|
${wt}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${ti}`},[`${wt}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${wt}-ping-right`]:{[`&:not(${wt}-has-fix-right) ${wt}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${ti}`}},[`
|
|
|
${wt}-cell-fix-right-first::after,
|
|
|
${wt}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${ti}`}}}}},Rf=mt=>{const{componentCls:wt,antCls:on}=mt;return{[`${wt}-wrapper`]:{[`${wt}-pagination${on}-pagination`]:{margin:`${mt.margin}px 0`},[`${wt}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:mt.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},jf=mt=>{const{componentCls:wt,tableRadius:on}=mt;return{[`${wt}-wrapper`]:{[wt]:{[`${wt}-title, ${wt}-header`]:{borderRadius:`${on}px ${on}px 0 0`},[`${wt}-title + ${wt}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${wt}-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:on,borderStartEndRadius:on,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:on},"> *:last-child":{borderStartEndRadius:on}}},"&-footer":{borderRadius:`0 0 ${on}px ${on}px`}}}}},wd=mt=>{const{componentCls:wt}=mt;return{[`${wt}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${wt}-pagination-left`]:{justifyContent:"flex-end"},[`${wt}-pagination-right`]:{justifyContent:"flex-start"},[`${wt}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${wt}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${wt}-row-indent`]:{float:"right"}}}}},Xd=mt=>{const{componentCls:wt,antCls:on,iconCls:dn,fontSizeIcon:Hn,padding:En,paddingXS:si,tableHeaderIconColor:li,tableHeaderIconColorHover:ti,tableSelectionColumnWidth:Mi}=mt;return{[`${wt}-wrapper`]:{[`${wt}-selection-col`]:{width:Mi,[`&${wt}-selection-col-with-dropdown`]:{width:Mi+Hn+En/4}},[`${wt}-bordered ${wt}-selection-col`]:{width:Mi+si*2,[`&${wt}-selection-col-with-dropdown`]:{width:Mi+Hn+En/4+si*2}},[`
|
|
|
table tr th${wt}-selection-column,
|
|
|
table tr td${wt}-selection-column
|
|
|
`]:{paddingInlineEnd:mt.paddingXS,paddingInlineStart:mt.paddingXS,textAlign:"center",[`${on}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${wt}-selection-column${wt}-cell-fix-left`]:{zIndex:mt.zIndexTableFixed+1},[`table tr th${wt}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${wt}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${wt}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${mt.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${mt.tablePaddingHorizontal/4}px`,[dn]:{color:li,fontSize:Hn,verticalAlign:"baseline","&:hover":{color:ti}}}}}},ud=mt=>{const{componentCls:wt}=mt,on=(dn,Hn,En,si)=>({[`${wt}${wt}-${dn}`]:{fontSize:si,[`
|
|
|
${wt}-title,
|
|
|
${wt}-footer,
|
|
|
${wt}-cell,
|
|
|
${wt}-thead > tr > th,
|
|
|
${wt}-tbody > tr > th,
|
|
|
${wt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${Hn}px ${En}px`},[`${wt}-filter-trigger`]:{marginInlineEnd:`-${En/2}px`},[`${wt}-expanded-row-fixed`]:{margin:`-${Hn}px -${En}px`},[`${wt}-tbody`]:{[`${wt}-wrapper:only-child ${wt}`]:{marginBlock:`-${Hn}px`,marginInline:`${mt.tableExpandColumnWidth-En}px -${En}px`}},[`${wt}-selection-column`]:{paddingInlineStart:`${En/4}px`}}});return{[`${wt}-wrapper`]:Object.assign(Object.assign({},on("middle",mt.tablePaddingVerticalMiddle,mt.tablePaddingHorizontalMiddle,mt.tableFontSizeMiddle)),on("small",mt.tablePaddingVerticalSmall,mt.tablePaddingHorizontalSmall,mt.tableFontSizeSmall))}},sc=mt=>{const{componentCls:wt,marginXXS:on,fontSizeIcon:dn,tableHeaderIconColor:Hn,tableHeaderIconColorHover:En}=mt;return{[`${wt}-wrapper`]:{[`${wt}-thead th${wt}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${mt.motionDurationSlow}`,"&:hover":{background:mt.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:mt.colorPrimary},[`
|
|
|
&${wt}-cell-fix-left:hover,
|
|
|
&${wt}-cell-fix-right:hover
|
|
|
`]:{background:mt.tableFixedHeaderSortActiveBg}},[`${wt}-thead th${wt}-column-sort`]:{background:mt.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${wt}-column-sort`]:{background:mt.tableBodySortBg},[`${wt}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${wt}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${wt}-column-sorter`]:{marginInlineStart:on,color:Hn,fontSize:0,transition:`color ${mt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:dn,"&.active":{color:mt.colorPrimary}},[`${wt}-column-sorter-up + ${wt}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${wt}-column-sorters:hover ${wt}-column-sorter`]:{color:En}}}},_u=mt=>{const{componentCls:wt,opacityLoading:on,tableScrollThumbBg:dn,tableScrollThumbBgHover:Hn,tableScrollThumbSize:En,tableScrollBg:si,zIndexTableSticky:li,stickyScrollBarBorderRadius:ti}=mt,Mi=`${mt.lineWidth}px ${mt.lineType} ${mt.tableBorderColor}`;return{[`${wt}-wrapper`]:{[`${wt}-sticky`]:{"&-holder":{position:"sticky",zIndex:li,background:mt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${En}px !important`,zIndex:li,display:"flex",alignItems:"center",background:si,borderTop:Mi,opacity:on,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:En,backgroundColor:dn,borderRadius:ti,transition:`all ${mt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:Hn}}}}}}},kl=mt=>{const{componentCls:wt,lineWidth:on,tableBorderColor:dn}=mt,Hn=`${on}px ${mt.lineType} ${dn}`;return{[`${wt}-wrapper`]:{[`${wt}-summary`]:{position:"relative",zIndex:mt.zIndexTableFixed,background:mt.tableBg,"> tr":{"> th, > td":{borderBottom:Hn}}},[`div${wt}-summary`]:{boxShadow:`0 -${on}px 0 ${dn}`}}}},xc=mt=>{const{componentCls:wt}=mt,on=`${mt.lineWidth}px ${mt.lineType} ${mt.tableBorderColor}`,dn=`${wt}-expanded-row-cell`;return{[`${wt}-wrapper`]:{[`${wt}-tbody-virtual`]:{[`${wt}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${wt}-cell`]:{borderBottom:on},[`${wt}-expanded-row`]:{[`${dn}${dn}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${mt.lineWidth}px)`,borderInlineEnd:"none"}}},[`${wt}-bordered`]:{[`${wt}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:on,position:"absolute"},[`${wt}-cell`]:{borderInlineEnd:on,[`&${wt}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-mt.lineWidth,borderInlineStart:on}}}}}}};const Lu=mt=>{const{componentCls:wt,fontWeightStrong:on,tablePaddingVertical:dn,tablePaddingHorizontal:Hn,lineWidth:En,lineType:si,tableBorderColor:li,tableFontSize:ti,tableBg:Mi,tableRadius:Ai,tableHeaderTextColor:Ni,motionDurationMid:gr,tableHeaderBg:dr,tableHeaderCellSplitColor:ir,tableRowHoverBg:Wr,tableSelectedRowBg:sr,tableSelectedRowHoverBg:zr,tableFooterTextColor:Ir,tableFooterBg:eo,paddingContentVerticalLG:xo}=mt,ko=`${En}px ${si} ${li}`;return{[`${wt}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,_a.dF)()),{[wt]:Object.assign(Object.assign({},(0,_a.Wf)(mt)),{fontSize:ti,background:Mi,borderRadius:`${Ai}px ${Ai}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Ai}px ${Ai}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${wt}-cell,
|
|
|
${wt}-thead > tr > th,
|
|
|
${wt}-tbody > tr > th,
|
|
|
${wt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${xo}px ${Hn}px`,overflowWrap:"break-word"},[`${wt}-title`]:{padding:`${dn}px ${Hn}px`},[`${wt}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Ni,fontWeight:on,textAlign:"start",background:dr,borderBottom:ko,transition:`background ${gr} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${wt}-selection-column):not(${wt}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:ir,transform:"translateY(-50%)",transition:`background-color ${gr}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${wt}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${gr}, border-color ${gr}`,borderBottom:ko,[`
|
|
|
> ${wt}-wrapper:only-child,
|
|
|
> ${wt}-expanded-row-fixed > ${wt}-wrapper:only-child
|
|
|
`]:{[wt]:{marginBlock:`-${dn}px`,marginInline:`${mt.tableExpandColumnWidth-Hn}px -${Hn}px`,[`${wt}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Ni,fontWeight:on,textAlign:"start",background:dr,borderBottom:ko,transition:`background ${gr} ease`},[`
|
|
|
&${wt}-row:hover > th,
|
|
|
&${wt}-row:hover > td,
|
|
|
> th${wt}-cell-row-hover,
|
|
|
> td${wt}-cell-row-hover
|
|
|
`]:{background:Wr},[`&${wt}-row-selected`]:{"> th, > td":{background:sr},"&:hover > th, &:hover > td":{background:zr}}}},[`${wt}-footer`]:{padding:`${dn}px ${Hn}px`,color:Ir,background:eo}})}};var lc=(0,ra.Z)("Table",mt=>{const{colorTextHeading:wt,colorSplit:on,colorIcon:dn,colorIconHover:Hn,opacityLoading:En,colorBgContainer:si,controlInteractiveSize:li,headerBg:ti,headerColor:Mi,headerSortActiveBg:Ai,headerSortHoverBg:Ni,bodySortBg:gr,rowHoverBg:dr,rowSelectedBg:ir,rowSelectedHoverBg:Wr,rowExpandedBg:sr,cellPaddingBlock:zr,cellPaddingInline:Ir,cellPaddingBlockMD:eo,cellPaddingInlineMD:xo,cellPaddingBlockSM:ko,cellPaddingInlineSM:$r,borderColor:So,footerBg:Xo,footerColor:_r,headerBorderRadius:co,cellFontSize:Xr,cellFontSizeMD:Cr,cellFontSizeSM:oo,headerSplitColor:Mo,fixedHeaderSortActiveBg:Zo,headerFilterHoverBg:Wo,filterDropdownBg:Kr,expandIconBg:Yo,selectionColumnWidth:ia,stickyScrollBarBg:Ta}=mt,pa=new ul.C(dn),ds=new ul.C(Hn),ja=2,na=(0,Hs.TS)(mt,{tableFontSize:Xr,tableBg:si,tableRadius:co,tablePaddingVertical:zr,tablePaddingHorizontal:Ir,tablePaddingVerticalMiddle:eo,tablePaddingHorizontalMiddle:xo,tablePaddingVerticalSmall:ko,tablePaddingHorizontalSmall:$r,tableBorderColor:So,tableHeaderTextColor:Mi,tableHeaderBg:ti,tableFooterTextColor:_r,tableFooterBg:Xo,tableHeaderCellSplitColor:Mo,tableHeaderSortBg:Ai,tableHeaderSortHoverBg:Ni,tableHeaderIconColor:pa.clone().setAlpha(pa.getAlpha()*En).toRgbString(),tableHeaderIconColorHover:ds.clone().setAlpha(ds.getAlpha()*En).toRgbString(),tableBodySortBg:gr,tableFixedHeaderSortActiveBg:Zo,tableHeaderFilterActiveBg:Wo,tableFilterDropdownBg:Kr,tableRowHoverBg:dr,tableSelectedRowBg:ir,tableSelectedRowHoverBg:Wr,zIndexTableFixed:ja,zIndexTableSticky:ja+1,tableFontSizeMiddle:Cr,tableFontSizeSmall:oo,tableSelectionColumnWidth:ia,tableExpandIconBg:Yo,tableExpandColumnWidth:li+2*mt.padding,tableExpandedRowBg:sr,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Ta,tableScrollThumbBgHover:wt,tableScrollBg:on});return[Lu(na),Rf(na),kl(na),sc(na),Ps(na),Ja(na),jf(na),Va(na),kl(na),Pa(na),Xd(na),ad(na),_u(na),nl(na),ud(na),wd(na),xc(na)]},mt=>{const{colorFillAlter:wt,colorBgContainer:on,colorTextHeading:dn,colorFillSecondary:Hn,colorFillContent:En,controlItemBgActive:si,controlItemBgActiveHover:li,padding:ti,paddingSM:Mi,paddingXS:Ai,colorBorderSecondary:Ni,borderRadiusLG:gr,fontSize:dr,controlHeight:ir,colorTextPlaceholder:Wr}=mt,sr=new ul.C(Hn).onBackground(on).toHexShortString(),zr=new ul.C(En).onBackground(on).toHexShortString(),Ir=new ul.C(wt).onBackground(on).toHexShortString();return{headerBg:Ir,headerColor:dn,headerSortActiveBg:sr,headerSortHoverBg:zr,bodySortBg:Ir,rowHoverBg:Ir,rowSelectedBg:si,rowSelectedHoverBg:li,rowExpandedBg:wt,cellPaddingBlock:ti,cellPaddingInline:ti,cellPaddingBlockMD:Mi,cellPaddingInlineMD:Ai,cellPaddingBlockSM:Ai,cellPaddingInlineSM:Ai,borderColor:Ni,headerBorderRadius:gr,footerBg:Ir,footerColor:dn,cellFontSize:dr,cellFontSizeMD:dr,cellFontSizeSM:dr,headerSplitColor:Ni,fixedHeaderSortActiveBg:sr,headerFilterHoverBg:En,filterDropdownMenuBg:on,filterDropdownBg:on,expandIconBg:on,selectionColumnWidth:ir,stickyScrollBarBg:Wr,stickyScrollBarBorderRadius:100}});const Jd=[],of=(mt,wt)=>{const{prefixCls:on,className:dn,rootClassName:Hn,style:En,size:si,bordered:li,dropdownPrefixCls:ti,dataSource:Mi,pagination:Ai,rowSelection:Ni,rowKey:gr="key",rowClassName:dr,columns:ir,children:Wr,childrenColumnName:sr,onChange:zr,getPopupContainer:Ir,loading:eo,expandIcon:xo,expandable:ko,expandedRowRender:$r,expandIconColumnIndex:So,indentSize:Xo,scroll:_r,sortDirections:co,locale:Xr,showSorterTooltip:Cr=!0,virtual:oo}=mt,Mo=Me.useMemo(()=>ir||nn(Wr),[ir,Wr]),Zo=Me.useMemo(()=>Mo.some(Da=>Da.responsive),[Mo]),Wo=(0,pi.Z)(Zo),Kr=Me.useMemo(()=>{const Da=new Set(Object.keys(Wo).filter(rs=>Wo[rs]));return Mo.filter(rs=>!rs.responsive||rs.responsive.some(Bs=>Da.has(Bs)))},[Mo,Wo]),Yo=(0,qr.Z)(mt,["className","style","columns"]),{locale:ia=Tr.Z,direction:Ta,table:pa,renderEmpty:ds,getPrefixCls:ja,getPopupContainer:na}=Me.useContext(Ro.E_),Fo=(0,Nr.Z)(si),Sa=Object.assign(Object.assign({},ia.Table),Xr),hs=Mi||Jd,Qa=ja("table",on),Ns=ja("dropdown",ti),$o=Object.assign({childrenColumnName:sr,expandIconColumnIndex:So},ko),{childrenColumnName:Io="children"}=$o,Go=Me.useMemo(()=>hs.some(Da=>Da==null?void 0:Da[Io])?"nest":$r||ko&&ko.expandedRowRender?"row":null,[hs]),Co={body:Me.useRef()},Aa=Me.useMemo(()=>typeof gr=="function"?gr:Da=>Da==null?void 0:Da[gr],[gr]),[Po]=kc(hs,Io,Aa),Jo={},ga=function(Da,rs){let Bs=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var os,Ca,Ts;const Rl=Object.assign(Object.assign({},Jo),Da);Bs&&((os=Jo.resetPagination)===null||os===void 0||os.call(Jo),!((Ca=Rl.pagination)===null||Ca===void 0)&&Ca.current&&(Rl.pagination.current=1),Ai&&Ai.onChange&&Ai.onChange(1,(Ts=Rl.pagination)===null||Ts===void 0?void 0:Ts.pageSize)),_r&&_r.scrollToFirstRowOnChange!==!1&&Co.body.current&&(0,zo.Z)(0,{getContainer:()=>Co.body.current}),zr==null||zr(Rl.pagination,Rl.filters,Rl.sorter,{currentDataSource:wl(Mu(hs,Rl.sorterStates,Io),Rl.filterStates),action:rs})},ma=(Da,rs)=>{ga({sorter:Da,sorterStates:rs},"sort",!1)},[Us,Zs,cl,ka]=Nh({prefixCls:Qa,mergedColumns:Kr,onSorterChange:ma,sortDirections:co||["ascend","descend"],tableLocale:Sa,showSorterTooltip:Cr}),il=Me.useMemo(()=>Mu(hs,Zs,Io),[hs,Zs]);Jo.sorter=ka(),Jo.sorterStates=Zs;const Fs=(Da,rs)=>{ga({filters:Da,filterStates:rs},"filter",!0)},[Ws,uc,Ia]=nd({prefixCls:Qa,locale:Sa,dropdownPrefixCls:Ns,mergedColumns:Kr,onFilterChange:Fs,getPopupContainer:Ir||na}),$a=wl(il,uc);Jo.filters=Ia,Jo.filterStates=uc;const Oa=Me.useMemo(()=>{const Da={};return Object.keys(Ia).forEach(rs=>{Ia[rs]!==null&&(Da[rs]=Ia[rs])}),Object.assign(Object.assign({},cl),{filters:Da})},[cl,Ia]),[qa]=ys(Oa),As=(Da,rs)=>{ga({pagination:Object.assign(Object.assign({},Jo.pagination),{current:Da,pageSize:rs})},"paginate")},[da,Xa]=xd($a.length,As,Ai);Jo.pagination=Ai===!1?{}:Js(da,Ai),Jo.resetPagination=Xa;const _s=Me.useMemo(()=>{if(Ai===!1||!da.pageSize)return $a;const{current:Da=1,total:rs,pageSize:Bs=Ic}=da;return $a.length<rs?$a.length>Bs?$a.slice((Da-1)*Bs,Da*Bs):$a:$a.slice((Da-1)*Bs,Da*Bs)},[!!Ai,$a,da&&da.current,da&&da.pageSize,da&&da.total]),[dl,hu]=_l({prefixCls:Qa,data:$a,pageData:_s,getRowKey:Aa,getRecordByKey:Po,expandType:Go,childrenColumnName:Io,locale:Sa,getPopupContainer:Ir||na},Ni),Yl=(Da,rs,Bs)=>{let os;return typeof dr=="function"?os=tt()(dr(Da,rs,Bs)):os=tt()(dr),tt()({[`${Qa}-row-selected`]:hu.has(Aa(Da,rs))},os)};$o.__PARENT_RENDER_ICON__=$o.expandIcon,$o.expandIcon=$o.expandIcon||xo||_o(Sa),Go==="nest"&&$o.expandIconColumnIndex===void 0?$o.expandIconColumnIndex=Ni?1:0:$o.expandIconColumnIndex>0&&Ni&&($o.expandIconColumnIndex-=1),typeof $o.indentSize!="number"&&($o.indentSize=typeof Xo=="number"?Xo:15);const Ds=Me.useCallback(Da=>qa(dl(Ws(Us(Da)))),[Us,Ws,dl]);let Jl,Ql;if(Ai!==!1&&(da!=null&&da.total)){let Da;da.size?Da=da.size:Da=Fo==="small"||Fo==="middle"?"small":void 0;const rs=Ca=>Me.createElement(Bo.Z,Object.assign({},da,{className:tt()(`${Qa}-pagination ${Qa}-pagination-${Ca}`,da.className),size:Da})),Bs=Ta==="rtl"?"left":"right",{position:os}=da;if(os!==null&&Array.isArray(os)){const Ca=os.find(zu=>zu.includes("top")),Ts=os.find(zu=>zu.includes("bottom")),Rl=os.every(zu=>`${zu}`=="none");!Ca&&!Ts&&!Rl&&(Ql=rs(Bs)),Ca&&(Jl=rs(Ca.toLowerCase().replace("top",""))),Ts&&(Ql=rs(Ts.toLowerCase().replace("bottom","")))}else Ql=rs(Bs)}let za;typeof eo=="boolean"?za={spinning:eo}:typeof eo=="object"&&(za=Object.assign({spinning:!0},eo));const[rl,es]=lc(Qa),[,Ya]=(0,Ho.Z)(),fu=tt()(`${Qa}-wrapper`,pa==null?void 0:pa.className,{[`${Qa}-wrapper-rtl`]:Ta==="rtl"},dn,Hn,es),Pc=Object.assign(Object.assign({},pa==null?void 0:pa.style),En),Nu=Xr&&Xr.emptyText||(ds==null?void 0:ds("Table"))||Me.createElement(Mr.Z,{componentName:"Table"}),Fu=oo?yl:To,gu={},ql=Me.useMemo(()=>{const{fontSize:Da,lineHeight:rs,padding:Bs,paddingXS:os,paddingSM:Ca}=Ya,Ts=Math.floor(Da*rs);switch(Fo){case"large":return Bs*2+Ts;case"small":return os*2+Ts;default:return Ca*2+Ts}},[Ya,Fo]);return oo&&(gu.listItemHeight=ql),rl(Me.createElement("div",{ref:wt,className:fu,style:Pc},Me.createElement(aa.Z,Object.assign({spinning:!1},za),Jl,Me.createElement(Fu,Object.assign({},gu,Yo,{columns:Kr,direction:Ta,expandable:$o,prefixCls:Qa,className:tt()({[`${Qa}-middle`]:Fo==="middle",[`${Qa}-small`]:Fo==="small",[`${Qa}-bordered`]:li,[`${Qa}-empty`]:hs.length===0}),data:_s,rowKey:Aa,rowClassName:Yl,emptyText:Nu,internalHooks:Re,internalRefs:Co,transformColumns:Ds})),Ql)))};var Ah=Me.forwardRef(of);const Hf=(mt,wt)=>{const on=Me.useRef(0);return on.current+=1,Me.createElement(Ah,Object.assign({},mt,{ref:wt,_renderTimes:on.current}))},Ol=Me.forwardRef(Hf);Ol.SELECTION_COLUMN=Ss,Ol.EXPAND_COLUMN=ge,Ol.SELECTION_ALL=ms,Ol.SELECTION_INVERT=Ua,Ol.SELECTION_NONE=ss,Ol.Column=Lr,Ol.ColumnGroup=uo,Ol.Summary=rt;var Oc=Ol,dg=Oc},12563:function(Vn,Cn,pe){"use strict";pe.d(Cn,{default:function(){return xt}});var ge=pe(59301),Re=pe(99267),Ve=pe(92310),dt=pe.n(Ve),Ke=pe(36785),st=pe(47729),Me=pe(14088),kt=pe(36355),bt=pe(17313),Ue=pe(37613),lt=pe(83116);const yt=He=>{const{paddingXXS:Et,lineWidth:tt,tagPaddingHorizontal:Ot,componentCls:gt}=He,Ht=Ot-tt,Xt=Et-tt;return{[gt]:Object.assign(Object.assign({},(0,bt.Wf)(He)),{display:"inline-block",height:"auto",marginInlineEnd:He.marginXS,paddingInline:Ht,fontSize:He.tagFontSize,lineHeight:He.tagLineHeight,whiteSpace:"nowrap",background:He.defaultBg,border:`${He.lineWidth}px ${He.lineType} ${He.colorBorder}`,borderRadius:He.borderRadiusSM,opacity:1,transition:`all ${He.motionDurationMid}`,textAlign:"start",position:"relative",[`&${gt}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:He.defaultColor},[`${gt}-close-icon`]:{marginInlineStart:Xt,color:He.colorTextDescription,fontSize:He.tagIconSize,cursor:"pointer",transition:`all ${He.motionDurationMid}`,"&:hover":{color:He.colorTextHeading}},[`&${gt}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${He.iconCls}-close, ${He.iconCls}-close:hover`]:{color:He.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${gt}-checkable-checked):hover`]:{color:He.colorPrimary,backgroundColor:He.colorFillSecondary},"&:active, &-checked":{color:He.colorTextLightSolid},"&-checked":{backgroundColor:He.colorPrimary,"&:hover":{backgroundColor:He.colorPrimaryHover}},"&:active":{backgroundColor:He.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${He.iconCls} + span, > span + ${He.iconCls}`]:{marginInlineStart:Ht}}),[`${gt}-borderless`]:{borderColor:"transparent",background:He.tagBorderlessBg}}},jt=He=>{const{lineWidth:Et,fontSizeIcon:tt}=He,Ot=He.fontSizeSM,gt=`${He.lineHeightSM*Ot}px`;return(0,Ue.TS)(He,{tagFontSize:Ot,tagLineHeight:gt,tagIconSize:tt-2*Et,tagPaddingHorizontal:8,tagBorderlessBg:He.colorFillTertiary})},Ae=He=>({defaultBg:He.colorFillQuaternary,defaultColor:He.colorText});var ne=(0,lt.Z)("Tag",He=>{const Et=jt(He);return yt(Et)},Ae),ee=function(He,Et){var tt={};for(var Ot in He)Object.prototype.hasOwnProperty.call(He,Ot)&&Et.indexOf(Ot)<0&&(tt[Ot]=He[Ot]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,Ot=Object.getOwnPropertySymbols(He);gt<Ot.length;gt++)Et.indexOf(Ot[gt])<0&&Object.prototype.propertyIsEnumerable.call(He,Ot[gt])&&(tt[Ot[gt]]=He[Ot[gt]]);return tt},se=He=>{const{prefixCls:Et,style:tt,className:Ot,checked:gt,onChange:Ht,onClick:Xt}=He,Ut=ee(He,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:it,tag:_e}=ge.useContext(kt.E_),Wt=Tn=>{Ht==null||Ht(!gt),Xt==null||Xt(Tn)},Dn=it("tag",Et),[Bn,$t]=ne(Dn),ln=dt()(Dn,`${Dn}-checkable`,{[`${Dn}-checkable-checked`]:gt},_e==null?void 0:_e.className,Ot,$t);return Bn(ge.createElement("span",Object.assign({},Ut,{style:Object.assign(Object.assign({},tt),_e==null?void 0:_e.style),className:ln,onClick:Wt})))},fe=pe(45157);const ye=He=>(0,fe.Z)(He,(Et,tt)=>{let{textColor:Ot,lightBorderColor:gt,lightColor:Ht,darkColor:Xt}=tt;return{[`${He.componentCls}-${Et}`]:{color:Ot,background:Ht,borderColor:gt,"&-inverse":{color:He.colorTextLightSolid,background:Xt,borderColor:Xt},[`&${He.componentCls}-borderless`]:{borderColor:"transparent"}}}});var be=(0,lt.b)(["Tag","preset"],He=>{const Et=jt(He);return ye(Et)},Ae);function Te(He){return typeof He!="string"?He:He.charAt(0).toUpperCase()+He.slice(1)}const Be=(He,Et,tt)=>{const Ot=Te(tt);return{[`${He.componentCls}-${Et}`]:{color:He[`color${tt}`],background:He[`color${Ot}Bg`],borderColor:He[`color${Ot}Border`],[`&${He.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ze=(0,lt.b)(["Tag","status"],He=>{const Et=jt(He);return[Be(Et,"success","Success"),Be(Et,"processing","Info"),Be(Et,"error","Error"),Be(Et,"warning","Warning")]},Ae),Ge=function(He,Et){var tt={};for(var Ot in He)Object.prototype.hasOwnProperty.call(He,Ot)&&Et.indexOf(Ot)<0&&(tt[Ot]=He[Ot]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,Ot=Object.getOwnPropertySymbols(He);gt<Ot.length;gt++)Et.indexOf(Ot[gt])<0&&Object.prototype.propertyIsEnumerable.call(He,Ot[gt])&&(tt[Ot[gt]]=He[Ot[gt]]);return tt};const nt=(He,Et)=>{const{prefixCls:tt,className:Ot,rootClassName:gt,style:Ht,children:Xt,icon:Ut,color:it,onClose:_e,closeIcon:Wt,closable:Dn,bordered:Bn=!0}=He,$t=Ge(He,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:ln,direction:Tn,tag:ei}=ge.useContext(kt.E_),[Ln,Yn]=ge.useState(!0);ge.useEffect(()=>{"visible"in $t&&Yn($t.visible)},[$t.visible]);const zt=(0,Ke.o2)(it),wn=(0,Ke.yT)(it),$n=zt||wn,Yt=Object.assign(Object.assign({backgroundColor:it&&!$n?it:void 0},ei==null?void 0:ei.style),Ht),tn=ln("tag",tt),[Gt,Tt]=ne(tn),ot=dt()(tn,ei==null?void 0:ei.className,{[`${tn}-${it}`]:$n,[`${tn}-has-color`]:it&&!$n,[`${tn}-hidden`]:!Ln,[`${tn}-rtl`]:Tn==="rtl",[`${tn}-borderless`]:!Bn},Ot,gt,Tt),Ze=Pe=>{Pe.stopPropagation(),_e==null||_e(Pe),!Pe.defaultPrevented&&Yn(!1)},[,At]=(0,st.Z)(Dn,Wt,Pe=>Pe===null?ge.createElement(Re.Z,{className:`${tn}-close-icon`,onClick:Ze}):ge.createElement("span",{className:`${tn}-close-icon`,onClick:Ze},Pe),null,!1),Dt=typeof $t.onClick=="function"||Xt&&Xt.type==="a",rt=Ut||null,et=rt?ge.createElement(ge.Fragment,null,rt,Xt&&ge.createElement("span",null,Xt)):Xt,Oe=ge.createElement("span",Object.assign({},$t,{ref:Et,className:ot,style:Yt}),et,At,zt&&ge.createElement(be,{key:"preset",prefixCls:tn}),wn&&ge.createElement(ze,{key:"status",prefixCls:tn}));return Gt(Dt?ge.createElement(Me.Z,{component:"Tag"},Oe):Oe)},Je=ge.forwardRef(nt);Je.CheckableTag=se;var xt=Je},98228:function(Vn,Cn,pe){"use strict";pe.d(Cn,{default:function(){return Er}});var ge=pe(92310),Re=pe.n(ge),Ve=pe(96663),dt=pe(19127),Ke=pe(44127),st=pe(72071),Me=pe(6620),kt=pe(20135),bt=pe(77861),Ue=pe(17115),lt=pe(90782),yt=pe(18929),jt=pe(48736),Ae=pe(59301),ne=function(Kn){var Le=Ae.useRef({valueLabels:new Map});return Ae.useMemo(function(){var Ei=Le.current.valueLabels,Ri=new Map,an=Kn.map(function(di){var yi,Li=di.value,On=(yi=di.label)!==null&&yi!==void 0?yi:Ei.get(Li);return Ri.set(Li,On),(0,Ke.Z)((0,Ke.Z)({},di),{},{label:On})});return Le.current.valueLabels=Ri,[an]},[Kn])},ee=function(Kn,Le,Ei,Ri){return Ae.useMemo(function(){var an=Kn.map(function(On){var Un=On.value;return Un}),di=Le.map(function(On){var Un=On.value;return Un}),yi=an.filter(function(On){return!Ri[On]});if(Ei){var Li=(0,lt.S)(an,!0,Ri);an=Li.checkedKeys,di=Li.halfCheckedKeys}return[Array.from(new Set([].concat((0,dt.Z)(yi),(0,dt.Z)(an)))),di]},[Kn,Le,Ei,Ri])},ce=pe(71430),se=function(Kn,Le){return Ae.useMemo(function(){var Ei=(0,ce.I8)(Kn,{fieldNames:Le,initWrapper:function(an){return(0,Ke.Z)((0,Ke.Z)({},an),{},{valueEntities:new Map})},processEntity:function(an,di){var yi=an.node[Le.value];if(0)var Li;di.valueEntities.set(yi,an)}});return Ei},[Kn,Le])},fe=pe(90493),ye=pe(11592),be=function(){return null},Te=be,Be=["children","value"];function ze(Kn){return(0,ye.Z)(Kn).map(function(Le){if(!Ae.isValidElement(Le)||!Le.type)return null;var Ei=Le,Ri=Ei.key,an=Ei.props,di=an.children,yi=an.value,Li=(0,Me.Z)(an,Be),On=(0,Ke.Z)({key:Ri,value:yi},Li),Un=ze(di);return Un.length&&(On.children=Un),On}).filter(function(Le){return Le})}function Ge(Kn){if(!Kn)return Kn;var Le=(0,Ke.Z)({},Kn);return"props"in Le||Object.defineProperty(Le,"props",{get:function(){return(0,jt.ZP)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),Le}}),Le}function nt(Kn,Le,Ei,Ri,an,di){var yi=null,Li=null;function On(){function Un(It){var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",Ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return It.map(function(nn,xn){var Nt="".concat(Kt,"-").concat(xn),at=nn[di.value],cn=Ei.includes(at),Nn=Un(nn[di.children]||[],Nt,cn),kn=Ae.createElement(Te,nn,Nn.map(function(St){return St.node}));if(Le===at&&(yi=kn),cn){var Jn={pos:Nt,node:kn,children:Nn};return Ye||Li.push(Jn),Jn}return null}).filter(function(nn){return nn})}Li||(Li=[],Un(Ri),Li.sort(function(It,Kt){var Ye=It.node.props.value,nn=Kt.node.props.value,xn=Ei.indexOf(Ye),Nt=Ei.indexOf(nn);return xn-Nt}))}Object.defineProperty(Kn,"triggerNode",{get:function(){return(0,jt.ZP)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),On(),yi}}),Object.defineProperty(Kn,"allCheckedNodes",{get:function(){return(0,jt.ZP)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),On(),an?Li:Li.map(function(It){var Kt=It.node;return Kt})}})}var Je=function(Kn,Le,Ei){var Ri=Ei.treeNodeFilterProp,an=Ei.filterTreeNode,di=Ei.fieldNames,yi=di.children;return Ae.useMemo(function(){if(!Le||an===!1)return Kn;var Li;if(typeof an=="function")Li=an;else{var On=Le.toUpperCase();Li=function(Kt,Ye){var nn=Ye[Ri];return String(nn).toUpperCase().includes(On)}}function Un(It){var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return It.reduce(function(Ye,nn){var xn=nn[yi],Nt=Kt||Li(Le,Ge(nn)),at=Un(xn||[],Nt);return(Nt||at.length)&&Ye.push((0,Ke.Z)((0,Ke.Z)({},nn),{},(0,fe.Z)({isLeaf:void 0},yi,at))),Ye},[])}return Un(Kn)},[Kn,Le,yi,Ri,an])};function xt(Kn){var Le=Ae.useRef();Le.current=Kn;var Ei=Ae.useCallback(function(){return Le.current.apply(Le,arguments)},[]);return Ei}function He(Kn,Le){var Ei=Le.id,Ri=Le.pId,an=Le.rootPId,di={},yi=[],Li=Kn.map(function(On){var Un=(0,Ke.Z)({},On),It=Un[Ei];return di[It]=Un,Un.key=Un.key||It,Un});return Li.forEach(function(On){var Un=On[Ri],It=di[Un];It&&(It.children=It.children||[],It.children.push(On)),(Un===an||!It&&an===null)&&yi.push(On)}),yi}function Et(Kn,Le,Ei){return Ae.useMemo(function(){return Kn?Ei?He(Kn,(0,Ke.Z)({id:"id",pId:"pId",rootPId:null},Ei!==!0?Ei:{})):Kn:ze(Le)},[Le,Ei,Kn])}var tt=Ae.createContext(null),Ot=tt,gt=pe(10228),Ht=pe(80547),Xt=pe(43858),Ut=Ae.createContext(null),it=Ut;function _e(Kn){return Array.isArray(Kn)?Kn:Kn!==void 0?[Kn]:[]}function Wt(Kn){var Le=Kn||{},Ei=Le.label,Ri=Le.value,an=Le.children,di=Ri||"value";return{_title:Ei?[Ei]:["title","label"],value:di,key:di,children:an||"children"}}function Dn(Kn){return!Kn||Kn.disabled||Kn.disableCheckbox||Kn.checkable===!1}function Bn(Kn,Le){var Ei=[];function Ri(an){an.forEach(function(di){var yi=di[Le.children];yi&&(Ei.push(di[Le.value]),Ri(yi))})}return Ri(Kn),Ei}function $t(Kn){return Kn==null}var ln={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Tn=function(Le,Ei){var Ri=(0,bt.lk)(),an=Ri.prefixCls,di=Ri.multiple,yi=Ri.searchValue,Li=Ri.toggleOpen,On=Ri.open,Un=Ri.notFoundContent,It=Ae.useContext(it),Kt=It.virtual,Ye=It.listHeight,nn=It.listItemHeight,xn=It.treeData,Nt=It.fieldNames,at=It.onSelect,cn=It.dropdownMatchSelectWidth,Nn=It.treeExpandAction,kn=Ae.useContext(Ot),Jn=kn.checkable,St=kn.checkedKeys,An=kn.halfCheckedKeys,qn=kn.treeExpandedKeys,Si=kn.treeDefaultExpandAll,rn=kn.treeDefaultExpandedKeys,bn=kn.onTreeExpand,Ft=kn.treeIcon,Pn=kn.showTreeIcon,yn=kn.switcherIcon,Sn=kn.treeLine,Gn=kn.treeNodeFilterProp,Zn=kn.loadData,Qn=kn.treeLoadedKeys,ii=kn.treeMotion,ji=kn.onTreeLoad,pn=kn.keyEntities,Ji=Ae.useRef(),Ki=(0,Ht.Z)(function(){return xn},[On,xn],function(qi,Rr){return Rr[0]&&qi[1]!==Rr[1]}),Gi=Ae.useState(null),gn=(0,st.Z)(Gi,2),oi=gn[0],Bi=gn[1],$i=pn[oi],Ti=Ae.useMemo(function(){return Jn?{checked:St,halfChecked:An}:null},[Jn,St,An]);Ae.useEffect(function(){if(On&&!di&&St.length){var qi;(qi=Ji.current)===null||qi===void 0||qi.scrollTo({key:St[0]}),Bi(St[0])}},[On]);var Qi=String(yi).toLowerCase(),pr=function(Rr){return Qi?String(Rr[Gn]).toLowerCase().includes(Qi):!1},hr=Ae.useState(rn),Vi=(0,st.Z)(hr,2),xr=Vi[0],Rn=Vi[1],Br=Ae.useState(null),_n=(0,st.Z)(Br,2),Or=_n[0],no=_n[1],br=Ae.useMemo(function(){return qn?(0,dt.Z)(qn):yi?Or:xr},[xr,Or,qn,yi]);Ae.useEffect(function(){yi&&no(Bn(xn,Nt))},[yi]);var mo=function(Rr){Rn(Rr),no(Rr),bn&&bn(Rr)},Jr=function(Rr){Rr.preventDefault()},ur=function(Rr,Ii){var Qe=Ii.node;Jn&&Dn(Qe)||(at(Qe.key,{selected:!St.includes(Qe.key)}),di||Li(!1))};if(Ae.useImperativeHandle(Ei,function(){var qi;return{scrollTo:(qi=Ji.current)===null||qi===void 0?void 0:qi.scrollTo,onKeyDown:function(Ii){var Qe,Qr=Ii.which;switch(Qr){case gt.Z.UP:case gt.Z.DOWN:case gt.Z.LEFT:case gt.Z.RIGHT:(Qe=Ji.current)===null||Qe===void 0||Qe.onKeyDown(Ii);break;case gt.Z.ENTER:{if($i){var lo=($i==null?void 0:$i.node)||{},jr=lo.selectable,vo=lo.value;jr!==!1&&ur(null,{node:{key:oi},selected:!St.includes(vo)})}break}case gt.Z.ESC:Li(!1)}},onKeyUp:function(){}}}),Ki.length===0)return Ae.createElement("div",{role:"listbox",className:"".concat(an,"-empty"),onMouseDown:Jr},Un);var er={fieldNames:Nt};return Qn&&(er.loadedKeys=Qn),br&&(er.expandedKeys=br),Ae.createElement("div",{onMouseDown:Jr},$i&&On&&Ae.createElement("span",{style:ln,"aria-live":"assertive"},$i.node.value),Ae.createElement(Xt.Z,(0,Ve.Z)({ref:Ji,focusable:!1,prefixCls:"".concat(an,"-tree"),treeData:Ki,height:Ye,itemHeight:nn,virtual:Kt!==!1&&cn!==!1,multiple:di,icon:Ft,showIcon:Pn,switcherIcon:yn,showLine:Sn,loadData:yi?null:Zn,motion:ii,activeKey:oi,checkable:Jn,checkStrictly:!0,checkedKeys:Ti,selectedKeys:Jn?[]:St,defaultExpandAll:Si},er,{onActiveChange:Bi,onSelect:ur,onCheck:ur,onExpand:mo,onLoad:ji,filterTreeNode:pr,expandAction:Nn})))},ei=Ae.forwardRef(Tn);ei.displayName="OptionList";var Ln=ei,Yn="SHOW_ALL",zt="SHOW_PARENT",wn="SHOW_CHILD";function $n(Kn,Le,Ei,Ri){var an=new Set(Kn);return Le===wn?Kn.filter(function(di){var yi=Ei[di];return!(yi&&yi.children&&yi.children.some(function(Li){var On=Li.node;return an.has(On[Ri.value])})&&yi.children.every(function(Li){var On=Li.node;return Dn(On)||an.has(On[Ri.value])}))}):Le===zt?Kn.filter(function(di){var yi=Ei[di],Li=yi?yi.parent:null;return!(Li&&!Dn(Li.node)&&an.has(Li.key))}):Kn}function Yt(Kn){var Le=Kn.searchPlaceholder,Ei=Kn.treeCheckStrictly,Ri=Kn.treeCheckable,an=Kn.labelInValue,di=Kn.value,yi=Kn.multiple;warning(!Le,"`searchPlaceholder` has been removed."),Ei&&an===!1&&warning(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(an||Ei)&&warning(toArray(di).every(function(Li){return Li&&_typeof(Li)==="object"&&"value"in Li}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),Ei||yi||Ri?warning(!di||Array.isArray(di),"`value` should be an array when `TreeSelect` is checkable or multiple."):warning(!Array.isArray(di),"`value` should not be array when `TreeSelect` is single mode.")}var tn=null,Gt=["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 Tt(Kn){return!Kn||(0,kt.Z)(Kn)!=="object"}var ot=Ae.forwardRef(function(Kn,Le){var Ei=Kn.id,Ri=Kn.prefixCls,an=Ri===void 0?"rc-tree-select":Ri,di=Kn.value,yi=Kn.defaultValue,Li=Kn.onChange,On=Kn.onSelect,Un=Kn.onDeselect,It=Kn.searchValue,Kt=Kn.inputValue,Ye=Kn.onSearch,nn=Kn.autoClearSearchValue,xn=nn===void 0?!0:nn,Nt=Kn.filterTreeNode,at=Kn.treeNodeFilterProp,cn=at===void 0?"value":at,Nn=Kn.showCheckedStrategy,kn=Kn.treeNodeLabelProp,Jn=Kn.multiple,St=Kn.treeCheckable,An=Kn.treeCheckStrictly,qn=Kn.labelInValue,Si=Kn.fieldNames,rn=Kn.treeDataSimpleMode,bn=Kn.treeData,Ft=Kn.children,Pn=Kn.loadData,yn=Kn.treeLoadedKeys,Sn=Kn.onTreeLoad,Gn=Kn.treeDefaultExpandAll,Zn=Kn.treeExpandedKeys,Qn=Kn.treeDefaultExpandedKeys,ii=Kn.onTreeExpand,ji=Kn.treeExpandAction,pn=Kn.virtual,Ji=Kn.listHeight,Ki=Ji===void 0?200:Ji,Gi=Kn.listItemHeight,gn=Gi===void 0?20:Gi,oi=Kn.onDropdownVisibleChange,Bi=Kn.dropdownMatchSelectWidth,$i=Bi===void 0?!0:Bi,Ti=Kn.treeLine,Qi=Kn.treeIcon,pr=Kn.showTreeIcon,hr=Kn.switcherIcon,Vi=Kn.treeMotion,xr=(0,Me.Z)(Kn,Gt),Rn=(0,Ue.ZP)(Ei),Br=St&&!An,_n=St||An,Or=An||qn,no=_n||Jn,br=(0,yt.Z)(yi,{value:di}),mo=(0,st.Z)(br,2),Jr=mo[0],ur=mo[1],er=Ae.useMemo(function(){return St?Nn||wn:Yn},[Nn,St]),qi=Ae.useMemo(function(){return Wt(Si)},[JSON.stringify(Si)]),Rr=(0,yt.Z)("",{value:It!==void 0?It:Kt,postState:function(cr){return cr||""}}),Ii=(0,st.Z)(Rr,2),Qe=Ii[0],Qr=Ii[1],lo=function(cr){Qr(cr),Ye==null||Ye(cr)},jr=Et(bn,Ft,rn),vo=se(jr,qi),po=vo.keyEntities,Lr=vo.valueEntities,Fr=Ae.useCallback(function(or){var cr=[],Pr=[];return or.forEach(function(Gr){Lr.has(Gr)?Pr.push(Gr):cr.push(Gr)}),{missingRawValues:cr,existRawValues:Pr}},[Lr]),uo=Je(jr,Qe,{fieldNames:qi,treeNodeFilterProp:cn,filterTreeNode:Nt}),qr=Ae.useCallback(function(or){if(or){if(kn)return or[kn];for(var cr=qi._title,Pr=0;Pr<cr.length;Pr+=1){var Gr=or[cr[Pr]];if(Gr!==void 0)return Gr}}},[qi,kn]),zo=Ae.useCallback(function(or){var cr=_e(or);return cr.map(function(Pr){return Tt(Pr)?{value:Pr}:Pr})},[]),Ro=Ae.useCallback(function(or){var cr=zo(or);return cr.map(function(Pr){var Gr=Pr.label,yr=Pr.value,kr=Pr.halfChecked,Zr,Oi=Lr.get(yr);if(Oi){var sa;Gr=(sa=Gr)!==null&&sa!==void 0?sa:qr(Oi.node),Zr=Oi.node.disabled}else if(Gr===void 0){var Ra=zo(Jr).find(function(Ls){return Ls.value===yr});Gr=Ra.label}return{label:Gr,value:yr,halfChecked:kr,disabled:Zr}})},[Lr,qr,zo,Jr]),Mr=Ae.useMemo(function(){return zo(Jr)},[zo,Jr]),Nr=Ae.useMemo(function(){var or=[],cr=[];return Mr.forEach(function(Pr){Pr.halfChecked?cr.push(Pr):or.push(Pr)}),[or,cr]},[Mr]),pi=(0,st.Z)(Nr,2),Tr=pi[0],Bo=pi[1],aa=Ae.useMemo(function(){return Tr.map(function(or){return or.value})},[Tr]),Ho=ee(Tr,Bo,Br,po),Ao=(0,st.Z)(Ho,2),_o=Ao[0],ta=Ao[1],Ea=Ae.useMemo(function(){var or=$n(_o,er,po,qi),cr=or.map(function(kr){var Zr,Oi,sa;return(Zr=(Oi=po[kr])===null||Oi===void 0||(sa=Oi.node)===null||sa===void 0?void 0:sa[qi.value])!==null&&Zr!==void 0?Zr:kr}),Pr=cr.map(function(kr){var Zr=Tr.find(function(Oi){return Oi.value===kr});return{value:kr,label:Zr==null?void 0:Zr.label}}),Gr=Ro(Pr),yr=Gr[0];return!no&&yr&&$t(yr.value)&&$t(yr.label)?[]:Gr.map(function(kr){var Zr;return(0,Ke.Z)((0,Ke.Z)({},kr),{},{label:(Zr=kr.label)!==null&&Zr!==void 0?Zr:kr.value})})},[qi,no,_o,Tr,Ro,er,po]),Mt=ne(Ea),Pi=(0,st.Z)(Mt,1),_t=Pi[0],Xi=xt(function(or,cr,Pr){var Gr=Ro(or);if(ur(Gr),xn&&Qr(""),Li){var yr=or;if(Br){var kr=$n(or,er,po,qi);yr=kr.map(function(Ba){var zs=Lr.get(Ba);return zs?zs.node[qi.value]:Ba})}var Zr=cr||{triggerValue:void 0,selected:void 0},Oi=Zr.triggerValue,sa=Zr.selected,Ra=yr;if(An){var Ls=Bo.filter(function(Ba){return!yr.includes(Ba.value)});Ra=[].concat((0,dt.Z)(Ra),(0,dt.Z)(Ls))}var Ys=Ro(Ra),tl={preValue:Tr,triggerValue:Oi},Ui=!0;(An||Pr==="selection"&&!sa)&&(Ui=!1),nt(tl,Oi,or,jr,Ui,qi),_n?tl.checked=sa:tl.selected=sa;var La=Or?Ys:Ys.map(function(Ba){return Ba.value});Li(no?La:La[0],Or?null:Ys.map(function(Ba){return Ba.label}),tl)}}),wi=Ae.useCallback(function(or,cr){var Pr,Gr=cr.selected,yr=cr.source,kr=po[or],Zr=kr==null?void 0:kr.node,Oi=(Pr=Zr==null?void 0:Zr[qi.value])!==null&&Pr!==void 0?Pr:or;if(!no)Xi([Oi],{selected:!0,triggerValue:Oi},"option");else{var sa=Gr?[].concat((0,dt.Z)(aa),[Oi]):_o.filter(function(zs){return zs!==Oi});if(Br){var Ra=Fr(sa),Ls=Ra.missingRawValues,Ys=Ra.existRawValues,tl=Ys.map(function(zs){return Lr.get(zs).key}),Ui;if(Gr){var La=(0,lt.S)(tl,!0,po);Ui=La.checkedKeys}else{var Ba=(0,lt.S)(tl,{checked:!1,halfCheckedKeys:ta},po);Ui=Ba.checkedKeys}sa=[].concat((0,dt.Z)(Ls),(0,dt.Z)(Ui.map(function(zs){return po[zs].node[qi.value]})))}Xi(sa,{selected:Gr,triggerValue:Oi},yr||"option")}Gr||!no?On==null||On(Oi,Ge(Zr)):Un==null||Un(Oi,Ge(Zr))},[Fr,Lr,po,qi,no,aa,Xi,Br,On,Un,_o,ta]),Sr=Ae.useCallback(function(or){if(oi){var cr={};Object.defineProperty(cr,"documentClickClose",{get:function(){return(0,jt.ZP)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),oi(or,cr)}},[oi]),Zi=xt(function(or,cr){var Pr=or.map(function(Gr){return Gr.value});if(cr.type==="clear"){Xi(Pr,{},"selection");return}cr.values.length&&wi(cr.values[0].value,{selected:!1,source:"selection"})}),Ci=Ae.useMemo(function(){return{virtual:pn,dropdownMatchSelectWidth:$i,listHeight:Ki,listItemHeight:gn,treeData:uo,fieldNames:qi,onSelect:wi,treeExpandAction:ji}},[pn,$i,Ki,gn,uo,qi,wi,ji]),nr=Ae.useMemo(function(){return{checkable:_n,loadData:Pn,treeLoadedKeys:yn,onTreeLoad:Sn,checkedKeys:_o,halfCheckedKeys:ta,treeDefaultExpandAll:Gn,treeExpandedKeys:Zn,treeDefaultExpandedKeys:Qn,onTreeExpand:ii,treeIcon:Qi,treeMotion:Vi,showTreeIcon:pr,switcherIcon:hr,treeLine:Ti,treeNodeFilterProp:cn,keyEntities:po}},[_n,Pn,yn,Sn,_o,ta,Gn,Zn,Qn,ii,Qi,Vi,pr,hr,Ti,cn,po]);return Ae.createElement(it.Provider,{value:Ci},Ae.createElement(Ot.Provider,{value:nr},Ae.createElement(bt.Ac,(0,Ve.Z)({ref:Le},xr,{id:Rn,prefixCls:an,mode:no?"multiple":void 0,displayValues:_t,onDisplayValuesChange:Zi,searchValue:Qe,onSearch:lo,OptionList:Ln,emptyOptions:!jr.length,onDropdownVisibleChange:Sr,dropdownMatchSelectWidth:$i}))))}),Ze=ot;Ze.TreeNode=Te,Ze.SHOW_ALL=Yn,Ze.SHOW_PARENT=zt,Ze.SHOW_CHILD=wn;var At=Ze,Dt=At,rt=pe(2738),et=pe(53487),Oe=pe(62892),Pe=pe(19080),ve=pe(36355),Fe=pe(1684),We=pe(93891),Ne=pe(19716),ft=pe(32441),sn=pe(14154),un=pe(58582),Pt=pe(84443),qt=pe(66339),Mn=pe(33234),hn=pe(71997),fn=pe(98447),ui=pe(37613),gi=pe(83116),fi=pe(20648);const bi=Kn=>{const{componentCls:Le,treePrefixCls:Ei,colorBgElevated:Ri}=Kn,an=`.${Ei}`;return[{[`${Le}-dropdown`]:[{padding:`${Kn.paddingXS}px ${Kn.paddingXS/2}px`},(0,fi.Yk)(Ei,(0,ui.TS)(Kn,{colorBgContainer:Ri})),{[an]:{borderRadius:0,[`${an}-list-holder-inner`]:{alignItems:"stretch",[`${an}-treenode`]:{[`${an}-node-content-wrapper`]:{flex:"auto"}}}}},(0,fn.C2)(`${Ei}-checkbox`,Kn),{"&-rtl":{direction:"rtl",[`${an}-switcher${an}-switcher_close`]:{[`${an}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function _i(Kn,Le){return(0,gi.Z)("TreeSelect",Ei=>{const Ri=(0,ui.TS)(Ei,{treePrefixCls:Le});return[bi(Ri)]},fi.TM)(Kn)}var rr=function(Kn,Le){var Ei={};for(var Ri in Kn)Object.prototype.hasOwnProperty.call(Kn,Ri)&&Le.indexOf(Ri)<0&&(Ei[Ri]=Kn[Ri]);if(Kn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var an=0,Ri=Object.getOwnPropertySymbols(Kn);an<Ri.length;an++)Le.indexOf(Ri[an])<0&&Object.prototype.propertyIsEnumerable.call(Kn,Ri[an])&&(Ei[Ri[an]]=Kn[Ri[an]]);return Ei};const Wi=(Kn,Le)=>{var Ei,{prefixCls:Ri,size:an,disabled:di,bordered:yi=!0,className:Li,rootClassName:On,treeCheckable:Un,multiple:It,listHeight:Kt=256,listItemHeight:Ye=26,placement:nn,notFoundContent:xn,switcherIcon:Nt,treeLine:at,getPopupContainer:cn,popupClassName:Nn,dropdownClassName:kn,treeIcon:Jn=!1,transitionName:St,choiceTransitionName:An="",status:qn,treeExpandAction:Si,builtinPlacements:rn,dropdownMatchSelectWidth:bn,popupMatchSelectWidth:Ft,allowClear:Pn}=Kn,yn=rr(Kn,["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:Sn,getPrefixCls:Gn,renderEmpty:Zn,direction:Qn,virtual:ii,popupMatchSelectWidth:ji,popupOverflow:pn}=Ae.useContext(ve.E_),Ji=Gn(),Ki=Gn("select",Ri),Gi=Gn("select-tree",Ri),gn=Gn("tree-select",Ri),{compactSize:oi,compactItemClassnames:Bi}=(0,Mn.ri)(Ki,Qn),[$i,Ti]=(0,sn.Z)(Ki),[Qi]=_i(gn,Gi),pr=Re()(Nn||kn,`${gn}-dropdown`,{[`${gn}-dropdown-rtl`]:Qn==="rtl"},On,Ti),hr=!!(Un||It),Vi=(0,Pt.Z)(yn.suffixIcon,yn.showArrow),xr=(Ei=Ft!=null?Ft:bn)!==null&&Ei!==void 0?Ei:ji,{status:Rn,hasFeedback:Br,isFormItemInput:_n,feedbackIcon:Or}=Ae.useContext(ft.aM),no=(0,Pe.F)(Rn,qn),{suffixIcon:br,removeIcon:mo,clearIcon:Jr}=(0,qt.Z)(Object.assign(Object.assign({},yn),{multiple:hr,showSuffixIcon:Vi,hasFeedback:Br,feedbackIcon:Or,prefixCls:Ki,componentName:"TreeSelect"})),ur=Pn===!0?{clearIcon:Jr}:Pn;let er;xn!==void 0?er=xn:er=(Zn==null?void 0:Zn("Select"))||Ae.createElement(We.Z,{componentName:"Select"});const qi=(0,rt.Z)(yn,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),Rr=Ae.useMemo(()=>nn!==void 0?nn:Qn==="rtl"?"bottomRight":"bottomLeft",[nn,Qn]),Ii=(0,un.Z)(rn,pn),Qe=(0,Ne.Z)(Lr=>{var Fr;return(Fr=an!=null?an:oi)!==null&&Fr!==void 0?Fr:Lr}),Qr=Ae.useContext(Fe.Z),lo=di!=null?di:Qr,jr=Re()(!Ri&&gn,{[`${Ki}-lg`]:Qe==="large",[`${Ki}-sm`]:Qe==="small",[`${Ki}-rtl`]:Qn==="rtl",[`${Ki}-borderless`]:!yi,[`${Ki}-in-form-item`]:_n},(0,Pe.Z)(Ki,no,Br),Bi,Li,On,Ti),vo=Lr=>Ae.createElement(hn.Z,{prefixCls:Gi,switcherIcon:Nt,treeNodeProps:Lr,showLine:at}),po=Ae.createElement(Dt,Object.assign({virtual:ii,disabled:lo},qi,{dropdownMatchSelectWidth:xr,builtinPlacements:Ii,ref:Le,prefixCls:Ki,className:jr,listHeight:Kt,listItemHeight:Ye,treeCheckable:Un&&Ae.createElement("span",{className:`${Ki}-tree-checkbox-inner`}),treeLine:!!at,suffixIcon:br,multiple:hr,placement:Rr,removeIcon:mo,allowClear:ur,switcherIcon:vo,showTreeIcon:Jn,notFoundContent:er,getPopupContainer:cn||Sn,treeMotion:null,dropdownClassName:pr,choiceTransitionName:(0,Oe.m)(Ji,"",An),transitionName:(0,Oe.m)(Ji,"slide-up",St),treeExpandAction:Si}));return $i(Qi(po))},fr=Ae.forwardRef(Wi),zi=(0,et.Z)(fr);fr.TreeNode=Te,fr.SHOW_ALL=Yn,fr.SHOW_PARENT=zt,fr.SHOW_CHILD=wn,fr._InternalPanelDoNotUseOrYouWillBeFired=zi;var Er=fr},17574:function(Vn,Cn,pe){"use strict";pe.d(Cn,{default:function(){return it}});var ge=pe(43858),Re=pe(19127),Ve=pe(52671),dt=pe(8657),Ke=pe(96663),st=pe(59301),Me={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"},kt=Me,bt=pe(7657),Ue=function(Wt,Dn){return st.createElement(bt.Z,(0,Ke.Z)({},Wt,{ref:Dn,icon:kt}))},lt=st.forwardRef(Ue),yt=lt,jt=pe(92310),Ae=pe.n(jt),ne=pe(35654),ee=pe(71430),ce=pe(36355),se=pe(56082),fe=pe(62892),ye=pe(20648);const be=4;function Te(_e){const{dropPosition:Wt,dropLevelOffset:Dn,prefixCls:Bn,indent:$t,direction:ln="ltr"}=_e,Tn=ln==="ltr"?"left":"right",ei=ln==="ltr"?"right":"left",Ln={[Tn]:-Dn*$t+be,[ei]:0};switch(Wt){case-1:Ln.top=-3;break;case 1:Ln.bottom=-3;break;default:Ln.bottom=-3,Ln[Tn]=$t+be;break}return st.createElement("div",{style:Ln,className:`${Bn}-drop-indicator`})}var Be=pe(71997),Ge=st.forwardRef((_e,Wt)=>{const{getPrefixCls:Dn,direction:Bn,virtual:$t,tree:ln}=st.useContext(ce.E_),{prefixCls:Tn,className:ei,showIcon:Ln=!1,showLine:Yn,switcherIcon:zt,blockNode:wn=!1,children:$n,checkable:Yt=!1,selectable:tn=!0,draggable:Gt,motion:Tt,style:ot}=_e,Ze=Dn("tree",Tn),At=Dn(),Dt=Tt!=null?Tt:Object.assign(Object.assign({},(0,fe.Z)(At)),{motionAppear:!1}),rt=Object.assign(Object.assign({},_e),{checkable:Yt,selectable:tn,showIcon:Ln,motion:Dt,blockNode:wn,showLine:!!Yn,dropIndicatorRender:Te}),[et,Oe]=(0,ye.ZP)(Ze),Pe=st.useMemo(()=>{if(!Gt)return!1;let Fe={};switch(typeof Gt){case"function":Fe.nodeDraggable=Gt;break;case"object":Fe=Object.assign({},Gt);break;default:break}return Fe.icon!==!1&&(Fe.icon=Fe.icon||st.createElement(se.Z,null)),Fe},[Gt]),ve=Fe=>st.createElement(Be.Z,{prefixCls:Ze,switcherIcon:zt,treeNodeProps:Fe,showLine:Yn});return et(st.createElement(ge.Z,Object.assign({itemHeight:20,ref:Wt,virtual:$t},rt,{style:Object.assign(Object.assign({},ln==null?void 0:ln.style),ot),prefixCls:Ze,className:Ae()({[`${Ze}-icon-hide`]:!Ln,[`${Ze}-block-node`]:wn,[`${Ze}-unselectable`]:!tn,[`${Ze}-rtl`]:Bn==="rtl"},ln==null?void 0:ln.className,ei,Oe),direction:Bn,checkable:Yt&&st.createElement("span",{className:`${Ze}-checkbox-inner`}),selectable:tn,switcherIcon:ve,draggable:Pe}),$n))}),nt;(function(_e){_e[_e.None=0]="None",_e[_e.Start=1]="Start",_e[_e.End=2]="End"})(nt||(nt={}));function Je(_e,Wt){function Dn(Bn){const{key:$t,children:ln}=Bn;Wt($t,Bn)!==!1&&Je(ln||[],Wt)}_e.forEach(Dn)}function xt(_e){let{treeData:Wt,expandedKeys:Dn,startKey:Bn,endKey:$t}=_e;const ln=[];let Tn=nt.None;if(Bn&&Bn===$t)return[Bn];if(!Bn||!$t)return[];function ei(Ln){return Ln===Bn||Ln===$t}return Je(Wt,Ln=>{if(Tn===nt.End)return!1;if(ei(Ln)){if(ln.push(Ln),Tn===nt.None)Tn=nt.Start;else if(Tn===nt.Start)return Tn=nt.End,!1}else Tn===nt.Start&&ln.push(Ln);return Dn.includes(Ln)}),ln}function He(_e,Wt){const Dn=(0,Re.Z)(Wt),Bn=[];return Je(_e,($t,ln)=>{const Tn=Dn.indexOf($t);return Tn!==-1&&(Bn.push(ln),Dn.splice(Tn,1)),!!Dn.length}),Bn}var Et=function(_e,Wt){var Dn={};for(var Bn in _e)Object.prototype.hasOwnProperty.call(_e,Bn)&&Wt.indexOf(Bn)<0&&(Dn[Bn]=_e[Bn]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $t=0,Bn=Object.getOwnPropertySymbols(_e);$t<Bn.length;$t++)Wt.indexOf(Bn[$t])<0&&Object.prototype.propertyIsEnumerable.call(_e,Bn[$t])&&(Dn[Bn[$t]]=_e[Bn[$t]]);return Dn};function tt(_e){const{isLeaf:Wt,expanded:Dn}=_e;return Wt?st.createElement(Ve.Z,null):Dn?st.createElement(dt.Z,null):st.createElement(yt,null)}function Ot(_e){let{treeData:Wt,children:Dn}=_e;return Wt||(0,ee.zn)(Dn)}const gt=(_e,Wt)=>{var{defaultExpandAll:Dn,defaultExpandParent:Bn,defaultExpandedKeys:$t}=_e,ln=Et(_e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const Tn=st.useRef(),ei=st.useRef(),Ln=()=>{const{keyEntities:Pe}=(0,ee.I8)(Ot(ln));let ve;return Dn?ve=Object.keys(Pe):Bn?ve=(0,ne.r7)(ln.expandedKeys||$t||[],Pe):ve=ln.expandedKeys||$t,ve},[Yn,zt]=st.useState(ln.selectedKeys||ln.defaultSelectedKeys||[]),[wn,$n]=st.useState(()=>Ln());st.useEffect(()=>{"selectedKeys"in ln&&zt(ln.selectedKeys)},[ln.selectedKeys]),st.useEffect(()=>{"expandedKeys"in ln&&$n(ln.expandedKeys)},[ln.expandedKeys]);const Yt=(Pe,ve)=>{var Fe;return"expandedKeys"in ln||$n(Pe),(Fe=ln.onExpand)===null||Fe===void 0?void 0:Fe.call(ln,Pe,ve)},tn=(Pe,ve)=>{var Fe;const{multiple:We}=ln,{node:Ne,nativeEvent:ft}=ve,{key:sn=""}=Ne,un=Ot(ln),Pt=Object.assign(Object.assign({},ve),{selected:!0}),qt=(ft==null?void 0:ft.ctrlKey)||(ft==null?void 0:ft.metaKey),Mn=ft==null?void 0:ft.shiftKey;let hn;We&&qt?(hn=Pe,Tn.current=sn,ei.current=hn,Pt.selectedNodes=He(un,hn)):We&&Mn?(hn=Array.from(new Set([].concat((0,Re.Z)(ei.current||[]),(0,Re.Z)(xt({treeData:un,expandedKeys:wn,startKey:sn,endKey:Tn.current}))))),Pt.selectedNodes=He(un,hn)):(hn=[sn],Tn.current=sn,ei.current=hn,Pt.selectedNodes=He(un,hn)),(Fe=ln.onSelect)===null||Fe===void 0||Fe.call(ln,hn,Pt),"selectedKeys"in ln||zt(hn)},{getPrefixCls:Gt,direction:Tt}=st.useContext(ce.E_),{prefixCls:ot,className:Ze,showIcon:At=!0,expandAction:Dt="click"}=ln,rt=Et(ln,["prefixCls","className","showIcon","expandAction"]),et=Gt("tree",ot),Oe=Ae()(`${et}-directory`,{[`${et}-directory-rtl`]:Tt==="rtl"},Ze);return st.createElement(Ge,Object.assign({icon:tt,ref:Wt,blockNode:!0},rt,{showIcon:At,expandAction:Dt,prefixCls:et,className:Oe,expandedKeys:wn,selectedKeys:Yn,onSelect:tn,onExpand:Yt}))};var Xt=st.forwardRef(gt);const Ut=Ge;Ut.DirectoryTree=Xt,Ut.TreeNode=ge.O;var it=Ut},20648:function(Vn,Cn,pe){"use strict";pe.d(Cn,{TM:function(){return jt},Yk:function(){return yt}});var ge=pe(93083),Re=pe(98447),Ve=pe(17313),dt=pe(8378),Ke=pe(37613),st=pe(83116);const Me=new ge.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),kt=(Ae,ne)=>({[`.${Ae}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${ne.motionDurationSlow}`}}}),bt=(Ae,ne)=>({[`.${Ae}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:ne.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${ne.lineWidthBold}px solid ${ne.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Ue=(Ae,ne)=>{const{treeCls:ee,treeNodeCls:ce,treeNodePadding:se,titleHeight:fe,nodeSelectedBg:ye,nodeHoverBg:be}=ne,Te=ne.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,Ve.Wf)(ne)),{background:ne.colorBgContainer,borderRadius:ne.borderRadius,transition:`background-color ${ne.motionDurationSlow}`,[`&${ee}-rtl`]:{[`${ee}-switcher`]:{"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${ee}-active-focused)`]:Object.assign({},(0,Ve.oN)(ne)),[`${ee}-list-holder-inner`]:{alignItems:"flex-start"},[`&${ee}-block-node`]:{[`${ee}-list-holder-inner`]:{alignItems:"stretch",[`${ee}-node-content-wrapper`]:{flex:"auto"},[`${ce}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:se,insetInlineStart:0,border:`1px solid ${ne.colorPrimary}`,opacity:0,animationName:Me,animationDuration:ne.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${ce}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${se}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${ee}-node-content-wrapper`]:{color:ne.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${ee}-node-content-wrapper`]:Object.assign({},(0,Ve.oN)(ne)),[`&:not(${ce}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:fe,lineHeight:`${fe}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${ne.motionDurationSlow}`,[`${ce}:hover &`]:{opacity:.45}},[`&${ce}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:fe}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},kt(Ae,ne)),{position:"relative",flex:"none",alignSelf:"stretch",width:fe,margin:0,lineHeight:`${fe}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:ne.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:fe/2,bottom:-se,marginInlineStart:-1,borderInlineEnd:`1px solid ${ne.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:fe/2*.8,height:fe/2,borderBottom:`1px solid ${ne.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:Te},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:fe,margin:0,padding:`0 ${ne.paddingXS/2}px`,color:"inherit",lineHeight:`${fe}px`,background:"transparent",borderRadius:ne.borderRadius,cursor:"pointer",transition:`all ${ne.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:be},[`&${ee}-node-selected`]:{backgroundColor:ye},[`${ee}-iconEle`]:{display:"inline-block",width:fe,height:fe,lineHeight:`${fe}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${ee}-unselectable ${ee}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${ee}-node-content-wrapper`]:Object.assign({lineHeight:`${fe}px`,userSelect:"none"},bt(Ae,ne)),[`${ce}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${ne.colorPrimary}`}},"&-show-line":{[`${ee}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:fe/2,bottom:-se,borderInlineEnd:`1px solid ${ne.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${ce}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${fe/2}px !important`}}}}})}},lt=Ae=>{const{treeCls:ne,treeNodeCls:ee,treeNodePadding:ce,directoryNodeSelectedBg:se,directoryNodeSelectedColor:fe}=Ae;return{[`${ne}${ne}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:ce,insetInlineStart:0,transition:`background-color ${Ae.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Ae.controlItemBgHover}},"> *":{zIndex:1},[`${ne}-switcher`]:{transition:`color ${Ae.motionDurationMid}`},[`${ne}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${ne}-node-selected`]:{color:fe,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:se},[`${ne}-switcher`]:{color:fe},[`${ne}-node-content-wrapper`]:{color:fe,background:"transparent"}}}}}},yt=(Ae,ne)=>{const ee=`.${Ae}`,ce=`${ee}-treenode`,se=ne.paddingXS/2,fe=(0,Ke.TS)(ne,{treeCls:ee,treeNodeCls:ce,treeNodePadding:se});return[Ue(Ae,fe),lt(fe)]},jt=Ae=>{const{controlHeightSM:ne}=Ae;return{titleHeight:ne,nodeHoverBg:Ae.controlItemBgHover,nodeSelectedBg:Ae.controlItemBgActive}};Cn.ZP=(0,st.Z)("Tree",(Ae,ne)=>{let{prefixCls:ee}=ne;return[{[Ae.componentCls]:(0,Re.C2)(`${ee}-checkbox`,Ae)},yt(ee,Ae),(0,dt.Z)(Ae)]},Ae=>{const{colorTextLightSolid:ne,colorPrimary:ee}=Ae;return Object.assign(Object.assign({},jt(Ae)),{directoryNodeSelectedColor:ne,directoryNodeSelectedBg:ee})})},71997:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return ce}});var ge=pe(96663),Re=pe(59301),Ve={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"},dt=Ve,Ke=pe(7657),st=function(fe,ye){return Re.createElement(Ke.Z,(0,ge.Z)({},fe,{ref:ye,icon:dt}))},Me=Re.forwardRef(st),kt=Me,bt=pe(52671),Ue=pe(58617),lt=pe(15075),yt=pe(43531),jt=pe(92310),Ae=pe.n(jt),ne=pe(92343),ce=se=>{const{prefixCls:fe,switcherIcon:ye,treeNodeProps:be,showLine:Te}=se,{isLeaf:Be,expanded:ze,loading:Ge}=be;if(Ge)return Re.createElement(Ue.Z,{className:`${fe}-switcher-loading-icon`});let nt;if(Te&&typeof Te=="object"&&(nt=Te.showLeafIcon),Be){if(!Te)return null;if(typeof nt!="boolean"&&nt){const He=typeof nt=="function"?nt(be):nt,Et=`${fe}-switcher-line-custom-icon`;return(0,ne.l$)(He)?(0,ne.Tm)(He,{className:Ae()(He.props.className||"",Et)}):He}return nt?Re.createElement(bt.Z,{className:`${fe}-switcher-line-icon`}):Re.createElement("span",{className:`${fe}-switcher-leaf-line`})}const Je=`${fe}-switcher-icon`,xt=typeof ye=="function"?ye(be):ye;return(0,ne.l$)(xt)?(0,ne.Tm)(xt,{className:Ae()(xt.props.className||"",Je)}):xt!==void 0?xt:Te?ze?Re.createElement(lt.Z,{className:`${fe}-switcher-line-icon`}):Re.createElement(yt.Z,{className:`${fe}-switcher-line-icon`}):Re.createElement(kt,{className:Je})}},54580:function(Vn,Cn,pe){"use strict";pe.d(Cn,{default:function(){return bn}});var ge=pe(59301),Re=pe(19127),Ve=pe(92310),dt=pe.n(Ve),Ke=pe(96663),st=pe(52884),Me=pe(95727),kt=pe(65711),bt=pe(85745),Ue=pe(90493),lt=pe(6620),yt=pe(49581),jt=pe(20135),Ae=pe(73324),ne=pe(26112);function ee(Ft,Pn){var yn="cannot ".concat(Ft.method," ").concat(Ft.action," ").concat(Pn.status,"'"),Sn=new Error(yn);return Sn.status=Pn.status,Sn.method=Ft.method,Sn.url=Ft.action,Sn}function ce(Ft){var Pn=Ft.responseText||Ft.response;if(!Pn)return Pn;try{return JSON.parse(Pn)}catch(yn){return Pn}}function se(Ft){var Pn=new XMLHttpRequest;Ft.onProgress&&Pn.upload&&(Pn.upload.onprogress=function(Zn){Zn.total>0&&(Zn.percent=Zn.loaded/Zn.total*100),Ft.onProgress(Zn)});var yn=new FormData;Ft.data&&Object.keys(Ft.data).forEach(function(Gn){var Zn=Ft.data[Gn];if(Array.isArray(Zn)){Zn.forEach(function(Qn){yn.append("".concat(Gn,"[]"),Qn)});return}yn.append(Gn,Zn)}),Ft.file instanceof Blob?yn.append(Ft.filename,Ft.file,Ft.file.name):yn.append(Ft.filename,Ft.file),Pn.onerror=function(Zn){Ft.onError(Zn)},Pn.onload=function(){return Pn.status<200||Pn.status>=300?Ft.onError(ee(Ft,Pn),ce(Pn)):Ft.onSuccess(ce(Pn),Pn)},Pn.open(Ft.method,Ft.action,!0),Ft.withCredentials&&"withCredentials"in Pn&&(Pn.withCredentials=!0);var Sn=Ft.headers||{};return Sn["X-Requested-With"]!==null&&Pn.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Sn).forEach(function(Gn){Sn[Gn]!==null&&Pn.setRequestHeader(Gn,Sn[Gn])}),Pn.send(yn),{abort:function(){Pn.abort()}}}var fe=+new Date,ye=0;function be(){return"rc-upload-".concat(fe,"-").concat(++ye)}var Te=pe(48736),Be=function(Ft,Pn){if(Ft&&Pn){var yn=Array.isArray(Pn)?Pn:Pn.split(","),Sn=Ft.name||"",Gn=Ft.type||"",Zn=Gn.replace(/\/.*$/,"");return yn.some(function(Qn){var ii=Qn.trim();if(/^\*(\/\*)?$/.test(Qn))return!0;if(ii.charAt(0)==="."){var ji=Sn.toLowerCase(),pn=ii.toLowerCase(),Ji=[pn];return(pn===".jpg"||pn===".jpeg")&&(Ji=[".jpg",".jpeg"]),Ji.some(function(Ki){return ji.endsWith(Ki)})}return/\/\*$/.test(ii)?Zn===ii.replace(/\/.*$/,""):Gn===ii?!0:/^\w+$/.test(ii)?((0,Te.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(ii,"'.Skip for check.")),!0):!1})}return!0};function ze(Ft,Pn){var yn=Ft.createReader(),Sn=[];function Gn(){yn.readEntries(function(Zn){var Qn=Array.prototype.slice.apply(Zn);Sn=Sn.concat(Qn);var ii=!Qn.length;ii?Pn(Sn):Gn()})}Gn()}var Ge=function(Pn,yn,Sn){var Gn=function Zn(Qn,ii){Qn&&(Qn.path=ii||"",Qn.isFile?Qn.file(function(ji){Sn(ji)&&(Qn.fullPath&&!ji.webkitRelativePath&&(Object.defineProperties(ji,{webkitRelativePath:{writable:!0}}),ji.webkitRelativePath=Qn.fullPath.replace(/^\//,""),Object.defineProperties(ji,{webkitRelativePath:{writable:!1}})),yn([ji]))}):Qn.isDirectory&&ze(Qn,function(ji){ji.forEach(function(pn){Zn(pn,"".concat(ii).concat(Qn.name,"/"))})}))};Pn.forEach(function(Zn){Gn(Zn.webkitGetAsEntry())})},nt=Ge,Je=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],xt=function(Ft){(0,kt.Z)(yn,Ft);var Pn=(0,bt.Z)(yn);function yn(){var Sn;(0,st.Z)(this,yn);for(var Gn=arguments.length,Zn=new Array(Gn),Qn=0;Qn<Gn;Qn++)Zn[Qn]=arguments[Qn];return Sn=Pn.call.apply(Pn,[this].concat(Zn)),Sn.state={uid:be()},Sn.reqs={},Sn.fileInput=void 0,Sn._isMounted=void 0,Sn.onChange=function(ii){var ji=Sn.props,pn=ji.accept,Ji=ji.directory,Ki=ii.target.files,Gi=(0,Re.Z)(Ki).filter(function(gn){return!Ji||Be(gn,pn)});Sn.uploadFiles(Gi),Sn.reset()},Sn.onClick=function(ii){var ji=Sn.fileInput;if(ji){var pn=ii.target,Ji=Sn.props.onClick;if(pn&&pn.tagName==="BUTTON"){var Ki=ji.parentNode;Ki.focus(),pn.blur()}ji.click(),Ji&&Ji(ii)}},Sn.onKeyDown=function(ii){ii.key==="Enter"&&Sn.onClick(ii)},Sn.onFileDrop=function(ii){var ji=Sn.props.multiple;if(ii.preventDefault(),ii.type!=="dragover")if(Sn.props.directory)nt(Array.prototype.slice.call(ii.dataTransfer.items),Sn.uploadFiles,function(Ji){return Be(Ji,Sn.props.accept)});else{var pn=(0,Re.Z)(ii.dataTransfer.files).filter(function(Ji){return Be(Ji,Sn.props.accept)});ji===!1&&(pn=pn.slice(0,1)),Sn.uploadFiles(pn)}},Sn.uploadFiles=function(ii){var ji=(0,Re.Z)(ii),pn=ji.map(function(Ji){return Ji.uid=be(),Sn.processFile(Ji,ji)});Promise.all(pn).then(function(Ji){var Ki=Sn.props.onBatchStart;Ki==null||Ki(Ji.map(function(Gi){var gn=Gi.origin,oi=Gi.parsedFile;return{file:gn,parsedFile:oi}})),Ji.filter(function(Gi){return Gi.parsedFile!==null}).forEach(function(Gi){Sn.post(Gi)})})},Sn.processFile=function(){var ii=(0,Ae.Z)((0,yt.Z)().mark(function ji(pn,Ji){var Ki,Gi,gn,oi,Bi,$i,Ti,Qi,pr;return(0,yt.Z)().wrap(function(Vi){for(;;)switch(Vi.prev=Vi.next){case 0:if(Ki=Sn.props.beforeUpload,Gi=pn,!Ki){Vi.next=14;break}return Vi.prev=3,Vi.next=6,Ki(pn,Ji);case 6:Gi=Vi.sent,Vi.next=12;break;case 9:Vi.prev=9,Vi.t0=Vi.catch(3),Gi=!1;case 12:if(Gi!==!1){Vi.next=14;break}return Vi.abrupt("return",{origin:pn,parsedFile:null,action:null,data:null});case 14:if(gn=Sn.props.action,typeof gn!="function"){Vi.next=21;break}return Vi.next=18,gn(pn);case 18:oi=Vi.sent,Vi.next=22;break;case 21:oi=gn;case 22:if(Bi=Sn.props.data,typeof Bi!="function"){Vi.next=29;break}return Vi.next=26,Bi(pn);case 26:$i=Vi.sent,Vi.next=30;break;case 29:$i=Bi;case 30:return Ti=((0,jt.Z)(Gi)==="object"||typeof Gi=="string")&&Gi?Gi:pn,Ti instanceof File?Qi=Ti:Qi=new File([Ti],pn.name,{type:pn.type}),pr=Qi,pr.uid=pn.uid,Vi.abrupt("return",{origin:pn,data:$i,parsedFile:pr,action:oi});case 35:case"end":return Vi.stop()}},ji,null,[[3,9]])}));return function(ji,pn){return ii.apply(this,arguments)}}(),Sn.saveFileInput=function(ii){Sn.fileInput=ii},Sn}return(0,Me.Z)(yn,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Gn){var Zn=this,Qn=Gn.data,ii=Gn.origin,ji=Gn.action,pn=Gn.parsedFile;if(this._isMounted){var Ji=this.props,Ki=Ji.onStart,Gi=Ji.customRequest,gn=Ji.name,oi=Ji.headers,Bi=Ji.withCredentials,$i=Ji.method,Ti=ii.uid,Qi=Gi||se,pr={action:ji,filename:gn,data:Qn,file:pn,headers:oi,withCredentials:Bi,method:$i||"post",onProgress:function(Vi){var xr=Zn.props.onProgress;xr==null||xr(Vi,pn)},onSuccess:function(Vi,xr){var Rn=Zn.props.onSuccess;Rn==null||Rn(Vi,pn,xr),delete Zn.reqs[Ti]},onError:function(Vi,xr){var Rn=Zn.props.onError;Rn==null||Rn(Vi,xr,pn),delete Zn.reqs[Ti]}};Ki(ii),this.reqs[Ti]=Qi(pr)}}},{key:"reset",value:function(){this.setState({uid:be()})}},{key:"abort",value:function(Gn){var Zn=this.reqs;if(Gn){var Qn=Gn.uid?Gn.uid:Gn;Zn[Qn]&&Zn[Qn].abort&&Zn[Qn].abort(),delete Zn[Qn]}else Object.keys(Zn).forEach(function(ii){Zn[ii]&&Zn[ii].abort&&Zn[ii].abort(),delete Zn[ii]})}},{key:"render",value:function(){var Gn=this.props,Zn=Gn.component,Qn=Gn.prefixCls,ii=Gn.className,ji=Gn.disabled,pn=Gn.id,Ji=Gn.style,Ki=Gn.multiple,Gi=Gn.accept,gn=Gn.capture,oi=Gn.children,Bi=Gn.directory,$i=Gn.openFileDialogOnClick,Ti=Gn.onMouseEnter,Qi=Gn.onMouseLeave,pr=(0,lt.Z)(Gn,Je),hr=dt()((0,Ue.Z)((0,Ue.Z)((0,Ue.Z)({},Qn,!0),"".concat(Qn,"-disabled"),ji),ii,ii)),Vi=Bi?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},xr=ji?{}:{onClick:$i?this.onClick:function(){},onKeyDown:$i?this.onKeyDown:function(){},onMouseEnter:Ti,onMouseLeave:Qi,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return ge.createElement(Zn,(0,Ke.Z)({},xr,{className:hr,role:"button",style:Ji}),ge.createElement("input",(0,Ke.Z)({},(0,ne.Z)(pr,{aria:!0,data:!0}),{id:pn,disabled:ji,type:"file",ref:this.saveFileInput,onClick:function(Br){return Br.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:Gi},Vi,{multiple:Ki,onChange:this.onChange},gn!=null?{capture:gn}:{})),oi)}}]),yn}(ge.Component),He=xt;function Et(){}var tt=function(Ft){(0,kt.Z)(yn,Ft);var Pn=(0,bt.Z)(yn);function yn(){var Sn;(0,st.Z)(this,yn);for(var Gn=arguments.length,Zn=new Array(Gn),Qn=0;Qn<Gn;Qn++)Zn[Qn]=arguments[Qn];return Sn=Pn.call.apply(Pn,[this].concat(Zn)),Sn.uploader=void 0,Sn.saveUploader=function(ii){Sn.uploader=ii},Sn}return(0,Me.Z)(yn,[{key:"abort",value:function(Gn){this.uploader.abort(Gn)}},{key:"render",value:function(){return ge.createElement(He,(0,Ke.Z)({},this.props,{ref:this.saveUploader}))}}]),yn}(ge.Component);tt.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Et,onError:Et,onSuccess:Et,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var Ot=tt,gt=Ot,Ht=pe(18929),Xt=pe(4676),Ut=pe(36355),it=pe(1684),_e=pe(9763),Wt=pe(31724),Dn={icon:function(Pn,yn){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:yn}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:Pn}}]}},name:"file",theme:"twotone"},Bn=Dn,$t=pe(7657),ln=function(Pn,yn){return ge.createElement($t.Z,(0,Ke.Z)({},Pn,{ref:yn,icon:Bn}))},Tn=ge.forwardRef(ln),ei=Tn,Ln=pe(58617),Yn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},zt=Yn,wn=function(Pn,yn){return ge.createElement($t.Z,(0,Ke.Z)({},Pn,{ref:yn,icon:zt}))},$n=ge.forwardRef(wn),Yt=$n,tn={icon:function(Pn,yn){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:Pn}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:yn}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:yn}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:yn}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:Pn}}]}},name:"picture",theme:"twotone"},Gt=tn,Tt=function(Pn,yn){return ge.createElement($t.Z,(0,Ke.Z)({},Pn,{ref:yn,icon:Gt}))},ot=ge.forwardRef(Tt),Ze=ot,At=pe(77900),Dt=pe(56762),rt=pe(62892),et=pe(92343),Oe=pe(3113);function Pe(Ft){return Object.assign(Object.assign({},Ft),{lastModified:Ft.lastModified,lastModifiedDate:Ft.lastModifiedDate,name:Ft.name,size:Ft.size,type:Ft.type,uid:Ft.uid,percent:0,originFileObj:Ft})}function ve(Ft,Pn){const yn=(0,Re.Z)(Pn),Sn=yn.findIndex(Gn=>{let{uid:Zn}=Gn;return Zn===Ft.uid});return Sn===-1?yn.push(Ft):yn[Sn]=Ft,yn}function Fe(Ft,Pn){const yn=Ft.uid!==void 0?"uid":"name";return Pn.filter(Sn=>Sn[yn]===Ft[yn])[0]}function We(Ft,Pn){const yn=Ft.uid!==void 0?"uid":"name",Sn=Pn.filter(Gn=>Gn[yn]!==Ft[yn]);return Sn.length===Pn.length?null:Sn}const Ne=function(){const Pn=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),Sn=Pn[Pn.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(Sn)||[""])[0]},ft=Ft=>Ft.indexOf("image/")===0,sn=Ft=>{if(Ft.type&&!Ft.thumbUrl)return ft(Ft.type);const Pn=Ft.thumbUrl||Ft.url||"",yn=Ne(Pn);return/^data:image\//.test(Pn)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(yn)?!0:!(/^data:/.test(Pn)||yn)},un=200;function Pt(Ft){return new Promise(Pn=>{if(!Ft.type||!ft(Ft.type)){Pn("");return}const yn=document.createElement("canvas");yn.width=un,yn.height=un,yn.style.cssText=`position: fixed; left: 0; top: 0; width: ${un}px; height: ${un}px; z-index: 9999; display: none;`,document.body.appendChild(yn);const Sn=yn.getContext("2d"),Gn=new Image;if(Gn.onload=()=>{const{width:Zn,height:Qn}=Gn;let ii=un,ji=un,pn=0,Ji=0;Zn>Qn?(ji=Qn*(un/Zn),Ji=-(ji-ii)/2):(ii=Zn*(un/Qn),pn=-(ii-ji)/2),Sn.drawImage(Gn,pn,Ji,ii,ji);const Ki=yn.toDataURL();document.body.removeChild(yn),window.URL.revokeObjectURL(Gn.src),Pn(Ki)},Gn.crossOrigin="anonymous",Ft.type.startsWith("image/svg+xml")){const Zn=new FileReader;Zn.onload=()=>{Zn.result&&(Gn.src=Zn.result)},Zn.readAsDataURL(Ft)}else if(Ft.type.startsWith("image/gif")){const Zn=new FileReader;Zn.onload=()=>{Zn.result&&Pn(Zn.result)},Zn.readAsDataURL(Ft)}else Gn.src=window.URL.createObjectURL(Ft)})}var qt=pe(26227),Mn=pe(41464),hn=pe(15277),fn=pe(93948),ui=pe(6848),fi=ge.forwardRef((Ft,Pn)=>{let{prefixCls:yn,className:Sn,style:Gn,locale:Zn,listType:Qn,file:ii,items:ji,progress:pn,iconRender:Ji,actionIconRender:Ki,itemRender:Gi,isImgUrl:gn,showPreviewIcon:oi,showRemoveIcon:Bi,showDownloadIcon:$i,previewIcon:Ti,removeIcon:Qi,downloadIcon:pr,onPreview:hr,onDownload:Vi,onClose:xr}=Ft;var Rn,Br;const{status:_n}=ii,[Or,no]=ge.useState(_n);ge.useEffect(()=>{_n!=="removed"&&no(_n)},[_n]);const[br,mo]=ge.useState(!1);ge.useEffect(()=>{const Ro=setTimeout(()=>{mo(!0)},300);return()=>{clearTimeout(Ro)}},[]);const Jr=Ji(ii);let ur=ge.createElement("div",{className:`${yn}-icon`},Jr);if(Qn==="picture"||Qn==="picture-card"||Qn==="picture-circle")if(Or==="uploading"||!ii.thumbUrl&&!ii.url){const Ro=dt()(`${yn}-list-item-thumbnail`,{[`${yn}-list-item-file`]:Or!=="uploading"});ur=ge.createElement("div",{className:Ro},Jr)}else{const Ro=gn!=null&&gn(ii)?ge.createElement("img",{src:ii.thumbUrl||ii.url,alt:ii.name,className:`${yn}-list-item-image`,crossOrigin:ii.crossOrigin}):Jr,Mr=dt()(`${yn}-list-item-thumbnail`,{[`${yn}-list-item-file`]:gn&&!gn(ii)});ur=ge.createElement("a",{className:Mr,onClick:Nr=>hr(ii,Nr),href:ii.url||ii.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Ro)}const er=dt()(`${yn}-list-item`,`${yn}-list-item-${Or}`),qi=typeof ii.linkProps=="string"?JSON.parse(ii.linkProps):ii.linkProps,Rr=Bi?Ki((typeof Qi=="function"?Qi(ii):Qi)||ge.createElement(qt.Z,null),()=>xr(ii),yn,Zn.removeFile):null,Ii=$i&&Or==="done"?Ki((typeof pr=="function"?pr(ii):pr)||ge.createElement(Mn.Z,null),()=>Vi(ii),yn,Zn.downloadFile):null,Qe=Qn!=="picture-card"&&Qn!=="picture-circle"&&ge.createElement("span",{key:"download-delete",className:dt()(`${yn}-list-item-actions`,{picture:Qn==="picture"})},Ii,Rr),Qr=dt()(`${yn}-list-item-name`),lo=ii.url?[ge.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:Qr,title:ii.name},qi,{href:ii.url,onClick:Ro=>hr(ii,Ro)}),ii.name),Qe]:[ge.createElement("span",{key:"view",className:Qr,onClick:Ro=>hr(ii,Ro),title:ii.name},ii.name),Qe],jr={pointerEvents:"none",opacity:.5},vo=oi?ge.createElement("a",{href:ii.url||ii.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:ii.url||ii.thumbUrl?void 0:jr,onClick:Ro=>hr(ii,Ro),title:Zn.previewFile},typeof Ti=="function"?Ti(ii):Ti||ge.createElement(hn.Z,null)):null,po=(Qn==="picture-card"||Qn==="picture-circle")&&Or!=="uploading"&&ge.createElement("span",{className:`${yn}-list-item-actions`},vo,Or==="done"&&Ii,Rr),{getPrefixCls:Lr}=ge.useContext(Ut.E_),Fr=Lr(),uo=ge.createElement("div",{className:er},ur,lo,po,br&&ge.createElement(At.default,{motionName:`${Fr}-fade`,visible:Or==="uploading",motionDeadline:2e3},Ro=>{let{className:Mr}=Ro;const Nr="percent"in ii?ge.createElement(fn.Z,Object.assign({},pn,{type:"line",percent:ii.percent,"aria-label":ii["aria-label"],"aria-labelledby":ii["aria-labelledby"]})):null;return ge.createElement("div",{className:dt()(`${yn}-list-item-progress`,Mr)},Nr)})),qr=ii.response&&typeof ii.response=="string"?ii.response:((Rn=ii.error)===null||Rn===void 0?void 0:Rn.statusText)||((Br=ii.error)===null||Br===void 0?void 0:Br.message)||Zn.uploadError,zo=Or==="error"?ge.createElement(ui.Z,{title:qr,getPopupContainer:Ro=>Ro.parentNode},uo):uo;return ge.createElement("div",{className:dt()(`${yn}-list-item-container`,Sn),style:Gn,ref:Pn},Gi?Gi(zo,ii,ji,{download:Vi.bind(null,ii),preview:hr.bind(null,ii),remove:xr.bind(null,ii)}):zo)});const bi=(Ft,Pn)=>{const{listType:yn="text",previewFile:Sn=Pt,onPreview:Gn,onDownload:Zn,onRemove:Qn,locale:ii,iconRender:ji,isImageUrl:pn=sn,prefixCls:Ji,items:Ki=[],showPreviewIcon:Gi=!0,showRemoveIcon:gn=!0,showDownloadIcon:oi=!1,removeIcon:Bi,previewIcon:$i,downloadIcon:Ti,progress:Qi={size:[-1,2],showInfo:!1},appendAction:pr,appendActionVisible:hr=!0,itemRender:Vi,disabled:xr}=Ft,Rn=(0,Dt.Z)(),[Br,_n]=ge.useState(!1);ge.useEffect(()=>{yn!=="picture"&&yn!=="picture-card"&&yn!=="picture-circle"||(Ki||[]).forEach(jr=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(jr.originFileObj instanceof File||jr.originFileObj instanceof Blob)||jr.thumbUrl!==void 0||(jr.thumbUrl="",Sn&&Sn(jr.originFileObj).then(vo=>{jr.thumbUrl=vo||"",Rn()}))})},[yn,Ki,Sn]),ge.useEffect(()=>{_n(!0)},[]);const Or=(jr,vo)=>{if(Gn)return vo==null||vo.preventDefault(),Gn(jr)},no=jr=>{typeof Zn=="function"?Zn(jr):jr.url&&window.open(jr.url)},br=jr=>{Qn==null||Qn(jr)},mo=jr=>{if(ji)return ji(jr,yn);const vo=jr.status==="uploading",po=pn&&pn(jr)?ge.createElement(Ze,null):ge.createElement(ei,null);let Lr=vo?ge.createElement(Ln.Z,null):ge.createElement(Yt,null);return yn==="picture"?Lr=vo?ge.createElement(Ln.Z,null):po:(yn==="picture-card"||yn==="picture-circle")&&(Lr=vo?ii.uploading:po),Lr},Jr=(jr,vo,po,Lr)=>{const Fr={type:"text",size:"small",title:Lr,onClick:uo=>{vo(),(0,et.l$)(jr)&&jr.props.onClick&&jr.props.onClick(uo)},className:`${po}-list-item-action`,disabled:xr};if((0,et.l$)(jr)){const uo=(0,et.Tm)(jr,Object.assign(Object.assign({},jr.props),{onClick:()=>{}}));return ge.createElement(Oe.ZP,Object.assign({},Fr,{icon:uo}))}return ge.createElement(Oe.ZP,Object.assign({},Fr),ge.createElement("span",null,jr))};ge.useImperativeHandle(Pn,()=>({handlePreview:Or,handleDownload:no}));const{getPrefixCls:ur}=ge.useContext(Ut.E_),er=ur("upload",Ji),qi=ur(),Rr=dt()(`${er}-list`,`${er}-list-${yn}`),Ii=(0,Re.Z)(Ki.map(jr=>({key:jr.uid,file:jr})));let Qr={motionDeadline:2e3,motionName:`${er}-${yn==="picture-card"||yn==="picture-circle"?"animate-inline":"animate"}`,keys:Ii,motionAppear:Br};const lo=ge.useMemo(()=>{const jr=Object.assign({},(0,rt.Z)(qi));return delete jr.onAppearEnd,delete jr.onEnterEnd,delete jr.onLeaveEnd,jr},[qi]);return yn!=="picture-card"&&yn!=="picture-circle"&&(Qr=Object.assign(Object.assign({},lo),Qr)),ge.createElement("div",{className:Rr},ge.createElement(At.CSSMotionList,Object.assign({},Qr,{component:!1}),jr=>{let{key:vo,file:po,className:Lr,style:Fr}=jr;return ge.createElement(fi,{key:vo,locale:ii,prefixCls:er,className:Lr,style:Fr,file:po,items:Ki,progress:Qi,listType:yn,isImgUrl:pn,showPreviewIcon:Gi,showRemoveIcon:gn,showDownloadIcon:oi,removeIcon:Bi,previewIcon:$i,downloadIcon:Ti,iconRender:mo,actionIconRender:Jr,itemRender:Vi,onPreview:Or,onDownload:no,onClose:br})}),pr&&ge.createElement(At.default,Object.assign({},Qr,{visible:hr,forceRender:!0}),jr=>{let{className:vo,style:po}=jr;return(0,et.Tm)(pr,Lr=>({className:dt()(Lr.className,vo),style:Object.assign(Object.assign(Object.assign({},po),{pointerEvents:vo?"none":void 0}),Lr.style)}))}))};var rr=ge.forwardRef(bi),Wi=pe(17313),vr=pe(8378),fr=pe(83116),zi=pe(37613),Kn=Ft=>{const{componentCls:Pn,iconCls:yn}=Ft;return{[`${Pn}-wrapper`]:{[`${Pn}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:Ft.colorFillAlter,border:`${Ft.lineWidth}px dashed ${Ft.colorBorder}`,borderRadius:Ft.borderRadiusLG,cursor:"pointer",transition:`border-color ${Ft.motionDurationSlow}`,[Pn]:{padding:`${Ft.padding}px 0`},[`${Pn}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${Pn}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${Pn}-disabled):hover`]:{borderColor:Ft.colorPrimaryHover},[`p${Pn}-drag-icon`]:{marginBottom:Ft.margin,[yn]:{color:Ft.colorPrimary,fontSize:Ft.uploadThumbnailSize}},[`p${Pn}-text`]:{margin:`0 0 ${Ft.marginXXS}px`,color:Ft.colorTextHeading,fontSize:Ft.fontSizeLG},[`p${Pn}-hint`]:{color:Ft.colorTextDescription,fontSize:Ft.fontSize},[`&${Pn}-disabled`]:{cursor:"not-allowed",[`p${Pn}-drag-icon ${yn},
|
|
|
p${Pn}-text,
|
|
|
p${Pn}-hint
|
|
|
`]:{color:Ft.colorTextDisabled}}}}}},Ei=Ft=>{const{componentCls:Pn,antCls:yn,iconCls:Sn,fontSize:Gn,lineHeight:Zn}=Ft,Qn=`${Pn}-list-item`,ii=`${Qn}-actions`,ji=`${Qn}-action`,pn=Math.round(Gn*Zn);return{[`${Pn}-wrapper`]:{[`${Pn}-list`]:Object.assign(Object.assign({},(0,Wi.dF)()),{lineHeight:Ft.lineHeight,[Qn]:{position:"relative",height:Ft.lineHeight*Gn,marginTop:Ft.marginXS,fontSize:Gn,display:"flex",alignItems:"center",transition:`background-color ${Ft.motionDurationSlow}`,"&:hover":{backgroundColor:Ft.controlItemBgHover},[`${Qn}-name`]:Object.assign(Object.assign({},Wi.vS),{padding:`0 ${Ft.paddingXS}px`,lineHeight:Zn,flex:"auto",transition:`all ${Ft.motionDurationSlow}`}),[ii]:{[ji]:{opacity:0},[`${ji}${yn}-btn-sm`]:{height:pn,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
|
|
${ji}:focus-visible,
|
|
|
&.picture ${ji}
|
|
|
`]:{opacity:1},[Sn]:{color:Ft.actionsColor,transition:`all ${Ft.motionDurationSlow}`},[`&:hover ${Sn}`]:{color:Ft.colorText}},[`${Pn}-icon ${Sn}`]:{color:Ft.colorTextDescription,fontSize:Gn},[`${Qn}-progress`]:{position:"absolute",bottom:-Ft.uploadProgressOffset,width:"100%",paddingInlineStart:Gn+Ft.paddingXS,fontSize:Gn,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${Qn}:hover ${ji}`]:{opacity:1,color:Ft.colorText},[`${Qn}-error`]:{color:Ft.colorError,[`${Qn}-name, ${Pn}-icon ${Sn}`]:{color:Ft.colorError},[ii]:{[`${Sn}, ${Sn}:hover`]:{color:Ft.colorError},[ji]:{opacity:1}}},[`${Pn}-list-item-container`]:{transition:`opacity ${Ft.motionDurationSlow}, height ${Ft.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Ri=pe(93083),an=pe(1950);const di=new Ri.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),yi=new Ri.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var On=Ft=>{const{componentCls:Pn}=Ft,yn=`${Pn}-animate-inline`;return[{[`${Pn}-wrapper`]:{[`${yn}-appear, ${yn}-enter, ${yn}-leave`]:{animationDuration:Ft.motionDurationSlow,animationTimingFunction:Ft.motionEaseInOutCirc,animationFillMode:"forwards"},[`${yn}-appear, ${yn}-enter`]:{animationName:di},[`${yn}-leave`]:{animationName:yi}}},{[`${Pn}-wrapper`]:(0,an.J$)(Ft)},di,yi]},Un=pe(93398),It=pe(64993);const Kt=Ft=>{const{componentCls:Pn,iconCls:yn,uploadThumbnailSize:Sn,uploadProgressOffset:Gn}=Ft,Zn=`${Pn}-list`,Qn=`${Zn}-item`;return{[`${Pn}-wrapper`]:{[`
|
|
|
${Zn}${Zn}-picture,
|
|
|
${Zn}${Zn}-picture-card,
|
|
|
${Zn}${Zn}-picture-circle
|
|
|
`]:{[Qn]:{position:"relative",height:Sn+Ft.lineWidth*2+Ft.paddingXS*2,padding:Ft.paddingXS,border:`${Ft.lineWidth}px ${Ft.lineType} ${Ft.colorBorder}`,borderRadius:Ft.borderRadiusLG,"&:hover":{background:"transparent"},[`${Qn}-thumbnail`]:Object.assign(Object.assign({},Wi.vS),{width:Sn,height:Sn,lineHeight:`${Sn+Ft.paddingSM}px`,textAlign:"center",flex:"none",[yn]:{fontSize:Ft.fontSizeHeading2,color:Ft.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${Qn}-progress`]:{bottom:Gn,width:`calc(100% - ${Ft.paddingSM*2}px)`,marginTop:0,paddingInlineStart:Sn+Ft.paddingXS}},[`${Qn}-error`]:{borderColor:Ft.colorError,[`${Qn}-thumbnail ${yn}`]:{[`svg path[fill='${Un.blue[0]}']`]:{fill:Ft.colorErrorBg},[`svg path[fill='${Un.blue.primary}']`]:{fill:Ft.colorError}}},[`${Qn}-uploading`]:{borderStyle:"dashed",[`${Qn}-name`]:{marginBottom:Gn}}},[`${Zn}${Zn}-picture-circle ${Qn}`]:{[`&, &::before, ${Qn}-thumbnail`]:{borderRadius:"50%"}}}}},Ye=Ft=>{const{componentCls:Pn,iconCls:yn,fontSizeLG:Sn,colorTextLightSolid:Gn}=Ft,Zn=`${Pn}-list`,Qn=`${Zn}-item`,ii=Ft.uploadPicCardSize;return{[`
|
|
|
${Pn}-wrapper${Pn}-picture-card-wrapper,
|
|
|
${Pn}-wrapper${Pn}-picture-circle-wrapper
|
|
|
`]:Object.assign(Object.assign({},(0,Wi.dF)()),{display:"inline-block",width:"100%",[`${Pn}${Pn}-select`]:{width:ii,height:ii,marginInlineEnd:Ft.marginXS,marginBottom:Ft.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:Ft.colorFillAlter,border:`${Ft.lineWidth}px dashed ${Ft.colorBorder}`,borderRadius:Ft.borderRadiusLG,cursor:"pointer",transition:`border-color ${Ft.motionDurationSlow}`,[`> ${Pn}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${Pn}-disabled):hover`]:{borderColor:Ft.colorPrimary}},[`${Zn}${Zn}-picture-card, ${Zn}${Zn}-picture-circle`]:{[`${Zn}-item-container`]:{display:"inline-block",width:ii,height:ii,marginBlock:`0 ${Ft.marginXS}px`,marginInline:`0 ${Ft.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[Qn]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${Ft.paddingXS*2}px)`,height:`calc(100% - ${Ft.paddingXS*2}px)`,backgroundColor:Ft.colorBgMask,opacity:0,transition:`all ${Ft.motionDurationSlow}`,content:'" "'}},[`${Qn}:hover`]:{[`&::before, ${Qn}-actions`]:{opacity:1}},[`${Qn}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${Ft.motionDurationSlow}`,[`${yn}-eye, ${yn}-download, ${yn}-delete`]:{zIndex:10,width:Sn,margin:`0 ${Ft.marginXXS}px`,fontSize:Sn,cursor:"pointer",transition:`all ${Ft.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${Qn}-actions, ${Qn}-actions:hover`]:{[`${yn}-eye, ${yn}-download, ${yn}-delete`]:{color:new It.C(Gn).setAlpha(.65).toRgbString(),"&:hover":{color:Gn}}},[`${Qn}-thumbnail, ${Qn}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${Qn}-name`]:{display:"none",textAlign:"center"},[`${Qn}-file + ${Qn}-name`]:{position:"absolute",bottom:Ft.margin,display:"block",width:`calc(100% - ${Ft.paddingXS*2}px)`},[`${Qn}-uploading`]:{[`&${Qn}`]:{backgroundColor:Ft.colorFillAlter},[`&::before, ${yn}-eye, ${yn}-download, ${yn}-delete`]:{display:"none"}},[`${Qn}-progress`]:{bottom:Ft.marginXL,width:`calc(100% - ${Ft.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${Pn}-wrapper${Pn}-picture-circle-wrapper`]:{[`${Pn}${Pn}-select`]:{borderRadius:"50%"}}}};var xn=Ft=>{const{componentCls:Pn}=Ft;return{[`${Pn}-rtl`]:{direction:"rtl"}}};const Nt=Ft=>{const{componentCls:Pn,colorTextDisabled:yn}=Ft;return{[`${Pn}-wrapper`]:Object.assign(Object.assign({},(0,Wi.Wf)(Ft)),{[Pn]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${Pn}-select`]:{display:"inline-block"},[`${Pn}-disabled`]:{color:yn,cursor:"not-allowed"}})}};var at=(0,fr.Z)("Upload",Ft=>{const{fontSizeHeading3:Pn,fontSize:yn,lineHeight:Sn,lineWidth:Gn,controlHeightLG:Zn}=Ft,Qn=Math.round(yn*Sn),ii=(0,zi.TS)(Ft,{uploadThumbnailSize:Pn*2,uploadProgressOffset:Qn/2+Gn,uploadPicCardSize:Zn*2.55});return[Nt(ii),Kn(ii),Kt(ii),Ye(ii),Ei(ii),On(ii),xn(ii),(0,vr.Z)(ii)]},Ft=>({actionsColor:Ft.colorTextDescription})),cn=function(Ft,Pn,yn,Sn){function Gn(Zn){return Zn instanceof yn?Zn:new yn(function(Qn){Qn(Zn)})}return new(yn||(yn=Promise))(function(Zn,Qn){function ii(Ji){try{pn(Sn.next(Ji))}catch(Ki){Qn(Ki)}}function ji(Ji){try{pn(Sn.throw(Ji))}catch(Ki){Qn(Ki)}}function pn(Ji){Ji.done?Zn(Ji.value):Gn(Ji.value).then(ii,ji)}pn((Sn=Sn.apply(Ft,Pn||[])).next())})};const Nn=`__LIST_IGNORE_${Date.now()}__`,kn=(Ft,Pn)=>{const{fileList:yn,defaultFileList:Sn,onRemove:Gn,showUploadList:Zn=!0,listType:Qn="text",onPreview:ii,onDownload:ji,onChange:pn,onDrop:Ji,previewFile:Ki,disabled:Gi,locale:gn,iconRender:oi,isImageUrl:Bi,progress:$i,prefixCls:Ti,className:Qi,type:pr="select",children:hr,style:Vi,itemRender:xr,maxCount:Rn,data:Br={},multiple:_n=!1,action:Or="",accept:no="",supportServerRender:br=!0,rootClassName:mo}=Ft,Jr=ge.useContext(it.Z),ur=Gi!=null?Gi:Jr,[er,qi]=(0,Ht.Z)(Sn||[],{value:yn,postState:Zi=>Zi!=null?Zi:[]}),[Rr,Ii]=ge.useState("drop"),Qe=ge.useRef(null);ge.useMemo(()=>{const Zi=Date.now();(yn||[]).forEach((Ci,nr)=>{!Ci.uid&&!Object.isFrozen(Ci)&&(Ci.uid=`__AUTO__${Zi}_${nr}__`)})},[yn]);const Qr=(Zi,Ci,nr)=>{let or=(0,Re.Z)(Ci),cr=!1;Rn===1?or=or.slice(-1):Rn&&(cr=or.length>Rn,or=or.slice(0,Rn)),(0,Xt.flushSync)(()=>{qi(or)});const Pr={file:Zi,fileList:or};nr&&(Pr.event=nr),(!cr||or.some(Gr=>Gr.uid===Zi.uid))&&(0,Xt.flushSync)(()=>{pn==null||pn(Pr)})},lo=(Zi,Ci)=>cn(void 0,void 0,void 0,function*(){const{beforeUpload:nr,transformFile:or}=Ft;let cr=Zi;if(nr){const Pr=yield nr(Zi,Ci);if(Pr===!1)return!1;if(delete Zi[Nn],Pr===Nn)return Object.defineProperty(Zi,Nn,{value:!0,configurable:!0}),!1;typeof Pr=="object"&&Pr&&(cr=Pr)}return or&&(cr=yield or(cr)),cr}),jr=Zi=>{const Ci=Zi.filter(cr=>!cr.file[Nn]);if(!Ci.length)return;const nr=Ci.map(cr=>Pe(cr.file));let or=(0,Re.Z)(er);nr.forEach(cr=>{or=ve(cr,or)}),nr.forEach((cr,Pr)=>{let Gr=cr;if(Ci[Pr].parsedFile)cr.status="uploading";else{const{originFileObj:yr}=cr;let kr;try{kr=new File([yr],yr.name,{type:yr.type})}catch(Zr){kr=new Blob([yr],{type:yr.type}),kr.name=yr.name,kr.lastModifiedDate=new Date,kr.lastModified=new Date().getTime()}kr.uid=cr.uid,Gr=kr}Qr(Gr,or)})},vo=(Zi,Ci,nr)=>{try{typeof Zi=="string"&&(Zi=JSON.parse(Zi))}catch(Pr){}if(!Fe(Ci,er))return;const or=Pe(Ci);or.status="done",or.percent=100,or.response=Zi,or.xhr=nr;const cr=ve(or,er);Qr(or,cr)},po=(Zi,Ci)=>{if(!Fe(Ci,er))return;const nr=Pe(Ci);nr.status="uploading",nr.percent=Zi.percent;const or=ve(nr,er);Qr(nr,or,Zi)},Lr=(Zi,Ci,nr)=>{if(!Fe(nr,er))return;const or=Pe(nr);or.error=Zi,or.response=Ci,or.status="error";const cr=ve(or,er);Qr(or,cr)},Fr=Zi=>{let Ci;Promise.resolve(typeof Gn=="function"?Gn(Zi):Gn).then(nr=>{var or;if(nr===!1)return;const cr=We(Zi,er);cr&&(Ci=Object.assign(Object.assign({},Zi),{status:"removed"}),er==null||er.forEach(Pr=>{const Gr=Ci.uid!==void 0?"uid":"name";Pr[Gr]===Ci[Gr]&&!Object.isFrozen(Pr)&&(Pr.status="removed")}),(or=Qe.current)===null||or===void 0||or.abort(Ci),Qr(Ci,cr))})},uo=Zi=>{Ii(Zi.type),Zi.type==="drop"&&(Ji==null||Ji(Zi))};ge.useImperativeHandle(Pn,()=>({onBatchStart:jr,onSuccess:vo,onProgress:po,onError:Lr,fileList:er,upload:Qe.current}));const{getPrefixCls:qr,direction:zo,upload:Ro}=ge.useContext(Ut.E_),Mr=qr("upload",Ti),Nr=Object.assign(Object.assign({onBatchStart:jr,onError:Lr,onProgress:po,onSuccess:vo},Ft),{data:Br,multiple:_n,action:Or,accept:no,supportServerRender:br,prefixCls:Mr,disabled:ur,beforeUpload:lo,onChange:void 0});delete Nr.className,delete Nr.style,(!hr||ur)&&delete Nr.id;const[pi,Tr]=at(Mr),[Bo]=(0,_e.Z)("Upload",Wt.Z.Upload),{showRemoveIcon:aa,showPreviewIcon:Ho,showDownloadIcon:Ao,removeIcon:_o,previewIcon:ta,downloadIcon:Ea}=typeof Zn=="boolean"?{}:Zn,Mt=(Zi,Ci)=>Zn?ge.createElement(rr,{prefixCls:Mr,listType:Qn,items:er,previewFile:Ki,onPreview:ii,onDownload:ji,onRemove:Fr,showRemoveIcon:!ur&&aa,showPreviewIcon:Ho,showDownloadIcon:Ao,removeIcon:_o,previewIcon:ta,downloadIcon:Ea,iconRender:oi,locale:Object.assign(Object.assign({},Bo),gn),isImageUrl:Bi,progress:$i,appendAction:Zi,appendActionVisible:Ci,itemRender:xr,disabled:ur}):Zi,Pi=dt()(`${Mr}-wrapper`,Qi,mo,Tr,Ro==null?void 0:Ro.className,{[`${Mr}-rtl`]:zo==="rtl",[`${Mr}-picture-card-wrapper`]:Qn==="picture-card",[`${Mr}-picture-circle-wrapper`]:Qn==="picture-circle"}),_t=Object.assign(Object.assign({},Ro==null?void 0:Ro.style),Vi);if(pr==="drag"){const Zi=dt()(Tr,Mr,`${Mr}-drag`,{[`${Mr}-drag-uploading`]:er.some(Ci=>Ci.status==="uploading"),[`${Mr}-drag-hover`]:Rr==="dragover",[`${Mr}-disabled`]:ur,[`${Mr}-rtl`]:zo==="rtl"});return pi(ge.createElement("span",{className:Pi},ge.createElement("div",{className:Zi,style:_t,onDrop:uo,onDragOver:uo,onDragLeave:uo},ge.createElement(gt,Object.assign({},Nr,{ref:Qe,className:`${Mr}-btn`}),ge.createElement("div",{className:`${Mr}-drag-container`},hr))),Mt()))}const Xi=dt()(Mr,`${Mr}-select`,{[`${Mr}-disabled`]:ur}),Sr=(Zi=>ge.createElement("div",{className:Xi,style:Zi},ge.createElement(gt,Object.assign({},Nr,{ref:Qe}))))(hr?void 0:{display:"none"});return pi(Qn==="picture-card"||Qn==="picture-circle"?ge.createElement("span",{className:Pi},Mt(Sr,!!hr)):ge.createElement("span",{className:Pi},Sr,Mt()))};var St=ge.forwardRef(kn),An=function(Ft,Pn){var yn={};for(var Sn in Ft)Object.prototype.hasOwnProperty.call(Ft,Sn)&&Pn.indexOf(Sn)<0&&(yn[Sn]=Ft[Sn]);if(Ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gn=0,Sn=Object.getOwnPropertySymbols(Ft);Gn<Sn.length;Gn++)Pn.indexOf(Sn[Gn])<0&&Object.prototype.propertyIsEnumerable.call(Ft,Sn[Gn])&&(yn[Sn[Gn]]=Ft[Sn[Gn]]);return yn},Si=ge.forwardRef((Ft,Pn)=>{var{style:yn,height:Sn}=Ft,Gn=An(Ft,["style","height"]);return ge.createElement(St,Object.assign({ref:Pn},Gn,{type:"drag",style:Object.assign(Object.assign({},yn),{height:Sn})}))});const rn=St;rn.Dragger=Si,rn.LIST_IGNORE=Nn;var bn=rn},99498:function(Vn,Cn,pe){(function(ge){ge(pe(89780))})(function(ge){ge.defineOption("placeholder","",function(kt,bt,Ue){var lt=Ue&&Ue!=ge.Init;if(bt&&!lt)kt.on("blur",Ke),kt.on("change",st),kt.on("swapDoc",st),ge.on(kt.getInputField(),"compositionupdate",kt.state.placeholderCompose=function(){dt(kt)}),st(kt);else if(!bt&<){kt.off("blur",Ke),kt.off("change",st),kt.off("swapDoc",st),ge.off(kt.getInputField(),"compositionupdate",kt.state.placeholderCompose),Re(kt);var yt=kt.getWrapperElement();yt.className=yt.className.replace(" CodeMirror-empty","")}bt&&!kt.hasFocus()&&Ke(kt)});function Re(kt){kt.state.placeholder&&(kt.state.placeholder.parentNode.removeChild(kt.state.placeholder),kt.state.placeholder=null)}function Ve(kt){Re(kt);var bt=kt.state.placeholder=document.createElement("pre");bt.style.cssText="height: 0; overflow: visible",bt.style.direction=kt.getOption("direction"),bt.className="CodeMirror-placeholder CodeMirror-line-like";var Ue=kt.getOption("placeholder");typeof Ue=="string"&&(Ue=document.createTextNode(Ue)),bt.appendChild(Ue),kt.display.lineSpace.insertBefore(bt,kt.display.lineSpace.firstChild)}function dt(kt){setTimeout(function(){var bt=!1,Ue=kt.getInputField();Ue.nodeName=="TEXTAREA"?bt=!Ue.value:kt.lineCount()==1&&(bt=!/[^\u200b]/.test(Ue.querySelector(".CodeMirror-line").textContent)),bt?Ve(kt):Re(kt)},20)}function Ke(kt){Me(kt)&&Ve(kt)}function st(kt){var bt=kt.getWrapperElement(),Ue=Me(kt);bt.className=bt.className.replace(" CodeMirror-empty","")+(Ue?" CodeMirror-empty":""),Ue?Ve(kt):Re(kt)}function Me(kt){return kt.lineCount()===1&&kt.getLine(0)===""}})},25717:function(Vn,Cn,pe){(function(ge){ge(pe(89780))})(function(ge){var Re={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ve=ge.Pos;ge.defineOption("autoCloseBrackets",!1,function(ne,ee,ce){ce&&ce!=ge.Init&&(ne.removeKeyMap(Ke),ne.state.closeBrackets=null),ee&&(st(dt(ee,"pairs")),ne.state.closeBrackets=ee,ne.addKeyMap(Ke))});function dt(ne,ee){return ee=="pairs"&&typeof ne=="string"?ne:typeof ne=="object"&&ne[ee]!=null?ne[ee]:Re[ee]}var Ke={Backspace:bt,Enter:Ue};function st(ne){for(var ee=0;ee<ne.length;ee++){var ce=ne.charAt(ee),se="'"+ce+"'";Ke[se]||(Ke[se]=Me(ce))}}st(Re.pairs+"`");function Me(ne){return function(ee){return yt(ee,ne)}}function kt(ne){var ee=ne.state.closeBrackets;if(!ee||ee.override)return ee;var ce=ne.getModeAt(ne.getCursor());return ce.closeBrackets||ee}function bt(ne){var ee=kt(ne);if(!ee||ne.getOption("disableInput"))return ge.Pass;for(var ce=dt(ee,"pairs"),se=ne.listSelections(),fe=0;fe<se.length;fe++){if(!se[fe].empty())return ge.Pass;var ye=jt(ne,se[fe].head);if(!ye||ce.indexOf(ye)%2!=0)return ge.Pass}for(var fe=se.length-1;fe>=0;fe--){var be=se[fe].head;ne.replaceRange("",Ve(be.line,be.ch-1),Ve(be.line,be.ch+1),"+delete")}}function Ue(ne){var ee=kt(ne),ce=ee&&dt(ee,"explode");if(!ce||ne.getOption("disableInput"))return ge.Pass;for(var se=ne.listSelections(),fe=0;fe<se.length;fe++){if(!se[fe].empty())return ge.Pass;var ye=jt(ne,se[fe].head);if(!ye||ce.indexOf(ye)%2!=0)return ge.Pass}ne.operation(function(){var be=ne.lineSeparator()||`
|
|
|
`;ne.replaceSelection(be+be,null),ne.execCommand("goCharLeft"),se=ne.listSelections();for(var Te=0;Te<se.length;Te++){var Be=se[Te].head.line;ne.indentLine(Be,null,!0),ne.indentLine(Be+1,null,!0)}})}function lt(ne){var ee=ge.cmpPos(ne.anchor,ne.head)>0;return{anchor:new Ve(ne.anchor.line,ne.anchor.ch+(ee?-1:1)),head:new Ve(ne.head.line,ne.head.ch+(ee?1:-1))}}function yt(ne,ee){var ce=kt(ne);if(!ce||ne.getOption("disableInput"))return ge.Pass;var se=dt(ce,"pairs"),fe=se.indexOf(ee);if(fe==-1)return ge.Pass;for(var ye=dt(ce,"closeBefore"),be=dt(ce,"triples"),Te=se.charAt(fe+1)==ee,Be=ne.listSelections(),ze=fe%2==0,Ge,nt=0;nt<Be.length;nt++){var Je=Be[nt],xt=Je.head,He,Et=ne.getRange(xt,Ve(xt.line,xt.ch+1));if(ze&&!Je.empty())He="surround";else if((Te||!ze)&&Et==ee)Te&&Ae(ne,xt)?He="both":be.indexOf(ee)>=0&&ne.getRange(xt,Ve(xt.line,xt.ch+3))==ee+ee+ee?He="skipThree":He="skip";else if(Te&&xt.ch>1&&be.indexOf(ee)>=0&&ne.getRange(Ve(xt.line,xt.ch-2),xt)==ee+ee){if(xt.ch>2&&/\bstring/.test(ne.getTokenTypeAt(Ve(xt.line,xt.ch-2))))return ge.Pass;He="addFour"}else if(Te){var tt=xt.ch==0?" ":ne.getRange(Ve(xt.line,xt.ch-1),xt);if(!ge.isWordChar(Et)&&tt!=ee&&!ge.isWordChar(tt))He="both";else return ge.Pass}else if(ze&&(Et.length===0||/\s/.test(Et)||ye.indexOf(Et)>-1))He="both";else return ge.Pass;if(!Ge)Ge=He;else if(Ge!=He)return ge.Pass}var Ot=fe%2?se.charAt(fe-1):ee,gt=fe%2?ee:se.charAt(fe+1);ne.operation(function(){if(Ge=="skip")ne.execCommand("goCharRight");else if(Ge=="skipThree")for(var Ht=0;Ht<3;Ht++)ne.execCommand("goCharRight");else if(Ge=="surround"){for(var Xt=ne.getSelections(),Ht=0;Ht<Xt.length;Ht++)Xt[Ht]=Ot+Xt[Ht]+gt;ne.replaceSelections(Xt,"around"),Xt=ne.listSelections().slice();for(var Ht=0;Ht<Xt.length;Ht++)Xt[Ht]=lt(Xt[Ht]);ne.setSelections(Xt)}else Ge=="both"?(ne.replaceSelection(Ot+gt,null),ne.triggerElectric(Ot+gt),ne.execCommand("goCharLeft")):Ge=="addFour"&&(ne.replaceSelection(Ot+Ot+Ot+Ot,"before"),ne.execCommand("goCharRight"))})}function jt(ne,ee){var ce=ne.getRange(Ve(ee.line,ee.ch-1),Ve(ee.line,ee.ch+1));return ce.length==2?ce:null}function Ae(ne,ee){var ce=ne.getTokenAt(Ve(ee.line,ee.ch+1));return/\bstring/.test(ce.type)&&ce.start==ee.ch&&(ee.ch==0||!/\bstring/.test(ne.getTokenTypeAt(ee)))}})},6313:function(Vn,Cn,pe){(function(ge){ge(pe(89780),pe(32855))})(function(ge){ge.defineOption("autoCloseTags",!1,function(bt,Ue,lt){if(lt!=ge.Init&<&&bt.removeKeyMap("autoCloseTags"),!!Ue){var yt={name:"autoCloseTags"};(typeof Ue!="object"||Ue.whenClosing!==!1)&&(yt["'/'"]=function(jt){return st(jt)}),(typeof Ue!="object"||Ue.whenOpening!==!1)&&(yt["'>'"]=function(jt){return dt(jt)}),bt.addKeyMap(yt)}});var Re=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ve=["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 dt(bt){if(bt.getOption("disableInput"))return ge.Pass;for(var Ue=bt.listSelections(),lt=[],yt=bt.getOption("autoCloseTags"),jt=0;jt<Ue.length;jt++){if(!Ue[jt].empty())return ge.Pass;var Ae=Ue[jt].head,ne=bt.getTokenAt(Ae),ee=ge.innerMode(bt.getMode(),ne.state),ce=ee.state,se=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(ce),fe=se&&se.name;if(!fe)return ge.Pass;var ye=ee.mode.configuration=="html",be=typeof yt=="object"&&yt.dontCloseTags||ye&&Re,Te=typeof yt=="object"&&yt.indentTags||ye&&Ve;ne.end>Ae.ch&&(fe=fe.slice(0,fe.length-ne.end+Ae.ch));var Be=fe.toLowerCase();if(!fe||ne.type=="string"&&(ne.end!=Ae.ch||!/[\"\']/.test(ne.string.charAt(ne.string.length-1))||ne.string.length==1)||ne.type=="tag"&&se.close||ne.string.indexOf("/")==Ae.ch-ne.start-1||be&&Me(be,Be)>-1||kt(bt,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(ce)||[],fe,Ae,!0))return ge.Pass;var ze=typeof yt=="object"&&yt.emptyTags;if(ze&&Me(ze,fe)>-1){lt[jt]={text:"/>",newPos:ge.Pos(Ae.line,Ae.ch+2)};continue}var Ge=Te&&Me(Te,Be)>-1;lt[jt]={indent:Ge,text:">"+(Ge?`
|
|
|
|
|
|
`:"")+"</"+fe+">",newPos:Ge?ge.Pos(Ae.line+1,0):ge.Pos(Ae.line,Ae.ch+1)}}for(var nt=typeof yt=="object"&&yt.dontIndentOnAutoClose,jt=Ue.length-1;jt>=0;jt--){var Je=lt[jt];bt.replaceRange(Je.text,Ue[jt].head,Ue[jt].anchor,"+insert");var xt=bt.listSelections().slice(0);xt[jt]={head:Je.newPos,anchor:Je.newPos},bt.setSelections(xt),!nt&&Je.indent&&(bt.indentLine(Je.newPos.line,null,!0),bt.indentLine(Je.newPos.line+1,null,!0))}}function Ke(bt,Ue){for(var lt=bt.listSelections(),yt=[],jt=Ue?"/":"</",Ae=bt.getOption("autoCloseTags"),ne=typeof Ae=="object"&&Ae.dontIndentOnSlash,ee=0;ee<lt.length;ee++){if(!lt[ee].empty())return ge.Pass;var ce=lt[ee].head,se=bt.getTokenAt(ce),fe=ge.innerMode(bt.getMode(),se.state),ye=fe.state;if(Ue&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=ce.ch-1))return ge.Pass;var be,Te=fe.mode.name!="xml"&&bt.getMode().name=="htmlmixed";if(Te&&fe.mode.name=="javascript")be=jt+"script";else if(Te&&fe.mode.name=="css")be=jt+"style";else{var Be=fe.mode.xmlCurrentContext&&fe.mode.xmlCurrentContext(ye);if(!Be||Be.length&&kt(bt,Be,Be[Be.length-1],ce))return ge.Pass;be=jt+Be[Be.length-1]}bt.getLine(ce.line).charAt(se.end)!=">"&&(be+=">"),yt[ee]=be}if(bt.replaceSelections(yt),lt=bt.listSelections(),!ne)for(var ee=0;ee<lt.length;ee++)(ee==lt.length-1||lt[ee].head.line<lt[ee+1].head.line)&&bt.indentLine(lt[ee].head.line)}function st(bt){return bt.getOption("disableInput")?ge.Pass:Ke(bt,!0)}ge.commands.closeTag=function(bt){return Ke(bt)};function Me(bt,Ue){if(bt.indexOf)return bt.indexOf(Ue);for(var lt=0,yt=bt.length;lt<yt;++lt)if(bt[lt]==Ue)return lt;return-1}function kt(bt,Ue,lt,yt,jt){if(!ge.scanForClosingTag)return!1;var Ae=Math.min(bt.lastLine()+1,yt.line+500),ne=ge.scanForClosingTag(bt,yt,null,Ae);if(!ne||ne.tag!=lt)return!1;for(var ee=jt?1:0,ce=Ue.length-1;ce>=0&&Ue[ce]==lt;ce--)++ee;yt=ne.to;for(var ce=1;ce<ee;ce++){var se=ge.scanForClosingTag(bt,yt,null,Ae);if(!se||se.tag!=lt)return!1;yt=se.to}return!0}})},32855:function(Vn,Cn,pe){(function(ge){ge(pe(89780))})(function(ge){"use strict";var Re=ge.Pos;function Ve(ce,se){return ce.line-se.line||ce.ch-se.ch}var dt="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",Ke=dt+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",st=new RegExp("<(/?)(["+dt+"]["+Ke+"]*)","g");function Me(ce,se,fe,ye){this.line=se,this.ch=fe,this.cm=ce,this.text=ce.getLine(se),this.min=ye?Math.max(ye.from,ce.firstLine()):ce.firstLine(),this.max=ye?Math.min(ye.to-1,ce.lastLine()):ce.lastLine()}function kt(ce,se){var fe=ce.cm.getTokenTypeAt(Re(ce.line,se));return fe&&/\btag\b/.test(fe)}function bt(ce){if(!(ce.line>=ce.max))return ce.ch=0,ce.text=ce.cm.getLine(++ce.line),!0}function Ue(ce){if(!(ce.line<=ce.min))return ce.text=ce.cm.getLine(--ce.line),ce.ch=ce.text.length,!0}function lt(ce){for(;;){var se=ce.text.indexOf(">",ce.ch);if(se==-1){if(bt(ce))continue;return}if(!kt(ce,se+1)){ce.ch=se+1;continue}var fe=ce.text.lastIndexOf("/",se),ye=fe>-1&&!/\S/.test(ce.text.slice(fe+1,se));return ce.ch=se+1,ye?"selfClose":"regular"}}function yt(ce){for(;;){var se=ce.ch?ce.text.lastIndexOf("<",ce.ch-1):-1;if(se==-1){if(Ue(ce))continue;return}if(!kt(ce,se+1)){ce.ch=se;continue}st.lastIndex=se,ce.ch=se;var fe=st.exec(ce.text);if(fe&&fe.index==se)return fe}}function jt(ce){for(;;){st.lastIndex=ce.ch;var se=st.exec(ce.text);if(!se){if(bt(ce))continue;return}if(!kt(ce,se.index+1)){ce.ch=se.index+1;continue}return ce.ch=se.index+se[0].length,se}}function Ae(ce){for(;;){var se=ce.ch?ce.text.lastIndexOf(">",ce.ch-1):-1;if(se==-1){if(Ue(ce))continue;return}if(!kt(ce,se+1)){ce.ch=se;continue}var fe=ce.text.lastIndexOf("/",se),ye=fe>-1&&!/\S/.test(ce.text.slice(fe+1,se));return ce.ch=se+1,ye?"selfClose":"regular"}}function ne(ce,se){for(var fe=[];;){var ye=jt(ce),be,Te=ce.line,Be=ce.ch-(ye?ye[0].length:0);if(!ye||!(be=lt(ce)))return;if(be!="selfClose")if(ye[1]){for(var ze=fe.length-1;ze>=0;--ze)if(fe[ze]==ye[2]){fe.length=ze;break}if(ze<0&&(!se||se==ye[2]))return{tag:ye[2],from:Re(Te,Be),to:Re(ce.line,ce.ch)}}else fe.push(ye[2])}}function ee(ce,se){for(var fe=[];;){var ye=Ae(ce);if(!ye)return;if(ye=="selfClose"){yt(ce);continue}var be=ce.line,Te=ce.ch,Be=yt(ce);if(!Be)return;if(Be[1])fe.push(Be[2]);else{for(var ze=fe.length-1;ze>=0;--ze)if(fe[ze]==Be[2]){fe.length=ze;break}if(ze<0&&(!se||se==Be[2]))return{tag:Be[2],from:Re(ce.line,ce.ch),to:Re(be,Te)}}}}ge.registerHelper("fold","xml",function(ce,se){for(var fe=new Me(ce,se.line,0);;){var ye=jt(fe);if(!ye||fe.line!=se.line)return;var be=lt(fe);if(!be)return;if(!ye[1]&&be!="selfClose"){var Te=Re(fe.line,fe.ch),Be=ne(fe,ye[2]);return Be&&Ve(Be.from,Te)>0?{from:Te,to:Be.from}:null}}}),ge.findMatchingTag=function(ce,se,fe){var ye=new Me(ce,se.line,se.ch,fe);if(!(ye.text.indexOf(">")==-1&&ye.text.indexOf("<")==-1)){var be=lt(ye),Te=be&&Re(ye.line,ye.ch),Be=be&&yt(ye);if(!(!be||!Be||Ve(ye,se)>0)){var ze={from:Re(ye.line,ye.ch),to:Te,tag:Be[2]};return be=="selfClose"?{open:ze,close:null,at:"open"}:Be[1]?{open:ee(ye,Be[2]),close:ze,at:"close"}:(ye=new Me(ce,Te.line,Te.ch,fe),{open:ze,close:ne(ye,Be[2]),at:"open"})}}},ge.findEnclosingTag=function(ce,se,fe,ye){for(var be=new Me(ce,se.line,se.ch,fe);;){var Te=ee(be,ye);if(!Te)break;var Be=new Me(ce,se.line,se.ch,fe),ze=ne(Be,Te.tag);if(ze)return{open:Te,close:ze}}},ge.scanForClosingTag=function(ce,se,fe,ye){var be=new Me(ce,se.line,se.ch,ye?{from:0,to:ye}:null);return ne(be,fe)}})},89780:function(Vn){(function(Cn,pe){Vn.exports=pe()})(this,function(){"use strict";var Cn=navigator.userAgent,pe=navigator.platform,ge=/gecko\/\d/i.test(Cn),Re=/MSIE \d/.test(Cn),Ve=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Cn),dt=/Edge\/(\d+)/.exec(Cn),Ke=Re||Ve||dt,st=Ke&&(Re?document.documentMode||6:+(dt||Ve)[1]),Me=!dt&&/WebKit\//.test(Cn),kt=Me&&/Qt\/\d+\.\d+/.test(Cn),bt=!dt&&/Chrome\//.test(Cn),Ue=/Opera\//.test(Cn),lt=/Apple Computer/.test(navigator.vendor),yt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Cn),jt=/PhantomJS/.test(Cn),Ae=!dt&&/AppleWebKit/.test(Cn)&&/Mobile\/\w+/.test(Cn),ne=/Android/.test(Cn),ee=Ae||ne||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Cn),ce=Ae||/Mac/.test(pe),se=/\bCrOS\b/.test(Cn),fe=/win/i.test(pe),ye=Ue&&Cn.match(/Version\/(\d*\.\d*)/);ye&&(ye=Number(ye[1])),ye&&ye>=15&&(Ue=!1,Me=!0);var be=ce&&(kt||Ue&&(ye==null||ye<12.11)),Te=ge||Ke&&st>=9;function Be(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var ze=function(ie,ae){var he=ie.className,de=Be(ae).exec(he);if(de){var Se=he.slice(de.index+de[0].length);ie.className=he.slice(0,de.index)+(Se?de[1]+Se:"")}};function Ge(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function nt(ie,ae){return Ge(ie).appendChild(ae)}function Je(ie,ae,he,de){var Se=document.createElement(ie);if(he&&(Se.className=he),de&&(Se.style.cssText=de),typeof ae=="string")Se.appendChild(document.createTextNode(ae));else if(ae)for(var Ie=0;Ie<ae.length;++Ie)Se.appendChild(ae[Ie]);return Se}function xt(ie,ae,he,de){var Se=Je(ie,ae,he,de);return Se.setAttribute("role","presentation"),Se}var He;document.createRange?He=function(ie,ae,he,de){var Se=document.createRange();return Se.setEnd(de||ie,he),Se.setStart(ie,ae),Se}:He=function(ie,ae,he){var de=document.body.createTextRange();try{de.moveToElementText(ie.parentNode)}catch(Se){return de}return de.collapse(!0),de.moveEnd("character",he),de.moveStart("character",ae),de};function Et(ie,ae){if(ae.nodeType==3&&(ae=ae.parentNode),ie.contains)return ie.contains(ae);do if(ae.nodeType==11&&(ae=ae.host),ae==ie)return!0;while(ae=ae.parentNode)}function tt(){var ie;try{ie=document.activeElement}catch(ae){ie=document.body||null}for(;ie&&ie.shadowRoot&&ie.shadowRoot.activeElement;)ie=ie.shadowRoot.activeElement;return ie}function Ot(ie,ae){var he=ie.className;Be(ae).test(he)||(ie.className+=(he?" ":"")+ae)}function gt(ie,ae){for(var he=ie.split(" "),de=0;de<he.length;de++)he[de]&&!Be(he[de]).test(ae)&&(ae+=" "+he[de]);return ae}var Ht=function(ie){ie.select()};Ae?Ht=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:Ke&&(Ht=function(ie){try{ie.select()}catch(ae){}});function Xt(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function Ut(ie,ae,he){ae||(ae={});for(var de in ie)ie.hasOwnProperty(de)&&(he!==!1||!ae.hasOwnProperty(de))&&(ae[de]=ie[de]);return ae}function it(ie,ae,he,de,Se){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var Ie=de||0,Xe=Se||0;;){var ht=ie.indexOf(" ",Ie);if(ht<0||ht>=ae)return Xe+(ae-Ie);Xe+=ht-Ie,Xe+=he-Xe%he,Ie=ht+1}}var _e=function(){this.id=null,this.f=null,this.time=0,this.handler=Xt(this.onTimeout,this)};_e.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},_e.prototype.set=function(ie,ae){this.f=ae;var he=+new Date+ie;(!this.id||he<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=he)};function Wt(ie,ae){for(var he=0;he<ie.length;++he)if(ie[he]==ae)return he;return-1}var Dn=50,Bn={toString:function(){return"CodeMirror.Pass"}},$t={scroll:!1},ln={origin:"*mouse"},Tn={origin:"+move"};function ei(ie,ae,he){for(var de=0,Se=0;;){var Ie=ie.indexOf(" ",de);Ie==-1&&(Ie=ie.length);var Xe=Ie-de;if(Ie==ie.length||Se+Xe>=ae)return de+Math.min(Xe,ae-Se);if(Se+=Ie-de,Se+=he-Se%he,de=Ie+1,Se>=ae)return de}}var Ln=[""];function Yn(ie){for(;Ln.length<=ie;)Ln.push(zt(Ln)+" ");return Ln[ie]}function zt(ie){return ie[ie.length-1]}function wn(ie,ae){for(var he=[],de=0;de<ie.length;de++)he[de]=ae(ie[de],de);return he}function $n(ie,ae,he){for(var de=0,Se=he(ae);de<ie.length&&he(ie[de])<=Se;)de++;ie.splice(de,0,ae)}function Yt(){}function tn(ie,ae){var he;return Object.create?he=Object.create(ie):(Yt.prototype=ie,he=new Yt),ae&&Ut(ae,he),he}var Gt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Tt(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Gt.test(ie))}function ot(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&Tt(ie)?!0:ae.test(ie):Tt(ie)}function Ze(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var At=/[\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 Dt(ie){return ie.charCodeAt(0)>=768&&At.test(ie)}function rt(ie,ae,he){for(;(he<0?ae>0:ae<ie.length)&&Dt(ie.charAt(ae));)ae+=he;return ae}function et(ie,ae,he){for(var de=ae>he?-1:1;;){if(ae==he)return ae;var Se=(ae+he)/2,Ie=de<0?Math.ceil(Se):Math.floor(Se);if(Ie==ae)return ie(Ie)?ae:he;ie(Ie)?he=Ie:ae=Ie+de}}function Oe(ie,ae,he,de){if(!ie)return de(ae,he,"ltr",0);for(var Se=!1,Ie=0;Ie<ie.length;++Ie){var Xe=ie[Ie];(Xe.from<he&&Xe.to>ae||ae==he&&Xe.to==ae)&&(de(Math.max(Xe.from,ae),Math.min(Xe.to,he),Xe.level==1?"rtl":"ltr",Ie),Se=!0)}Se||de(ae,he,"ltr")}var Pe=null;function ve(ie,ae,he){var de;Pe=null;for(var Se=0;Se<ie.length;++Se){var Ie=ie[Se];if(Ie.from<ae&&Ie.to>ae)return Se;Ie.to==ae&&(Ie.from!=Ie.to&&he=="before"?de=Se:Pe=Se),Ie.from==ae&&(Ie.from!=Ie.to&&he!="before"?de=Se:Pe=Se)}return de!=null?de:Pe}var Fe=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function he(Zt){return Zt<=247?ie.charAt(Zt):1424<=Zt&&Zt<=1524?"R":1536<=Zt&&Zt<=1785?ae.charAt(Zt-1536):1774<=Zt&&Zt<=2220?"r":8192<=Zt&&Zt<=8203?"w":Zt==8204?"b":"L"}var de=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Se=/[stwN]/,Ie=/[LRr]/,Xe=/[Lb1n]/,ht=/[1n]/;function ut(Zt,zn,Qt){this.level=Zt,this.from=zn,this.to=Qt}return function(Zt,zn){var Qt=zn=="ltr"?"L":"R";if(Zt.length==0||zn=="ltr"&&!de.test(Zt))return!1;for(var ci=Zt.length,ai=[],tr=0;tr<ci;++tr)ai.push(he(Zt.charCodeAt(tr)));for(var lr=0,wr=Qt;lr<ci;++lr){var Vr=ai[lr];Vr=="m"?ai[lr]=wr:wr=Vr}for(var yo=0,ao=Qt;yo<ci;++yo){var Eo=ai[yo];Eo=="1"&&ao=="r"?ai[yo]="n":Ie.test(Eo)&&(ao=Eo,Eo=="r"&&(ai[yo]="R"))}for(var Qo=1,so=ai[0];Qo<ci-1;++Qo){var ha=ai[Qo];ha=="+"&&so=="1"&&ai[Qo+1]=="1"?ai[Qo]="1":ha==","&&so==ai[Qo+1]&&(so=="1"||so=="n")&&(ai[Qo]=so),so=ha}for(var ws=0;ws<ci;++ws){var Pl=ai[ws];if(Pl==",")ai[ws]="N";else if(Pl=="%"){var ks=void 0;for(ks=ws+1;ks<ci&&ai[ks]=="%";++ks);for(var mu=ws&&ai[ws-1]=="!"||ks<ci&&ai[ks]=="1"?"1":"N",zl=ws;zl<ks;++zl)ai[zl]=mu;ws=ks-1}}for(var fl=0,vu=Qt;fl<ci;++fl){var Nl=ai[fl];vu=="L"&&Nl=="1"?ai[fl]="L":Ie.test(Nl)&&(vu=Nl)}for(var gl=0;gl<ci;++gl)if(Se.test(ai[gl])){var Za=void 0;for(Za=gl+1;Za<ci&&Se.test(ai[Za]);++Za);for(var Is=(gl?ai[gl-1]:Qt)=="L",bl=(Za<ci?ai[Za]:Qt)=="L",Fl=Is==bl?Is?"L":"R":Qt,cc=gl;cc<Za;++cc)ai[cc]=Fl;gl=Za-1}for(var Os=[],Zu,xe=0;xe<ci;)if(Xe.test(ai[xe])){var Ce=xe;for(++xe;xe<ci&&Xe.test(ai[xe]);++xe);Os.push(new ut(0,Ce,xe))}else{var ke=xe,$e=Os.length,vt=zn=="rtl"?1:0;for(++xe;xe<ci&&ai[xe]!="L";++xe);for(var pt=ke;pt<xe;)if(ht.test(ai[pt])){ke<pt&&(Os.splice($e,0,new ut(1,ke,pt)),$e+=vt);var Bt=pt;for(++pt;pt<xe&&ht.test(ai[pt]);++pt);Os.splice($e,0,new ut(2,Bt,pt)),$e+=vt,ke=pt}else++pt;ke<xe&&Os.splice($e,0,new ut(1,ke,xe))}return zn=="ltr"&&(Os[0].level==1&&(Zu=Zt.match(/^\s+/))&&(Os[0].from=Zu[0].length,Os.unshift(new ut(0,0,Zu[0].length))),zt(Os).level==1&&(Zu=Zt.match(/\s+$/))&&(zt(Os).to-=Zu[0].length,Os.push(new ut(0,ci-Zu[0].length,ci)))),zn=="rtl"?Os.reverse():Os}}();function We(ie,ae){var he=ie.order;return he==null&&(he=ie.order=Fe(ie.text,ae)),he}var Ne=[],ft=function(ie,ae,he){if(ie.addEventListener)ie.addEventListener(ae,he,!1);else if(ie.attachEvent)ie.attachEvent("on"+ae,he);else{var de=ie._handlers||(ie._handlers={});de[ae]=(de[ae]||Ne).concat(he)}};function sn(ie,ae){return ie._handlers&&ie._handlers[ae]||Ne}function un(ie,ae,he){if(ie.removeEventListener)ie.removeEventListener(ae,he,!1);else if(ie.detachEvent)ie.detachEvent("on"+ae,he);else{var de=ie._handlers,Se=de&&de[ae];if(Se){var Ie=Wt(Se,he);Ie>-1&&(de[ae]=Se.slice(0,Ie).concat(Se.slice(Ie+1)))}}}function Pt(ie,ae){var he=sn(ie,ae);if(he.length)for(var de=Array.prototype.slice.call(arguments,2),Se=0;Se<he.length;++Se)he[Se].apply(null,de)}function qt(ie,ae,he){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),Pt(ie,he||ae.type,ie,ae),fi(ae)||ae.codemirrorIgnore}function Mn(ie){var ae=ie._handlers&&ie._handlers.cursorActivity;if(ae)for(var he=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),de=0;de<ae.length;++de)Wt(he,ae[de])==-1&&he.push(ae[de])}function hn(ie,ae){return sn(ie,ae).length>0}function fn(ie){ie.prototype.on=function(ae,he){ft(this,ae,he)},ie.prototype.off=function(ae,he){un(this,ae,he)}}function ui(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function gi(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function fi(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function bi(ie){ui(ie),gi(ie)}function _i(ie){return ie.target||ie.srcElement}function rr(ie){var ae=ie.which;return ae==null&&(ie.button&1?ae=1:ie.button&2?ae=3:ie.button&4&&(ae=2)),ce&&ie.ctrlKey&&ae==1&&(ae=3),ae}var Wi=function(){if(Ke&&st<9)return!1;var ie=Je("div");return"draggable"in ie||"dragDrop"in ie}(),vr;function fr(ie){if(vr==null){var ae=Je("span","\u200B");nt(ie,Je("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(vr=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(Ke&&st<8))}var he=vr?Je("span","\u200B"):Je("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return he.setAttribute("cm-text",""),he}var zi;function Er(ie){if(zi!=null)return zi;var ae=nt(ie,document.createTextNode("A\u062EA")),he=He(ae,0,1).getBoundingClientRect(),de=He(ae,1,2).getBoundingClientRect();return Ge(ie),!he||he.left==he.right?!1:zi=de.right-he.right<3}var Kn=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(ie){for(var ae=0,he=[],de=ie.length;ae<=de;){var Se=ie.indexOf(`
|
|
|
`,ae);Se==-1&&(Se=ie.length);var Ie=ie.slice(ae,ie.charAt(Se-1)=="\r"?Se-1:Se),Xe=Ie.indexOf("\r");Xe!=-1?(he.push(Ie.slice(0,Xe)),ae+=Xe+1):(he.push(Ie),ae=Se+1)}return he}:function(ie){return ie.split(/\r\n?|\n/)},Le=window.getSelection?function(ie){try{return ie.selectionStart!=ie.selectionEnd}catch(ae){return!1}}:function(ie){var ae;try{ae=ie.ownerDocument.selection.createRange()}catch(he){}return!ae||ae.parentElement()!=ie?!1:ae.compareEndPoints("StartToEnd",ae)!=0},Ei=function(){var ie=Je("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),Ri=null;function an(ie){if(Ri!=null)return Ri;var ae=nt(ie,Je("span","x")),he=ae.getBoundingClientRect(),de=He(ae,0,1).getBoundingClientRect();return Ri=Math.abs(he.left-de.left)>1}var di={},yi={};function Li(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),di[ie]=ae}function On(ie,ae){yi[ie]=ae}function Un(ie){if(typeof ie=="string"&&yi.hasOwnProperty(ie))ie=yi[ie];else if(ie&&typeof ie.name=="string"&&yi.hasOwnProperty(ie.name)){var ae=yi[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=tn(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return Un("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return Un("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function It(ie,ae){ae=Un(ae);var he=di[ae.name];if(!he)return It(ie,"text/plain");var de=he(ie,ae);if(Kt.hasOwnProperty(ae.name)){var Se=Kt[ae.name];for(var Ie in Se)Se.hasOwnProperty(Ie)&&(de.hasOwnProperty(Ie)&&(de["_"+Ie]=de[Ie]),de[Ie]=Se[Ie])}if(de.name=ae.name,ae.helperType&&(de.helperType=ae.helperType),ae.modeProps)for(var Xe in ae.modeProps)de[Xe]=ae.modeProps[Xe];return de}var Kt={};function Ye(ie,ae){var he=Kt.hasOwnProperty(ie)?Kt[ie]:Kt[ie]={};Ut(ae,he)}function nn(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var he={};for(var de in ae){var Se=ae[de];Se instanceof Array&&(Se=Se.concat([])),he[de]=Se}return he}function xn(ie,ae){for(var he;ie.innerMode&&(he=ie.innerMode(ae),!(!he||he.mode==ie));)ae=he.state,ie=he.mode;return he||{mode:ie,state:ae}}function Nt(ie,ae,he){return ie.startState?ie.startState(ae,he):!0}var at=function(ie,ae,he){this.pos=this.start=0,this.string=ie,this.tabSize=ae||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=he};at.prototype.eol=function(){return this.pos>=this.string.length},at.prototype.sol=function(){return this.pos==this.lineStart},at.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},at.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},at.prototype.eat=function(ie){var ae=this.string.charAt(this.pos),he;if(typeof ie=="string"?he=ae==ie:he=ae&&(ie.test?ie.test(ae):ie(ae)),he)return++this.pos,ae},at.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},at.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},at.prototype.skipToEnd=function(){this.pos=this.string.length},at.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},at.prototype.backUp=function(ie){this.pos-=ie},at.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=it(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?it(this.string,this.lineStart,this.tabSize):0)},at.prototype.indentation=function(){return it(this.string,null,this.tabSize)-(this.lineStart?it(this.string,this.lineStart,this.tabSize):0)},at.prototype.match=function(ie,ae,he){if(typeof ie=="string"){var de=function(Xe){return he?Xe.toLowerCase():Xe},Se=this.string.substr(this.pos,ie.length);if(de(Se)==de(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var Ie=this.string.slice(this.pos).match(ie);return Ie&&Ie.index>0?null:(Ie&&ae!==!1&&(this.pos+=Ie[0].length),Ie)}},at.prototype.current=function(){return this.string.slice(this.start,this.pos)},at.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},at.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},at.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function cn(ie,ae){if(ae-=ie.first,ae<0||ae>=ie.size)throw new Error("There is no line "+(ae+ie.first)+" in the document.");for(var he=ie;!he.lines;)for(var de=0;;++de){var Se=he.children[de],Ie=Se.chunkSize();if(ae<Ie){he=Se;break}ae-=Ie}return he.lines[ae]}function Nn(ie,ae,he){var de=[],Se=ae.line;return ie.iter(ae.line,he.line+1,function(Ie){var Xe=Ie.text;Se==he.line&&(Xe=Xe.slice(0,he.ch)),Se==ae.line&&(Xe=Xe.slice(ae.ch)),de.push(Xe),++Se}),de}function kn(ie,ae,he){var de=[];return ie.iter(ae,he,function(Se){de.push(Se.text)}),de}function Jn(ie,ae){var he=ae-ie.height;if(he)for(var de=ie;de;de=de.parent)de.height+=he}function St(ie){if(ie.parent==null)return null;for(var ae=ie.parent,he=Wt(ae.lines,ie),de=ae.parent;de;ae=de,de=de.parent)for(var Se=0;de.children[Se]!=ae;++Se)he+=de.children[Se].chunkSize();return he+ae.first}function An(ie,ae){var he=ie.first;e:do{for(var de=0;de<ie.children.length;++de){var Se=ie.children[de],Ie=Se.height;if(ae<Ie){ie=Se;continue e}ae-=Ie,he+=Se.chunkSize()}return he}while(!ie.lines);for(var Xe=0;Xe<ie.lines.length;++Xe){var ht=ie.lines[Xe],ut=ht.height;if(ae<ut)break;ae-=ut}return he+Xe}function qn(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function Si(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function rn(ie,ae,he){if(he===void 0&&(he=null),!(this instanceof rn))return new rn(ie,ae,he);this.line=ie,this.ch=ae,this.sticky=he}function bn(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function Ft(ie,ae){return ie.sticky==ae.sticky&&bn(ie,ae)==0}function Pn(ie){return rn(ie.line,ie.ch)}function yn(ie,ae){return bn(ie,ae)<0?ae:ie}function Sn(ie,ae){return bn(ie,ae)<0?ie:ae}function Gn(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function Zn(ie,ae){if(ae.line<ie.first)return rn(ie.first,0);var he=ie.first+ie.size-1;return ae.line>he?rn(he,cn(ie,he).text.length):Qn(ae,cn(ie,ae.line).text.length)}function Qn(ie,ae){var he=ie.ch;return he==null||he>ae?rn(ie.line,ae):he<0?rn(ie.line,0):ie}function ii(ie,ae){for(var he=[],de=0;de<ae.length;de++)he[de]=Zn(ie,ae[de]);return he}var ji=function(ie,ae){this.state=ie,this.lookAhead=ae},pn=function(ie,ae,he,de){this.state=ae,this.doc=ie,this.line=he,this.maxLookAhead=de||0,this.baseTokens=null,this.baseTokenPos=1};pn.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},pn.prototype.baseToken=function(ie){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=ie;)this.baseTokenPos+=2;var ae=this.baseTokens[this.baseTokenPos+1];return{type:ae&&ae.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-ie}},pn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pn.fromSaved=function(ie,ae,he){return ae instanceof ji?new pn(ie,nn(ie.mode,ae.state),he,ae.lookAhead):new pn(ie,nn(ie.mode,ae),he)},pn.prototype.save=function(ie){var ae=ie!==!1?nn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ji(ae,this.maxLookAhead):ae};function Ji(ie,ae,he,de){var Se=[ie.state.modeGen],Ie={};pr(ie,ae.text,ie.doc.mode,he,function(Zt,zn){return Se.push(Zt,zn)},Ie,de);for(var Xe=he.state,ht=function(Zt){he.baseTokens=Se;var zn=ie.state.overlays[Zt],Qt=1,ci=0;he.state=!0,pr(ie,ae.text,zn.mode,he,function(ai,tr){for(var lr=Qt;ci<ai;){var wr=Se[Qt];wr>ai&&Se.splice(Qt,1,ai,Se[Qt+1],wr),Qt+=2,ci=Math.min(ai,wr)}if(tr)if(zn.opaque)Se.splice(lr,Qt-lr,ai,"overlay "+tr),Qt=lr+2;else for(;lr<Qt;lr+=2){var Vr=Se[lr+1];Se[lr+1]=(Vr?Vr+" ":"")+"overlay "+tr}},Ie),he.state=Xe,he.baseTokens=null,he.baseTokenPos=1},ut=0;ut<ie.state.overlays.length;++ut)ht(ut);return{styles:Se,classes:Ie.bgClass||Ie.textClass?Ie:null}}function Ki(ie,ae,he){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var de=Gi(ie,St(ae)),Se=ae.text.length>ie.options.maxHighlightLength&&nn(ie.doc.mode,de.state),Ie=Ji(ie,ae,de);Se&&(de.state=Se),ae.stateAfter=de.save(!Se),ae.styles=Ie.styles,Ie.classes?ae.styleClasses=Ie.classes:ae.styleClasses&&(ae.styleClasses=null),he===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ae.styles}function Gi(ie,ae,he){var de=ie.doc,Se=ie.display;if(!de.mode.startState)return new pn(de,!0,ae);var Ie=hr(ie,ae,he),Xe=Ie>de.first&&cn(de,Ie-1).stateAfter,ht=Xe?pn.fromSaved(de,Xe,Ie):new pn(de,Nt(de.mode),Ie);return de.iter(Ie,ae,function(ut){gn(ie,ut.text,ht);var Zt=ht.line;ut.stateAfter=Zt==ae-1||Zt%5==0||Zt>=Se.viewFrom&&Zt<Se.viewTo?ht.save():null,ht.nextLine()}),he&&(de.modeFrontier=ht.line),ht}function gn(ie,ae,he,de){var Se=ie.doc.mode,Ie=new at(ae,ie.options.tabSize,he);for(Ie.start=Ie.pos=de||0,ae==""&&oi(Se,he.state);!Ie.eol();)Bi(Se,Ie,he.state),Ie.start=Ie.pos}function oi(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var he=xn(ie,ae);if(he.mode.blankLine)return he.mode.blankLine(he.state)}}function Bi(ie,ae,he,de){for(var Se=0;Se<10;Se++){de&&(de[0]=xn(ie,he).mode);var Ie=ie.token(ae,he);if(ae.pos>ae.start)return Ie}throw new Error("Mode "+ie.name+" failed to advance stream.")}var $i=function(ie,ae,he){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=he};function Ti(ie,ae,he,de){var Se=ie.doc,Ie=Se.mode,Xe;ae=Zn(Se,ae);var ht=cn(Se,ae.line),ut=Gi(ie,ae.line,he),Zt=new at(ht.text,ie.options.tabSize,ut),zn;for(de&&(zn=[]);(de||Zt.pos<ae.ch)&&!Zt.eol();)Zt.start=Zt.pos,Xe=Bi(Ie,Zt,ut.state),de&&zn.push(new $i(Zt,Xe,nn(Se.mode,ut.state)));return de?zn:new $i(Zt,Xe,ut.state)}function Qi(ie,ae){if(ie)for(;;){var he=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!he)break;ie=ie.slice(0,he.index)+ie.slice(he.index+he[0].length);var de=he[1]?"bgClass":"textClass";ae[de]==null?ae[de]=he[2]:new RegExp("(?:^|\\s)"+he[2]+"(?:$|\\s)").test(ae[de])||(ae[de]+=" "+he[2])}return ie}function pr(ie,ae,he,de,Se,Ie,Xe){var ht=he.flattenSpans;ht==null&&(ht=ie.options.flattenSpans);var ut=0,Zt=null,zn=new at(ae,ie.options.tabSize,de),Qt,ci=ie.options.addModeClass&&[null];for(ae==""&&Qi(oi(he,de.state),Ie);!zn.eol();){if(zn.pos>ie.options.maxHighlightLength?(ht=!1,Xe&&gn(ie,ae,de,zn.pos),zn.pos=ae.length,Qt=null):Qt=Qi(Bi(he,zn,de.state,ci),Ie),ci){var ai=ci[0].name;ai&&(Qt="m-"+(Qt?ai+" "+Qt:ai))}if(!ht||Zt!=Qt){for(;ut<zn.start;)ut=Math.min(zn.start,ut+5e3),Se(ut,Zt);Zt=Qt}zn.start=zn.pos}for(;ut<zn.pos;){var tr=Math.min(zn.pos,ut+5e3);Se(tr,Zt),ut=tr}}function hr(ie,ae,he){for(var de,Se,Ie=ie.doc,Xe=he?-1:ae-(ie.doc.mode.innerMode?1e3:100),ht=ae;ht>Xe;--ht){if(ht<=Ie.first)return Ie.first;var ut=cn(Ie,ht-1),Zt=ut.stateAfter;if(Zt&&(!he||ht+(Zt instanceof ji?Zt.lookAhead:0)<=Ie.modeFrontier))return ht;var zn=it(ut.text,null,ie.options.tabSize);(Se==null||de>zn)&&(Se=ht-1,de=zn)}return Se}function Vi(ie,ae){if(ie.modeFrontier=Math.min(ie.modeFrontier,ae),!(ie.highlightFrontier<ae-10)){for(var he=ie.first,de=ae-1;de>he;de--){var Se=cn(ie,de).stateAfter;if(Se&&(!(Se instanceof ji)||de+Se.lookAhead<ae)){he=de+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,he)}}var xr=!1,Rn=!1;function Br(){xr=!0}function _n(){Rn=!0}function Or(ie,ae,he){this.marker=ie,this.from=ae,this.to=he}function no(ie,ae){if(ie)for(var he=0;he<ie.length;++he){var de=ie[he];if(de.marker==ae)return de}}function br(ie,ae){for(var he,de=0;de<ie.length;++de)ie[de]!=ae&&(he||(he=[])).push(ie[de]);return he}function mo(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function Jr(ie,ae,he){var de;if(ie)for(var Se=0;Se<ie.length;++Se){var Ie=ie[Se],Xe=Ie.marker,ht=Ie.from==null||(Xe.inclusiveLeft?Ie.from<=ae:Ie.from<ae);if(ht||Ie.from==ae&&Xe.type=="bookmark"&&(!he||!Ie.marker.insertLeft)){var ut=Ie.to==null||(Xe.inclusiveRight?Ie.to>=ae:Ie.to>ae);(de||(de=[])).push(new Or(Xe,Ie.from,ut?null:Ie.to))}}return de}function ur(ie,ae,he){var de;if(ie)for(var Se=0;Se<ie.length;++Se){var Ie=ie[Se],Xe=Ie.marker,ht=Ie.to==null||(Xe.inclusiveRight?Ie.to>=ae:Ie.to>ae);if(ht||Ie.from==ae&&Xe.type=="bookmark"&&(!he||Ie.marker.insertLeft)){var ut=Ie.from==null||(Xe.inclusiveLeft?Ie.from<=ae:Ie.from<ae);(de||(de=[])).push(new Or(Xe,ut?null:Ie.from-ae,Ie.to==null?null:Ie.to-ae))}}return de}function er(ie,ae){if(ae.full)return null;var he=qn(ie,ae.from.line)&&cn(ie,ae.from.line).markedSpans,de=qn(ie,ae.to.line)&&cn(ie,ae.to.line).markedSpans;if(!he&&!de)return null;var Se=ae.from.ch,Ie=ae.to.ch,Xe=bn(ae.from,ae.to)==0,ht=Jr(he,Se,Xe),ut=ur(de,Ie,Xe),Zt=ae.text.length==1,zn=zt(ae.text).length+(Zt?Se:0);if(ht)for(var Qt=0;Qt<ht.length;++Qt){var ci=ht[Qt];if(ci.to==null){var ai=no(ut,ci.marker);ai?Zt&&(ci.to=ai.to==null?null:ai.to+zn):ci.to=Se}}if(ut)for(var tr=0;tr<ut.length;++tr){var lr=ut[tr];if(lr.to!=null&&(lr.to+=zn),lr.from==null){var wr=no(ht,lr.marker);wr||(lr.from=zn,Zt&&(ht||(ht=[])).push(lr))}else lr.from+=zn,Zt&&(ht||(ht=[])).push(lr)}ht&&(ht=qi(ht)),ut&&ut!=ht&&(ut=qi(ut));var Vr=[ht];if(!Zt){var yo=ae.text.length-2,ao;if(yo>0&&ht)for(var Eo=0;Eo<ht.length;++Eo)ht[Eo].to==null&&(ao||(ao=[])).push(new Or(ht[Eo].marker,null,null));for(var Qo=0;Qo<yo;++Qo)Vr.push(ao);Vr.push(ut)}return Vr}function qi(ie){for(var ae=0;ae<ie.length;++ae){var he=ie[ae];he.from!=null&&he.from==he.to&&he.marker.clearWhenEmpty!==!1&&ie.splice(ae--,1)}return ie.length?ie:null}function Rr(ie,ae,he){var de=null;if(ie.iter(ae.line,he.line+1,function(ai){if(ai.markedSpans)for(var tr=0;tr<ai.markedSpans.length;++tr){var lr=ai.markedSpans[tr].marker;lr.readOnly&&(!de||Wt(de,lr)==-1)&&(de||(de=[])).push(lr)}}),!de)return null;for(var Se=[{from:ae,to:he}],Ie=0;Ie<de.length;++Ie)for(var Xe=de[Ie],ht=Xe.find(0),ut=0;ut<Se.length;++ut){var Zt=Se[ut];if(!(bn(Zt.to,ht.from)<0||bn(Zt.from,ht.to)>0)){var zn=[ut,1],Qt=bn(Zt.from,ht.from),ci=bn(Zt.to,ht.to);(Qt<0||!Xe.inclusiveLeft&&!Qt)&&zn.push({from:Zt.from,to:ht.from}),(ci>0||!Xe.inclusiveRight&&!ci)&&zn.push({from:ht.to,to:Zt.to}),Se.splice.apply(Se,zn),ut+=zn.length-3}}return Se}function Ii(ie){var ae=ie.markedSpans;if(ae){for(var he=0;he<ae.length;++he)ae[he].marker.detachLine(ie);ie.markedSpans=null}}function Qe(ie,ae){if(ae){for(var he=0;he<ae.length;++he)ae[he].marker.attachLine(ie);ie.markedSpans=ae}}function Qr(ie){return ie.inclusiveLeft?-1:0}function lo(ie){return ie.inclusiveRight?1:0}function jr(ie,ae){var he=ie.lines.length-ae.lines.length;if(he!=0)return he;var de=ie.find(),Se=ae.find(),Ie=bn(de.from,Se.from)||Qr(ie)-Qr(ae);if(Ie)return-Ie;var Xe=bn(de.to,Se.to)||lo(ie)-lo(ae);return Xe||ae.id-ie.id}function vo(ie,ae){var he=Rn&&ie.markedSpans,de;if(he)for(var Se=void 0,Ie=0;Ie<he.length;++Ie)Se=he[Ie],Se.marker.collapsed&&(ae?Se.from:Se.to)==null&&(!de||jr(de,Se.marker)<0)&&(de=Se.marker);return de}function po(ie){return vo(ie,!0)}function Lr(ie){return vo(ie,!1)}function Fr(ie,ae){var he=Rn&&ie.markedSpans,de;if(he)for(var Se=0;Se<he.length;++Se){var Ie=he[Se];Ie.marker.collapsed&&(Ie.from==null||Ie.from<ae)&&(Ie.to==null||Ie.to>ae)&&(!de||jr(de,Ie.marker)<0)&&(de=Ie.marker)}return de}function uo(ie,ae,he,de,Se){var Ie=cn(ie,ae),Xe=Rn&&Ie.markedSpans;if(Xe)for(var ht=0;ht<Xe.length;++ht){var ut=Xe[ht];if(ut.marker.collapsed){var Zt=ut.marker.find(0),zn=bn(Zt.from,he)||Qr(ut.marker)-Qr(Se),Qt=bn(Zt.to,de)||lo(ut.marker)-lo(Se);if(!(zn>=0&&Qt<=0||zn<=0&&Qt>=0)&&(zn<=0&&(ut.marker.inclusiveRight&&Se.inclusiveLeft?bn(Zt.to,he)>=0:bn(Zt.to,he)>0)||zn>=0&&(ut.marker.inclusiveRight&&Se.inclusiveLeft?bn(Zt.from,de)<=0:bn(Zt.from,de)<0)))return!0}}}function qr(ie){for(var ae;ae=po(ie);)ie=ae.find(-1,!0).line;return ie}function zo(ie){for(var ae;ae=Lr(ie);)ie=ae.find(1,!0).line;return ie}function Ro(ie){for(var ae,he;ae=Lr(ie);)ie=ae.find(1,!0).line,(he||(he=[])).push(ie);return he}function Mr(ie,ae){var he=cn(ie,ae),de=qr(he);return he==de?ae:St(de)}function Nr(ie,ae){if(ae>ie.lastLine())return ae;var he=cn(ie,ae),de;if(!pi(ie,he))return ae;for(;de=Lr(he);)he=de.find(1,!0).line;return St(he)+1}function pi(ie,ae){var he=Rn&&ae.markedSpans;if(he){for(var de=void 0,Se=0;Se<he.length;++Se)if(de=he[Se],!!de.marker.collapsed){if(de.from==null)return!0;if(!de.marker.widgetNode&&de.from==0&&de.marker.inclusiveLeft&&Tr(ie,ae,de))return!0}}}function Tr(ie,ae,he){if(he.to==null){var de=he.marker.find(1,!0);return Tr(ie,de.line,no(de.line.markedSpans,he.marker))}if(he.marker.inclusiveRight&&he.to==ae.text.length)return!0;for(var Se=void 0,Ie=0;Ie<ae.markedSpans.length;++Ie)if(Se=ae.markedSpans[Ie],Se.marker.collapsed&&!Se.marker.widgetNode&&Se.from==he.to&&(Se.to==null||Se.to!=he.from)&&(Se.marker.inclusiveLeft||he.marker.inclusiveRight)&&Tr(ie,ae,Se))return!0}function Bo(ie){ie=qr(ie);for(var ae=0,he=ie.parent,de=0;de<he.lines.length;++de){var Se=he.lines[de];if(Se==ie)break;ae+=Se.height}for(var Ie=he.parent;Ie;he=Ie,Ie=he.parent)for(var Xe=0;Xe<Ie.children.length;++Xe){var ht=Ie.children[Xe];if(ht==he)break;ae+=ht.height}return ae}function aa(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,he,de=ie;he=po(de);){var Se=he.find(0,!0);de=Se.from.line,ae+=Se.from.ch-Se.to.ch}for(de=ie;he=Lr(de);){var Ie=he.find(0,!0);ae-=de.text.length-Ie.from.ch,de=Ie.to.line,ae+=de.text.length-Ie.to.ch}return ae}function Ho(ie){var ae=ie.display,he=ie.doc;ae.maxLine=cn(he,he.first),ae.maxLineLength=aa(ae.maxLine),ae.maxLineChanged=!0,he.iter(function(de){var Se=aa(de);Se>ae.maxLineLength&&(ae.maxLineLength=Se,ae.maxLine=de)})}var Ao=function(ie,ae,he){this.text=ie,Qe(this,ae),this.height=he?he(this):1};Ao.prototype.lineNo=function(){return St(this)},fn(Ao);function _o(ie,ae,he,de){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),Ii(ie),Qe(ie,he);var Se=de?de(ie):1;Se!=ie.height&&Jn(ie,Se)}function ta(ie){ie.parent=null,Ii(ie)}var Ea={},Mt={};function Pi(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var he=ae.addModeClass?Mt:Ea;return he[ie]||(he[ie]=ie.replace(/\S+/g,"cm-$&"))}function _t(ie,ae){var he=xt("span",null,null,Me?"padding-right: .1px":null),de={pre:xt("pre",[he],"CodeMirror-line"),content:he,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ae.measure={};for(var Se=0;Se<=(ae.rest?ae.rest.length:0);Se++){var Ie=Se?ae.rest[Se-1]:ae.line,Xe=void 0;de.pos=0,de.addToken=wi,Er(ie.display.measure)&&(Xe=We(Ie,ie.doc.direction))&&(de.addToken=Zi(de.addToken,Xe)),de.map=[];var ht=ae!=ie.display.externalMeasured&&St(Ie);nr(Ie,de,Ki(ie,Ie,ht)),Ie.styleClasses&&(Ie.styleClasses.bgClass&&(de.bgClass=gt(Ie.styleClasses.bgClass,de.bgClass||"")),Ie.styleClasses.textClass&&(de.textClass=gt(Ie.styleClasses.textClass,de.textClass||""))),de.map.length==0&&de.map.push(0,0,de.content.appendChild(fr(ie.display.measure))),Se==0?(ae.measure.map=de.map,ae.measure.cache={}):((ae.measure.maps||(ae.measure.maps=[])).push(de.map),(ae.measure.caches||(ae.measure.caches=[])).push({}))}if(Me){var ut=de.content.lastChild;(/\bcm-tab\b/.test(ut.className)||ut.querySelector&&ut.querySelector(".cm-tab"))&&(de.content.className="cm-tab-wrap-hack")}return Pt(ie,"renderLine",ie,ae.line,de.pre),de.pre.className&&(de.textClass=gt(de.pre.className,de.textClass||"")),de}function Xi(ie){var ae=Je("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function wi(ie,ae,he,de,Se,Ie,Xe){if(ae){var ht=ie.splitSpaces?Sr(ae,ie.trailingSpace):ae,ut=ie.cm.state.specialChars,Zt=!1,zn;if(!ut.test(ae))ie.col+=ae.length,zn=document.createTextNode(ht),ie.map.push(ie.pos,ie.pos+ae.length,zn),Ke&&st<9&&(Zt=!0),ie.pos+=ae.length;else{zn=document.createDocumentFragment();for(var Qt=0;;){ut.lastIndex=Qt;var ci=ut.exec(ae),ai=ci?ci.index-Qt:ae.length-Qt;if(ai){var tr=document.createTextNode(ht.slice(Qt,Qt+ai));Ke&&st<9?zn.appendChild(Je("span",[tr])):zn.appendChild(tr),ie.map.push(ie.pos,ie.pos+ai,tr),ie.col+=ai,ie.pos+=ai}if(!ci)break;Qt+=ai+1;var lr=void 0;if(ci[0]==" "){var wr=ie.cm.options.tabSize,Vr=wr-ie.col%wr;lr=zn.appendChild(Je("span",Yn(Vr),"cm-tab")),lr.setAttribute("role","presentation"),lr.setAttribute("cm-text"," "),ie.col+=Vr}else ci[0]=="\r"||ci[0]==`
|
|
|
`?(lr=zn.appendChild(Je("span",ci[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),lr.setAttribute("cm-text",ci[0]),ie.col+=1):(lr=ie.cm.options.specialCharPlaceholder(ci[0]),lr.setAttribute("cm-text",ci[0]),Ke&&st<9?zn.appendChild(Je("span",[lr])):zn.appendChild(lr),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,lr),ie.pos++}}if(ie.trailingSpace=ht.charCodeAt(ae.length-1)==32,he||de||Se||Zt||Ie||Xe){var yo=he||"";de&&(yo+=de),Se&&(yo+=Se);var ao=Je("span",[zn],yo,Ie);if(Xe)for(var Eo in Xe)Xe.hasOwnProperty(Eo)&&Eo!="style"&&Eo!="class"&&ao.setAttribute(Eo,Xe[Eo]);return ie.content.appendChild(ao)}ie.content.appendChild(zn)}}function Sr(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var he=ae,de="",Se=0;Se<ie.length;Se++){var Ie=ie.charAt(Se);Ie==" "&&he&&(Se==ie.length-1||ie.charCodeAt(Se+1)==32)&&(Ie="\xA0"),de+=Ie,he=Ie==" "}return de}function Zi(ie,ae){return function(he,de,Se,Ie,Xe,ht,ut){Se=Se?Se+" cm-force-border":"cm-force-border";for(var Zt=he.pos,zn=Zt+de.length;;){for(var Qt=void 0,ci=0;ci<ae.length&&(Qt=ae[ci],!(Qt.to>Zt&&Qt.from<=Zt));ci++);if(Qt.to>=zn)return ie(he,de,Se,Ie,Xe,ht,ut);ie(he,de.slice(0,Qt.to-Zt),Se,Ie,null,ht,ut),Ie=null,de=de.slice(Qt.to-Zt),Zt=Qt.to}}}function Ci(ie,ae,he,de){var Se=!de&&he.widgetNode;Se&&ie.map.push(ie.pos,ie.pos+ae,Se),!de&&ie.cm.display.input.needsContentAttribute&&(Se||(Se=ie.content.appendChild(document.createElement("span"))),Se.setAttribute("cm-marker",he.id)),Se&&(ie.cm.display.input.setUneditable(Se),ie.content.appendChild(Se)),ie.pos+=ae,ie.trailingSpace=!1}function nr(ie,ae,he){var de=ie.markedSpans,Se=ie.text,Ie=0;if(!de){for(var Xe=1;Xe<he.length;Xe+=2)ae.addToken(ae,Se.slice(Ie,Ie=he[Xe]),Pi(he[Xe+1],ae.cm.options));return}for(var ht=Se.length,ut=0,Zt=1,zn="",Qt,ci,ai=0,tr,lr,wr,Vr,yo;;){if(ai==ut){tr=lr=wr=ci="",yo=null,Vr=null,ai=1/0;for(var ao=[],Eo=void 0,Qo=0;Qo<de.length;++Qo){var so=de[Qo],ha=so.marker;if(ha.type=="bookmark"&&so.from==ut&&ha.widgetNode)ao.push(ha);else if(so.from<=ut&&(so.to==null||so.to>ut||ha.collapsed&&so.to==ut&&so.from==ut)){if(so.to!=null&&so.to!=ut&&ai>so.to&&(ai=so.to,lr=""),ha.className&&(tr+=" "+ha.className),ha.css&&(ci=(ci?ci+";":"")+ha.css),ha.startStyle&&so.from==ut&&(wr+=" "+ha.startStyle),ha.endStyle&&so.to==ai&&(Eo||(Eo=[])).push(ha.endStyle,so.to),ha.title&&((yo||(yo={})).title=ha.title),ha.attributes)for(var ws in ha.attributes)(yo||(yo={}))[ws]=ha.attributes[ws];ha.collapsed&&(!Vr||jr(Vr.marker,ha)<0)&&(Vr=so)}else so.from>ut&&ai>so.from&&(ai=so.from)}if(Eo)for(var Pl=0;Pl<Eo.length;Pl+=2)Eo[Pl+1]==ai&&(lr+=" "+Eo[Pl]);if(!Vr||Vr.from==ut)for(var ks=0;ks<ao.length;++ks)Ci(ae,0,ao[ks]);if(Vr&&(Vr.from||0)==ut){if(Ci(ae,(Vr.to==null?ht+1:Vr.to)-ut,Vr.marker,Vr.from==null),Vr.to==null)return;Vr.to==ut&&(Vr=!1)}}if(ut>=ht)break;for(var mu=Math.min(ht,ai);;){if(zn){var zl=ut+zn.length;if(!Vr){var fl=zl>mu?zn.slice(0,mu-ut):zn;ae.addToken(ae,fl,Qt?Qt+tr:tr,wr,ut+fl.length==ai?lr:"",ci,yo)}if(zl>=mu){zn=zn.slice(mu-ut),ut=mu;break}ut=zl,wr=""}zn=Se.slice(Ie,Ie=he[Zt++]),Qt=Pi(he[Zt++],ae.cm.options)}}}function or(ie,ae,he){this.line=ae,this.rest=Ro(ae),this.size=this.rest?St(zt(this.rest))-he+1:1,this.node=this.text=null,this.hidden=pi(ie,ae)}function cr(ie,ae,he){for(var de=[],Se,Ie=ae;Ie<he;Ie=Se){var Xe=new or(ie.doc,cn(ie.doc,Ie),Ie);Se=Ie+Xe.size,de.push(Xe)}return de}var Pr=null;function Gr(ie){Pr?Pr.ops.push(ie):ie.ownsGroup=Pr={ops:[ie],delayedCallbacks:[]}}function yr(ie){var ae=ie.delayedCallbacks,he=0;do{for(;he<ae.length;he++)ae[he].call(null);for(var de=0;de<ie.ops.length;de++){var Se=ie.ops[de];if(Se.cursorActivityHandlers)for(;Se.cursorActivityCalled<Se.cursorActivityHandlers.length;)Se.cursorActivityHandlers[Se.cursorActivityCalled++].call(null,Se.cm)}}while(he<ae.length)}function kr(ie,ae){var he=ie.ownsGroup;if(he)try{yr(he)}finally{Pr=null,ae(he)}}var Zr=null;function Oi(ie,ae){var he=sn(ie,ae);if(he.length){var de=Array.prototype.slice.call(arguments,2),Se;Pr?Se=Pr.delayedCallbacks:Zr?Se=Zr:(Se=Zr=[],setTimeout(sa,0));for(var Ie=function(ht){Se.push(function(){return he[ht].apply(null,de)})},Xe=0;Xe<he.length;++Xe)Ie(Xe)}}function sa(){var ie=Zr;Zr=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function Ra(ie,ae,he,de){for(var Se=0;Se<ae.changes.length;Se++){var Ie=ae.changes[Se];Ie=="text"?Ui(ie,ae):Ie=="gutter"?Ba(ie,ae,he,de):Ie=="class"?La(ie,ae):Ie=="widget"&&zs(ie,ae,de)}ae.changes=null}function Ls(ie){return ie.node==ie.text&&(ie.node=Je("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),Ke&&st<8&&(ie.node.style.zIndex=2)),ie.node}function Ys(ie,ae){var he=ae.bgClass?ae.bgClass+" "+(ae.line.bgClass||""):ae.line.bgClass;if(he&&(he+=" CodeMirror-linebackground"),ae.background)he?ae.background.className=he:(ae.background.parentNode.removeChild(ae.background),ae.background=null);else if(he){var de=Ls(ae);ae.background=de.insertBefore(Je("div",null,he),de.firstChild),ie.display.input.setUneditable(ae.background)}}function tl(ie,ae){var he=ie.display.externalMeasured;return he&&he.line==ae.line?(ie.display.externalMeasured=null,ae.measure=he.measure,he.built):_t(ie,ae)}function Ui(ie,ae){var he=ae.text.className,de=tl(ie,ae);ae.text==ae.node&&(ae.node=de.pre),ae.text.parentNode.replaceChild(de.pre,ae.text),ae.text=de.pre,de.bgClass!=ae.bgClass||de.textClass!=ae.textClass?(ae.bgClass=de.bgClass,ae.textClass=de.textClass,La(ie,ae)):he&&(ae.text.className=he)}function La(ie,ae){Ys(ie,ae),ae.line.wrapClass?Ls(ae).className=ae.line.wrapClass:ae.node!=ae.text&&(ae.node.className="");var he=ae.textClass?ae.textClass+" "+(ae.line.textClass||""):ae.line.textClass;ae.text.className=he||""}function Ba(ie,ae,he,de){if(ae.gutter&&(ae.node.removeChild(ae.gutter),ae.gutter=null),ae.gutterBackground&&(ae.node.removeChild(ae.gutterBackground),ae.gutterBackground=null),ae.line.gutterClass){var Se=Ls(ae);ae.gutterBackground=Je("div",null,"CodeMirror-gutter-background "+ae.line.gutterClass,"left: "+(ie.options.fixedGutter?de.fixedPos:-de.gutterTotalWidth)+"px; width: "+de.gutterTotalWidth+"px"),ie.display.input.setUneditable(ae.gutterBackground),Se.insertBefore(ae.gutterBackground,ae.text)}var Ie=ae.line.gutterMarkers;if(ie.options.lineNumbers||Ie){var Xe=Ls(ae),ht=ae.gutter=Je("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?de.fixedPos:-de.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(ht),Xe.insertBefore(ht,ae.text),ae.line.gutterClass&&(ht.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!Ie||!Ie["CodeMirror-linenumbers"])&&(ae.lineNumber=ht.appendChild(Je("div",Si(ie.options,he),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+de.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),Ie)for(var ut=0;ut<ie.display.gutterSpecs.length;++ut){var Zt=ie.display.gutterSpecs[ut].className,zn=Ie.hasOwnProperty(Zt)&&Ie[Zt];zn&&ht.appendChild(Je("div",[zn],"CodeMirror-gutter-elt","left: "+de.gutterLeft[Zt]+"px; width: "+de.gutterWidth[Zt]+"px"))}}}function zs(ie,ae,he){ae.alignable&&(ae.alignable=null);for(var de=Be("CodeMirror-linewidget"),Se=ae.node.firstChild,Ie=void 0;Se;Se=Ie)Ie=Se.nextSibling,de.test(Se.className)&&ae.node.removeChild(Se);lu(ie,ae,he)}function su(ie,ae,he,de){var Se=tl(ie,ae);return ae.text=ae.node=Se.pre,Se.bgClass&&(ae.bgClass=Se.bgClass),Se.textClass&&(ae.textClass=Se.textClass),La(ie,ae),Ba(ie,ae,he,de),lu(ie,ae,de),ae.node}function lu(ie,ae,he){if(wo(ie,ae.line,ae,he,!0),ae.rest)for(var de=0;de<ae.rest.length;de++)wo(ie,ae.rest[de],ae,he,!1)}function wo(ie,ae,he,de,Se){if(ae.widgets)for(var Ie=Ls(he),Xe=0,ht=ae.widgets;Xe<ht.length;++Xe){var ut=ht[Xe],Zt=Je("div",[ut.node],"CodeMirror-linewidget"+(ut.className?" "+ut.className:""));ut.handleMouseEvents||Zt.setAttribute("cm-ignore-events","true"),yc(ut,Zt,he,de),ie.display.input.setUneditable(Zt),Se&&ut.above?Ie.insertBefore(Zt,he.gutter||he.text):Ie.appendChild(Zt),Oi(ut,"redraw")}}function yc(ie,ae,he,de){if(ie.noHScroll){(he.alignable||(he.alignable=[])).push(ae);var Se=de.wrapperWidth;ae.style.left=de.fixedPos+"px",ie.coverGutter||(Se-=de.gutterTotalWidth,ae.style.paddingLeft=de.gutterTotalWidth+"px"),ae.style.width=Se+"px"}ie.coverGutter&&(ae.style.zIndex=5,ae.style.position="relative",ie.noHScroll||(ae.style.marginLeft=-de.gutterTotalWidth+"px"))}function Ml(ie){if(ie.height!=null)return ie.height;var ae=ie.doc.cm;if(!ae)return 0;if(!Et(document.body,ie.node)){var he="position: relative;";ie.coverGutter&&(he+="margin-left: -"+ae.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(he+="width: "+ae.display.wrapper.clientWidth+"px;"),nt(ae.display.measure,Je("div",[ie.node],null,he))}return ie.height=ie.node.parentNode.offsetHeight}function as(ie,ae){for(var he=_i(ae);he!=ie.wrapper;he=he.parentNode)if(!he||he.nodeType==1&&he.getAttribute("cm-ignore-events")=="true"||he.parentNode==ie.sizer&&he!=ie.mover)return!0}function vl(ie){return ie.lineSpace.offsetTop}function ju(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function rc(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=nt(ie.measure,Je("pre","x","CodeMirror-line-like")),he=window.getComputedStyle?window.getComputedStyle(ae):ae.currentStyle,de={left:parseInt(he.paddingLeft),right:parseInt(he.paddingRight)};return!isNaN(de.left)&&!isNaN(de.right)&&(ie.cachedPaddingH=de),de}function wl(ie){return Dn-ie.display.nativeBarWidth}function sl(ie){return ie.display.scroller.clientWidth-wl(ie)-ie.display.barWidth}function td(ie){return ie.display.scroller.clientHeight-wl(ie)-ie.display.barHeight}function nd(ie,ae,he){var de=ie.options.lineWrapping,Se=de&&sl(ie);if(!ae.measure.heights||de&&ae.measure.width!=Se){var Ie=ae.measure.heights=[];if(de){ae.measure.width=Se;for(var Xe=ae.text.firstChild.getClientRects(),ht=0;ht<Xe.length-1;ht++){var ut=Xe[ht],Zt=Xe[ht+1];Math.abs(ut.bottom-Zt.bottom)>2&&Ie.push((ut.bottom+Zt.top)/2-he.top)}}Ie.push(he.bottom-he.top)}}function kc(ie,ae,he){if(ie.line==ae)return{map:ie.measure.map,cache:ie.measure.cache};for(var de=0;de<ie.rest.length;de++)if(ie.rest[de]==ae)return{map:ie.measure.maps[de],cache:ie.measure.caches[de]};for(var Se=0;Se<ie.rest.length;Se++)if(St(ie.rest[Se])>he)return{map:ie.measure.maps[Se],cache:ie.measure.caches[Se],before:!0}}function _d(ie,ae){ae=qr(ae);var he=St(ae),de=ie.display.externalMeasured=new or(ie.doc,ae,he);de.lineN=he;var Se=de.built=_t(ie,de);return de.text=Se.pre,nt(ie.display.lineMeasure,Se.pre),de}function id(ie,ae,he,de){return uu(ie,Js(ie,ae),he,de)}function Ic(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[ul(ie,ae)];var he=ie.display.externalMeasured;if(he&&ae>=he.lineN&&ae<he.lineN+he.size)return he}function Js(ie,ae){var he=St(ae),de=Ic(ie,he);de&&!de.text?de=null:de&&de.changes&&(Ra(ie,de,he,Nh(ie)),ie.curOp.forceUpdate=!0),de||(de=_d(ie,ae));var Se=kc(de,ae,he);return{line:ae,view:de,rect:null,map:Se.map,cache:Se.cache,before:Se.before,hasHeights:!1}}function uu(ie,ae,he,de,Se){ae.before&&(he=-1);var Ie=he+(de||""),Xe;return ae.cache.hasOwnProperty(Ie)?Xe=ae.cache[Ie]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(nd(ie,ae.view,ae.rect),ae.hasHeights=!0),Xe=Vo(ie,ae,he,de),Xe.bogus||(ae.cache[Ie]=Xe)),{left:Xe.left,right:Xe.right,top:Se?Xe.rtop:Xe.top,bottom:Se?Xe.rbottom:Xe.bottom}}var xd={left:0,right:0,top:0,bottom:0};function Eu(ie,ae,he){for(var de,Se,Ie,Xe,ht,ut,Zt=0;Zt<ie.length;Zt+=3)if(ht=ie[Zt],ut=ie[Zt+1],ae<ht?(Se=0,Ie=1,Xe="left"):ae<ut?(Se=ae-ht,Ie=Se+1):(Zt==ie.length-3||ae==ut&&ie[Zt+3]>ae)&&(Ie=ut-ht,Se=Ie-1,ae>=ut&&(Xe="right")),Se!=null){if(de=ie[Zt+2],ht==ut&&he==(de.insertLeft?"left":"right")&&(Xe=he),he=="left"&&Se==0)for(;Zt&&ie[Zt-2]==ie[Zt-3]&&ie[Zt-1].insertLeft;)de=ie[(Zt-=3)+2],Xe="left";if(he=="right"&&Se==ut-ht)for(;Zt<ie.length-3&&ie[Zt+3]==ie[Zt+4]&&!ie[Zt+5].insertLeft;)de=ie[(Zt+=3)+2],Xe="right";break}return{node:de,start:Se,end:Ie,collapse:Xe,coverStart:ht,coverEnd:ut}}function Sc(ie,ae){var he=xd;if(ae=="left")for(var de=0;de<ie.length&&(he=ie[de]).left==he.right;de++);else for(var Se=ie.length-1;Se>=0&&(he=ie[Se]).left==he.right;Se--);return he}function Vo(ie,ae,he,de){var Se=Eu(ae.map,he,de),Ie=Se.node,Xe=Se.start,ht=Se.end,ut=Se.collapse,Zt;if(Ie.nodeType==3){for(var zn=0;zn<4;zn++){for(;Xe&&Dt(ae.line.text.charAt(Se.coverStart+Xe));)--Xe;for(;Se.coverStart+ht<Se.coverEnd&&Dt(ae.line.text.charAt(Se.coverStart+ht));)++ht;if(Ke&&st<9&&Xe==0&&ht==Se.coverEnd-Se.coverStart?Zt=Ie.parentNode.getBoundingClientRect():Zt=Sc(He(Ie,Xe,ht).getClientRects(),de),Zt.left||Zt.right||Xe==0)break;ht=Xe,Xe=Xe-1,ut="right"}Ke&&st<11&&(Zt=ya(ie.display.measure,Zt))}else{Xe>0&&(ut=de="right");var Qt;ie.options.lineWrapping&&(Qt=Ie.getClientRects()).length>1?Zt=Qt[de=="right"?Qt.length-1:0]:Zt=Ie.getBoundingClientRect()}if(Ke&&st<9&&!Xe&&(!Zt||!Zt.left&&!Zt.right)){var ci=Ie.parentNode.getClientRects()[0];ci?Zt={left:ci.left,right:ci.left+Mu(ie.display),top:ci.top,bottom:ci.bottom}:Zt=xd}for(var ai=Zt.top-ae.rect.top,tr=Zt.bottom-ae.rect.top,lr=(ai+tr)/2,wr=ae.view.measure.heights,Vr=0;Vr<wr.length-1&&!(lr<wr[Vr]);Vr++);var yo=Vr?wr[Vr-1]:0,ao=wr[Vr],Eo={left:(ut=="right"?Zt.right:Zt.left)-ae.rect.left,right:(ut=="left"?Zt.left:Zt.right)-ae.rect.left,top:yo,bottom:ao};return!Zt.left&&!Zt.right&&(Eo.bogus=!0),ie.options.singleCursorHeightPerLine||(Eo.rtop=ai,Eo.rbottom=tr),Eo}function ya(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!an(ie))return ae;var he=screen.logicalXDPI/screen.deviceXDPI,de=screen.logicalYDPI/screen.deviceYDPI;return{left:ae.left*he,right:ae.right*he,top:ae.top*de,bottom:ae.bottom*de}}function ll(ie){if(ie.measure&&(ie.measure.cache={},ie.measure.heights=null,ie.rest))for(var ae=0;ae<ie.rest.length;ae++)ie.measure.caches[ae]={}}function Ss(ie){ie.display.externalMeasure=null,Ge(ie.display.lineMeasure);for(var ae=0;ae<ie.display.view.length;ae++)ll(ie.display.view[ae])}function ms(ie){Ss(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function Ua(){return bt&&ne?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ss(){return bt&&ne?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function xs(ie){var ae=0;if(ie.widgets)for(var he=0;he<ie.widgets.length;++he)ie.widgets[he].above&&(ae+=Ml(ie.widgets[he]));return ae}function vs(ie,ae,he,de,Se){if(!Se){var Ie=xs(ae);he.top+=Ie,he.bottom+=Ie}if(de=="line")return he;de||(de="local");var Xe=Bo(ae);if(de=="local"?Xe+=vl(ie.display):Xe-=ie.display.viewOffset,de=="page"||de=="window"){var ht=ie.display.lineSpace.getBoundingClientRect();Xe+=ht.top+(de=="window"?0:ss());var ut=ht.left+(de=="window"?0:Ua());he.left+=ut,he.right+=ut}return he.top+=Xe,he.bottom+=Xe,he}function oc(ie,ae,he){if(he=="div")return ae;var de=ae.left,Se=ae.top;if(he=="page")de-=Ua(),Se-=ss();else if(he=="local"||!he){var Ie=ie.display.sizer.getBoundingClientRect();de+=Ie.left,Se+=Ie.top}var Xe=ie.display.lineSpace.getBoundingClientRect();return{left:de-Xe.left,top:Se-Xe.top}}function _l(ie,ae,he,de,Se){return de||(de=cn(ie.doc,ae.line)),vs(ie,de,id(ie,de,ae.ch,Se),he)}function is(ie,ae,he,de,Se,Ie){de=de||cn(ie.doc,ae.line),Se||(Se=Js(ie,de));function Xe(tr,lr){var wr=uu(ie,Se,tr,lr?"right":"left",Ie);return lr?wr.left=wr.right:wr.right=wr.left,vs(ie,de,wr,he)}var ht=We(de,ie.doc.direction),ut=ae.ch,Zt=ae.sticky;if(ut>=de.text.length?(ut=de.text.length,Zt="before"):ut<=0&&(ut=0,Zt="after"),!ht)return Xe(Zt=="before"?ut-1:ut,Zt=="before");function zn(tr,lr,wr){var Vr=ht[lr],yo=Vr.level==1;return Xe(wr?tr-1:tr,yo!=wr)}var Qt=ve(ht,ut,Zt),ci=Pe,ai=zn(ut,Qt,Zt=="before");return ci!=null&&(ai.other=zn(ut,ci,Zt!="before")),ai}function bh(ie,ae){var he=0;ae=Zn(ie.doc,ae),ie.options.lineWrapping||(he=Mu(ie.display)*ae.ch);var de=cn(ie.doc,ae.line),Se=Bo(de)+vl(ie.display);return{left:he,right:he,top:Se,bottom:Se+de.height}}function Eh(ie,ae,he,de,Se){var Ie=rn(ie,ae,he);return Ie.xRel=Se,de&&(Ie.outside=de),Ie}function Uu(ie,ae,he){var de=ie.doc;if(he+=ie.display.viewOffset,he<0)return Eh(de.first,0,null,-1,-1);var Se=An(de,he),Ie=de.first+de.size-1;if(Se>Ie)return Eh(de.first+de.size-1,cn(de,Ie).text.length,null,1,1);ae<0&&(ae=0);for(var Xe=cn(de,Se);;){var ht=xi(ie,Xe,Se,ae,he),ut=Fr(Xe,ht.ch+(ht.xRel>0||ht.outside>0?1:0));if(!ut)return ht;var Zt=ut.find(1);if(Zt.line==Se)return Zt;Xe=cn(de,Se=Zt.line)}}function ro(ie,ae,he,de){de-=xs(ae);var Se=ae.text.length,Ie=et(function(Xe){return uu(ie,he,Xe-1).bottom<=de},Se,0);return Se=et(function(Xe){return uu(ie,he,Xe).top>de},Ie,Se),{begin:Ie,end:Se}}function rd(ie,ae,he,de){he||(he=Js(ie,ae));var Se=vs(ie,ae,uu(ie,he,de),"line").top;return ro(ie,ae,he,Se)}function en(ie,ae,he,de){return ie.bottom<=he?!1:ie.top>he?!0:(de?ie.left:ie.right)>ae}function xi(ie,ae,he,de,Se){Se-=Bo(ae);var Ie=Js(ie,ae),Xe=xs(ae),ht=0,ut=ae.text.length,Zt=!0,zn=We(ae,ie.doc.direction);if(zn){var Qt=(ie.options.lineWrapping?Lh:Mh)(ie,ae,he,Ie,zn,de,Se);Zt=Qt.level!=1,ht=Zt?Qt.from:Qt.to-1,ut=Zt?Qt.to:Qt.from-1}var ci=null,ai=null,tr=et(function(Qo){var so=uu(ie,Ie,Qo);return so.top+=Xe,so.bottom+=Xe,en(so,de,Se,!1)?(so.top<=Se&&so.left<=de&&(ci=Qo,ai=so),!0):!1},ht,ut),lr,wr,Vr=!1;if(ai){var yo=de-ai.left<ai.right-de,ao=yo==Zt;tr=ci+(ao?0:1),wr=ao?"after":"before",lr=yo?ai.left:ai.right}else{!Zt&&(tr==ut||tr==ht)&&tr++,wr=tr==0?"after":tr==ae.text.length?"before":uu(ie,Ie,tr-(Zt?1:0)).bottom+Xe<=Se==Zt?"after":"before";var Eo=is(ie,rn(he,tr,wr),"line",ae,Ie);lr=Eo.left,Vr=Se<Eo.top?-1:Se>=Eo.bottom?1:0}return tr=rt(ae.text,tr,1),Eh(he,tr,wr,Vr,de-lr)}function Mh(ie,ae,he,de,Se,Ie,Xe){var ht=et(function(Qt){var ci=Se[Qt],ai=ci.level!=1;return en(is(ie,rn(he,ai?ci.to:ci.from,ai?"before":"after"),"line",ae,de),Ie,Xe,!0)},0,Se.length-1),ut=Se[ht];if(ht>0){var Zt=ut.level!=1,zn=is(ie,rn(he,Zt?ut.from:ut.to,Zt?"after":"before"),"line",ae,de);en(zn,Ie,Xe,!0)&&zn.top>Xe&&(ut=Se[ht-1])}return ut}function Lh(ie,ae,he,de,Se,Ie,Xe){var ht=ro(ie,ae,de,Xe),ut=ht.begin,Zt=ht.end;/\s/.test(ae.text.charAt(Zt-1))&&Zt--;for(var zn=null,Qt=null,ci=0;ci<Se.length;ci++){var ai=Se[ci];if(!(ai.from>=Zt||ai.to<=ut)){var tr=ai.level!=1,lr=uu(ie,de,tr?Math.min(Zt,ai.to)-1:Math.max(ut,ai.from)).right,wr=lr<Ie?Ie-lr+1e9:lr-Ie;(!zn||Qt>wr)&&(zn=ai,Qt=wr)}}return zn||(zn=Se[Se.length-1]),zn.from<ut&&(zn={from:ut,to:zn.to,level:zn.level}),zn.to>Zt&&(zn={from:zn.from,to:Zt,level:zn.level}),zn}var ac;function cu(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(ac==null){ac=Je("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)ac.appendChild(document.createTextNode("x")),ac.appendChild(Je("br"));ac.appendChild(document.createTextNode("x"))}nt(ie.measure,ac);var he=ac.offsetHeight/50;return he>3&&(ie.cachedTextHeight=he),Ge(ie.measure),he||1}function Mu(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=Je("span","xxxxxxxxxx"),he=Je("pre",[ae],"CodeMirror-line-like");nt(ie.measure,he);var de=ae.getBoundingClientRect(),Se=(de.right-de.left)/10;return Se>2&&(ie.cachedCharWidth=Se),Se||10}function Nh(ie){for(var ae=ie.display,he={},de={},Se=ae.gutters.clientLeft,Ie=ae.gutters.firstChild,Xe=0;Ie;Ie=Ie.nextSibling,++Xe){var ht=ie.display.gutterSpecs[Xe].className;he[ht]=Ie.offsetLeft+Ie.clientLeft+Se,de[ht]=Ie.clientWidth}return{fixedPos:Pd(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:he,gutterWidth:de,wrapperWidth:ae.wrapper.clientWidth}}function Pd(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function ys(ie){var ae=cu(ie.display),he=ie.options.lineWrapping,de=he&&Math.max(5,ie.display.scroller.clientWidth/Mu(ie.display)-3);return function(Se){if(pi(ie.doc,Se))return 0;var Ie=0;if(Se.widgets)for(var Xe=0;Xe<Se.widgets.length;Xe++)Se.widgets[Xe].height&&(Ie+=Se.widgets[Xe].height);return he?Ie+(Math.ceil(Se.text.length/de)||1)*ae:Ie+ae}}function To(ie){var ae=ie.doc,he=ys(ie);ae.iter(function(de){var Se=he(de);Se!=de.height&&Jn(de,Se)})}function yl(ie,ae,he,de){var Se=ie.display;if(!he&&_i(ae).getAttribute("cm-not-content")=="true")return null;var Ie,Xe,ht=Se.lineSpace.getBoundingClientRect();try{Ie=ae.clientX-ht.left,Xe=ae.clientY-ht.top}catch(Qt){return null}var ut=Uu(ie,Ie,Xe),Zt;if(de&&ut.xRel>0&&(Zt=cn(ie.doc,ut.line).text).length==ut.ch){var zn=it(Zt,Zt.length,ie.options.tabSize)-Zt.length;ut=rn(ut.line,Math.max(0,Math.round((Ie-rc(ie.display).left)/Mu(ie.display))-zn))}return ut}function ul(ie,ae){if(ae>=ie.display.viewTo||(ae-=ie.display.viewFrom,ae<0))return null;for(var he=ie.display.view,de=0;de<he.length;de++)if(ae-=he[de].size,ae<0)return de}function _a(ie,ae,he,de){ae==null&&(ae=ie.doc.first),he==null&&(he=ie.doc.first+ie.doc.size),de||(de=0);var Se=ie.display;if(de&&he<Se.viewTo&&(Se.updateLineNumbers==null||Se.updateLineNumbers>ae)&&(Se.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=Se.viewTo)Rn&&Mr(ie.doc,ae)<Se.viewTo&&Hs(ie);else if(he<=Se.viewFrom)Rn&&Nr(ie.doc,he+de)>Se.viewFrom?Hs(ie):(Se.viewFrom+=de,Se.viewTo+=de);else if(ae<=Se.viewFrom&&he>=Se.viewTo)Hs(ie);else if(ae<=Se.viewFrom){var Ie=Xl(ie,he,he+de,1);Ie?(Se.view=Se.view.slice(Ie.index),Se.viewFrom=Ie.lineN,Se.viewTo+=de):Hs(ie)}else if(he>=Se.viewTo){var Xe=Xl(ie,ae,ae,-1);Xe?(Se.view=Se.view.slice(0,Xe.index),Se.viewTo=Xe.lineN):Hs(ie)}else{var ht=Xl(ie,ae,ae,-1),ut=Xl(ie,he,he+de,1);ht&&ut?(Se.view=Se.view.slice(0,ht.index).concat(cr(ie,ht.lineN,ut.lineN)).concat(Se.view.slice(ut.index)),Se.viewTo+=de):Hs(ie)}var Zt=Se.externalMeasured;Zt&&(he<Zt.lineN?Zt.lineN+=de:ae<Zt.lineN+Zt.size&&(Se.externalMeasured=null))}function ra(ie,ae,he){ie.curOp.viewChanged=!0;var de=ie.display,Se=ie.display.externalMeasured;if(Se&&ae>=Se.lineN&&ae<Se.lineN+Se.size&&(de.externalMeasured=null),!(ae<de.viewFrom||ae>=de.viewTo)){var Ie=de.view[ul(ie,ae)];if(Ie.node!=null){var Xe=Ie.changes||(Ie.changes=[]);Wt(Xe,he)==-1&&Xe.push(he)}}}function Hs(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Xl(ie,ae,he,de){var Se=ul(ie,ae),Ie,Xe=ie.display.view;if(!Rn||he==ie.doc.first+ie.doc.size)return{index:Se,lineN:he};for(var ht=ie.display.viewFrom,ut=0;ut<Se;ut++)ht+=Xe[ut].size;if(ht!=ae){if(de>0){if(Se==Xe.length-1)return null;Ie=ht+Xe[Se].size-ae,Se++}else Ie=ht-ae;ae+=Ie,he+=Ie}for(;Mr(ie.doc,he)!=he;){if(Se==(de<0?0:Xe.length-1))return null;he+=de*Xe[Se-(de<0?1:0)].size,Se+=de}return{index:Se,lineN:he}}function Ja(ie,ae,he){var de=ie.display,Se=de.view;Se.length==0||ae>=de.viewTo||he<=de.viewFrom?(de.view=cr(ie,ae,he),de.viewFrom=ae):(de.viewFrom>ae?de.view=cr(ie,ae,de.viewFrom).concat(de.view):de.viewFrom<ae&&(de.view=de.view.slice(ul(ie,ae))),de.viewFrom=ae,de.viewTo<he?de.view=de.view.concat(cr(ie,de.viewTo,he)):de.viewTo>he&&(de.view=de.view.slice(0,ul(ie,he)))),de.viewTo=he}function du(ie){for(var ae=ie.display.view,he=0,de=0;de<ae.length;de++){var Se=ae[de];!Se.hidden&&(!Se.node||Se.changes)&&++he}return he}function nl(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function od(ie,ae){ae===void 0&&(ae=!0);for(var he=ie.doc,de={},Se=de.cursors=document.createDocumentFragment(),Ie=de.selection=document.createDocumentFragment(),Xe=0;Xe<he.sel.ranges.length;Xe++)if(!(!ae&&Xe==he.sel.primIndex)){var ht=he.sel.ranges[Xe];if(!(ht.from().line>=ie.display.viewTo||ht.to().line<ie.display.viewFrom)){var ut=ht.empty();(ut||ie.options.showCursorWhenSelecting)&&Pa(ie,ht.head,Se),ut||wa(ie,ht,Ie)}}return de}function Pa(ie,ae,he){var de=is(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),Se=he.appendChild(Je("div","\xA0","CodeMirror-cursor"));if(Se.style.left=de.left+"px",Se.style.top=de.top+"px",Se.style.height=Math.max(0,de.bottom-de.top)*ie.options.cursorHeight+"px",de.other){var Ie=he.appendChild(Je("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Ie.style.display="",Ie.style.left=de.other.left+"px",Ie.style.top=de.other.top+"px",Ie.style.height=(de.other.bottom-de.other.top)*.85+"px"}}function Ll(ie,ae){return ie.top-ae.top||ie.left-ae.left}function wa(ie,ae,he){var de=ie.display,Se=ie.doc,Ie=document.createDocumentFragment(),Xe=rc(ie.display),ht=Xe.left,ut=Math.max(de.sizerWidth,sl(ie)-de.sizer.offsetLeft)-Xe.right,Zt=Se.direction=="ltr";function zn(ao,Eo,Qo,so){Eo<0&&(Eo=0),Eo=Math.round(Eo),so=Math.round(so),Ie.appendChild(Je("div",null,"CodeMirror-selected","position: absolute; left: "+ao+`px;
|
|
|
top: `+Eo+"px; width: "+(Qo==null?ut-ao:Qo)+`px;
|
|
|
height: `+(so-Eo)+"px"))}function Qt(ao,Eo,Qo){var so=cn(Se,ao),ha=so.text.length,ws,Pl;function ks(fl,vu){return _l(ie,rn(ao,fl),"div",so,vu)}function mu(fl,vu,Nl){var gl=rd(ie,so,null,fl),Za=vu=="ltr"==(Nl=="after")?"left":"right",Is=Nl=="after"?gl.begin:gl.end-(/\s/.test(so.text.charAt(gl.end-1))?2:1);return ks(Is,Za)[Za]}var zl=We(so,Se.direction);return Oe(zl,Eo||0,Qo==null?ha:Qo,function(fl,vu,Nl,gl){var Za=Nl=="ltr",Is=ks(fl,Za?"left":"right"),bl=ks(vu-1,Za?"right":"left"),Fl=Eo==null&&fl==0,cc=Qo==null&&vu==ha,Os=gl==0,Zu=!zl||gl==zl.length-1;if(bl.top-Is.top<=3){var xe=(Zt?Fl:cc)&&Os,Ce=(Zt?cc:Fl)&&Zu,ke=xe?ht:(Za?Is:bl).left,$e=Ce?ut:(Za?bl:Is).right;zn(ke,Is.top,$e-ke,Is.bottom)}else{var vt,pt,Bt,Vt;Za?(vt=Zt&&Fl&&Os?ht:Is.left,pt=Zt?ut:mu(fl,Nl,"before"),Bt=Zt?ht:mu(vu,Nl,"after"),Vt=Zt&&cc&&Zu?ut:bl.right):(vt=Zt?mu(fl,Nl,"before"):ht,pt=!Zt&&Fl&&Os?ut:Is.right,Bt=!Zt&&cc&&Zu?ht:bl.left,Vt=Zt?mu(vu,Nl,"after"):ut),zn(vt,Is.top,pt-vt,Is.bottom),Is.bottom<bl.top&&zn(ht,Is.bottom,null,bl.top),zn(Bt,bl.top,Vt-Bt,bl.bottom)}(!ws||Ll(Is,ws)<0)&&(ws=Is),Ll(bl,ws)<0&&(ws=bl),(!Pl||Ll(Is,Pl)<0)&&(Pl=Is),Ll(bl,Pl)<0&&(Pl=bl)}),{start:ws,end:Pl}}var ci=ae.from(),ai=ae.to();if(ci.line==ai.line)Qt(ci.line,ci.ch,ai.ch);else{var tr=cn(Se,ci.line),lr=cn(Se,ai.line),wr=qr(tr)==qr(lr),Vr=Qt(ci.line,ci.ch,wr?tr.text.length+1:null).end,yo=Qt(ai.line,wr?0:null,ai.ch).start;wr&&(Vr.top<yo.top-2?(zn(Vr.right,Vr.top,null,Vr.bottom),zn(ht,yo.top,yo.left,yo.bottom)):zn(Vr.right,Vr.top,yo.left-Vr.right,Vr.bottom)),Vr.bottom<yo.top&&zn(ht,Vr.bottom,null,yo.top)}he.appendChild(Ie)}function Va(ie){if(ie.state.focused){var ae=ie.display;clearInterval(ae.blinker);var he=!0;ae.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ae.blinker=setInterval(function(){ie.hasFocus()||ad(ie),ae.cursorDiv.style.visibility=(he=!he)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ae.cursorDiv.style.visibility="hidden")}}function cs(ie){ie.state.focused||(ie.display.input.focus(),Na(ie))}function Ps(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,ad(ie))},100)}function Na(ie,ae){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(Pt(ie,"focus",ie,ae),ie.state.focused=!0,Ot(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),Me&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),Va(ie))}function ad(ie,ae){ie.state.delayingBlurEvent||(ie.state.focused&&(Pt(ie,"blur",ie,ae),ie.state.focused=!1,ze(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function Do(ie){for(var ae=ie.display,he=ae.lineDiv.offsetTop,de=0;de<ae.view.length;de++){var Se=ae.view[de],Ie=ie.options.lineWrapping,Xe=void 0,ht=0;if(!Se.hidden){if(Ke&&st<8){var ut=Se.node.offsetTop+Se.node.offsetHeight;Xe=ut-he,he=ut}else{var Zt=Se.node.getBoundingClientRect();Xe=Zt.bottom-Zt.top,!Ie&&Se.text.firstChild&&(ht=Se.text.firstChild.getBoundingClientRect().right-Zt.left-1)}var zn=Se.line.height-Xe;if((zn>.005||zn<-.005)&&(Jn(Se.line,Xe),Rf(Se.line),Se.rest))for(var Qt=0;Qt<Se.rest.length;Qt++)Rf(Se.rest[Qt]);if(ht>ie.display.sizerWidth){var ci=Math.ceil(ht/Mu(ie.display));ci>ie.display.maxLineLength&&(ie.display.maxLineLength=ci,ie.display.maxLine=Se.line,ie.display.maxLineChanged=!0)}}}}function Rf(ie){if(ie.widgets)for(var ae=0;ae<ie.widgets.length;++ae){var he=ie.widgets[ae],de=he.node.parentNode;de&&(he.height=de.offsetHeight)}}function fa(ie,ae,he){var de=he&&he.top!=null?Math.max(0,he.top):ie.scroller.scrollTop;de=Math.floor(de-vl(ie));var Se=he&&he.bottom!=null?he.bottom:de+ie.wrapper.clientHeight,Ie=An(ae,de),Xe=An(ae,Se);if(he&&he.ensure){var ht=he.ensure.from.line,ut=he.ensure.to.line;ht<Ie?(Ie=ht,Xe=An(ae,Bo(cn(ae,ht))+ie.wrapper.clientHeight)):Math.min(ut,ae.lastLine())>=Xe&&(Ie=An(ae,Bo(cn(ae,ut))-ie.wrapper.clientHeight),Xe=ut)}return{from:Ie,to:Math.max(Xe,Ie+1)}}function jf(ie,ae){if(!qt(ie,"scrollCursorIntoView")){var he=ie.display,de=he.sizer.getBoundingClientRect(),Se=null;if(ae.top+de.top<0?Se=!0:ae.bottom+de.top>(window.innerHeight||document.documentElement.clientHeight)&&(Se=!1),Se!=null&&!jt){var Ie=Je("div","\u200B",null,`position: absolute;
|
|
|
top: `+(ae.top-he.viewOffset-vl(ie.display))+`px;
|
|
|
height: `+(ae.bottom-ae.top+wl(ie)+he.barHeight)+`px;
|
|
|
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(Ie),Ie.scrollIntoView(Se),ie.display.lineSpace.removeChild(Ie)}}}function sd(ie,ae,he,de){de==null&&(de=0);var Se;!ie.options.lineWrapping&&ae==he&&(ae=ae.ch?rn(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,he=ae.sticky=="before"?rn(ae.line,ae.ch+1,"before"):ae);for(var Ie=0;Ie<5;Ie++){var Xe=!1,ht=is(ie,ae),ut=!he||he==ae?ht:is(ie,he);Se={left:Math.min(ht.left,ut.left),top:Math.min(ht.top,ut.top)-de,right:Math.max(ht.left,ut.left),bottom:Math.max(ht.bottom,ut.bottom)+de};var Zt=zf(ie,Se),zn=ie.doc.scrollTop,Qt=ie.doc.scrollLeft;if(Zt.scrollTop!=null&&(_u(ie,Zt.scrollTop),Math.abs(ie.doc.scrollTop-zn)>1&&(Xe=!0)),Zt.scrollLeft!=null&&(kl(ie,Zt.scrollLeft),Math.abs(ie.doc.scrollLeft-Qt)>1&&(Xe=!0)),!Xe)break}return Se}function wd(ie,ae){var he=zf(ie,ae);he.scrollTop!=null&&_u(ie,he.scrollTop),he.scrollLeft!=null&&kl(ie,he.scrollLeft)}function zf(ie,ae){var he=ie.display,de=cu(ie.display);ae.top<0&&(ae.top=0);var Se=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:he.scroller.scrollTop,Ie=td(ie),Xe={};ae.bottom-ae.top>Ie&&(ae.bottom=ae.top+Ie);var ht=ie.doc.height+ju(he),ut=ae.top<de,Zt=ae.bottom>ht-de;if(ae.top<Se)Xe.scrollTop=ut?0:ae.top;else if(ae.bottom>Se+Ie){var zn=Math.min(ae.top,(Zt?ht:ae.bottom)-Ie);zn!=Se&&(Xe.scrollTop=zn)}var Qt=ie.options.fixedGutter?0:he.gutters.offsetWidth,ci=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:he.scroller.scrollLeft-Qt,ai=sl(ie)-he.gutters.offsetWidth,tr=ae.right-ae.left>ai;return tr&&(ae.right=ae.left+ai),ae.left<10?Xe.scrollLeft=0:ae.left<ci?Xe.scrollLeft=Math.max(0,ae.left+Qt-(tr?0:10)):ae.right>ai+ci-3&&(Xe.scrollLeft=ae.right+(tr?0:10)-ai),Xe}function Xd(ie,ae){ae!=null&&(sc(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ae)}function ld(ie){sc(ie);var ae=ie.getCursor();ie.curOp.scrollToPos={from:ae,to:ae,margin:ie.options.cursorScrollMargin}}function ud(ie,ae,he){(ae!=null||he!=null)&&sc(ie),ae!=null&&(ie.curOp.scrollLeft=ae),he!=null&&(ie.curOp.scrollTop=he)}function Fa(ie,ae){sc(ie),ie.curOp.scrollToPos=ae}function sc(ie){var ae=ie.curOp.scrollToPos;if(ae){ie.curOp.scrollToPos=null;var he=bh(ie,ae.from),de=bh(ie,ae.to);Yd(ie,he,de,ae.margin)}}function Yd(ie,ae,he,de){var Se=zf(ie,{left:Math.min(ae.left,he.left),top:Math.min(ae.top,he.top)-de,right:Math.max(ae.right,he.right),bottom:Math.max(ae.bottom,he.bottom)+de});ud(ie,Se.scrollLeft,Se.scrollTop)}function _u(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(ge||zr(ie,{top:ae}),Fh(ie,ae,!0),ge&&zr(ie),Mi(ie,100))}function Fh(ie,ae,he){ae=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ae)),!(ie.display.scroller.scrollTop==ae&&!he)&&(ie.doc.scrollTop=ae,ie.display.scrollbars.setScrollTop(ae),ie.display.scroller.scrollTop!=ae&&(ie.display.scroller.scrollTop=ae))}function kl(ie,ae,he,de){ae=Math.max(0,Math.min(ae,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((he?ae==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ae)<2)&&!de)&&(ie.doc.scrollLeft=ae,ko(ie),ie.display.scroller.scrollLeft!=ae&&(ie.display.scroller.scrollLeft=ae),ie.display.scrollbars.setScrollLeft(ae))}function Il(ie){var ae=ie.display,he=ae.gutters.offsetWidth,de=Math.round(ie.doc.height+ju(ie.display));return{clientHeight:ae.scroller.clientHeight,viewHeight:ae.wrapper.clientHeight,scrollWidth:ae.scroller.scrollWidth,clientWidth:ae.scroller.clientWidth,viewWidth:ae.wrapper.clientWidth,barLeft:ie.options.fixedGutter?he:0,docHeight:de,scrollHeight:de+wl(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:he}}var xc=function(ie,ae,he){this.cm=he;var de=this.vert=Je("div",[Je("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Se=this.horiz=Je("div",[Je("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");de.tabIndex=Se.tabIndex=-1,ie(de),ie(Se),ft(de,"scroll",function(){de.clientHeight&&ae(de.scrollTop,"vertical")}),ft(Se,"scroll",function(){Se.clientWidth&&ae(Se.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ke&&st<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xc.prototype.update=function(ie){var ae=ie.scrollWidth>ie.clientWidth+1,he=ie.scrollHeight>ie.clientHeight+1,de=ie.nativeBarWidth;if(he){this.vert.style.display="block",this.vert.style.bottom=ae?de+"px":"0";var Se=ie.viewHeight-(ae?de:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+Se)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ae){this.horiz.style.display="block",this.horiz.style.right=he?de+"px":"0",this.horiz.style.left=ie.barLeft+"px";var Ie=ie.viewWidth-ie.barLeft-(he?de:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+Ie)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(de==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:he?de:0,bottom:ae?de:0}},xc.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xc.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xc.prototype.zeroWidthHack=function(){var ie=ce&&!yt?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new _e,this.disableVert=new _e},xc.prototype.enableZeroWidthBar=function(ie,ae,he){ie.style.pointerEvents="auto";function de(){var Se=ie.getBoundingClientRect(),Ie=he=="vert"?document.elementFromPoint(Se.right-1,(Se.top+Se.bottom)/2):document.elementFromPoint((Se.right+Se.left)/2,Se.bottom-1);Ie!=ie?ie.style.pointerEvents="none":ae.set(1e3,de)}ae.set(1e3,de)},xc.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Lu=function(){};Lu.prototype.update=function(){return{bottom:0,right:0}},Lu.prototype.setScrollLeft=function(){},Lu.prototype.setScrollTop=function(){},Lu.prototype.clear=function(){};function lc(ie,ae){ae||(ae=Il(ie));var he=ie.display.barWidth,de=ie.display.barHeight;Jd(ie,ae);for(var Se=0;Se<4&&he!=ie.display.barWidth||de!=ie.display.barHeight;Se++)he!=ie.display.barWidth&&ie.options.lineWrapping&&Do(ie),Jd(ie,Il(ie)),he=ie.display.barWidth,de=ie.display.barHeight}function Jd(ie,ae){var he=ie.display,de=he.scrollbars.update(ae);he.sizer.style.paddingRight=(he.barWidth=de.right)+"px",he.sizer.style.paddingBottom=(he.barHeight=de.bottom)+"px",he.heightForcer.style.borderBottom=de.bottom+"px solid transparent",de.right&&de.bottom?(he.scrollbarFiller.style.display="block",he.scrollbarFiller.style.height=de.bottom+"px",he.scrollbarFiller.style.width=de.right+"px"):he.scrollbarFiller.style.display="",de.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(he.gutterFiller.style.display="block",he.gutterFiller.style.height=de.bottom+"px",he.gutterFiller.style.width=ae.gutterWidth+"px"):he.gutterFiller.style.display=""}var of={native:xc,null:Lu};function Ah(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&ze(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new of[ie.options.scrollbarStyle](function(ae){ie.display.wrapper.insertBefore(ae,ie.display.scrollbarFiller),ft(ae,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ae.setAttribute("cm-not-content","true")},function(ae,he){he=="horizontal"?kl(ie,ae):_u(ie,ae)},ie),ie.display.scrollbars.addClass&&Ot(ie.display.wrapper,ie.display.scrollbars.addClass)}var Hf=0;function Ol(ie){ie.curOp={cm:ie,viewChanged:!1,startHeight:ie.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Hf},Gr(ie.curOp)}function Oc(ie){var ae=ie.curOp;ae&&kr(ae,function(he){for(var de=0;de<he.ops.length;de++)he.ops[de].cm.curOp=null;dg(he)})}function dg(ie){for(var ae=ie.ops,he=0;he<ae.length;he++)mt(ae[he]);for(var de=0;de<ae.length;de++)wt(ae[de]);for(var Se=0;Se<ae.length;Se++)on(ae[Se]);for(var Ie=0;Ie<ae.length;Ie++)dn(ae[Ie]);for(var Xe=0;Xe<ae.length;Xe++)Hn(ae[Xe])}function mt(ie){var ae=ie.cm,he=ae.display;gr(ae),ie.updateMaxLine&&Ho(ae),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<he.viewFrom||ie.scrollToPos.to.line>=he.viewTo)||he.maxLineChanged&&ae.options.lineWrapping,ie.update=ie.mustUpdate&&new Ni(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function wt(ie){ie.updatedDisplay=ie.mustUpdate&&Wr(ie.cm,ie.update)}function on(ie){var ae=ie.cm,he=ae.display;ie.updatedDisplay&&Do(ae),ie.barMeasure=Il(ae),he.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=id(ae,he.maxLine,he.maxLine.text.length).left+3,ae.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(he.scroller.clientWidth,he.sizer.offsetLeft+ie.adjustWidthTo+wl(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,he.sizer.offsetLeft+ie.adjustWidthTo-sl(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=he.input.prepareSelection())}function dn(ie){var ae=ie.cm;ie.adjustWidthTo!=null&&(ae.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ae.doc.scrollLeft&&kl(ae,Math.min(ae.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ae.display.maxLineChanged=!1);var he=ie.focus&&ie.focus==tt();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,he),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&lc(ae,ie.barMeasure),ie.updatedDisplay&&xo(ae,ie.barMeasure),ie.selectionChanged&&Va(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),he&&cs(ie.cm)}function Hn(ie){var ae=ie.cm,he=ae.display,de=ae.doc;if(ie.updatedDisplay&&sr(ae,ie.update),he.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(he.wheelStartX=he.wheelStartY=null),ie.scrollTop!=null&&Fh(ae,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&kl(ae,ie.scrollLeft,!0,!0),ie.scrollToPos){var Se=sd(ae,Zn(de,ie.scrollToPos.from),Zn(de,ie.scrollToPos.to),ie.scrollToPos.margin);jf(ae,Se)}var Ie=ie.maybeHiddenMarkers,Xe=ie.maybeUnhiddenMarkers;if(Ie)for(var ht=0;ht<Ie.length;++ht)Ie[ht].lines.length||Pt(Ie[ht],"hide");if(Xe)for(var ut=0;ut<Xe.length;++ut)Xe[ut].lines.length&&Pt(Xe[ut],"unhide");he.wrapper.offsetHeight&&(de.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&Pt(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function En(ie,ae){if(ie.curOp)return ae();Ol(ie);try{return ae()}finally{Oc(ie)}}function si(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);Ol(ie);try{return ae.apply(ie,arguments)}finally{Oc(ie)}}}function li(ie){return function(){if(this.curOp)return ie.apply(this,arguments);Ol(this);try{return ie.apply(this,arguments)}finally{Oc(this)}}}function ti(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);Ol(ae);try{return ie.apply(this,arguments)}finally{Oc(ae)}}}function Mi(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,Xt(Ai,ie))}function Ai(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var he=+new Date+ie.options.workTime,de=Gi(ie,ae.highlightFrontier),Se=[];ae.iter(de.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(Ie){if(de.line>=ie.display.viewFrom){var Xe=Ie.styles,ht=Ie.text.length>ie.options.maxHighlightLength?nn(ae.mode,de.state):null,ut=Ji(ie,Ie,de,!0);ht&&(de.state=ht),Ie.styles=ut.styles;var Zt=Ie.styleClasses,zn=ut.classes;zn?Ie.styleClasses=zn:Zt&&(Ie.styleClasses=null);for(var Qt=!Xe||Xe.length!=Ie.styles.length||Zt!=zn&&(!Zt||!zn||Zt.bgClass!=zn.bgClass||Zt.textClass!=zn.textClass),ci=0;!Qt&&ci<Xe.length;++ci)Qt=Xe[ci]!=Ie.styles[ci];Qt&&Se.push(de.line),Ie.stateAfter=de.save(),de.nextLine()}else Ie.text.length<=ie.options.maxHighlightLength&&gn(ie,Ie.text,de),Ie.stateAfter=de.line%5==0?de.save():null,de.nextLine();if(+new Date>he)return Mi(ie,ie.options.workDelay),!0}),ae.highlightFrontier=de.line,ae.modeFrontier=Math.max(ae.modeFrontier,de.line),Se.length&&En(ie,function(){for(var Ie=0;Ie<Se.length;Ie++)ra(ie,Se[Ie],"text")})}}var Ni=function(ie,ae,he){var de=ie.display;this.viewport=ae,this.visible=fa(de,ie.doc,ae),this.editorIsHidden=!de.wrapper.offsetWidth,this.wrapperHeight=de.wrapper.clientHeight,this.wrapperWidth=de.wrapper.clientWidth,this.oldDisplayWidth=sl(ie),this.force=he,this.dims=Nh(ie),this.events=[]};Ni.prototype.signal=function(ie,ae){hn(ie,ae)&&this.events.push(arguments)},Ni.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)Pt.apply(null,this.events[ie])};function gr(ie){var ae=ie.display;!ae.scrollbarsClipped&&ae.scroller.offsetWidth&&(ae.nativeBarWidth=ae.scroller.offsetWidth-ae.scroller.clientWidth,ae.heightForcer.style.height=wl(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=wl(ie)+"px",ae.scrollbarsClipped=!0)}function dr(ie){if(ie.hasFocus())return null;var ae=tt();if(!ae||!Et(ie.display.lineDiv,ae))return null;var he={activeElt:ae};if(window.getSelection){var de=window.getSelection();de.anchorNode&&de.extend&&Et(ie.display.lineDiv,de.anchorNode)&&(he.anchorNode=de.anchorNode,he.anchorOffset=de.anchorOffset,he.focusNode=de.focusNode,he.focusOffset=de.focusOffset)}return he}function ir(ie){if(!(!ie||!ie.activeElt||ie.activeElt==tt())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&Et(document.body,ie.anchorNode)&&Et(document.body,ie.focusNode))){var ae=window.getSelection(),he=document.createRange();he.setEnd(ie.anchorNode,ie.anchorOffset),he.collapse(!1),ae.removeAllRanges(),ae.addRange(he),ae.extend(ie.focusNode,ie.focusOffset)}}function Wr(ie,ae){var he=ie.display,de=ie.doc;if(ae.editorIsHidden)return Hs(ie),!1;if(!ae.force&&ae.visible.from>=he.viewFrom&&ae.visible.to<=he.viewTo&&(he.updateLineNumbers==null||he.updateLineNumbers>=he.viewTo)&&he.renderedView==he.view&&du(ie)==0)return!1;$r(ie)&&(Hs(ie),ae.dims=Nh(ie));var Se=de.first+de.size,Ie=Math.max(ae.visible.from-ie.options.viewportMargin,de.first),Xe=Math.min(Se,ae.visible.to+ie.options.viewportMargin);he.viewFrom<Ie&&Ie-he.viewFrom<20&&(Ie=Math.max(de.first,he.viewFrom)),he.viewTo>Xe&&he.viewTo-Xe<20&&(Xe=Math.min(Se,he.viewTo)),Rn&&(Ie=Mr(ie.doc,Ie),Xe=Nr(ie.doc,Xe));var ht=Ie!=he.viewFrom||Xe!=he.viewTo||he.lastWrapHeight!=ae.wrapperHeight||he.lastWrapWidth!=ae.wrapperWidth;Ja(ie,Ie,Xe),he.viewOffset=Bo(cn(ie.doc,he.viewFrom)),ie.display.mover.style.top=he.viewOffset+"px";var ut=du(ie);if(!ht&&ut==0&&!ae.force&&he.renderedView==he.view&&(he.updateLineNumbers==null||he.updateLineNumbers>=he.viewTo))return!1;var Zt=dr(ie);return ut>4&&(he.lineDiv.style.display="none"),Ir(ie,he.updateLineNumbers,ae.dims),ut>4&&(he.lineDiv.style.display=""),he.renderedView=he.view,ir(Zt),Ge(he.cursorDiv),Ge(he.selectionDiv),he.gutters.style.height=he.sizer.style.minHeight=0,ht&&(he.lastWrapHeight=ae.wrapperHeight,he.lastWrapWidth=ae.wrapperWidth,Mi(ie,400)),he.updateLineNumbers=null,!0}function sr(ie,ae){for(var he=ae.viewport,de=!0;;de=!1){if(!de||!ie.options.lineWrapping||ae.oldDisplayWidth==sl(ie)){if(he&&he.top!=null&&(he={top:Math.min(ie.doc.height+ju(ie.display)-td(ie),he.top)}),ae.visible=fa(ie.display,ie.doc,he),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else de&&(ae.visible=fa(ie.display,ie.doc,he));if(!Wr(ie,ae))break;Do(ie);var Se=Il(ie);nl(ie),lc(ie,Se),xo(ie,Se),ae.force=!1}ae.signal(ie,"update",ie),(ie.display.viewFrom!=ie.display.reportedViewFrom||ie.display.viewTo!=ie.display.reportedViewTo)&&(ae.signal(ie,"viewportChange",ie,ie.display.viewFrom,ie.display.viewTo),ie.display.reportedViewFrom=ie.display.viewFrom,ie.display.reportedViewTo=ie.display.viewTo)}function zr(ie,ae){var he=new Ni(ie,ae);if(Wr(ie,he)){Do(ie),sr(ie,he);var de=Il(ie);nl(ie),lc(ie,de),xo(ie,de),he.finish()}}function Ir(ie,ae,he){var de=ie.display,Se=ie.options.lineNumbers,Ie=de.lineDiv,Xe=Ie.firstChild;function ht(tr){var lr=tr.nextSibling;return Me&&ce&&ie.display.currentWheelTarget==tr?tr.style.display="none":tr.parentNode.removeChild(tr),lr}for(var ut=de.view,Zt=de.viewFrom,zn=0;zn<ut.length;zn++){var Qt=ut[zn];if(!Qt.hidden)if(!Qt.node||Qt.node.parentNode!=Ie){var ci=su(ie,Qt,Zt,he);Ie.insertBefore(ci,Xe)}else{for(;Xe!=Qt.node;)Xe=ht(Xe);var ai=Se&&ae!=null&&ae<=Zt&&Qt.lineNumber;Qt.changes&&(Wt(Qt.changes,"gutter")>-1&&(ai=!1),Ra(ie,Qt,Zt,he)),ai&&(Ge(Qt.lineNumber),Qt.lineNumber.appendChild(document.createTextNode(Si(ie.options,Zt)))),Xe=Qt.node.nextSibling}Zt+=Qt.size}for(;Xe;)Xe=ht(Xe)}function eo(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function xo(ie,ae){ie.display.sizer.style.minHeight=ae.docHeight+"px",ie.display.heightForcer.style.top=ae.docHeight+"px",ie.display.gutters.style.height=ae.docHeight+ie.display.barHeight+wl(ie)+"px"}function ko(ie){var ae=ie.display,he=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var de=Pd(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,Se=ae.gutters.offsetWidth,Ie=de+"px",Xe=0;Xe<he.length;Xe++)if(!he[Xe].hidden){ie.options.fixedGutter&&(he[Xe].gutter&&(he[Xe].gutter.style.left=Ie),he[Xe].gutterBackground&&(he[Xe].gutterBackground.style.left=Ie));var ht=he[Xe].alignable;if(ht)for(var ut=0;ut<ht.length;ut++)ht[ut].style.left=Ie}ie.options.fixedGutter&&(ae.gutters.style.left=de+Se+"px")}}function $r(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,he=Si(ie.options,ae.first+ae.size-1),de=ie.display;if(he.length!=de.lineNumChars){var Se=de.measure.appendChild(Je("div",[Je("div",he)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Ie=Se.firstChild.offsetWidth,Xe=Se.offsetWidth-Ie;return de.lineGutter.style.width="",de.lineNumInnerWidth=Math.max(Ie,de.lineGutter.offsetWidth-Xe)+1,de.lineNumWidth=de.lineNumInnerWidth+Xe,de.lineNumChars=de.lineNumInnerWidth?he.length:-1,de.lineGutter.style.width=de.lineNumWidth+"px",eo(ie.display),!0}return!1}function So(ie,ae){for(var he=[],de=!1,Se=0;Se<ie.length;Se++){var Ie=ie[Se],Xe=null;if(typeof Ie!="string"&&(Xe=Ie.style,Ie=Ie.className),Ie=="CodeMirror-linenumbers")if(ae)de=!0;else continue;he.push({className:Ie,style:Xe})}return ae&&!de&&he.push({className:"CodeMirror-linenumbers",style:null}),he}function Xo(ie){var ae=ie.gutters,he=ie.gutterSpecs;Ge(ae),ie.lineGutter=null;for(var de=0;de<he.length;++de){var Se=he[de],Ie=Se.className,Xe=Se.style,ht=ae.appendChild(Je("div",null,"CodeMirror-gutter "+Ie));Xe&&(ht.style.cssText=Xe),Ie=="CodeMirror-linenumbers"&&(ie.lineGutter=ht,ht.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=he.length?"":"none",eo(ie)}function _r(ie){Xo(ie.display),_a(ie),ko(ie)}function co(ie,ae,he,de){var Se=this;this.input=he,Se.scrollbarFiller=Je("div",null,"CodeMirror-scrollbar-filler"),Se.scrollbarFiller.setAttribute("cm-not-content","true"),Se.gutterFiller=Je("div",null,"CodeMirror-gutter-filler"),Se.gutterFiller.setAttribute("cm-not-content","true"),Se.lineDiv=xt("div",null,"CodeMirror-code"),Se.selectionDiv=Je("div",null,null,"position: relative; z-index: 1"),Se.cursorDiv=Je("div",null,"CodeMirror-cursors"),Se.measure=Je("div",null,"CodeMirror-measure"),Se.lineMeasure=Je("div",null,"CodeMirror-measure"),Se.lineSpace=xt("div",[Se.measure,Se.lineMeasure,Se.selectionDiv,Se.cursorDiv,Se.lineDiv],null,"position: relative; outline: none");var Ie=xt("div",[Se.lineSpace],"CodeMirror-lines");Se.mover=Je("div",[Ie],null,"position: relative"),Se.sizer=Je("div",[Se.mover],"CodeMirror-sizer"),Se.sizerWidth=null,Se.heightForcer=Je("div",null,null,"position: absolute; height: "+Dn+"px; width: 1px;"),Se.gutters=Je("div",null,"CodeMirror-gutters"),Se.lineGutter=null,Se.scroller=Je("div",[Se.sizer,Se.heightForcer,Se.gutters],"CodeMirror-scroll"),Se.scroller.setAttribute("tabIndex","-1"),Se.wrapper=Je("div",[Se.scrollbarFiller,Se.gutterFiller,Se.scroller],"CodeMirror"),Ke&&st<8&&(Se.gutters.style.zIndex=-1,Se.scroller.style.paddingRight=0),!Me&&!(ge&&ee)&&(Se.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(Se.wrapper):ie(Se.wrapper)),Se.viewFrom=Se.viewTo=ae.first,Se.reportedViewFrom=Se.reportedViewTo=ae.first,Se.view=[],Se.renderedView=null,Se.externalMeasured=null,Se.viewOffset=0,Se.lastWrapHeight=Se.lastWrapWidth=0,Se.updateLineNumbers=null,Se.nativeBarWidth=Se.barHeight=Se.barWidth=0,Se.scrollbarsClipped=!1,Se.lineNumWidth=Se.lineNumInnerWidth=Se.lineNumChars=null,Se.alignWidgets=!1,Se.cachedCharWidth=Se.cachedTextHeight=Se.cachedPaddingH=null,Se.maxLine=null,Se.maxLineLength=0,Se.maxLineChanged=!1,Se.wheelDX=Se.wheelDY=Se.wheelStartX=Se.wheelStartY=null,Se.shift=!1,Se.selForContextMenu=null,Se.activeTouch=null,Se.gutterSpecs=So(de.gutters,de.lineNumbers),Xo(Se),he.init(Se)}var Xr=0,Cr=null;Ke?Cr=-.53:ge?Cr=15:bt?Cr=-.7:lt&&(Cr=-1/3);function oo(ie){var ae=ie.wheelDeltaX,he=ie.wheelDeltaY;return ae==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ae=ie.detail),he==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?he=ie.detail:he==null&&(he=ie.wheelDelta),{x:ae,y:he}}function Mo(ie){var ae=oo(ie);return ae.x*=Cr,ae.y*=Cr,ae}function Zo(ie,ae){var he=oo(ae),de=he.x,Se=he.y,Ie=ie.display,Xe=Ie.scroller,ht=Xe.scrollWidth>Xe.clientWidth,ut=Xe.scrollHeight>Xe.clientHeight;if(de&&ht||Se&&ut){if(Se&&ce&&Me){e:for(var Zt=ae.target,zn=Ie.view;Zt!=Xe;Zt=Zt.parentNode)for(var Qt=0;Qt<zn.length;Qt++)if(zn[Qt].node==Zt){ie.display.currentWheelTarget=Zt;break e}}if(de&&!ge&&!Ue&&Cr!=null){Se&&ut&&_u(ie,Math.max(0,Xe.scrollTop+Se*Cr)),kl(ie,Math.max(0,Xe.scrollLeft+de*Cr)),(!Se||Se&&ut)&&ui(ae),Ie.wheelStartX=null;return}if(Se&&Cr!=null){var ci=Se*Cr,ai=ie.doc.scrollTop,tr=ai+Ie.wrapper.clientHeight;ci<0?ai=Math.max(0,ai+ci-50):tr=Math.min(ie.doc.height,tr+ci+50),zr(ie,{top:ai,bottom:tr})}Xr<20&&(Ie.wheelStartX==null?(Ie.wheelStartX=Xe.scrollLeft,Ie.wheelStartY=Xe.scrollTop,Ie.wheelDX=de,Ie.wheelDY=Se,setTimeout(function(){if(Ie.wheelStartX!=null){var lr=Xe.scrollLeft-Ie.wheelStartX,wr=Xe.scrollTop-Ie.wheelStartY,Vr=wr&&Ie.wheelDY&&wr/Ie.wheelDY||lr&&Ie.wheelDX&&lr/Ie.wheelDX;Ie.wheelStartX=Ie.wheelStartY=null,Vr&&(Cr=(Cr*Xr+Vr)/(Xr+1),++Xr)}},200)):(Ie.wheelDX+=de,Ie.wheelDY+=Se))}}var Wo=function(ie,ae){this.ranges=ie,this.primIndex=ae};Wo.prototype.primary=function(){return this.ranges[this.primIndex]},Wo.prototype.equals=function(ie){if(ie==this)return!0;if(ie.primIndex!=this.primIndex||ie.ranges.length!=this.ranges.length)return!1;for(var ae=0;ae<this.ranges.length;ae++){var he=this.ranges[ae],de=ie.ranges[ae];if(!Ft(he.anchor,de.anchor)||!Ft(he.head,de.head))return!1}return!0},Wo.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new Kr(Pn(this.ranges[ae].anchor),Pn(this.ranges[ae].head));return new Wo(ie,this.primIndex)},Wo.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},Wo.prototype.contains=function(ie,ae){ae||(ae=ie);for(var he=0;he<this.ranges.length;he++){var de=this.ranges[he];if(bn(ae,de.from())>=0&&bn(ie,de.to())<=0)return he}return-1};var Kr=function(ie,ae){this.anchor=ie,this.head=ae};Kr.prototype.from=function(){return Sn(this.anchor,this.head)},Kr.prototype.to=function(){return yn(this.anchor,this.head)},Kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Yo(ie,ae,he){var de=ie&&ie.options.selectionsMayTouch,Se=ae[he];ae.sort(function(ci,ai){return bn(ci.from(),ai.from())}),he=Wt(ae,Se);for(var Ie=1;Ie<ae.length;Ie++){var Xe=ae[Ie],ht=ae[Ie-1],ut=bn(ht.to(),Xe.from());if(de&&!Xe.empty()?ut>0:ut>=0){var Zt=Sn(ht.from(),Xe.from()),zn=yn(ht.to(),Xe.to()),Qt=ht.empty()?Xe.from()==Xe.head:ht.from()==ht.head;Ie<=he&&--he,ae.splice(--Ie,2,new Kr(Qt?zn:Zt,Qt?Zt:zn))}}return new Wo(ae,he)}function ia(ie,ae){return new Wo([new Kr(ie,ae||ie)],0)}function Ta(ie){return ie.text?rn(ie.from.line+ie.text.length-1,zt(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function pa(ie,ae){if(bn(ie,ae.from)<0)return ie;if(bn(ie,ae.to)<=0)return Ta(ae);var he=ie.line+ae.text.length-(ae.to.line-ae.from.line)-1,de=ie.ch;return ie.line==ae.to.line&&(de+=Ta(ae).ch-ae.to.ch),rn(he,de)}function ds(ie,ae){for(var he=[],de=0;de<ie.sel.ranges.length;de++){var Se=ie.sel.ranges[de];he.push(new Kr(pa(Se.anchor,ae),pa(Se.head,ae)))}return Yo(ie.cm,he,ie.sel.primIndex)}function ja(ie,ae,he){return ie.line==ae.line?rn(he.line,ie.ch-ae.ch+he.ch):rn(he.line+(ie.line-ae.line),ie.ch)}function na(ie,ae,he){for(var de=[],Se=rn(ie.first,0),Ie=Se,Xe=0;Xe<ae.length;Xe++){var ht=ae[Xe],ut=ja(ht.from,Se,Ie),Zt=ja(Ta(ht),Se,Ie);if(Se=ht.to,Ie=Zt,he=="around"){var zn=ie.sel.ranges[Xe],Qt=bn(zn.head,zn.anchor)<0;de[Xe]=new Kr(Qt?Zt:ut,Qt?ut:Zt)}else de[Xe]=new Kr(ut,ut)}return new Wo(de,ie.sel.primIndex)}function Fo(ie){ie.doc.mode=It(ie.options,ie.doc.modeOption),Sa(ie)}function Sa(ie){ie.doc.iter(function(ae){ae.stateAfter&&(ae.stateAfter=null),ae.styles&&(ae.styles=null)}),ie.doc.modeFrontier=ie.doc.highlightFrontier=ie.doc.first,Mi(ie,100),ie.state.modeGen++,ie.curOp&&_a(ie)}function hs(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&zt(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Qa(ie,ae,he,de){function Se(yo){return he?he[yo]:null}function Ie(yo,ao,Eo){_o(yo,ao,Eo,de),Oi(yo,"change",yo,ae)}function Xe(yo,ao){for(var Eo=[],Qo=yo;Qo<ao;++Qo)Eo.push(new Ao(Zt[Qo],Se(Qo),de));return Eo}var ht=ae.from,ut=ae.to,Zt=ae.text,zn=cn(ie,ht.line),Qt=cn(ie,ut.line),ci=zt(Zt),ai=Se(Zt.length-1),tr=ut.line-ht.line;if(ae.full)ie.insert(0,Xe(0,Zt.length)),ie.remove(Zt.length,ie.size-Zt.length);else if(hs(ie,ae)){var lr=Xe(0,Zt.length-1);Ie(Qt,Qt.text,ai),tr&&ie.remove(ht.line,tr),lr.length&&ie.insert(ht.line,lr)}else if(zn==Qt)if(Zt.length==1)Ie(zn,zn.text.slice(0,ht.ch)+ci+zn.text.slice(ut.ch),ai);else{var wr=Xe(1,Zt.length-1);wr.push(new Ao(ci+zn.text.slice(ut.ch),ai,de)),Ie(zn,zn.text.slice(0,ht.ch)+Zt[0],Se(0)),ie.insert(ht.line+1,wr)}else if(Zt.length==1)Ie(zn,zn.text.slice(0,ht.ch)+Zt[0]+Qt.text.slice(ut.ch),Se(0)),ie.remove(ht.line+1,tr);else{Ie(zn,zn.text.slice(0,ht.ch)+Zt[0],Se(0)),Ie(Qt,ci+Qt.text.slice(ut.ch),ai);var Vr=Xe(1,Zt.length-1);tr>1&&ie.remove(ht.line+1,tr-1),ie.insert(ht.line+1,Vr)}Oi(ie,"change",ie,ae)}function Ns(ie,ae,he){function de(Se,Ie,Xe){if(Se.linked)for(var ht=0;ht<Se.linked.length;++ht){var ut=Se.linked[ht];if(ut.doc!=Ie){var Zt=Xe&&ut.sharedHist;he&&!Zt||(ae(ut.doc,Zt),de(ut.doc,Se,Zt))}}}de(ie,null,!0)}function $o(ie,ae){if(ae.cm)throw new Error("This document is already in use.");ie.doc=ae,ae.cm=ie,To(ie),Fo(ie),Io(ie),ie.options.lineWrapping||Ho(ie),ie.options.mode=ae.modeOption,_a(ie)}function Io(ie){(ie.doc.direction=="rtl"?Ot:ze)(ie.display.lineDiv,"CodeMirror-rtl")}function Go(ie){En(ie,function(){Io(ie),_a(ie)})}function Co(ie){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=ie||1}function Aa(ie,ae){var he={from:Pn(ae.from),to:Ta(ae),text:Nn(ie,ae.from,ae.to)};return cl(ie,he,ae.from.line,ae.to.line+1),Ns(ie,function(de){return cl(de,he,ae.from.line,ae.to.line+1)},!0),he}function Po(ie){for(;ie.length;){var ae=zt(ie);if(ae.ranges)ie.pop();else break}}function Jo(ie,ae){if(ae)return Po(ie.done),zt(ie.done);if(ie.done.length&&!zt(ie.done).ranges)return zt(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),zt(ie.done)}function ga(ie,ae,he,de){var Se=ie.history;Se.undone.length=0;var Ie=+new Date,Xe,ht;if((Se.lastOp==de||Se.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&Se.lastModTime>Ie-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(Xe=Jo(Se,Se.lastOp==de)))ht=zt(Xe.changes),bn(ae.from,ae.to)==0&&bn(ae.from,ht.to)==0?ht.to=Ta(ae):Xe.changes.push(Aa(ie,ae));else{var ut=zt(Se.done);for((!ut||!ut.ranges)&&Zs(ie.sel,Se.done),Xe={changes:[Aa(ie,ae)],generation:Se.generation},Se.done.push(Xe);Se.done.length>Se.undoDepth;)Se.done.shift(),Se.done[0].ranges||Se.done.shift()}Se.done.push(he),Se.generation=++Se.maxGeneration,Se.lastModTime=Se.lastSelTime=Ie,Se.lastOp=Se.lastSelOp=de,Se.lastOrigin=Se.lastSelOrigin=ae.origin,ht||Pt(ie,"historyAdded")}function ma(ie,ae,he,de){var Se=ae.charAt(0);return Se=="*"||Se=="+"&&he.ranges.length==de.ranges.length&&he.somethingSelected()==de.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function Us(ie,ae,he,de){var Se=ie.history,Ie=de&&de.origin;he==Se.lastSelOp||Ie&&Se.lastSelOrigin==Ie&&(Se.lastModTime==Se.lastSelTime&&Se.lastOrigin==Ie||ma(ie,Ie,zt(Se.done),ae))?Se.done[Se.done.length-1]=ae:Zs(ae,Se.done),Se.lastSelTime=+new Date,Se.lastSelOrigin=Ie,Se.lastSelOp=he,de&&de.clearRedo!==!1&&Po(Se.undone)}function Zs(ie,ae){var he=zt(ae);he&&he.ranges&&he.equals(ie)||ae.push(ie)}function cl(ie,ae,he,de){var Se=ae["spans_"+ie.id],Ie=0;ie.iter(Math.max(ie.first,he),Math.min(ie.first+ie.size,de),function(Xe){Xe.markedSpans&&((Se||(Se=ae["spans_"+ie.id]={}))[Ie]=Xe.markedSpans),++Ie})}function ka(ie){if(!ie)return null;for(var ae,he=0;he<ie.length;++he)ie[he].marker.explicitlyCleared?ae||(ae=ie.slice(0,he)):ae&&ae.push(ie[he]);return ae?ae.length?ae:null:ie}function il(ie,ae){var he=ae["spans_"+ie.id];if(!he)return null;for(var de=[],Se=0;Se<ae.text.length;++Se)de.push(ka(he[Se]));return de}function Fs(ie,ae){var he=il(ie,ae),de=er(ie,ae);if(!he)return de;if(!de)return he;for(var Se=0;Se<he.length;++Se){var Ie=he[Se],Xe=de[Se];if(Ie&&Xe)e:for(var ht=0;ht<Xe.length;++ht){for(var ut=Xe[ht],Zt=0;Zt<Ie.length;++Zt)if(Ie[Zt].marker==ut.marker)continue e;Ie.push(ut)}else Xe&&(he[Se]=Xe)}return he}function Ws(ie,ae,he){for(var de=[],Se=0;Se<ie.length;++Se){var Ie=ie[Se];if(Ie.ranges){de.push(he?Wo.prototype.deepCopy.call(Ie):Ie);continue}var Xe=Ie.changes,ht=[];de.push({changes:ht});for(var ut=0;ut<Xe.length;++ut){var Zt=Xe[ut],zn=void 0;if(ht.push({from:Zt.from,to:Zt.to,text:Zt.text}),ae)for(var Qt in Zt)(zn=Qt.match(/^spans_(\d+)$/))&&Wt(ae,Number(zn[1]))>-1&&(zt(ht)[Qt]=Zt[Qt],delete Zt[Qt])}}return de}function uc(ie,ae,he,de){if(de){var Se=ie.anchor;if(he){var Ie=bn(ae,Se)<0;Ie!=bn(he,Se)<0?(Se=ae,ae=he):Ie!=bn(ae,he)<0&&(ae=he)}return new Kr(Se,ae)}else return new Kr(he||ae,ae)}function Ia(ie,ae,he,de,Se){Se==null&&(Se=ie.cm&&(ie.cm.display.shift||ie.extend)),Xa(ie,new Wo([uc(ie.sel.primary(),ae,he,Se)],0),de)}function $a(ie,ae,he){for(var de=[],Se=ie.cm&&(ie.cm.display.shift||ie.extend),Ie=0;Ie<ie.sel.ranges.length;Ie++)de[Ie]=uc(ie.sel.ranges[Ie],ae[Ie],null,Se);var Xe=Yo(ie.cm,de,ie.sel.primIndex);Xa(ie,Xe,he)}function Oa(ie,ae,he,de){var Se=ie.sel.ranges.slice(0);Se[ae]=he,Xa(ie,Yo(ie.cm,Se,ie.sel.primIndex),de)}function qa(ie,ae,he,de){Xa(ie,ia(ae,he),de)}function As(ie,ae,he){var de={ranges:ae.ranges,update:function(Se){this.ranges=[];for(var Ie=0;Ie<Se.length;Ie++)this.ranges[Ie]=new Kr(Zn(ie,Se[Ie].anchor),Zn(ie,Se[Ie].head))},origin:he&&he.origin};return Pt(ie,"beforeSelectionChange",ie,de),ie.cm&&Pt(ie.cm,"beforeSelectionChange",ie.cm,de),de.ranges!=ae.ranges?Yo(ie.cm,de.ranges,de.ranges.length-1):ae}function da(ie,ae,he){var de=ie.history.done,Se=zt(de);Se&&Se.ranges?(de[de.length-1]=ae,_s(ie,ae,he)):Xa(ie,ae,he)}function Xa(ie,ae,he){_s(ie,ae,he),Us(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,he)}function _s(ie,ae,he){(hn(ie,"beforeSelectionChange")||ie.cm&&hn(ie.cm,"beforeSelectionChange"))&&(ae=As(ie,ae,he));var de=he&&he.bias||(bn(ae.primary().head,ie.sel.primary().head)<0?-1:1);dl(ie,Yl(ie,ae,de,!0)),!(he&&he.scroll===!1)&&ie.cm&&ld(ie.cm)}function dl(ie,ae){ae.equals(ie.sel)||(ie.sel=ae,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,Mn(ie.cm)),Oi(ie,"cursorActivity",ie))}function hu(ie){dl(ie,Yl(ie,ie.sel,null,!1))}function Yl(ie,ae,he,de){for(var Se,Ie=0;Ie<ae.ranges.length;Ie++){var Xe=ae.ranges[Ie],ht=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[Ie],ut=Jl(ie,Xe.anchor,ht&&ht.anchor,he,de),Zt=Jl(ie,Xe.head,ht&&ht.head,he,de);(Se||ut!=Xe.anchor||Zt!=Xe.head)&&(Se||(Se=ae.ranges.slice(0,Ie)),Se[Ie]=new Kr(ut,Zt))}return Se?Yo(ie.cm,Se,ae.primIndex):ae}function Ds(ie,ae,he,de,Se){var Ie=cn(ie,ae.line);if(Ie.markedSpans)for(var Xe=0;Xe<Ie.markedSpans.length;++Xe){var ht=Ie.markedSpans[Xe],ut=ht.marker,Zt="selectLeft"in ut?!ut.selectLeft:ut.inclusiveLeft,zn="selectRight"in ut?!ut.selectRight:ut.inclusiveRight;if((ht.from==null||(Zt?ht.from<=ae.ch:ht.from<ae.ch))&&(ht.to==null||(zn?ht.to>=ae.ch:ht.to>ae.ch))){if(Se&&(Pt(ut,"beforeCursorEnter"),ut.explicitlyCleared))if(Ie.markedSpans){--Xe;continue}else break;if(!ut.atomic)continue;if(he){var Qt=ut.find(de<0?1:-1),ci=void 0;if((de<0?zn:Zt)&&(Qt=Ql(ie,Qt,-de,Qt&&Qt.line==ae.line?Ie:null)),Qt&&Qt.line==ae.line&&(ci=bn(Qt,he))&&(de<0?ci<0:ci>0))return Ds(ie,Qt,ae,de,Se)}var ai=ut.find(de<0?-1:1);return(de<0?Zt:zn)&&(ai=Ql(ie,ai,de,ai.line==ae.line?Ie:null)),ai?Ds(ie,ai,ae,de,Se):null}}return ae}function Jl(ie,ae,he,de,Se){var Ie=de||1,Xe=Ds(ie,ae,he,Ie,Se)||!Se&&Ds(ie,ae,he,Ie,!0)||Ds(ie,ae,he,-Ie,Se)||!Se&&Ds(ie,ae,he,-Ie,!0);return Xe||(ie.cantEdit=!0,rn(ie.first,0))}function Ql(ie,ae,he,de){return he<0&&ae.ch==0?ae.line>ie.first?Zn(ie,rn(ae.line-1)):null:he>0&&ae.ch==(de||cn(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?rn(ae.line+1,0):null:new rn(ae.line,ae.ch+he)}function za(ie){ie.setSelection(rn(ie.firstLine(),0),rn(ie.lastLine()),$t)}function rl(ie,ae,he){var de={canceled:!1,from:ae.from,to:ae.to,text:ae.text,origin:ae.origin,cancel:function(){return de.canceled=!0}};return he&&(de.update=function(Se,Ie,Xe,ht){Se&&(de.from=Zn(ie,Se)),Ie&&(de.to=Zn(ie,Ie)),Xe&&(de.text=Xe),ht!==void 0&&(de.origin=ht)}),Pt(ie,"beforeChange",ie,de),ie.cm&&Pt(ie.cm,"beforeChange",ie.cm,de),de.canceled?(ie.cm&&(ie.cm.curOp.updateInput=2),null):{from:de.from,to:de.to,text:de.text,origin:de.origin}}function es(ie,ae,he){if(ie.cm){if(!ie.cm.curOp)return si(ie.cm,es)(ie,ae,he);if(ie.cm.state.suppressEdits)return}if(!((hn(ie,"beforeChange")||ie.cm&&hn(ie.cm,"beforeChange"))&&(ae=rl(ie,ae,!0),!ae))){var de=xr&&!he&&Rr(ie,ae.from,ae.to);if(de)for(var Se=de.length-1;Se>=0;--Se)Ya(ie,{from:de[Se].from,to:de[Se].to,text:Se?[""]:ae.text,origin:ae.origin});else Ya(ie,ae)}}function Ya(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&bn(ae.from,ae.to)==0)){var he=ds(ie,ae);ga(ie,ae,he,ie.cm?ie.cm.curOp.id:NaN),Nu(ie,ae,he,er(ie,ae));var de=[];Ns(ie,function(Se,Ie){!Ie&&Wt(de,Se.history)==-1&&(rs(Se.history,ae),de.push(Se.history)),Nu(Se,ae,null,er(Se,ae))})}}function fu(ie,ae,he){var de=ie.cm&&ie.cm.state.suppressEdits;if(!(de&&!he)){for(var Se=ie.history,Ie,Xe=ie.sel,ht=ae=="undo"?Se.done:Se.undone,ut=ae=="undo"?Se.undone:Se.done,Zt=0;Zt<ht.length&&(Ie=ht[Zt],!(he?Ie.ranges&&!Ie.equals(ie.sel):!Ie.ranges));Zt++);if(Zt!=ht.length){for(Se.lastOrigin=Se.lastSelOrigin=null;;)if(Ie=ht.pop(),Ie.ranges){if(Zs(Ie,ut),he&&!Ie.equals(ie.sel)){Xa(ie,Ie,{clearRedo:!1});return}Xe=Ie}else if(de){ht.push(Ie);return}else break;var zn=[];Zs(Xe,ut),ut.push({changes:zn,generation:Se.generation}),Se.generation=Ie.generation||++Se.maxGeneration;for(var Qt=hn(ie,"beforeChange")||ie.cm&&hn(ie.cm,"beforeChange"),ci=function(lr){var wr=Ie.changes[lr];if(wr.origin=ae,Qt&&!rl(ie,wr,!1))return ht.length=0,{};zn.push(Aa(ie,wr));var Vr=lr?ds(ie,wr):zt(ht);Nu(ie,wr,Vr,Fs(ie,wr)),!lr&&ie.cm&&ie.cm.scrollIntoView({from:wr.from,to:Ta(wr)});var yo=[];Ns(ie,function(ao,Eo){!Eo&&Wt(yo,ao.history)==-1&&(rs(ao.history,wr),yo.push(ao.history)),Nu(ao,wr,null,Fs(ao,wr))})},ai=Ie.changes.length-1;ai>=0;--ai){var tr=ci(ai);if(tr)return tr.v}}}}function Pc(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new Wo(wn(ie.sel.ranges,function(Se){return new Kr(rn(Se.anchor.line+ae,Se.anchor.ch),rn(Se.head.line+ae,Se.head.ch))}),ie.sel.primIndex),ie.cm)){_a(ie.cm,ie.first,ie.first-ae,ae);for(var he=ie.cm.display,de=he.viewFrom;de<he.viewTo;de++)ra(ie.cm,de,"gutter")}}function Nu(ie,ae,he,de){if(ie.cm&&!ie.cm.curOp)return si(ie.cm,Nu)(ie,ae,he,de);if(ae.to.line<ie.first){Pc(ie,ae.text.length-1-(ae.to.line-ae.from.line));return}if(!(ae.from.line>ie.lastLine())){if(ae.from.line<ie.first){var Se=ae.text.length-1-(ie.first-ae.from.line);Pc(ie,Se),ae={from:rn(ie.first,0),to:rn(ae.to.line+Se,ae.to.ch),text:[zt(ae.text)],origin:ae.origin}}var Ie=ie.lastLine();ae.to.line>Ie&&(ae={from:ae.from,to:rn(Ie,cn(ie,Ie).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=Nn(ie,ae.from,ae.to),he||(he=ds(ie,ae)),ie.cm?Fu(ie.cm,ae,de):Qa(ie,ae,de),_s(ie,he,$t),ie.cantEdit&&Jl(ie,rn(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function Fu(ie,ae,he){var de=ie.doc,Se=ie.display,Ie=ae.from,Xe=ae.to,ht=!1,ut=Ie.line;ie.options.lineWrapping||(ut=St(qr(cn(de,Ie.line))),de.iter(ut,Xe.line+1,function(ai){if(ai==Se.maxLine)return ht=!0,!0})),de.sel.contains(ae.from,ae.to)>-1&&Mn(ie),Qa(de,ae,he,ys(ie)),ie.options.lineWrapping||(de.iter(ut,Ie.line+ae.text.length,function(ai){var tr=aa(ai);tr>Se.maxLineLength&&(Se.maxLine=ai,Se.maxLineLength=tr,Se.maxLineChanged=!0,ht=!1)}),ht&&(ie.curOp.updateMaxLine=!0)),Vi(de,Ie.line),Mi(ie,400);var Zt=ae.text.length-(Xe.line-Ie.line)-1;ae.full?_a(ie):Ie.line==Xe.line&&ae.text.length==1&&!hs(ie.doc,ae)?ra(ie,Ie.line,"text"):_a(ie,Ie.line,Xe.line+1,Zt);var zn=hn(ie,"changes"),Qt=hn(ie,"change");if(Qt||zn){var ci={from:Ie,to:Xe,text:ae.text,removed:ae.removed,origin:ae.origin};Qt&&Oi(ie,"change",ie,ci),zn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(ci)}ie.display.selForContextMenu=null}function gu(ie,ae,he,de,Se){var Ie;de||(de=he),bn(de,he)<0&&(Ie=[de,he],he=Ie[0],de=Ie[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),es(ie,{from:he,to:de,text:ae,origin:Se})}function ql(ie,ae,he,de){he<ie.line?ie.line+=de:ae<ie.line&&(ie.line=ae,ie.ch=0)}function Da(ie,ae,he,de){for(var Se=0;Se<ie.length;++Se){var Ie=ie[Se],Xe=!0;if(Ie.ranges){Ie.copied||(Ie=ie[Se]=Ie.deepCopy(),Ie.copied=!0);for(var ht=0;ht<Ie.ranges.length;ht++)ql(Ie.ranges[ht].anchor,ae,he,de),ql(Ie.ranges[ht].head,ae,he,de);continue}for(var ut=0;ut<Ie.changes.length;++ut){var Zt=Ie.changes[ut];if(he<Zt.from.line)Zt.from=rn(Zt.from.line+de,Zt.from.ch),Zt.to=rn(Zt.to.line+de,Zt.to.ch);else if(ae<=Zt.to.line){Xe=!1;break}}Xe||(ie.splice(0,Se+1),Se=0)}}function rs(ie,ae){var he=ae.from.line,de=ae.to.line,Se=ae.text.length-(de-he)-1;Da(ie.done,he,de,Se),Da(ie.undone,he,de,Se)}function Bs(ie,ae,he,de){var Se=ae,Ie=ae;return typeof ae=="number"?Ie=cn(ie,Gn(ie,ae)):Se=St(ae),Se==null?null:(de(Ie,Se)&&ie.cm&&ra(ie.cm,Se,he),Ie)}function os(ie){this.lines=ie,this.parent=null;for(var ae=0,he=0;he<ie.length;++he)ie[he].parent=this,ae+=ie[he].height;this.height=ae}os.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ae){for(var he=ie,de=ie+ae;he<de;++he){var Se=this.lines[he];this.height-=Se.height,ta(Se),Oi(Se,"delete")}this.lines.splice(ie,ae)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ae,he){this.height+=he,this.lines=this.lines.slice(0,ie).concat(ae).concat(this.lines.slice(ie));for(var de=0;de<ae.length;++de)ae[de].parent=this},iterN:function(ie,ae,he){for(var de=ie+ae;ie<de;++ie)if(he(this.lines[ie]))return!0}};function Ca(ie){this.children=ie;for(var ae=0,he=0,de=0;de<ie.length;++de){var Se=ie[de];ae+=Se.chunkSize(),he+=Se.height,Se.parent=this}this.size=ae,this.height=he,this.parent=null}Ca.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ae){this.size-=ae;for(var he=0;he<this.children.length;++he){var de=this.children[he],Se=de.chunkSize();if(ie<Se){var Ie=Math.min(ae,Se-ie),Xe=de.height;if(de.removeInner(ie,Ie),this.height-=Xe-de.height,Se==Ie&&(this.children.splice(he--,1),de.parent=null),(ae-=Ie)==0)break;ie=0}else ie-=Se}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof os))){var ht=[];this.collapse(ht),this.children=[new os(ht)],this.children[0].parent=this}},collapse:function(ie){for(var ae=0;ae<this.children.length;++ae)this.children[ae].collapse(ie)},insertInner:function(ie,ae,he){this.size+=ae.length,this.height+=he;for(var de=0;de<this.children.length;++de){var Se=this.children[de],Ie=Se.chunkSize();if(ie<=Ie){if(Se.insertInner(ie,ae,he),Se.lines&&Se.lines.length>50){for(var Xe=Se.lines.length%25+25,ht=Xe;ht<Se.lines.length;){var ut=new os(Se.lines.slice(ht,ht+=25));Se.height-=ut.height,this.children.splice(++de,0,ut),ut.parent=this}Se.lines=Se.lines.slice(0,Xe),this.maybeSpill()}break}ie-=Ie}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),he=new Ca(ae);if(ie.parent){ie.size-=he.size,ie.height-=he.height;var Se=Wt(ie.parent.children,ie);ie.parent.children.splice(Se+1,0,he)}else{var de=new Ca(ie.children);de.parent=ie,ie.children=[de,he],ie=de}he.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ae,he){for(var de=0;de<this.children.length;++de){var Se=this.children[de],Ie=Se.chunkSize();if(ie<Ie){var Xe=Math.min(ae,Ie-ie);if(Se.iterN(ie,Xe,he))return!0;if((ae-=Xe)==0)break;ie=0}else ie-=Ie}}};var Ts=function(ie,ae,he){if(he)for(var de in he)he.hasOwnProperty(de)&&(this[de]=he[de]);this.doc=ie,this.node=ae};Ts.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,he=this.line,de=St(he);if(!(de==null||!ae)){for(var Se=0;Se<ae.length;++Se)ae[Se]==this&&ae.splice(Se--,1);ae.length||(he.widgets=null);var Ie=Ml(this);Jn(he,Math.max(0,he.height-Ie)),ie&&(En(ie,function(){Rl(ie,he,-Ie),ra(ie,de,"widget")}),Oi(ie,"lineWidgetCleared",ie,this,de))}},Ts.prototype.changed=function(){var ie=this,ae=this.height,he=this.doc.cm,de=this.line;this.height=null;var Se=Ml(this)-ae;Se&&(pi(this.doc,de)||Jn(de,de.height+Se),he&&En(he,function(){he.curOp.forceUpdate=!0,Rl(he,de,Se),Oi(he,"lineWidgetChanged",he,ie,St(de))}))},fn(Ts);function Rl(ie,ae,he){Bo(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Xd(ie,he)}function zu(ie,ae,he,de){var Se=new Ts(ie,he,de),Ie=ie.cm;return Ie&&Se.noHScroll&&(Ie.display.alignWidgets=!0),Bs(ie,ae,"widget",function(Xe){var ht=Xe.widgets||(Xe.widgets=[]);if(Se.insertAt==null?ht.push(Se):ht.splice(Math.min(ht.length-1,Math.max(0,Se.insertAt)),0,Se),Se.line=Xe,Ie&&!pi(ie,Xe)){var ut=Bo(Xe)<ie.scrollTop;Jn(Xe,Xe.height+Ml(Se)),ut&&Xd(Ie,Se.height),Ie.curOp.forceUpdate=!0}return!0}),Ie&&Oi(Ie,"lineWidgetAdded",Ie,Se,typeof ae=="number"?ae:St(ae)),Se}var Cd=0,mn=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++Cd};mn.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&Ol(ie),hn(this,"clear")){var he=this.find();he&&Oi(this,"clear",he.from,he.to)}for(var de=null,Se=null,Ie=0;Ie<this.lines.length;++Ie){var Xe=this.lines[Ie],ht=no(Xe.markedSpans,this);ie&&!this.collapsed?ra(ie,St(Xe),"text"):ie&&(ht.to!=null&&(Se=St(Xe)),ht.from!=null&&(de=St(Xe))),Xe.markedSpans=br(Xe.markedSpans,ht),ht.from==null&&this.collapsed&&!pi(this.doc,Xe)&&ie&&Jn(Xe,cu(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var ut=0;ut<this.lines.length;++ut){var Zt=qr(this.lines[ut]),zn=aa(Zt);zn>ie.display.maxLineLength&&(ie.display.maxLine=Zt,ie.display.maxLineLength=zn,ie.display.maxLineChanged=!0)}de!=null&&ie&&this.collapsed&&_a(ie,de,Se+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&hu(ie.doc)),ie&&Oi(ie,"markerCleared",ie,this,de,Se),ae&&Oc(ie),this.parent&&this.parent.clear()}},mn.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var he,de,Se=0;Se<this.lines.length;++Se){var Ie=this.lines[Se],Xe=no(Ie.markedSpans,this);if(Xe.from!=null&&(he=rn(ae?Ie:St(Ie),Xe.from),ie==-1))return he;if(Xe.to!=null&&(de=rn(ae?Ie:St(Ie),Xe.to),ie==1))return de}return he&&{from:he,to:de}},mn.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),he=this,de=this.doc.cm;!ae||!de||En(de,function(){var Se=ae.line,Ie=St(ae.line),Xe=Ic(de,Ie);if(Xe&&(ll(Xe),de.curOp.selectionChanged=de.curOp.forceUpdate=!0),de.curOp.updateMaxLine=!0,!pi(he.doc,Se)&&he.height!=null){var ht=he.height;he.height=null;var ut=Ml(he)-ht;ut&&Jn(Se,Se.height+ut)}Oi(de,"markerChanged",de,ie)})},mn.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(!ae.maybeHiddenMarkers||Wt(ae.maybeHiddenMarkers,this)==-1)&&(ae.maybeUnhiddenMarkers||(ae.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},mn.prototype.detachLine=function(ie){if(this.lines.splice(Wt(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(ae.maybeHiddenMarkers||(ae.maybeHiddenMarkers=[])).push(this)}},fn(mn);function Rc(ie,ae,he,de,Se){if(de&&de.shared)return af(ie,ae,he,de,Se);if(ie.cm&&!ie.cm.curOp)return si(ie.cm,Rc)(ie,ae,he,de,Se);var Ie=new mn(ie,Se),Xe=bn(ae,he);if(de&&Ut(de,Ie,!1),Xe>0||Xe==0&&Ie.clearWhenEmpty!==!1)return Ie;if(Ie.replacedWith&&(Ie.collapsed=!0,Ie.widgetNode=xt("span",[Ie.replacedWith],"CodeMirror-widget"),de.handleMouseEvents||Ie.widgetNode.setAttribute("cm-ignore-events","true"),de.insertLeft&&(Ie.widgetNode.insertLeft=!0)),Ie.collapsed){if(uo(ie,ae.line,ae,he,Ie)||ae.line!=he.line&&uo(ie,he.line,ae,he,Ie))throw new Error("Inserting collapsed marker partially overlapping an existing one");_n()}Ie.addToHistory&&ga(ie,{from:ae,to:he,origin:"markText"},ie.sel,NaN);var ht=ae.line,ut=ie.cm,Zt;if(ie.iter(ht,he.line+1,function(Qt){ut&&Ie.collapsed&&!ut.options.lineWrapping&&qr(Qt)==ut.display.maxLine&&(Zt=!0),Ie.collapsed&&ht!=ae.line&&Jn(Qt,0),mo(Qt,new Or(Ie,ht==ae.line?ae.ch:null,ht==he.line?he.ch:null)),++ht}),Ie.collapsed&&ie.iter(ae.line,he.line+1,function(Qt){pi(ie,Qt)&&Jn(Qt,0)}),Ie.clearOnEnter&&ft(Ie,"beforeCursorEnter",function(){return Ie.clear()}),Ie.readOnly&&(Br(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Ie.collapsed&&(Ie.id=++Cd,Ie.atomic=!0),ut){if(Zt&&(ut.curOp.updateMaxLine=!0),Ie.collapsed)_a(ut,ae.line,he.line+1);else if(Ie.className||Ie.startStyle||Ie.endStyle||Ie.css||Ie.attributes||Ie.title)for(var zn=ae.line;zn<=he.line;zn++)ra(ut,zn,"text");Ie.atomic&&hu(ut.doc),Oi(ut,"markerAdded",ut,Ie)}return Ie}var Xu=function(ie,ae){this.markers=ie,this.primary=ae;for(var he=0;he<ie.length;++he)ie[he].parent=this};Xu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();Oi(this,"clear")}},Xu.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},fn(Xu);function af(ie,ae,he,de,Se){de=Ut(de),de.shared=!1;var Ie=[Rc(ie,ae,he,de,Se)],Xe=Ie[0],ht=de.widgetNode;return Ns(ie,function(ut){ht&&(de.widgetNode=ht.cloneNode(!0)),Ie.push(Rc(ut,Zn(ut,ae),Zn(ut,he),de,Se));for(var Zt=0;Zt<ut.linked.length;++Zt)if(ut.linked[Zt].isParent)return;Xe=zt(Ie)}),new Xu(Ie,Xe)}function bd(ie){return ie.findMarks(rn(ie.first,0),ie.clipPos(rn(ie.lastLine())),function(ae){return ae.parent})}function Ed(ie,ae){for(var he=0;he<ae.length;he++){var de=ae[he],Se=de.find(),Ie=ie.clipPos(Se.from),Xe=ie.clipPos(Se.to);if(bn(Ie,Xe)){var ht=Rc(ie,Ie,Xe,de.primary,de.primary.type);de.markers.push(ht),ht.parent=de}}}function Dh(ie){for(var ae=function(de){var Se=ie[de],Ie=[Se.primary.doc];Ns(Se.primary.doc,function(ut){return Ie.push(ut)});for(var Xe=0;Xe<Se.markers.length;Xe++){var ht=Se.markers[Xe];Wt(Ie,ht.doc)==-1&&(ht.parent=null,Se.markers.splice(Xe--,1))}},he=0;he<ie.length;he++)ae(he)}var Qg=0,Gs=function(ie,ae,he,de,Se){if(!(this instanceof Gs))return new Gs(ie,ae,he,de,Se);he==null&&(he=0),Ca.call(this,[new os([new Ao("",null)])]),this.first=he,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=he;var Ie=rn(he,0);this.sel=ia(Ie),this.history=new Co(null),this.id=++Qg,this.modeOption=ae,this.lineSep=de,this.direction=Se=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Qa(this,{from:Ie,to:Ie,text:ie}),Xa(this,ia(Ie),$t)};Gs.prototype=tn(Ca.prototype,{constructor:Gs,iter:function(ie,ae,he){he?this.iterN(ie-this.first,ae-ie,he):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ae){for(var he=0,de=0;de<ae.length;++de)he+=ae[de].height;this.insertInner(ie-this.first,ae,he)},remove:function(ie,ae){this.removeInner(ie-this.first,ae)},getValue:function(ie){var ae=kn(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:ti(function(ie){var ae=rn(this.first,0),he=this.first+this.size-1;es(this,{from:ae,to:rn(he,cn(this,he).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&ud(this.cm,0,0),Xa(this,ia(ae),$t)}),replaceRange:function(ie,ae,he,de){ae=Zn(this,ae),he=he?Zn(this,he):ae,gu(this,ie,ae,he,de)},getRange:function(ie,ae,he){var de=Nn(this,Zn(this,ie),Zn(this,ae));return he===!1?de:de.join(he||this.lineSeparator())},getLine:function(ie){var ae=this.getLineHandle(ie);return ae&&ae.text},getLineHandle:function(ie){if(qn(this,ie))return cn(this,ie)},getLineNumber:function(ie){return St(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=cn(this,ie)),qr(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return Zn(this,ie)},getCursor:function(ie){var ae=this.sel.primary(),he;return ie==null||ie=="head"?he=ae.head:ie=="anchor"?he=ae.anchor:ie=="end"||ie=="to"||ie===!1?he=ae.to():he=ae.from(),he},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ti(function(ie,ae,he){qa(this,Zn(this,typeof ie=="number"?rn(ie,ae||0):ie),null,he)}),setSelection:ti(function(ie,ae,he){qa(this,Zn(this,ie),Zn(this,ae||ie),he)}),extendSelection:ti(function(ie,ae,he){Ia(this,Zn(this,ie),ae&&Zn(this,ae),he)}),extendSelections:ti(function(ie,ae){$a(this,ii(this,ie),ae)}),extendSelectionsBy:ti(function(ie,ae){var he=wn(this.sel.ranges,ie);$a(this,ii(this,he),ae)}),setSelections:ti(function(ie,ae,he){if(ie.length){for(var de=[],Se=0;Se<ie.length;Se++)de[Se]=new Kr(Zn(this,ie[Se].anchor),Zn(this,ie[Se].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),Xa(this,Yo(this.cm,de,ae),he)}}),addSelection:ti(function(ie,ae,he){var de=this.sel.ranges.slice(0);de.push(new Kr(Zn(this,ie),Zn(this,ae||ie))),Xa(this,Yo(this.cm,de,de.length-1),he)}),getSelection:function(ie){for(var ae=this.sel.ranges,he,de=0;de<ae.length;de++){var Se=Nn(this,ae[de].from(),ae[de].to());he=he?he.concat(Se):Se}return ie===!1?he:he.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ae=[],he=this.sel.ranges,de=0;de<he.length;de++){var Se=Nn(this,he[de].from(),he[de].to());ie!==!1&&(Se=Se.join(ie||this.lineSeparator())),ae[de]=Se}return ae},replaceSelection:function(ie,ae,he){for(var de=[],Se=0;Se<this.sel.ranges.length;Se++)de[Se]=ie;this.replaceSelections(de,ae,he||"+input")},replaceSelections:ti(function(ie,ae,he){for(var de=[],Se=this.sel,Ie=0;Ie<Se.ranges.length;Ie++){var Xe=Se.ranges[Ie];de[Ie]={from:Xe.from(),to:Xe.to(),text:this.splitLines(ie[Ie]),origin:he}}for(var ht=ae&&ae!="end"&&na(this,de,ae),ut=de.length-1;ut>=0;ut--)es(this,de[ut]);ht?da(this,ht):this.cm&&ld(this.cm)}),undo:ti(function(){fu(this,"undo")}),redo:ti(function(){fu(this,"redo")}),undoSelection:ti(function(){fu(this,"undo",!0)}),redoSelection:ti(function(){fu(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ae=0,he=0,de=0;de<ie.done.length;de++)ie.done[de].ranges||++ae;for(var Se=0;Se<ie.undone.length;Se++)ie.undone[Se].ranges||++he;return{undo:ae,redo:he}},clearHistory:function(){var ie=this;this.history=new Co(this.history.maxGeneration),Ns(this,function(ae){return ae.history=ie.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(ie){return ie&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(ie){return this.history.generation==(ie||this.cleanGeneration)},getHistory:function(){return{done:Ws(this.history.done),undone:Ws(this.history.undone)}},setHistory:function(ie){var ae=this.history=new Co(this.history.maxGeneration);ae.done=Ws(ie.done.slice(0),null,!0),ae.undone=Ws(ie.undone.slice(0),null,!0)},setGutterMarker:ti(function(ie,ae,he){return Bs(this,ie,"gutter",function(de){var Se=de.gutterMarkers||(de.gutterMarkers={});return Se[ae]=he,!he&&Ze(Se)&&(de.gutterMarkers=null),!0})}),clearGutter:ti(function(ie){var ae=this;this.iter(function(he){he.gutterMarkers&&he.gutterMarkers[ie]&&Bs(ae,he,"gutter",function(){return he.gutterMarkers[ie]=null,Ze(he.gutterMarkers)&&(he.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!qn(this,ie)||(ae=ie,ie=cn(this,ie),!ie))return null}else if(ae=St(ie),ae==null)return null;return{line:ae,handle:ie,text:ie.text,gutterMarkers:ie.gutterMarkers,textClass:ie.textClass,bgClass:ie.bgClass,wrapClass:ie.wrapClass,widgets:ie.widgets}},addLineClass:ti(function(ie,ae,he){return Bs(this,ie,ae=="gutter"?"gutter":"class",function(de){var Se=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass";if(!de[Se])de[Se]=he;else{if(Be(he).test(de[Se]))return!1;de[Se]+=" "+he}return!0})}),removeLineClass:ti(function(ie,ae,he){return Bs(this,ie,ae=="gutter"?"gutter":"class",function(de){var Se=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",Ie=de[Se];if(Ie)if(he==null)de[Se]=null;else{var Xe=Ie.match(Be(he));if(!Xe)return!1;var ht=Xe.index+Xe[0].length;de[Se]=Ie.slice(0,Xe.index)+(!Xe.index||ht==Ie.length?"":" ")+Ie.slice(ht)||null}else return!1;return!0})}),addLineWidget:ti(function(ie,ae,he){return zu(this,ie,ae,he)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,he){return Rc(this,Zn(this,ie),Zn(this,ae),he,he&&he.type||"range")},setBookmark:function(ie,ae){var he={replacedWith:ae&&(ae.nodeType==null?ae.widget:ae),insertLeft:ae&&ae.insertLeft,clearWhenEmpty:!1,shared:ae&&ae.shared,handleMouseEvents:ae&&ae.handleMouseEvents};return ie=Zn(this,ie),Rc(this,ie,ie,he,"bookmark")},findMarksAt:function(ie){ie=Zn(this,ie);var ae=[],he=cn(this,ie.line).markedSpans;if(he)for(var de=0;de<he.length;++de){var Se=he[de];(Se.from==null||Se.from<=ie.ch)&&(Se.to==null||Se.to>=ie.ch)&&ae.push(Se.marker.parent||Se.marker)}return ae},findMarks:function(ie,ae,he){ie=Zn(this,ie),ae=Zn(this,ae);var de=[],Se=ie.line;return this.iter(ie.line,ae.line+1,function(Ie){var Xe=Ie.markedSpans;if(Xe)for(var ht=0;ht<Xe.length;ht++){var ut=Xe[ht];!(ut.to!=null&&Se==ie.line&&ie.ch>=ut.to||ut.from==null&&Se!=ie.line||ut.from!=null&&Se==ae.line&&ut.from>=ae.ch)&&(!he||he(ut.marker))&&de.push(ut.marker.parent||ut.marker)}++Se}),de},getAllMarks:function(){var ie=[];return this.iter(function(ae){var he=ae.markedSpans;if(he)for(var de=0;de<he.length;++de)he[de].from!=null&&ie.push(he[de].marker)}),ie},posFromIndex:function(ie){var ae,he=this.first,de=this.lineSeparator().length;return this.iter(function(Se){var Ie=Se.text.length+de;if(Ie>ie)return ae=ie,!0;ie-=Ie,++he}),Zn(this,rn(he,ae))},indexFromPos:function(ie){ie=Zn(this,ie);var ae=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var he=this.lineSeparator().length;return this.iter(this.first,ie.line,function(de){ae+=de.text.length+he}),ae},copy:function(ie){var ae=new Gs(kn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ae.scrollTop=this.scrollTop,ae.scrollLeft=this.scrollLeft,ae.sel=this.sel,ae.extend=!1,ie&&(ae.history.undoDepth=this.history.undoDepth,ae.setHistory(this.getHistory())),ae},linkedDoc:function(ie){ie||(ie={});var ae=this.first,he=this.first+this.size;ie.from!=null&&ie.from>ae&&(ae=ie.from),ie.to!=null&&ie.to<he&&(he=ie.to);var de=new Gs(kn(this,ae,he),ie.mode||this.modeOption,ae,this.lineSep,this.direction);return ie.sharedHist&&(de.history=this.history),(this.linked||(this.linked=[])).push({doc:de,sharedHist:ie.sharedHist}),de.linked=[{doc:this,isParent:!0,sharedHist:ie.sharedHist}],Ed(de,bd(this)),de},unlinkDoc:function(ie){if(ie instanceof Ha&&(ie=ie.doc),this.linked)for(var ae=0;ae<this.linked.length;++ae){var he=this.linked[ae];if(he.doc==ie){this.linked.splice(ae,1),ie.unlinkDoc(this),Dh(bd(this));break}}if(ie.history==this.history){var de=[ie.id];Ns(ie,function(Se){return de.push(Se.id)},!0),ie.history=new Co(null),ie.history.done=Ws(this.history.done,de),ie.history.undone=Ws(this.history.undone,de)}},iterLinkedDocs:function(ie){Ns(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):Kn(ie)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:ti(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&Go(this.cm))})}),Gs.prototype.eachLine=Gs.prototype.iter;var Qd=0;function Md(ie){var ae=this;if(Zf(ae),!(qt(ae,ie)||as(ae.display,ie))){ui(ie),Ke&&(Qd=+new Date);var he=yl(ae,ie,!0),de=ie.dataTransfer.files;if(!(!he||ae.isReadOnly()))if(de&&de.length&&window.FileReader&&window.File)for(var Se=de.length,Ie=Array(Se),Xe=0,ht=function(){++Xe==Se&&si(ae,function(){he=Zn(ae.doc,he);var ai={from:he,to:he,text:ae.doc.splitLines(Ie.filter(function(tr){return tr!=null}).join(ae.doc.lineSeparator())),origin:"paste"};es(ae.doc,ai),da(ae.doc,ia(Zn(ae.doc,he),Zn(ae.doc,Ta(ai))))})()},ut=function(ai,tr){if(ae.options.allowDropFileTypes&&Wt(ae.options.allowDropFileTypes,ai.type)==-1){ht();return}var lr=new FileReader;lr.onerror=function(){return ht()},lr.onload=function(){var wr=lr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(wr)){ht();return}Ie[tr]=wr,ht()},lr.readAsText(ai)},Zt=0;Zt<de.length;Zt++)ut(de[Zt],Zt);else{if(ae.state.draggingText&&ae.doc.sel.contains(he)>-1){ae.state.draggingText(ie),setTimeout(function(){return ae.display.input.focus()},20);return}try{var zn=ie.dataTransfer.getData("Text");if(zn){var Qt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(Qt=ae.listSelections()),_s(ae.doc,ia(he,he)),Qt)for(var ci=0;ci<Qt.length;++ci)gu(ae.doc,"",Qt[ci].anchor,Qt[ci].head,"drag");ae.replaceSelection(zn,"around","paste"),ae.display.input.focus()}}catch(ai){}}}}function qd(ie,ae){if(Ke&&(!ie.state.draggingText||+new Date-Qd<100)){bi(ae);return}if(!(qt(ie,ae)||as(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!lt)){var he=Je("img",null,null,"position: fixed; left: 0; top: 0;");he.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ue&&(he.width=he.height=1,ie.display.wrapper.appendChild(he),he._top=he.offsetTop),ae.dataTransfer.setDragImage(he,0,0),Ue&&he.parentNode.removeChild(he)}}function sf(ie,ae){var he=yl(ie,ae);if(he){var de=document.createDocumentFragment();Pa(ie,he,de),ie.display.dragCursor||(ie.display.dragCursor=Je("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),nt(ie.display.dragCursor,de)}}function Zf(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function eh(ie){if(document.getElementsByClassName){for(var ae=document.getElementsByClassName("CodeMirror"),he=[],de=0;de<ae.length;de++){var Se=ae[de].CodeMirror;Se&&he.push(Se)}he.length&&he[0].operation(function(){for(var Ie=0;Ie<he.length;Ie++)ie(he[Ie])})}}var th=!1;function pu(){th||(Ld(),th=!0)}function Ld(){var ie;ft(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,eh(lf)},100))}),ft(window,"blur",function(){return eh(ad)})}function lf(ie){var ae=ie.display;ae.cachedCharWidth=ae.cachedTextHeight=ae.cachedPaddingH=null,ae.scrollbarsClipped=!1,ie.setSize()}for(var Yu={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"},jc=0;jc<10;jc++)Yu[jc+48]=Yu[jc+96]=String(jc);for(var Nd=65;Nd<=90;Nd++)Yu[Nd]=String.fromCharCode(Nd);for(var cd=1;cd<=12;cd++)Yu[cd+111]=Yu[cd+63235]="F"+cd;var jl={};jl.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"},jl.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"},jl.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"},jl.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"]},jl.default=ce?jl.macDefault:jl.pcDefault;function dd(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var he,de,Se,Ie,Xe=0;Xe<ae.length-1;Xe++){var ht=ae[Xe];if(/^(cmd|meta|m)$/i.test(ht))Ie=!0;else if(/^a(lt)?$/i.test(ht))he=!0;else if(/^(c|ctrl|control)$/i.test(ht))de=!0;else if(/^s(hift)?$/i.test(ht))Se=!0;else throw new Error("Unrecognized modifier name: "+ht)}return he&&(ie="Alt-"+ie),de&&(ie="Ctrl-"+ie),Ie&&(ie="Cmd-"+ie),Se&&(ie="Shift-"+ie),ie}function Bh(ie){var ae={};for(var he in ie)if(ie.hasOwnProperty(he)){var de=ie[he];if(/^(name|fallthrough|(de|at)tach)$/.test(he))continue;if(de=="..."){delete ie[he];continue}for(var Se=wn(he.split(" "),dd),Ie=0;Ie<Se.length;Ie++){var Xe=void 0,ht=void 0;Ie==Se.length-1?(ht=Se.join(" "),Xe=de):(ht=Se.slice(0,Ie+1).join(" "),Xe="...");var ut=ae[ht];if(!ut)ae[ht]=Xe;else if(ut!=Xe)throw new Error("Inconsistent bindings for "+ht)}delete ie[he]}for(var Zt in ae)ie[Zt]=ae[Zt];return ie}function eu(ie,ae,he,de){ae=zc(ae);var Se=ae.call?ae.call(ie,de):ae[ie];if(Se===!1)return"nothing";if(Se==="...")return"multi";if(Se!=null&&he(Se))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return eu(ie,ae.fallthrough,he,de);for(var Ie=0;Ie<ae.fallthrough.length;Ie++){var Xe=eu(ie,ae.fallthrough[Ie],he,de);if(Xe)return Xe}}}function wc(ie){var ae=typeof ie=="string"?ie:Yu[ie.keyCode];return ae=="Ctrl"||ae=="Alt"||ae=="Shift"||ae=="Mod"}function nh(ie,ae,he){var de=ie;return ae.altKey&&de!="Alt"&&(ie="Alt-"+ie),(be?ae.metaKey:ae.ctrlKey)&&de!="Ctrl"&&(ie="Ctrl-"+ie),(be?ae.ctrlKey:ae.metaKey)&&de!="Mod"&&(ie="Cmd-"+ie),!he&&ae.shiftKey&&de!="Shift"&&(ie="Shift-"+ie),ie}function ih(ie,ae){if(Ue&&ie.keyCode==34&&ie.char)return!1;var he=Yu[ie.keyCode];return he==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(he=ie.code),nh(he,ie,ae))}function zc(ie){return typeof ie=="string"?jl[ie]:ie}function Cl(ie,ae){for(var he=ie.doc.sel.ranges,de=[],Se=0;Se<he.length;Se++){for(var Ie=ae(he[Se]);de.length&&bn(Ie.from,zt(de).to)<=0;){var Xe=de.pop();if(bn(Xe.from,Ie.from)<0){Ie.from=Xe.from;break}}de.push(Ie)}En(ie,function(){for(var ht=de.length-1;ht>=0;ht--)gu(ie.doc,"",de[ht].from,de[ht].to,"+delete");ld(ie)})}function Th(ie,ae,he){var de=rt(ie.text,ae+he,he);return de<0||de>ie.text.length?null:de}function $s(ie,ae,he){var de=Th(ie,ae.ch,he);return de==null?null:new rn(ae.line,de,he<0?"after":"before")}function xa(ie,ae,he,de,Se){if(ie){ae.doc.direction=="rtl"&&(Se=-Se);var Ie=We(he,ae.doc.direction);if(Ie){var Xe=Se<0?zt(Ie):Ie[0],ht=Se<0==(Xe.level==1),ut=ht?"after":"before",Zt;if(Xe.level>0||ae.doc.direction=="rtl"){var zn=Js(ae,he);Zt=Se<0?he.text.length-1:0;var Qt=uu(ae,zn,Zt).top;Zt=et(function(ci){return uu(ae,zn,ci).top==Qt},Se<0==(Xe.level==1)?Xe.from:Xe.to-1,Zt),ut=="before"&&(Zt=Th(he,Zt,1))}else Zt=Se<0?Xe.to:Xe.from;return new rn(de,Zt,ut)}}return new rn(de,Se<0?he.text.length:0,Se<0?"before":"after")}function ls(ie,ae,he,de){var Se=We(ae,ie.doc.direction);if(!Se)return $s(ae,he,de);he.ch>=ae.text.length?(he.ch=ae.text.length,he.sticky="before"):he.ch<=0&&(he.ch=0,he.sticky="after");var Ie=ve(Se,he.ch,he.sticky),Xe=Se[Ie];if(ie.doc.direction=="ltr"&&Xe.level%2==0&&(de>0?Xe.to>he.ch:Xe.from<he.ch))return $s(ae,he,de);var ht=function(Vr,yo){return Th(ae,Vr instanceof rn?Vr.ch:Vr,yo)},ut,Zt=function(Vr){return ie.options.lineWrapping?(ut=ut||Js(ie,ae),rd(ie,ae,ut,Vr)):{begin:0,end:ae.text.length}},zn=Zt(he.sticky=="before"?ht(he,-1):he.ch);if(ie.doc.direction=="rtl"||Xe.level==1){var Qt=Xe.level==1==de<0,ci=ht(he,Qt?1:-1);if(ci!=null&&(Qt?ci<=Xe.to&&ci<=zn.end:ci>=Xe.from&&ci>=zn.begin)){var ai=Qt?"before":"after";return new rn(he.line,ci,ai)}}var tr=function(Vr,yo,ao){for(var Eo=function(ws,Pl){return Pl?new rn(he.line,ht(ws,1),"before"):new rn(he.line,ws,"after")};Vr>=0&&Vr<Se.length;Vr+=yo){var Qo=Se[Vr],so=yo>0==(Qo.level!=1),ha=so?ao.begin:ht(ao.end,-1);if(Qo.from<=ha&&ha<Qo.to||(ha=so?Qo.from:ht(Qo.to,-1),ao.begin<=ha&&ha<ao.end))return Eo(ha,so)}},lr=tr(Ie+de,de,zn);if(lr)return lr;var wr=de>0?zn.end:ht(zn.begin,-1);return wr!=null&&!(de>0&&wr==ae.text.length)&&(lr=tr(de>0?0:Se.length-1,de,Zt(wr)),lr)?lr:null}var Sl={selectAll:za,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),$t)},killLine:function(ie){return Cl(ie,function(ae){if(ae.empty()){var he=cn(ie.doc,ae.head.line).text.length;return ae.head.ch==he&&ae.head.line<ie.lastLine()?{from:ae.head,to:rn(ae.head.line+1,0)}:{from:ae.head,to:rn(ae.head.line,he)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return Cl(ie,function(ae){return{from:rn(ae.from().line,0),to:Zn(ie.doc,rn(ae.to().line+1,0))}})},delLineLeft:function(ie){return Cl(ie,function(ae){return{from:rn(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return Cl(ie,function(ae){var he=ie.charCoords(ae.head,"div").top+5,de=ie.coordsChar({left:0,top:he},"div");return{from:de,to:ae.from()}})},delWrappedLineRight:function(ie){return Cl(ie,function(ae){var he=ie.charCoords(ae.head,"div").top+5,de=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:he},"div");return{from:ae.from(),to:de}})},undo:function(ie){return ie.undo()},redo:function(ie){return ie.redo()},undoSelection:function(ie){return ie.undoSelection()},redoSelection:function(ie){return ie.redoSelection()},goDocStart:function(ie){return ie.extendSelection(rn(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(rn(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ae){return Au(ie,ae.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ae){return Fd(ie,ae.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ae){return Du(ie,ae.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ae){var he=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:he},"div")},Tn)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ae){var he=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:0,top:he},"div")},Tn)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ae){var he=ie.cursorCoords(ae.head,"div").top+5,de=ie.coordsChar({left:0,top:he},"div");return de.ch<ie.getLine(de.line).search(/\S/)?Fd(ie,ae.head):de},Tn)},goLineUp:function(ie){return ie.moveV(-1,"line")},goLineDown:function(ie){return ie.moveV(1,"line")},goPageUp:function(ie){return ie.moveV(-1,"page")},goPageDown:function(ie){return ie.moveV(1,"page")},goCharLeft:function(ie){return ie.moveH(-1,"char")},goCharRight:function(ie){return ie.moveH(1,"char")},goColumnLeft:function(ie){return ie.moveH(-1,"column")},goColumnRight:function(ie){return ie.moveH(1,"column")},goWordLeft:function(ie){return ie.moveH(-1,"word")},goGroupRight:function(ie){return ie.moveH(1,"group")},goGroupLeft:function(ie){return ie.moveH(-1,"group")},goWordRight:function(ie){return ie.moveH(1,"word")},delCharBefore:function(ie){return ie.deleteH(-1,"codepoint")},delCharAfter:function(ie){return ie.deleteH(1,"char")},delWordBefore:function(ie){return ie.deleteH(-1,"word")},delWordAfter:function(ie){return ie.deleteH(1,"word")},delGroupBefore:function(ie){return ie.deleteH(-1,"group")},delGroupAfter:function(ie){return ie.deleteH(1,"group")},indentAuto:function(ie){return ie.indentSelection("smart")},indentMore:function(ie){return ie.indentSelection("add")},indentLess:function(ie){return ie.indentSelection("subtract")},insertTab:function(ie){return ie.replaceSelection(" ")},insertSoftTab:function(ie){for(var ae=[],he=ie.listSelections(),de=ie.options.tabSize,Se=0;Se<he.length;Se++){var Ie=he[Se].from(),Xe=it(ie.getLine(Ie.line),Ie.ch,de);ae.push(Yn(de-Xe%de))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return En(ie,function(){for(var ae=ie.listSelections(),he=[],de=0;de<ae.length;de++)if(ae[de].empty()){var Se=ae[de].head,Ie=cn(ie.doc,Se.line).text;if(Ie){if(Se.ch==Ie.length&&(Se=new rn(Se.line,Se.ch-1)),Se.ch>0)Se=new rn(Se.line,Se.ch+1),ie.replaceRange(Ie.charAt(Se.ch-1)+Ie.charAt(Se.ch-2),rn(Se.line,Se.ch-2),Se,"+transpose");else if(Se.line>ie.doc.first){var Xe=cn(ie.doc,Se.line-1).text;Xe&&(Se=new rn(Se.line,1),ie.replaceRange(Ie.charAt(0)+ie.doc.lineSeparator()+Xe.charAt(Xe.length-1),rn(Se.line-1,Xe.length-1),Se,"+transpose"))}}he.push(new Kr(Se,Se))}ie.setSelections(he)})},newlineAndIndent:function(ie){return En(ie,function(){for(var ae=ie.listSelections(),he=ae.length-1;he>=0;he--)ie.replaceRange(ie.doc.lineSeparator(),ae[he].anchor,ae[he].head,"+input");ae=ie.listSelections();for(var de=0;de<ae.length;de++)ie.indentLine(ae[de].from().line,null,!0);ld(ie)})},openLine:function(ie){return ie.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function Au(ie,ae){var he=cn(ie.doc,ae),de=qr(he);return de!=he&&(ae=St(de)),xa(!0,ie,de,ae,1)}function Du(ie,ae){var he=cn(ie.doc,ae),de=zo(he);return de!=he&&(ae=St(de)),xa(!0,ie,he,ae,-1)}function Fd(ie,ae){var he=Au(ie,ae.line),de=cn(ie.doc,he.line),Se=We(de,ie.doc.direction);if(!Se||Se[0].level==0){var Ie=Math.max(he.ch,de.text.search(/\S/)),Xe=ae.line==he.line&&ae.ch<=Ie&&ae.ch;return rn(he.line,Xe?0:Ie,he.sticky)}return he}function Hc(ie,ae,he){if(typeof ae=="string"&&(ae=Sl[ae],!ae))return!1;ie.display.input.ensurePolled();var de=ie.display.shift,Se=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),he&&(ie.display.shift=!1),Se=ae(ie)!=Bn}finally{ie.display.shift=de,ie.state.suppressEdits=!1}return Se}function rh(ie,ae,he){for(var de=0;de<ie.state.keyMaps.length;de++){var Se=eu(ae,ie.state.keyMaps[de],he,ie);if(Se)return Se}return ie.options.extraKeys&&eu(ae,ie.options.extraKeys,he,ie)||eu(ae,ie.options.keyMap,he,ie)}var Hu=new _e;function Cc(ie,ae,he,de){var Se=ie.state.keySeq;if(Se){if(wc(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:Hu.set(50,function(){ie.state.keySeq==Se&&(ie.state.keySeq=null,ie.display.input.reset())}),Wf(ie,Se+" "+ae,he,de))return!0}return Wf(ie,ae,he,de)}function Wf(ie,ae,he,de){var Se=rh(ie,ae,de);return Se=="multi"&&(ie.state.keySeq=ae),Se=="handled"&&Oi(ie,"keyHandled",ie,ae,he),(Se=="handled"||Se=="multi")&&(ui(he),Va(ie)),!!Se}function Gf(ie,ae){var he=ih(ae,!0);return he?ae.shiftKey&&!ie.state.keySeq?Cc(ie,"Shift-"+he,ae,function(de){return Hc(ie,de,!0)})||Cc(ie,he,ae,function(de){if(typeof de=="string"?/^go[A-Z]/.test(de):de.motion)return Hc(ie,de)}):Cc(ie,he,ae,function(de){return Hc(ie,de)}):!1}function $f(ie,ae,he){return Cc(ie,"'"+he+"'",ae,function(de){return Hc(ie,de,!0)})}var Ad=null;function hg(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=tt(),!qt(ae,ie))){Ke&&st<11&&ie.keyCode==27&&(ie.returnValue=!1);var he=ie.keyCode;ae.display.shift=he==16||ie.shiftKey;var de=Gf(ae,ie);Ue&&(Ad=de?he:null,!de&&he==88&&!Ei&&(ce?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),ge&&!ce&&!de&&he==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),he==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&fg(ae)}}function fg(ie){var ae=ie.display.lineDiv;Ot(ae,"CodeMirror-crosshair");function he(de){(de.keyCode==18||!de.altKey)&&(ze(ae,"CodeMirror-crosshair"),un(document,"keyup",he),un(document,"mouseover",he))}ft(document,"keyup",he),ft(document,"mouseover",he)}function gg(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),qt(this,ie)}function bc(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(as(ae.display,ie)||qt(ae,ie)||ie.ctrlKey&&!ie.altKey||ce&&ie.metaKey)){var he=ie.keyCode,de=ie.charCode;if(Ue&&he==Ad){Ad=null,ui(ie);return}if(!(Ue&&(!ie.which||ie.which<10)&&Gf(ae,ie))){var Se=String.fromCharCode(de==null?he:de);Se!="\b"&&($f(ae,ie,Se)||ae.display.input.onKeyPress(ie))}}}var pg=400,mg=function(ie,ae,he){this.time=ie,this.pos=ae,this.button=he};mg.prototype.compare=function(ie,ae,he){return this.time+pg>ie&&bn(ae,this.pos)==0&&he==this.button};var kh,oh;function vg(ie,ae){var he=+new Date;return oh&&oh.compare(he,ie,ae)?(kh=oh=null,"triple"):kh&&kh.compare(he,ie,ae)?(oh=new mg(he,ie,ae),kh=null,"double"):(kh=new mg(he,ie,ae),oh=null,"single")}function Ec(ie){var ae=this,he=ae.display;if(!(qt(ae,ie)||he.activeTouch&&he.input.supportsTouch())){if(he.input.ensurePolled(),he.shift=ie.shiftKey,as(he,ie)){Me||(he.scroller.draggable=!1,setTimeout(function(){return he.scroller.draggable=!0},100));return}if(!Kf(ae,ie)){var de=yl(ae,ie),Se=rr(ie),Ie=de?vg(de,Se):"single";window.focus(),Se==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(de&&yg(ae,Se,de,Ie,ie))&&(Se==1?de?Sg(ae,de,Ie,ie):_i(ie)==he.scroller&&ui(ie):Se==2?(de&&Ia(ae.doc,de),setTimeout(function(){return he.input.focus()},20)):Se==3&&(Te?ae.display.input.onContextMenu(ie):Ps(ae)))}}}function yg(ie,ae,he,de,Se){var Ie="Click";return de=="double"?Ie="Double"+Ie:de=="triple"&&(Ie="Triple"+Ie),Ie=(ae==1?"Left":ae==2?"Middle":"Right")+Ie,Cc(ie,nh(Ie,Se),Se,function(Xe){if(typeof Xe=="string"&&(Xe=Sl[Xe]),!Xe)return!1;var ht=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),ht=Xe(ie,he)!=Bn}finally{ie.state.suppressEdits=!1}return ht})}function ah(ie,ae,he){var de=ie.getOption("configureMouse"),Se=de?de(ie,ae,he):{};if(Se.unit==null){var Ie=se?he.shiftKey&&he.metaKey:he.altKey;Se.unit=Ie?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(Se.extend==null||ie.doc.extend)&&(Se.extend=ie.doc.extend||he.shiftKey),Se.addNew==null&&(Se.addNew=ce?he.metaKey:he.ctrlKey),Se.moveOnDrag==null&&(Se.moveOnDrag=!(ce?he.altKey:he.ctrlKey)),Se}function Sg(ie,ae,he,de){Ke?setTimeout(Xt(cs,ie),0):ie.curOp.focus=tt();var Se=ah(ie,he,de),Ie=ie.doc.sel,Xe;ie.options.dragDrop&&Wi&&!ie.isReadOnly()&&he=="single"&&(Xe=Ie.contains(ae))>-1&&(bn((Xe=Ie.ranges[Xe]).from(),ae)<0||ae.xRel>0)&&(bn(Xe.to(),ae)>0||ae.xRel<0)?xg(ie,de,ae,Se):Wp(ie,de,ae,Se)}function xg(ie,ae,he,de){var Se=ie.display,Ie=!1,Xe=si(ie,function(Zt){Me&&(Se.scroller.draggable=!1),ie.state.draggingText=!1,un(Se.wrapper.ownerDocument,"mouseup",Xe),un(Se.wrapper.ownerDocument,"mousemove",ht),un(Se.scroller,"dragstart",ut),un(Se.scroller,"drop",Xe),Ie||(ui(Zt),de.addNew||Ia(ie.doc,he,null,null,de.extend),Me&&!lt||Ke&&st==9?setTimeout(function(){Se.wrapper.ownerDocument.body.focus({preventScroll:!0}),Se.input.focus()},20):Se.input.focus())}),ht=function(Zt){Ie=Ie||Math.abs(ae.clientX-Zt.clientX)+Math.abs(ae.clientY-Zt.clientY)>=10},ut=function(){return Ie=!0};Me&&(Se.scroller.draggable=!0),ie.state.draggingText=Xe,Xe.copy=!de.moveOnDrag,Se.scroller.dragDrop&&Se.scroller.dragDrop(),ft(Se.wrapper.ownerDocument,"mouseup",Xe),ft(Se.wrapper.ownerDocument,"mousemove",ht),ft(Se.scroller,"dragstart",ut),ft(Se.scroller,"drop",Xe),Ps(ie),setTimeout(function(){return Se.input.focus()},20)}function Pg(ie,ae,he){if(he=="char")return new Kr(ae,ae);if(he=="word")return ie.findWordAt(ae);if(he=="line")return new Kr(rn(ae.line,0),Zn(ie.doc,rn(ae.line+1,0)));var de=he(ie,ae);return new Kr(de.from,de.to)}function Wp(ie,ae,he,de){var Se=ie.display,Ie=ie.doc;ui(ae);var Xe,ht,ut=Ie.sel,Zt=ut.ranges;if(de.addNew&&!de.extend?(ht=Ie.sel.contains(he),ht>-1?Xe=Zt[ht]:Xe=new Kr(he,he)):(Xe=Ie.sel.primary(),ht=Ie.sel.primIndex),de.unit=="rectangle")de.addNew||(Xe=new Kr(he,he)),he=yl(ie,ae,!0,!0),ht=-1;else{var zn=Pg(ie,he,de.unit);de.extend?Xe=uc(Xe,zn.anchor,zn.head,de.extend):Xe=zn}de.addNew?ht==-1?(ht=Zt.length,Xa(Ie,Yo(ie,Zt.concat([Xe]),ht),{scroll:!1,origin:"*mouse"})):Zt.length>1&&Zt[ht].empty()&&de.unit=="char"&&!de.extend?(Xa(Ie,Yo(ie,Zt.slice(0,ht).concat(Zt.slice(ht+1)),0),{scroll:!1,origin:"*mouse"}),ut=Ie.sel):Oa(Ie,ht,Xe,ln):(ht=0,Xa(Ie,new Wo([Xe],0),ln),ut=Ie.sel);var Qt=he;function ci(ao){if(bn(Qt,ao)!=0)if(Qt=ao,de.unit=="rectangle"){for(var Eo=[],Qo=ie.options.tabSize,so=it(cn(Ie,he.line).text,he.ch,Qo),ha=it(cn(Ie,ao.line).text,ao.ch,Qo),ws=Math.min(so,ha),Pl=Math.max(so,ha),ks=Math.min(he.line,ao.line),mu=Math.min(ie.lastLine(),Math.max(he.line,ao.line));ks<=mu;ks++){var zl=cn(Ie,ks).text,fl=ei(zl,ws,Qo);ws==Pl?Eo.push(new Kr(rn(ks,fl),rn(ks,fl))):zl.length>fl&&Eo.push(new Kr(rn(ks,fl),rn(ks,ei(zl,Pl,Qo))))}Eo.length||Eo.push(new Kr(he,he)),Xa(Ie,Yo(ie,ut.ranges.slice(0,ht).concat(Eo),ht),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(ao)}else{var vu=Xe,Nl=Pg(ie,ao,de.unit),gl=vu.anchor,Za;bn(Nl.anchor,gl)>0?(Za=Nl.head,gl=Sn(vu.from(),Nl.anchor)):(Za=Nl.anchor,gl=yn(vu.to(),Nl.head));var Is=ut.ranges.slice(0);Is[ht]=qg(ie,new Kr(Zn(Ie,gl),Za)),Xa(Ie,Yo(ie,Is,ht),ln)}}var ai=Se.wrapper.getBoundingClientRect(),tr=0;function lr(ao){var Eo=++tr,Qo=yl(ie,ao,!0,de.unit=="rectangle");if(Qo)if(bn(Qo,Qt)!=0){ie.curOp.focus=tt(),ci(Qo);var so=fa(Se,Ie);(Qo.line>=so.to||Qo.line<so.from)&&setTimeout(si(ie,function(){tr==Eo&&lr(ao)}),150)}else{var ha=ao.clientY<ai.top?-20:ao.clientY>ai.bottom?20:0;ha&&setTimeout(si(ie,function(){tr==Eo&&(Se.scroller.scrollTop+=ha,lr(ao))}),50)}}function wr(ao){ie.state.selectingText=!1,tr=1/0,ao&&(ui(ao),Se.input.focus()),un(Se.wrapper.ownerDocument,"mousemove",Vr),un(Se.wrapper.ownerDocument,"mouseup",yo),Ie.history.lastSelOrigin=null}var Vr=si(ie,function(ao){ao.buttons===0||!rr(ao)?wr(ao):lr(ao)}),yo=si(ie,wr);ie.state.selectingText=yo,ft(Se.wrapper.ownerDocument,"mousemove",Vr),ft(Se.wrapper.ownerDocument,"mouseup",yo)}function qg(ie,ae){var he=ae.anchor,de=ae.head,Se=cn(ie.doc,he.line);if(bn(he,de)==0&&he.sticky==de.sticky)return ae;var Ie=We(Se);if(!Ie)return ae;var Xe=ve(Ie,he.ch,he.sticky),ht=Ie[Xe];if(ht.from!=he.ch&&ht.to!=he.ch)return ae;var ut=Xe+(ht.from==he.ch==(ht.level!=1)?0:1);if(ut==0||ut==Ie.length)return ae;var Zt;if(de.line!=he.line)Zt=(de.line-he.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var zn=ve(Ie,de.ch,de.sticky),Qt=zn-Xe||(de.ch-he.ch)*(ht.level==1?-1:1);zn==ut-1||zn==ut?Zt=Qt<0:Zt=Qt>0}var ci=Ie[ut+(Zt?-1:0)],ai=Zt==(ci.level==1),tr=ai?ci.from:ci.to,lr=ai?"after":"before";return he.ch==tr&&he.sticky==lr?ae:new Kr(new rn(he.line,tr,lr),de)}function Dd(ie,ae,he,de){var Se,Ie;if(ae.touches)Se=ae.touches[0].clientX,Ie=ae.touches[0].clientY;else try{Se=ae.clientX,Ie=ae.clientY}catch(ci){return!1}if(Se>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;de&&ui(ae);var Xe=ie.display,ht=Xe.lineDiv.getBoundingClientRect();if(Ie>ht.bottom||!hn(ie,he))return fi(ae);Ie-=ht.top-Xe.viewOffset;for(var ut=0;ut<ie.display.gutterSpecs.length;++ut){var Zt=Xe.gutters.childNodes[ut];if(Zt&&Zt.getBoundingClientRect().right>=Se){var zn=An(ie.doc,Ie),Qt=ie.display.gutterSpecs[ut];return Pt(ie,he,ie,zn,Qt.className,ae),fi(ae)}}}function Kf(ie,ae){return Dd(ie,ae,"gutterClick",!0)}function uf(ie,ae){as(ie.display,ae)||ep(ie,ae)||qt(ie,ae,"contextmenu")||Te||ie.display.input.onContextMenu(ae)}function ep(ie,ae){return hn(ie,"gutterContextMenu")?Dd(ie,ae,"gutterContextMenu",!1):!1}function Vf(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ms(ie)}var sh={toString:function(){return"CodeMirror.Init"}},wg={},lh={};function tp(ie){var ae=ie.optionHandlers;function he(de,Se,Ie,Xe){ie.defaults[de]=Se,Ie&&(ae[de]=Xe?function(ht,ut,Zt){Zt!=sh&&Ie(ht,ut,Zt)}:Ie)}ie.defineOption=he,ie.Init=sh,he("value","",function(de,Se){return de.setValue(Se)},!0),he("mode",null,function(de,Se){de.doc.modeOption=Se,Fo(de)},!0),he("indentUnit",2,Fo,!0),he("indentWithTabs",!1),he("smartIndent",!0),he("tabSize",4,function(de){Sa(de),ms(de),_a(de)},!0),he("lineSeparator",null,function(de,Se){if(de.doc.lineSep=Se,!!Se){var Ie=[],Xe=de.doc.first;de.doc.iter(function(ut){for(var Zt=0;;){var zn=ut.text.indexOf(Se,Zt);if(zn==-1)break;Zt=zn+Se.length,Ie.push(rn(Xe,zn))}Xe++});for(var ht=Ie.length-1;ht>=0;ht--)gu(de.doc,Se,Ie[ht],rn(Ie[ht].line,Ie[ht].ch+Se.length))}}),he("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(de,Se,Ie){de.state.specialChars=new RegExp(Se.source+(Se.test(" ")?"":"| "),"g"),Ie!=sh&&de.refresh()}),he("specialCharPlaceholder",Xi,function(de){return de.refresh()},!0),he("electricChars",!0),he("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),he("spellcheck",!1,function(de,Se){return de.getInputField().spellcheck=Se},!0),he("autocorrect",!1,function(de,Se){return de.getInputField().autocorrect=Se},!0),he("autocapitalize",!1,function(de,Se){return de.getInputField().autocapitalize=Se},!0),he("rtlMoveVisually",!fe),he("wholeLineUpdateBefore",!0),he("theme","default",function(de){Vf(de),_r(de)},!0),he("keyMap","default",function(de,Se,Ie){var Xe=zc(Se),ht=Ie!=sh&&zc(Ie);ht&&ht.detach&&ht.detach(de,Xe),Xe.attach&&Xe.attach(de,ht||null)}),he("extraKeys",null),he("configureMouse",null),he("lineWrapping",!1,np,!0),he("gutters",[],function(de,Se){de.display.gutterSpecs=So(Se,de.options.lineNumbers),_r(de)},!0),he("fixedGutter",!0,function(de,Se){de.display.gutters.style.left=Se?Pd(de.display)+"px":"0",de.refresh()},!0),he("coverGutterNextToScrollbar",!1,function(de){return lc(de)},!0),he("scrollbarStyle","native",function(de){Ah(de),lc(de),de.display.scrollbars.setScrollTop(de.doc.scrollTop),de.display.scrollbars.setScrollLeft(de.doc.scrollLeft)},!0),he("lineNumbers",!1,function(de,Se){de.display.gutterSpecs=So(de.options.gutters,Se),_r(de)},!0),he("firstLineNumber",1,_r,!0),he("lineNumberFormatter",function(de){return de},_r,!0),he("showCursorWhenSelecting",!1,nl,!0),he("resetSelectionOnContextMenu",!0),he("lineWiseCopyCut",!0),he("pasteLinesPerSelection",!0),he("selectionsMayTouch",!1),he("readOnly",!1,function(de,Se){Se=="nocursor"&&(ad(de),de.display.input.blur()),de.display.input.readOnlyChanged(Se)}),he("screenReaderLabel",null,function(de,Se){Se=Se===""?null:Se,de.display.input.screenReaderLabelChanged(Se)}),he("disableInput",!1,function(de,Se){Se||de.display.input.reset()},!0),he("dragDrop",!0,Uf),he("allowDropFileTypes",null),he("cursorBlinkRate",530),he("cursorScrollMargin",0),he("cursorHeight",1,nl,!0),he("singleCursorHeightPerLine",!0,nl,!0),he("workTime",100),he("workDelay",100),he("flattenSpans",!0,Sa,!0),he("addModeClass",!1,Sa,!0),he("pollInterval",100),he("undoDepth",200,function(de,Se){return de.doc.history.undoDepth=Se}),he("historyEventDelay",1250),he("viewportMargin",10,function(de){return de.refresh()},!0),he("maxHighlightLength",1e4,Sa,!0),he("moveInputWithCursor",!0,function(de,Se){Se||de.display.input.resetPosition()}),he("tabindex",null,function(de,Se){return de.display.input.getField().tabIndex=Se||""}),he("autofocus",null),he("direction","ltr",function(de,Se){return de.doc.setDirection(Se)},!0),he("phrases",null)}function Uf(ie,ae,he){var de=he&&he!=sh;if(!ae!=!de){var Se=ie.display.dragFunctions,Ie=ae?ft:un;Ie(ie.display.scroller,"dragstart",Se.start),Ie(ie.display.scroller,"dragenter",Se.enter),Ie(ie.display.scroller,"dragover",Se.over),Ie(ie.display.scroller,"dragleave",Se.leave),Ie(ie.display.scroller,"drop",Se.drop)}}function np(ie){ie.options.lineWrapping?(Ot(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(ze(ie.display.wrapper,"CodeMirror-wrap"),Ho(ie)),To(ie),_a(ie),ms(ie),setTimeout(function(){return lc(ie)},100)}function Ha(ie,ae){var he=this;if(!(this instanceof Ha))return new Ha(ie,ae);this.options=ae=ae?Ut(ae):{},Ut(wg,ae,!1);var de=ae.value;typeof de=="string"?de=new Gs(de,ae.mode,null,ae.lineSeparator,ae.direction):ae.mode&&(de.modeOption=ae.mode),this.doc=de;var Se=new Ha.inputStyles[ae.inputStyle](this),Ie=this.display=new co(ie,de,Se,ae);Ie.wrapper.CodeMirror=this,Vf(this),ae.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ah(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 _e,keySeq:null,specialChars:null},ae.autofocus&&!ee&&Ie.input.focus(),Ke&&st<11&&setTimeout(function(){return he.display.input.reset(!0)},20),Ih(this),pu(),Ol(this),this.curOp.forceUpdate=!0,$o(this,de),ae.autofocus&&!ee||this.hasFocus()?setTimeout(function(){he.hasFocus()&&!he.state.focused&&Na(he)},20):ad(this);for(var Xe in lh)lh.hasOwnProperty(Xe)&&lh[Xe](this,ae[Xe],sh);$r(this),ae.finishInit&&ae.finishInit(this);for(var ht=0;ht<Bd.length;++ht)Bd[ht](this);Oc(this),Me&&ae.lineWrapping&&getComputedStyle(Ie.lineDiv).textRendering=="optimizelegibility"&&(Ie.lineDiv.style.textRendering="auto")}Ha.defaults=wg,Ha.optionHandlers=lh;function Ih(ie){var ae=ie.display;ft(ae.scroller,"mousedown",si(ie,Ec)),Ke&&st<11?ft(ae.scroller,"dblclick",si(ie,function(ut){if(!qt(ie,ut)){var Zt=yl(ie,ut);if(!(!Zt||Kf(ie,ut)||as(ie.display,ut))){ui(ut);var zn=ie.findWordAt(Zt);Ia(ie.doc,zn.anchor,zn.head)}}})):ft(ae.scroller,"dblclick",function(ut){return qt(ie,ut)||ui(ut)}),ft(ae.scroller,"contextmenu",function(ut){return uf(ie,ut)}),ft(ae.input.getField(),"contextmenu",function(ut){ae.scroller.contains(ut.target)||uf(ie,ut)});var he,de={end:0};function Se(){ae.activeTouch&&(he=setTimeout(function(){return ae.activeTouch=null},1e3),de=ae.activeTouch,de.end=+new Date)}function Ie(ut){if(ut.touches.length!=1)return!1;var Zt=ut.touches[0];return Zt.radiusX<=1&&Zt.radiusY<=1}function Xe(ut,Zt){if(Zt.left==null)return!0;var zn=Zt.left-ut.left,Qt=Zt.top-ut.top;return zn*zn+Qt*Qt>20*20}ft(ae.scroller,"touchstart",function(ut){if(!qt(ie,ut)&&!Ie(ut)&&!Kf(ie,ut)){ae.input.ensurePolled(),clearTimeout(he);var Zt=+new Date;ae.activeTouch={start:Zt,moved:!1,prev:Zt-de.end<=300?de:null},ut.touches.length==1&&(ae.activeTouch.left=ut.touches[0].pageX,ae.activeTouch.top=ut.touches[0].pageY)}}),ft(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),ft(ae.scroller,"touchend",function(ut){var Zt=ae.activeTouch;if(Zt&&!as(ae,ut)&&Zt.left!=null&&!Zt.moved&&new Date-Zt.start<300){var zn=ie.coordsChar(ae.activeTouch,"page"),Qt;!Zt.prev||Xe(Zt,Zt.prev)?Qt=new Kr(zn,zn):!Zt.prev.prev||Xe(Zt,Zt.prev.prev)?Qt=ie.findWordAt(zn):Qt=new Kr(rn(zn.line,0),Zn(ie.doc,rn(zn.line+1,0))),ie.setSelection(Qt.anchor,Qt.head),ie.focus(),ui(ut)}Se()}),ft(ae.scroller,"touchcancel",Se),ft(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(_u(ie,ae.scroller.scrollTop),kl(ie,ae.scroller.scrollLeft,!0),Pt(ie,"scroll",ie))}),ft(ae.scroller,"mousewheel",function(ut){return Zo(ie,ut)}),ft(ae.scroller,"DOMMouseScroll",function(ut){return Zo(ie,ut)}),ft(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(ut){qt(ie,ut)||bi(ut)},over:function(ut){qt(ie,ut)||(sf(ie,ut),bi(ut))},start:function(ut){return qd(ie,ut)},drop:si(ie,Md),leave:function(ut){qt(ie,ut)||Zf(ie)}};var ht=ae.input.getField();ft(ht,"keyup",function(ut){return gg.call(ie,ut)}),ft(ht,"keydown",si(ie,hg)),ft(ht,"keypress",si(ie,bc)),ft(ht,"focus",function(ut){return Na(ie,ut)}),ft(ht,"blur",function(ut){return ad(ie,ut)})}var Bd=[];Ha.defineInitHook=function(ie){return Bd.push(ie)};function xl(ie,ae,he,de){var Se=ie.doc,Ie;he==null&&(he="add"),he=="smart"&&(Se.mode.indent?Ie=Gi(ie,ae).state:he="prev");var Xe=ie.options.tabSize,ht=cn(Se,ae),ut=it(ht.text,null,Xe);ht.stateAfter&&(ht.stateAfter=null);var Zt=ht.text.match(/^\s*/)[0],zn;if(!de&&!/\S/.test(ht.text))zn=0,he="not";else if(he=="smart"&&(zn=Se.mode.indent(Ie,ht.text.slice(Zt.length),ht.text),zn==Bn||zn>150)){if(!de)return;he="prev"}he=="prev"?ae>Se.first?zn=it(cn(Se,ae-1).text,null,Xe):zn=0:he=="add"?zn=ut+ie.options.indentUnit:he=="subtract"?zn=ut-ie.options.indentUnit:typeof he=="number"&&(zn=ut+he),zn=Math.max(0,zn);var Qt="",ci=0;if(ie.options.indentWithTabs)for(var ai=Math.floor(zn/Xe);ai;--ai)ci+=Xe,Qt+=" ";if(ci<zn&&(Qt+=Yn(zn-ci)),Qt!=Zt)return gu(Se,Qt,rn(ae,0),rn(ae,Zt.length),"+input"),ht.stateAfter=null,!0;for(var tr=0;tr<Se.sel.ranges.length;tr++){var lr=Se.sel.ranges[tr];if(lr.head.line==ae&&lr.head.ch<Zt.length){var wr=rn(ae,Zt.length);Oa(Se,tr,new Kr(wr,wr));break}}}var tu=null;function Oh(ie){tu=ie}function uh(ie,ae,he,de,Se){var Ie=ie.doc;ie.display.shift=!1,de||(de=Ie.sel);var Xe=+new Date-200,ht=Se=="paste"||ie.state.pasteIncoming>Xe,ut=Kn(ae),Zt=null;if(ht&&de.ranges.length>1)if(tu&&tu.text.join(`
|
|
|
`)==ae){if(de.ranges.length%tu.text.length==0){Zt=[];for(var zn=0;zn<tu.text.length;zn++)Zt.push(Ie.splitLines(tu.text[zn]))}}else ut.length==de.ranges.length&&ie.options.pasteLinesPerSelection&&(Zt=wn(ut,function(Vr){return[Vr]}));for(var Qt=ie.curOp.updateInput,ci=de.ranges.length-1;ci>=0;ci--){var ai=de.ranges[ci],tr=ai.from(),lr=ai.to();ai.empty()&&(he&&he>0?tr=rn(tr.line,tr.ch-he):ie.state.overwrite&&!ht?lr=rn(lr.line,Math.min(cn(Ie,lr.line).text.length,lr.ch+zt(ut).length)):ht&&tu&&tu.lineWise&&tu.text.join(`
|
|
|
`)==ut.join(`
|
|
|
`)&&(tr=lr=rn(tr.line,0)));var wr={from:tr,to:lr,text:Zt?Zt[ci%Zt.length]:ut,origin:Se||(ht?"paste":ie.state.cutIncoming>Xe?"cut":"+input")};es(ie.doc,wr),Oi(ie,"inputRead",ie,wr)}ae&&!ht&&bg(ie,ae),ld(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Qt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function Cg(ie,ae){var he=ie.clipboardData&&ie.clipboardData.getData("Text");if(he)return ie.preventDefault(),!ae.isReadOnly()&&!ae.options.disableInput&&En(ae,function(){return uh(ae,he,0,null,"paste")}),!0}function bg(ie,ae){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var he=ie.doc.sel,de=he.ranges.length-1;de>=0;de--){var Se=he.ranges[de];if(!(Se.head.ch>100||de&&he.ranges[de-1].head.line==Se.head.line)){var Ie=ie.getModeAt(Se.head),Xe=!1;if(Ie.electricChars){for(var ht=0;ht<Ie.electricChars.length;ht++)if(ae.indexOf(Ie.electricChars.charAt(ht))>-1){Xe=xl(ie,Se.head.line,"smart");break}}else Ie.electricInput&&Ie.electricInput.test(cn(ie.doc,Se.head.line).text.slice(0,Se.head.ch))&&(Xe=xl(ie,Se.head.line,"smart"));Xe&&Oi(ie,"electricInput",ie,Se.head.line)}}}function Eg(ie){for(var ae=[],he=[],de=0;de<ie.doc.sel.ranges.length;de++){var Se=ie.doc.sel.ranges[de].head.line,Ie={anchor:rn(Se,0),head:rn(Se+1,0)};he.push(Ie),ae.push(ie.getRange(Ie.anchor,Ie.head))}return{text:ae,ranges:he}}function Mg(ie,ae,he,de){ie.setAttribute("autocorrect",he?"":"off"),ie.setAttribute("autocapitalize",de?"":"off"),ie.setAttribute("spellcheck",!!ae)}function Lg(){var ie=Je("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=Je("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Me?ie.style.width="1000px":ie.setAttribute("wrap","off"),Ae&&(ie.style.border="1px solid black"),Mg(ie),ae}function Td(ie){var ae=ie.optionHandlers,he=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(de,Se){var Ie=this.options,Xe=Ie[de];Ie[de]==Se&&de!="mode"||(Ie[de]=Se,ae.hasOwnProperty(de)&&si(this,ae[de])(this,Se,Xe),Pt(this,"optionChange",this,de))},getOption:function(de){return this.options[de]},getDoc:function(){return this.doc},addKeyMap:function(de,Se){this.state.keyMaps[Se?"push":"unshift"](zc(de))},removeKeyMap:function(de){for(var Se=this.state.keyMaps,Ie=0;Ie<Se.length;++Ie)if(Se[Ie]==de||Se[Ie].name==de)return Se.splice(Ie,1),!0},addOverlay:li(function(de,Se){var Ie=de.token?de:ie.getMode(this.options,de);if(Ie.startState)throw new Error("Overlays may not be stateful.");$n(this.state.overlays,{mode:Ie,modeSpec:de,opaque:Se&&Se.opaque,priority:Se&&Se.priority||0},function(Xe){return Xe.priority}),this.state.modeGen++,_a(this)}),removeOverlay:li(function(de){for(var Se=this.state.overlays,Ie=0;Ie<Se.length;++Ie){var Xe=Se[Ie].modeSpec;if(Xe==de||typeof de=="string"&&Xe.name==de){Se.splice(Ie,1),this.state.modeGen++,_a(this);return}}}),indentLine:li(function(de,Se,Ie){typeof Se!="string"&&typeof Se!="number"&&(Se==null?Se=this.options.smartIndent?"smart":"prev":Se=Se?"add":"subtract"),qn(this.doc,de)&&xl(this,de,Se,Ie)}),indentSelection:li(function(de){for(var Se=this.doc.sel.ranges,Ie=-1,Xe=0;Xe<Se.length;Xe++){var ht=Se[Xe];if(ht.empty())ht.head.line>Ie&&(xl(this,ht.head.line,de,!0),Ie=ht.head.line,Xe==this.doc.sel.primIndex&&ld(this));else{var ut=ht.from(),Zt=ht.to(),zn=Math.max(Ie,ut.line);Ie=Math.min(this.lastLine(),Zt.line-(Zt.ch?0:1))+1;for(var Qt=zn;Qt<Ie;++Qt)xl(this,Qt,de);var ci=this.doc.sel.ranges;ut.ch==0&&Se.length==ci.length&&ci[Xe].from().ch>0&&Oa(this.doc,Xe,new Kr(ut,ci[Xe].to()),$t)}}}),getTokenAt:function(de,Se){return Ti(this,de,Se)},getLineTokens:function(de,Se){return Ti(this,rn(de),Se,!0)},getTokenTypeAt:function(de){de=Zn(this.doc,de);var Se=Ki(this,cn(this.doc,de.line)),Ie=0,Xe=(Se.length-1)/2,ht=de.ch,ut;if(ht==0)ut=Se[2];else for(;;){var Zt=Ie+Xe>>1;if((Zt?Se[Zt*2-1]:0)>=ht)Xe=Zt;else if(Se[Zt*2+1]<ht)Ie=Zt+1;else{ut=Se[Zt*2+2];break}}var zn=ut?ut.indexOf("overlay "):-1;return zn<0?ut:zn==0?null:ut.slice(0,zn-1)},getModeAt:function(de){var Se=this.doc.mode;return Se.innerMode?ie.innerMode(Se,this.getTokenAt(de).state).mode:Se},getHelper:function(de,Se){return this.getHelpers(de,Se)[0]},getHelpers:function(de,Se){var Ie=[];if(!he.hasOwnProperty(Se))return Ie;var Xe=he[Se],ht=this.getModeAt(de);if(typeof ht[Se]=="string")Xe[ht[Se]]&&Ie.push(Xe[ht[Se]]);else if(ht[Se])for(var ut=0;ut<ht[Se].length;ut++){var Zt=Xe[ht[Se][ut]];Zt&&Ie.push(Zt)}else ht.helperType&&Xe[ht.helperType]?Ie.push(Xe[ht.helperType]):Xe[ht.name]&&Ie.push(Xe[ht.name]);for(var zn=0;zn<Xe._global.length;zn++){var Qt=Xe._global[zn];Qt.pred(ht,this)&&Wt(Ie,Qt.val)==-1&&Ie.push(Qt.val)}return Ie},getStateAfter:function(de,Se){var Ie=this.doc;return de=Gn(Ie,de==null?Ie.first+Ie.size-1:de),Gi(this,de+1,Se).state},cursorCoords:function(de,Se){var Ie,Xe=this.doc.sel.primary();return de==null?Ie=Xe.head:typeof de=="object"?Ie=Zn(this.doc,de):Ie=de?Xe.from():Xe.to(),is(this,Ie,Se||"page")},charCoords:function(de,Se){return _l(this,Zn(this.doc,de),Se||"page")},coordsChar:function(de,Se){return de=oc(this,de,Se||"page"),Uu(this,de.left,de.top)},lineAtHeight:function(de,Se){return de=oc(this,{top:de,left:0},Se||"page").top,An(this.doc,de+this.display.viewOffset)},heightAtLine:function(de,Se,Ie){var Xe=!1,ht;if(typeof de=="number"){var ut=this.doc.first+this.doc.size-1;de<this.doc.first?de=this.doc.first:de>ut&&(de=ut,Xe=!0),ht=cn(this.doc,de)}else ht=de;return vs(this,ht,{top:0,left:0},Se||"page",Ie||Xe).top+(Xe?this.doc.height-Bo(ht):0)},defaultTextHeight:function(){return cu(this.display)},defaultCharWidth:function(){return Mu(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(de,Se,Ie,Xe,ht){var ut=this.display;de=is(this,Zn(this.doc,de));var Zt=de.bottom,zn=de.left;if(Se.style.position="absolute",Se.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Se),ut.sizer.appendChild(Se),Xe=="over")Zt=de.top;else if(Xe=="above"||Xe=="near"){var Qt=Math.max(ut.wrapper.clientHeight,this.doc.height),ci=Math.max(ut.sizer.clientWidth,ut.lineSpace.clientWidth);(Xe=="above"||de.bottom+Se.offsetHeight>Qt)&&de.top>Se.offsetHeight?Zt=de.top-Se.offsetHeight:de.bottom+Se.offsetHeight<=Qt&&(Zt=de.bottom),zn+Se.offsetWidth>ci&&(zn=ci-Se.offsetWidth)}Se.style.top=Zt+"px",Se.style.left=Se.style.right="",ht=="right"?(zn=ut.sizer.clientWidth-Se.offsetWidth,Se.style.right="0px"):(ht=="left"?zn=0:ht=="middle"&&(zn=(ut.sizer.clientWidth-Se.offsetWidth)/2),Se.style.left=zn+"px"),Ie&&wd(this,{left:zn,top:Zt,right:zn+Se.offsetWidth,bottom:Zt+Se.offsetHeight})},triggerOnKeyDown:li(hg),triggerOnKeyPress:li(bc),triggerOnKeyUp:gg,triggerOnMouseDown:li(Ec),execCommand:function(de){if(Sl.hasOwnProperty(de))return Sl[de].call(null,this)},triggerElectric:li(function(de){bg(this,de)}),findPosH:function(de,Se,Ie,Xe){var ht=1;Se<0&&(ht=-1,Se=-Se);for(var ut=Zn(this.doc,de),Zt=0;Zt<Se&&(ut=cf(this.doc,ut,ht,Ie,Xe),!ut.hitSide);++Zt);return ut},moveH:li(function(de,Se){var Ie=this;this.extendSelectionsBy(function(Xe){return Ie.display.shift||Ie.doc.extend||Xe.empty()?cf(Ie.doc,Xe.head,de,Se,Ie.options.rtlMoveVisually):de<0?Xe.from():Xe.to()},Tn)}),deleteH:li(function(de,Se){var Ie=this.doc.sel,Xe=this.doc;Ie.somethingSelected()?Xe.replaceSelection("",null,"+delete"):Cl(this,function(ht){var ut=cf(Xe,ht.head,de,Se,!1);return de<0?{from:ut,to:ht.head}:{from:ht.head,to:ut}})}),findPosV:function(de,Se,Ie,Xe){var ht=1,ut=Xe;Se<0&&(ht=-1,Se=-Se);for(var Zt=Zn(this.doc,de),zn=0;zn<Se;++zn){var Qt=is(this,Zt,"div");if(ut==null?ut=Qt.left:Qt.left=ut,Zt=hd(this,Qt,ht,Ie),Zt.hitSide)break}return Zt},moveV:li(function(de,Se){var Ie=this,Xe=this.doc,ht=[],ut=!this.display.shift&&!Xe.extend&&Xe.sel.somethingSelected();if(Xe.extendSelectionsBy(function(zn){if(ut)return de<0?zn.from():zn.to();var Qt=is(Ie,zn.head,"div");zn.goalColumn!=null&&(Qt.left=zn.goalColumn),ht.push(Qt.left);var ci=hd(Ie,Qt,de,Se);return Se=="page"&&zn==Xe.sel.primary()&&Xd(Ie,_l(Ie,ci,"div").top-Qt.top),ci},Tn),ht.length)for(var Zt=0;Zt<Xe.sel.ranges.length;Zt++)Xe.sel.ranges[Zt].goalColumn=ht[Zt]}),findWordAt:function(de){var Se=this.doc,Ie=cn(Se,de.line).text,Xe=de.ch,ht=de.ch;if(Ie){var ut=this.getHelper(de,"wordChars");(de.sticky=="before"||ht==Ie.length)&&Xe?--Xe:++ht;for(var Zt=Ie.charAt(Xe),zn=ot(Zt,ut)?function(Qt){return ot(Qt,ut)}:/\s/.test(Zt)?function(Qt){return/\s/.test(Qt)}:function(Qt){return!/\s/.test(Qt)&&!ot(Qt)};Xe>0&&zn(Ie.charAt(Xe-1));)--Xe;for(;ht<Ie.length&&zn(Ie.charAt(ht));)++ht}return new Kr(rn(de.line,Xe),rn(de.line,ht))},toggleOverwrite:function(de){de!=null&&de==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ot(this.display.cursorDiv,"CodeMirror-overwrite"):ze(this.display.cursorDiv,"CodeMirror-overwrite"),Pt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==tt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:li(function(de,Se){ud(this,de,Se)}),getScrollInfo:function(){var de=this.display.scroller;return{left:de.scrollLeft,top:de.scrollTop,height:de.scrollHeight-wl(this)-this.display.barHeight,width:de.scrollWidth-wl(this)-this.display.barWidth,clientHeight:td(this),clientWidth:sl(this)}},scrollIntoView:li(function(de,Se){de==null?(de={from:this.doc.sel.primary().head,to:null},Se==null&&(Se=this.options.cursorScrollMargin)):typeof de=="number"?de={from:rn(de,0),to:null}:de.from==null&&(de={from:de,to:null}),de.to||(de.to=de.from),de.margin=Se||0,de.from.line!=null?Fa(this,de):Yd(this,de.from,de.to,de.margin)}),setSize:li(function(de,Se){var Ie=this,Xe=function(ut){return typeof ut=="number"||/^\d+$/.test(String(ut))?ut+"px":ut};de!=null&&(this.display.wrapper.style.width=Xe(de)),Se!=null&&(this.display.wrapper.style.height=Xe(Se)),this.options.lineWrapping&&Ss(this);var ht=this.display.viewFrom;this.doc.iter(ht,this.display.viewTo,function(ut){if(ut.widgets){for(var Zt=0;Zt<ut.widgets.length;Zt++)if(ut.widgets[Zt].noHScroll){ra(Ie,ht,"widget");break}}++ht}),this.curOp.forceUpdate=!0,Pt(this,"refresh",this)}),operation:function(de){return En(this,de)},startOperation:function(){return Ol(this)},endOperation:function(){return Oc(this)},refresh:li(function(){var de=this.display.cachedTextHeight;_a(this),this.curOp.forceUpdate=!0,ms(this),ud(this,this.doc.scrollLeft,this.doc.scrollTop),eo(this.display),(de==null||Math.abs(de-cu(this.display))>.5||this.options.lineWrapping)&&To(this),Pt(this,"refresh",this)}),swapDoc:li(function(de){var Se=this.doc;return Se.cm=null,this.state.selectingText&&this.state.selectingText(),$o(this,de),ms(this),this.display.input.reset(),ud(this,de.scrollLeft,de.scrollTop),this.curOp.forceScroll=!0,Oi(this,"swapDoc",this,Se),Se}),phrase:function(de){var Se=this.options.phrases;return Se&&Object.prototype.hasOwnProperty.call(Se,de)?Se[de]:de},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}},fn(ie),ie.registerHelper=function(de,Se,Ie){he.hasOwnProperty(de)||(he[de]=ie[de]={_global:[]}),he[de][Se]=Ie},ie.registerGlobalHelper=function(de,Se,Ie,Xe){ie.registerHelper(de,Se,Xe),he[de]._global.push({pred:Ie,val:Xe})}}function cf(ie,ae,he,de,Se){var Ie=ae,Xe=he,ht=cn(ie,ae.line),ut=Se&&ie.direction=="rtl"?-he:he;function Zt(){var yo=ae.line+ut;return yo<ie.first||yo>=ie.first+ie.size?!1:(ae=new rn(yo,ae.ch,ae.sticky),ht=cn(ie,yo))}function zn(yo){var ao;if(de=="codepoint"){var Eo=ht.text.charCodeAt(ae.ch+(de>0?0:-1));isNaN(Eo)?ao=null:ao=new rn(ae.line,Math.max(0,Math.min(ht.text.length,ae.ch+he*(Eo>=55296&&Eo<56320?2:1))),-he)}else Se?ao=ls(ie.cm,ht,ae,he):ao=$s(ht,ae,he);if(ao==null)if(!yo&&Zt())ae=xa(Se,ie.cm,ht,ae.line,ut);else return!1;else ae=ao;return!0}if(de=="char"||de=="codepoint")zn();else if(de=="column")zn(!0);else if(de=="word"||de=="group")for(var Qt=null,ci=de=="group",ai=ie.cm&&ie.cm.getHelper(ae,"wordChars"),tr=!0;!(he<0&&!zn(!tr));tr=!1){var lr=ht.text.charAt(ae.ch)||`
|
|
|
`,wr=ot(lr,ai)?"w":ci&&lr==`
|
|
|
`?"n":!ci||/\s/.test(lr)?null:"p";if(ci&&!tr&&!wr&&(wr="s"),Qt&&Qt!=wr){he<0&&(he=1,zn(),ae.sticky="after");break}if(wr&&(Qt=wr),he>0&&!zn(!tr))break}var Vr=Jl(ie,ae,Ie,Xe,!0);return Ft(Ie,Vr)&&(Vr.hitSide=!0),Vr}function hd(ie,ae,he,de){var Se=ie.doc,Ie=ae.left,Xe;if(de=="page"){var ht=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ut=Math.max(ht-.5*cu(ie.display),3);Xe=(he>0?ae.bottom:ae.top)+he*ut}else de=="line"&&(Xe=he>0?ae.bottom+3:ae.top-3);for(var Zt;Zt=Uu(ie,Ie,Xe),!!Zt.outside;){if(he<0?Xe<=0:Xe>=Se.height){Zt.hitSide=!0;break}Xe+=he*5}return Zt}var ts=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new _e,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ts.prototype.init=function(ie){var ae=this,he=this,de=he.cm,Se=he.div=ie.lineDiv;Mg(Se,de.options.spellcheck,de.options.autocorrect,de.options.autocapitalize);function Ie(ht){for(var ut=ht.target;ut;ut=ut.parentNode){if(ut==Se)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ut.className))break}return!1}ft(Se,"paste",function(ht){!Ie(ht)||qt(de,ht)||Cg(ht,de)||st<=11&&setTimeout(si(de,function(){return ae.updateFromDOM()}),20)}),ft(Se,"compositionstart",function(ht){ae.composing={data:ht.data,done:!1}}),ft(Se,"compositionupdate",function(ht){ae.composing||(ae.composing={data:ht.data,done:!1})}),ft(Se,"compositionend",function(ht){ae.composing&&(ht.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),ft(Se,"touchstart",function(){return he.forceCompositionEnd()}),ft(Se,"input",function(){ae.composing||ae.readFromDOMSoon()});function Xe(ht){if(!(!Ie(ht)||qt(de,ht))){if(de.somethingSelected())Oh({lineWise:!1,text:de.getSelections()}),ht.type=="cut"&&de.replaceSelection("",null,"cut");else if(de.options.lineWiseCopyCut){var ut=Eg(de);Oh({lineWise:!0,text:ut.text}),ht.type=="cut"&&de.operation(function(){de.setSelections(ut.ranges,0,$t),de.replaceSelection("",null,"cut")})}else return;if(ht.clipboardData){ht.clipboardData.clearData();var Zt=tu.text.join(`
|
|
|
`);if(ht.clipboardData.setData("Text",Zt),ht.clipboardData.getData("Text")==Zt){ht.preventDefault();return}}var zn=Lg(),Qt=zn.firstChild;de.display.lineSpace.insertBefore(zn,de.display.lineSpace.firstChild),Qt.value=tu.text.join(`
|
|
|
`);var ci=document.activeElement;Ht(Qt),setTimeout(function(){de.display.lineSpace.removeChild(zn),ci.focus(),ci==Se&&he.showPrimarySelection()},50)}}ft(Se,"copy",Xe),ft(Se,"cut",Xe)},ts.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},ts.prototype.prepareSelection=function(){var ie=od(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},ts.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},ts.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ts.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ae=this.cm,he=ae.doc.sel.primary(),de=he.from(),Se=he.to();if(ae.display.viewTo==ae.display.viewFrom||de.line>=ae.display.viewTo||Se.line<ae.display.viewFrom){ie.removeAllRanges();return}var Ie=df(ae,ie.anchorNode,ie.anchorOffset),Xe=df(ae,ie.focusNode,ie.focusOffset);if(!(Ie&&!Ie.bad&&Xe&&!Xe.bad&&bn(Sn(Ie,Xe),de)==0&&bn(yn(Ie,Xe),Se)==0)){var ht=ae.display.view,ut=de.line>=ae.display.viewFrom&&ch(ae,de)||{node:ht[0].measure.map[2],offset:0},Zt=Se.line<ae.display.viewTo&&ch(ae,Se);if(!Zt){var zn=ht[ht.length-1].measure,Qt=zn.maps?zn.maps[zn.maps.length-1]:zn.map;Zt={node:Qt[Qt.length-1],offset:Qt[Qt.length-2]-Qt[Qt.length-3]}}if(!ut||!Zt){ie.removeAllRanges();return}var ci=ie.rangeCount&&ie.getRangeAt(0),ai;try{ai=He(ut.node,ut.offset,Zt.offset,Zt.node)}catch(tr){}ai&&(!ge&&ae.state.focused?(ie.collapse(ut.node,ut.offset),ai.collapsed||(ie.removeAllRanges(),ie.addRange(ai))):(ie.removeAllRanges(),ie.addRange(ai)),ci&&ie.anchorNode==null?ie.addRange(ci):ge&&this.startGracePeriod()),this.rememberSelection()}},ts.prototype.startGracePeriod=function(){var ie=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){ie.gracePeriod=!1,ie.selectionChanged()&&ie.cm.operation(function(){return ie.cm.curOp.selectionChanged=!0})},20)},ts.prototype.showMultipleSelections=function(ie){nt(this.cm.display.cursorDiv,ie.cursors),nt(this.cm.display.selectionDiv,ie.selection)},ts.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},ts.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return Et(this.div,ae)},ts.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ts.prototype.blur=function(){this.div.blur()},ts.prototype.getField=function(){return this.div},ts.prototype.supportsTouch=function(){return!0},ts.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():En(this.cm,function(){return ie.cm.curOp.selectionChanged=!0});function ae(){ie.cm.state.focused&&(ie.pollSelection(),ie.polling.set(ie.cm.options.pollInterval,ae))}this.polling.set(this.cm.options.pollInterval,ae)},ts.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},ts.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(ne&&bt&&this.cm.display.gutterSpecs.length&&Ng(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var he=df(ae,ie.anchorNode,ie.anchorOffset),de=df(ae,ie.focusNode,ie.focusOffset);he&&de&&En(ae,function(){Xa(ae.doc,ia(he,de),$t),(he.bad||de.bad)&&(ae.curOp.selectionChanged=!0)})}}},ts.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ae=ie.display,he=ie.doc.sel.primary(),de=he.from(),Se=he.to();if(de.ch==0&&de.line>ie.firstLine()&&(de=rn(de.line-1,cn(ie.doc,de.line-1).length)),Se.ch==cn(ie.doc,Se.line).text.length&&Se.line<ie.lastLine()&&(Se=rn(Se.line+1,0)),de.line<ae.viewFrom||Se.line>ae.viewTo-1)return!1;var Ie,Xe,ht;de.line==ae.viewFrom||(Ie=ul(ie,de.line))==0?(Xe=St(ae.view[0].line),ht=ae.view[0].node):(Xe=St(ae.view[Ie].line),ht=ae.view[Ie-1].node.nextSibling);var ut=ul(ie,Se.line),Zt,zn;if(ut==ae.view.length-1?(Zt=ae.viewTo-1,zn=ae.lineDiv.lastChild):(Zt=St(ae.view[ut+1].line)-1,zn=ae.view[ut+1].node.previousSibling),!ht)return!1;for(var Qt=ie.doc.splitLines(dh(ie,ht,zn,Xe,Zt)),ci=Nn(ie.doc,rn(Xe,0),rn(Zt,cn(ie.doc,Zt).text.length));Qt.length>1&&ci.length>1;)if(zt(Qt)==zt(ci))Qt.pop(),ci.pop(),Zt--;else if(Qt[0]==ci[0])Qt.shift(),ci.shift(),Xe++;else break;for(var ai=0,tr=0,lr=Qt[0],wr=ci[0],Vr=Math.min(lr.length,wr.length);ai<Vr&&lr.charCodeAt(ai)==wr.charCodeAt(ai);)++ai;for(var yo=zt(Qt),ao=zt(ci),Eo=Math.min(yo.length-(Qt.length==1?ai:0),ao.length-(ci.length==1?ai:0));tr<Eo&&yo.charCodeAt(yo.length-tr-1)==ao.charCodeAt(ao.length-tr-1);)++tr;if(Qt.length==1&&ci.length==1&&Xe==de.line)for(;ai&&ai>de.ch&&yo.charCodeAt(yo.length-tr-1)==ao.charCodeAt(ao.length-tr-1);)ai--,tr++;Qt[Qt.length-1]=yo.slice(0,yo.length-tr).replace(/^\u200b+/,""),Qt[0]=Qt[0].slice(ai).replace(/\u200b+$/,"");var Qo=rn(Xe,ai),so=rn(Zt,ci.length?zt(ci).length-tr:0);if(Qt.length>1||Qt[0]||bn(Qo,so))return gu(ie.doc,Qt,Qo,so,"+input"),!0},ts.prototype.ensurePolled=function(){this.forceCompositionEnd()},ts.prototype.reset=function(){this.forceCompositionEnd()},ts.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ts.prototype.readFromDOMSoon=function(){var ie=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(ie.readDOMTimeout=null,ie.composing)if(ie.composing.done)ie.composing=null;else return;ie.updateFromDOM()},80))},ts.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&En(this.cm,function(){return _a(ie.cm)})},ts.prototype.setUneditable=function(ie){ie.contentEditable="false"},ts.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||si(this.cm,uh)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},ts.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},ts.prototype.onContextMenu=function(){},ts.prototype.resetPosition=function(){},ts.prototype.needsContentAttribute=!0;function ch(ie,ae){var he=Ic(ie,ae.line);if(!he||he.hidden)return null;var de=cn(ie.doc,ae.line),Se=kc(he,de,ae.line),Ie=We(de,ie.doc.direction),Xe="left";if(Ie){var ht=ve(Ie,ae.ch);Xe=ht%2?"right":"left"}var ut=Eu(Se.map,ae.ch,Xe);return ut.offset=ut.collapse=="right"?ut.end:ut.start,ut}function Ng(ie){for(var ae=ie;ae;ae=ae.parentNode)if(/CodeMirror-gutter-wrapper/.test(ae.className))return!0;return!1}function kd(ie,ae){return ae&&(ie.bad=!0),ie}function dh(ie,ae,he,de,Se){var Ie="",Xe=!1,ht=ie.doc.lineSeparator(),ut=!1;function Zt(ai){return function(tr){return tr.id==ai}}function zn(){Xe&&(Ie+=ht,ut&&(Ie+=ht),Xe=ut=!1)}function Qt(ai){ai&&(zn(),Ie+=ai)}function ci(ai){if(ai.nodeType==1){var tr=ai.getAttribute("cm-text");if(tr){Qt(tr);return}var lr=ai.getAttribute("cm-marker"),wr;if(lr){var Vr=ie.findMarks(rn(de,0),rn(Se+1,0),Zt(+lr));Vr.length&&(wr=Vr[0].find(0))&&Qt(Nn(ie.doc,wr.from,wr.to).join(ht));return}if(ai.getAttribute("contenteditable")=="false")return;var yo=/^(pre|div|p|li|table|br)$/i.test(ai.nodeName);if(!/^br$/i.test(ai.nodeName)&&ai.textContent.length==0)return;yo&&zn();for(var ao=0;ao<ai.childNodes.length;ao++)ci(ai.childNodes[ao]);/^(pre|p)$/i.test(ai.nodeName)&&(ut=!0),yo&&(Xe=!0)}else ai.nodeType==3&&Qt(ai.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ci(ae),ae!=he;)ae=ae.nextSibling,ut=!1;return Ie}function df(ie,ae,he){var de;if(ae==ie.display.lineDiv){if(de=ie.display.lineDiv.childNodes[he],!de)return kd(ie.clipPos(rn(ie.display.viewTo-1)),!0);ae=null,he=0}else for(de=ae;;de=de.parentNode){if(!de||de==ie.display.lineDiv)return null;if(de.parentNode&&de.parentNode==ie.display.lineDiv)break}for(var Se=0;Se<ie.display.view.length;Se++){var Ie=ie.display.view[Se];if(Ie.node==de)return ip(Ie,ae,he)}}function ip(ie,ae,he){var de=ie.text.firstChild,Se=!1;if(!ae||!Et(de,ae))return kd(rn(St(ie.line),0),!0);if(ae==de&&(Se=!0,ae=de.childNodes[he],he=0,!ae)){var Ie=ie.rest?zt(ie.rest):ie.line;return kd(rn(St(Ie),Ie.text.length),Se)}var Xe=ae.nodeType==3?ae:null,ht=ae;for(!Xe&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(Xe=ae.firstChild,he&&(he=Xe.nodeValue.length));ht.parentNode!=de;)ht=ht.parentNode;var ut=ie.measure,Zt=ut.maps;function zn(wr,Vr,yo){for(var ao=-1;ao<(Zt?Zt.length:0);ao++)for(var Eo=ao<0?ut.map:Zt[ao],Qo=0;Qo<Eo.length;Qo+=3){var so=Eo[Qo+2];if(so==wr||so==Vr){var ha=St(ao<0?ie.line:ie.rest[ao]),ws=Eo[Qo]+yo;return(yo<0||so!=wr)&&(ws=Eo[Qo+(yo?1:0)]),rn(ha,ws)}}}var Qt=zn(Xe,ht,he);if(Qt)return kd(Qt,Se);for(var ci=ht.nextSibling,ai=Xe?Xe.nodeValue.length-he:0;ci;ci=ci.nextSibling){if(Qt=zn(ci,ci.firstChild,0),Qt)return kd(rn(Qt.line,Qt.ch-ai),Se);ai+=ci.textContent.length}for(var tr=ht.previousSibling,lr=he;tr;tr=tr.previousSibling){if(Qt=zn(tr,tr.firstChild,-1),Qt)return kd(rn(Qt.line,Qt.ch+lr),Se);lr+=tr.textContent.length}}var hl=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new _e,this.hasSelection=!1,this.composing=null};hl.prototype.init=function(ie){var ae=this,he=this,de=this.cm;this.createField(ie);var Se=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),Ae&&(Se.style.width="0px"),ft(Se,"input",function(){Ke&&st>=9&&ae.hasSelection&&(ae.hasSelection=null),he.poll()}),ft(Se,"paste",function(Xe){qt(de,Xe)||Cg(Xe,de)||(de.state.pasteIncoming=+new Date,he.fastPoll())});function Ie(Xe){if(!qt(de,Xe)){if(de.somethingSelected())Oh({lineWise:!1,text:de.getSelections()});else if(de.options.lineWiseCopyCut){var ht=Eg(de);Oh({lineWise:!0,text:ht.text}),Xe.type=="cut"?de.setSelections(ht.ranges,null,$t):(he.prevInput="",Se.value=ht.text.join(`
|
|
|
`),Ht(Se))}else return;Xe.type=="cut"&&(de.state.cutIncoming=+new Date)}}ft(Se,"cut",Ie),ft(Se,"copy",Ie),ft(ie.scroller,"paste",function(Xe){if(!(as(ie,Xe)||qt(de,Xe))){if(!Se.dispatchEvent){de.state.pasteIncoming=+new Date,he.focus();return}var ht=new Event("paste");ht.clipboardData=Xe.clipboardData,Se.dispatchEvent(ht)}}),ft(ie.lineSpace,"selectstart",function(Xe){as(ie,Xe)||ui(Xe)}),ft(Se,"compositionstart",function(){var Xe=de.getCursor("from");he.composing&&he.composing.range.clear(),he.composing={start:Xe,range:de.markText(Xe,de.getCursor("to"),{className:"CodeMirror-composing"})}}),ft(Se,"compositionend",function(){he.composing&&(he.poll(),he.composing.range.clear(),he.composing=null)})},hl.prototype.createField=function(ie){this.wrapper=Lg(),this.textarea=this.wrapper.firstChild},hl.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},hl.prototype.prepareSelection=function(){var ie=this.cm,ae=ie.display,he=ie.doc,de=od(ie);if(ie.options.moveInputWithCursor){var Se=is(ie,he.sel.primary().head,"div"),Ie=ae.wrapper.getBoundingClientRect(),Xe=ae.lineDiv.getBoundingClientRect();de.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,Se.top+Xe.top-Ie.top)),de.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,Se.left+Xe.left-Ie.left))}return de},hl.prototype.showSelection=function(ie){var ae=this.cm,he=ae.display;nt(he.cursorDiv,ie.cursors),nt(he.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},hl.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var ae=this.cm;if(ae.somethingSelected()){this.prevInput="";var he=ae.getSelection();this.textarea.value=he,ae.state.focused&&Ht(this.textarea),Ke&&st>=9&&(this.hasSelection=he)}else ie||(this.prevInput=this.textarea.value="",Ke&&st>=9&&(this.hasSelection=null))}},hl.prototype.getField=function(){return this.textarea},hl.prototype.supportsTouch=function(){return!1},hl.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||tt()!=this.textarea))try{this.textarea.focus()}catch(ie){}},hl.prototype.blur=function(){this.textarea.blur()},hl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},hl.prototype.receivedFocus=function(){this.slowPoll()},hl.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},hl.prototype.fastPoll=function(){var ie=!1,ae=this;ae.pollingFast=!0;function he(){var de=ae.poll();!de&&!ie?(ie=!0,ae.polling.set(60,he)):(ae.pollingFast=!1,ae.slowPoll())}ae.polling.set(20,he)},hl.prototype.poll=function(){var ie=this,ae=this.cm,he=this.textarea,de=this.prevInput;if(this.contextMenuPending||!ae.state.focused||Le(he)&&!de&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var Se=he.value;if(Se==de&&!ae.somethingSelected())return!1;if(Ke&&st>=9&&this.hasSelection===Se||ce&&/[\uf700-\uf7ff]/.test(Se))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var Ie=Se.charCodeAt(0);if(Ie==8203&&!de&&(de="\u200B"),Ie==8666)return this.reset(),this.cm.execCommand("undo")}for(var Xe=0,ht=Math.min(de.length,Se.length);Xe<ht&&de.charCodeAt(Xe)==Se.charCodeAt(Xe);)++Xe;return En(ae,function(){uh(ae,Se.slice(Xe),de.length-Xe,null,ie.composing?"*compose":null),Se.length>1e3||Se.indexOf(`
|
|
|
`)>-1?he.value=ie.prevInput="":ie.prevInput=Se,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ae.markText(ie.composing.start,ae.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},hl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},hl.prototype.onKeyPress=function(){Ke&&st>=9&&(this.hasSelection=null),this.fastPoll()},hl.prototype.onContextMenu=function(ie){var ae=this,he=ae.cm,de=he.display,Se=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var Ie=yl(he,ie),Xe=de.scroller.scrollTop;if(!Ie||Ue)return;var ht=he.options.resetSelectionOnContextMenu;ht&&he.doc.sel.contains(Ie)==-1&&si(he,Xa)(he.doc,ia(Ie),$t);var ut=Se.style.cssText,Zt=ae.wrapper.style.cssText,zn=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",Se.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(ie.clientY-zn.top-5)+"px; left: "+(ie.clientX-zn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(Ke?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Qt;Me&&(Qt=window.scrollY),de.input.focus(),Me&&window.scrollTo(null,Qt),de.input.reset(),he.somethingSelected()||(Se.value=ae.prevInput=" "),ae.contextMenuPending=ai,de.selForContextMenu=he.doc.sel,clearTimeout(de.detectingSelectAll);function ci(){if(Se.selectionStart!=null){var lr=he.somethingSelected(),wr="\u200B"+(lr?Se.value:"");Se.value="\u21DA",Se.value=wr,ae.prevInput=lr?"":"\u200B",Se.selectionStart=1,Se.selectionEnd=wr.length,de.selForContextMenu=he.doc.sel}}function ai(){if(ae.contextMenuPending==ai&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=Zt,Se.style.cssText=ut,Ke&&st<9&&de.scrollbars.setScrollTop(de.scroller.scrollTop=Xe),Se.selectionStart!=null)){(!Ke||Ke&&st<9)&&ci();var lr=0,wr=function(){de.selForContextMenu==he.doc.sel&&Se.selectionStart==0&&Se.selectionEnd>0&&ae.prevInput=="\u200B"?si(he,za)(he):lr++<10?de.detectingSelectAll=setTimeout(wr,500):(de.selForContextMenu=null,de.input.reset())};de.detectingSelectAll=setTimeout(wr,200)}}if(Ke&&st>=9&&ci(),Te){bi(ie);var tr=function(){un(window,"mouseup",tr),setTimeout(ai,20)};ft(window,"mouseup",tr)}else setTimeout(ai,50)},hl.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},hl.prototype.setUneditable=function(){},hl.prototype.needsContentAttribute=!1;function rp(ie,ae){if(ae=ae?Ut(ae):{},ae.value=ie.value,!ae.tabindex&&ie.tabIndex&&(ae.tabindex=ie.tabIndex),!ae.placeholder&&ie.placeholder&&(ae.placeholder=ie.placeholder),ae.autofocus==null){var he=tt();ae.autofocus=he==ie||ie.getAttribute("autofocus")!=null&&he==document.body}function de(){ie.value=ht.getValue()}var Se;if(ie.form&&(ft(ie.form,"submit",de),!ae.leaveSubmitMethodAlone)){var Ie=ie.form;Se=Ie.submit;try{var Xe=Ie.submit=function(){de(),Ie.submit=Se,Ie.submit(),Ie.submit=Xe}}catch(ut){}}ae.finishInit=function(ut){ut.save=de,ut.getTextArea=function(){return ie},ut.toTextArea=function(){ut.toTextArea=isNaN,de(),ie.parentNode.removeChild(ut.getWrapperElement()),ie.style.display="",ie.form&&(un(ie.form,"submit",de),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=Se))}},ie.style.display="none";var ht=Ha(function(ut){return ie.parentNode.insertBefore(ut,ie.nextSibling)},ae);return ht}function Id(ie){ie.off=un,ie.on=ft,ie.wheelEventPixels=Mo,ie.Doc=Gs,ie.splitLines=Kn,ie.countColumn=it,ie.findColumn=ei,ie.isWordChar=Tt,ie.Pass=Bn,ie.signal=Pt,ie.Line=Ao,ie.changeEnd=Ta,ie.scrollbarModel=of,ie.Pos=rn,ie.cmpPos=bn,ie.modes=di,ie.mimeModes=yi,ie.resolveMode=Un,ie.getMode=It,ie.modeExtensions=Kt,ie.extendMode=Ye,ie.copyState=nn,ie.startState=Nt,ie.innerMode=xn,ie.commands=Sl,ie.keyMap=jl,ie.keyName=ih,ie.isModifierKey=wc,ie.lookupKey=eu,ie.normalizeKeyMap=Bh,ie.StringStream=at,ie.SharedTextMarker=Xu,ie.TextMarker=mn,ie.LineWidget=Ts,ie.e_preventDefault=ui,ie.e_stopPropagation=gi,ie.e_stop=bi,ie.addClass=Ot,ie.contains=Et,ie.rmClass=ze,ie.keyNames=Yu}tp(Ha),Td(Ha);var Zc="iter insert remove copy getEditor constructor".split(" ");for(var hh in Gs.prototype)Gs.prototype.hasOwnProperty(hh)&&Wt(Zc,hh)<0&&(Ha.prototype[hh]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Gs.prototype[hh]));return fn(Gs),Ha.inputStyles={textarea:hl,contenteditable:ts},Ha.defineMode=function(ie){!Ha.defaults.mode&&ie!="null"&&(Ha.defaults.mode=ie),Li.apply(this,arguments)},Ha.defineMIME=On,Ha.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),Ha.defineMIME("text/plain","null"),Ha.defineExtension=function(ie,ae){Ha.prototype[ie]=ae},Ha.defineDocExtension=function(ie,ae){Gs.prototype[ie]=ae},Ha.fromTextArea=rp,Id(Ha),Ha.version="5.58.2",Ha})},25419:function(Vn,Cn,pe){(function(ge){ge(pe(89780),pe(15525),pe(98101))})(function(ge){"use strict";ge.defineMode("markdown",function(Re,Ve){var dt=ge.getMode(Re,"text/html"),Ke=dt.name=="null";function st(it){if(ge.findModeByName){var _e=ge.findModeByName(it);_e&&(it=_e.mime||_e.mimes[0])}var Wt=ge.getMode(Re,it);return Wt.name=="null"?null:Wt}Ve.highlightFormatting===void 0&&(Ve.highlightFormatting=!1),Ve.maxBlockquoteDepth===void 0&&(Ve.maxBlockquoteDepth=0),Ve.taskLists===void 0&&(Ve.taskLists=!1),Ve.strikethrough===void 0&&(Ve.strikethrough=!1),Ve.emoji===void 0&&(Ve.emoji=!1),Ve.fencedCodeBlockHighlighting===void 0&&(Ve.fencedCodeBlockHighlighting=!0),Ve.fencedCodeBlockDefaultMode===void 0&&(Ve.fencedCodeBlockDefaultMode="text/plain"),Ve.xml===void 0&&(Ve.xml=!0),Ve.tokenTypeOverrides===void 0&&(Ve.tokenTypeOverrides={});var Me={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var kt in Me)Me.hasOwnProperty(kt)&&Ve.tokenTypeOverrides[kt]&&(Me[kt]=Ve.tokenTypeOverrides[kt]);var bt=/^([*\-_])(?:\s*\1){2,}\s*$/,Ue=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,lt=/^\[(x| )\](?=\s)/i,yt=Ve.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,jt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ae=/^[^#!\[\]*_\\<>` "'(~:]+/,ne=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,ce=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,se=" ";function fe(it,_e,Wt){return _e.f=_e.inline=Wt,Wt(it,_e)}function ye(it,_e,Wt){return _e.f=_e.block=Wt,Wt(it,_e)}function be(it){return!it||!/\S/.test(it.string)}function Te(it){if(it.linkTitle=!1,it.linkHref=!1,it.linkText=!1,it.em=!1,it.strong=!1,it.strikethrough=!1,it.quote=0,it.indentedCode=!1,it.f==ze){var _e=Ke;if(!_e){var Wt=ge.innerMode(dt,it.htmlState);_e=Wt.mode.name=="xml"&&Wt.state.tagStart===null&&!Wt.state.context&&Wt.state.tokenize.isInText}_e&&(it.f=xt,it.block=Be,it.htmlState=null)}return it.trailingSpace=0,it.trailingSpaceNewLine=!1,it.prevLine=it.thisLine,it.thisLine={stream:null},null}function Be(it,_e){var Wt=it.column()===_e.indentation,Dn=be(_e.prevLine.stream),Bn=_e.indentedCode,$t=_e.prevLine.hr,ln=_e.list!==!1,Tn=(_e.listStack[_e.listStack.length-1]||0)+3;_e.indentedCode=!1;var ei=_e.indentation;if(_e.indentationDiff===null&&(_e.indentationDiff=_e.indentation,ln)){for(_e.list=null;ei<_e.listStack[_e.listStack.length-1];)_e.listStack.pop(),_e.listStack.length?_e.indentation=_e.listStack[_e.listStack.length-1]:_e.list=!1;_e.list!==!1&&(_e.indentationDiff=ei-_e.listStack[_e.listStack.length-1])}var Ln=!Dn&&!$t&&!_e.prevLine.header&&(!ln||!Bn)&&!_e.prevLine.fencedCodeEnd,Yn=(_e.list===!1||$t||Dn)&&_e.indentation<=Tn&&it.match(bt),zt=null;if(_e.indentationDiff>=4&&(Bn||_e.prevLine.fencedCodeEnd||_e.prevLine.header||Dn))return it.skipToEnd(),_e.indentedCode=!0,Me.code;if(it.eatSpace())return null;if(Wt&&_e.indentation<=Tn&&(zt=it.match(yt))&&zt[1].length<=6)return _e.quote=0,_e.header=zt[1].length,_e.thisLine.header=!0,Ve.highlightFormatting&&(_e.formatting="header"),_e.f=_e.inline,nt(_e);if(_e.indentation<=Tn&&it.eat(">"))return _e.quote=Wt?1:_e.quote+1,Ve.highlightFormatting&&(_e.formatting="quote"),it.eatSpace(),nt(_e);if(!Yn&&!_e.setext&&Wt&&_e.indentation<=Tn&&(zt=it.match(Ue))){var wn=zt[1]?"ol":"ul";return _e.indentation=ei+it.current().length,_e.list=!0,_e.quote=0,_e.listStack.push(_e.indentation),_e.em=!1,_e.strong=!1,_e.code=!1,_e.strikethrough=!1,Ve.taskLists&&it.match(lt,!1)&&(_e.taskList=!0),_e.f=_e.inline,Ve.highlightFormatting&&(_e.formatting=["list","list-"+wn]),nt(_e)}else{if(Wt&&_e.indentation<=Tn&&(zt=it.match(ne,!0)))return _e.quote=0,_e.fencedEndRE=new RegExp(zt[1]+"+ *$"),_e.localMode=Ve.fencedCodeBlockHighlighting&&st(zt[2]||Ve.fencedCodeBlockDefaultMode),_e.localMode&&(_e.localState=ge.startState(_e.localMode)),_e.f=_e.block=Ge,Ve.highlightFormatting&&(_e.formatting="code-block"),_e.code=-1,nt(_e);if(_e.setext||(!Ln||!ln)&&!_e.quote&&_e.list===!1&&!_e.code&&!Yn&&!ee.test(it.string)&&(zt=it.lookAhead(1))&&(zt=zt.match(jt)))return _e.setext?(_e.header=_e.setext,_e.setext=0,it.skipToEnd(),Ve.highlightFormatting&&(_e.formatting="header")):(_e.header=zt[0].charAt(0)=="="?1:2,_e.setext=_e.header),_e.thisLine.header=!0,_e.f=_e.inline,nt(_e);if(Yn)return it.skipToEnd(),_e.hr=!0,_e.thisLine.hr=!0,Me.hr;if(it.peek()==="[")return fe(it,_e,gt)}return fe(it,_e,_e.inline)}function ze(it,_e){var Wt=dt.token(it,_e.htmlState);if(!Ke){var Dn=ge.innerMode(dt,_e.htmlState);(Dn.mode.name=="xml"&&Dn.state.tagStart===null&&!Dn.state.context&&Dn.state.tokenize.isInText||_e.md_inside&&it.current().indexOf(">")>-1)&&(_e.f=xt,_e.block=Be,_e.htmlState=null)}return Wt}function Ge(it,_e){var Wt=_e.listStack[_e.listStack.length-1]||0,Dn=_e.indentation<Wt,Bn=Wt+3;if(_e.fencedEndRE&&_e.indentation<=Bn&&(Dn||it.match(_e.fencedEndRE))){Ve.highlightFormatting&&(_e.formatting="code-block");var $t;return Dn||($t=nt(_e)),_e.localMode=_e.localState=null,_e.block=Be,_e.f=xt,_e.fencedEndRE=null,_e.code=0,_e.thisLine.fencedCodeEnd=!0,Dn?ye(it,_e,_e.block):$t}else return _e.localMode?_e.localMode.token(it,_e.localState):(it.skipToEnd(),Me.code)}function nt(it){var _e=[];if(it.formatting){_e.push(Me.formatting),typeof it.formatting=="string"&&(it.formatting=[it.formatting]);for(var Wt=0;Wt<it.formatting.length;Wt++)_e.push(Me.formatting+"-"+it.formatting[Wt]),it.formatting[Wt]==="header"&&_e.push(Me.formatting+"-"+it.formatting[Wt]+"-"+it.header),it.formatting[Wt]==="quote"&&(!Ve.maxBlockquoteDepth||Ve.maxBlockquoteDepth>=it.quote?_e.push(Me.formatting+"-"+it.formatting[Wt]+"-"+it.quote):_e.push("error"))}if(it.taskOpen)return _e.push("meta"),_e.length?_e.join(" "):null;if(it.taskClosed)return _e.push("property"),_e.length?_e.join(" "):null;if(it.linkHref?_e.push(Me.linkHref,"url"):(it.strong&&_e.push(Me.strong),it.em&&_e.push(Me.em),it.strikethrough&&_e.push(Me.strikethrough),it.emoji&&_e.push(Me.emoji),it.linkText&&_e.push(Me.linkText),it.code&&_e.push(Me.code),it.image&&_e.push(Me.image),it.imageAltText&&_e.push(Me.imageAltText,"link"),it.imageMarker&&_e.push(Me.imageMarker)),it.header&&_e.push(Me.header,Me.header+"-"+it.header),it.quote&&(_e.push(Me.quote),!Ve.maxBlockquoteDepth||Ve.maxBlockquoteDepth>=it.quote?_e.push(Me.quote+"-"+it.quote):_e.push(Me.quote+"-"+Ve.maxBlockquoteDepth)),it.list!==!1){var Dn=(it.listStack.length-1)%3;Dn?Dn===1?_e.push(Me.list2):_e.push(Me.list3):_e.push(Me.list1)}return it.trailingSpaceNewLine?_e.push("trailing-space-new-line"):it.trailingSpace&&_e.push("trailing-space-"+(it.trailingSpace%2?"a":"b")),_e.length?_e.join(" "):null}function Je(it,_e){if(it.match(Ae,!0))return nt(_e)}function xt(it,_e){var Wt=_e.text(it,_e);if(typeof Wt!="undefined")return Wt;if(_e.list)return _e.list=null,nt(_e);if(_e.taskList){var Dn=it.match(lt,!0)[1]===" ";return Dn?_e.taskOpen=!0:_e.taskClosed=!0,Ve.highlightFormatting&&(_e.formatting="task"),_e.taskList=!1,nt(_e)}if(_e.taskOpen=!1,_e.taskClosed=!1,_e.header&&it.match(/^#+$/,!0))return Ve.highlightFormatting&&(_e.formatting="header"),nt(_e);var Bn=it.next();if(_e.linkTitle){_e.linkTitle=!1;var $t=Bn;Bn==="("&&($t=")"),$t=($t+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ln="^\\s*(?:[^"+$t+"\\\\]+|\\\\\\\\|\\\\.)"+$t;if(it.match(new RegExp(ln),!0))return Me.linkHref}if(Bn==="`"){var Tn=_e.formatting;Ve.highlightFormatting&&(_e.formatting="code"),it.eatWhile("`");var ei=it.current().length;if(_e.code==0&&(!_e.quote||ei==1))return _e.code=ei,nt(_e);if(ei==_e.code){var Ln=nt(_e);return _e.code=0,Ln}else return _e.formatting=Tn,nt(_e)}else if(_e.code)return nt(_e);if(Bn==="\\"&&(it.next(),Ve.highlightFormatting)){var Yn=nt(_e),zt=Me.formatting+"-escape";return Yn?Yn+" "+zt:zt}if(Bn==="!"&&it.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return _e.imageMarker=!0,_e.image=!0,Ve.highlightFormatting&&(_e.formatting="image"),nt(_e);if(Bn==="["&&_e.imageMarker&&it.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return _e.imageMarker=!1,_e.imageAltText=!0,Ve.highlightFormatting&&(_e.formatting="image"),nt(_e);if(Bn==="]"&&_e.imageAltText){Ve.highlightFormatting&&(_e.formatting="image");var Yn=nt(_e);return _e.imageAltText=!1,_e.image=!1,_e.inline=_e.f=Et,Yn}if(Bn==="["&&!_e.image)return _e.linkText&&it.match(/^.*?\]/)||(_e.linkText=!0,Ve.highlightFormatting&&(_e.formatting="link")),nt(_e);if(Bn==="]"&&_e.linkText){Ve.highlightFormatting&&(_e.formatting="link");var Yn=nt(_e);return _e.linkText=!1,_e.inline=_e.f=it.match(/\(.*?\)| ?\[.*?\]/,!1)?Et:xt,Yn}if(Bn==="<"&&it.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){_e.f=_e.inline=He,Ve.highlightFormatting&&(_e.formatting="link");var Yn=nt(_e);return Yn?Yn+=" ":Yn="",Yn+Me.linkInline}if(Bn==="<"&&it.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){_e.f=_e.inline=He,Ve.highlightFormatting&&(_e.formatting="link");var Yn=nt(_e);return Yn?Yn+=" ":Yn="",Yn+Me.linkEmail}if(Ve.xml&&Bn==="<"&&it.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var wn=it.string.indexOf(">",it.pos);if(wn!=-1){var $n=it.string.substring(it.start,wn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test($n)&&(_e.md_inside=!0)}return it.backUp(1),_e.htmlState=ge.startState(dt),ye(it,_e,ze)}if(Ve.xml&&Bn==="<"&&it.match(/^\/\w*?>/))return _e.md_inside=!1,"tag";if(Bn==="*"||Bn==="_"){for(var Yt=1,tn=it.pos==1?" ":it.string.charAt(it.pos-2);Yt<3&&it.eat(Bn);)Yt++;var Gt=it.peek()||" ",Tt=!/\s/.test(Gt)&&(!ce.test(Gt)||/\s/.test(tn)||ce.test(tn)),ot=!/\s/.test(tn)&&(!ce.test(tn)||/\s/.test(Gt)||ce.test(Gt)),Ze=null,At=null;if(Yt%2&&(!_e.em&&Tt&&(Bn==="*"||!ot||ce.test(tn))?Ze=!0:_e.em==Bn&&ot&&(Bn==="*"||!Tt||ce.test(Gt))&&(Ze=!1)),Yt>1&&(!_e.strong&&Tt&&(Bn==="*"||!ot||ce.test(tn))?At=!0:_e.strong==Bn&&ot&&(Bn==="*"||!Tt||ce.test(Gt))&&(At=!1)),At!=null||Ze!=null){Ve.highlightFormatting&&(_e.formatting=Ze==null?"strong":At==null?"em":"strong em"),Ze===!0&&(_e.em=Bn),At===!0&&(_e.strong=Bn);var Ln=nt(_e);return Ze===!1&&(_e.em=!1),At===!1&&(_e.strong=!1),Ln}}else if(Bn===" "&&(it.eat("*")||it.eat("_"))){if(it.peek()===" ")return nt(_e);it.backUp(1)}if(Ve.strikethrough){if(Bn==="~"&&it.eatWhile(Bn)){if(_e.strikethrough){Ve.highlightFormatting&&(_e.formatting="strikethrough");var Ln=nt(_e);return _e.strikethrough=!1,Ln}else if(it.match(/^[^\s]/,!1))return _e.strikethrough=!0,Ve.highlightFormatting&&(_e.formatting="strikethrough"),nt(_e)}else if(Bn===" "&&it.match(/^~~/,!0)){if(it.peek()===" ")return nt(_e);it.backUp(2)}}if(Ve.emoji&&Bn===":"&&it.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){_e.emoji=!0,Ve.highlightFormatting&&(_e.formatting="emoji");var Dt=nt(_e);return _e.emoji=!1,Dt}return Bn===" "&&(it.match(/^ +$/,!1)?_e.trailingSpace++:_e.trailingSpace&&(_e.trailingSpaceNewLine=!0)),nt(_e)}function He(it,_e){var Wt=it.next();if(Wt===">"){_e.f=_e.inline=xt,Ve.highlightFormatting&&(_e.formatting="link");var Dn=nt(_e);return Dn?Dn+=" ":Dn="",Dn+Me.linkInline}return it.match(/^[^>]+/,!0),Me.linkInline}function Et(it,_e){if(it.eatSpace())return null;var Wt=it.next();return Wt==="("||Wt==="["?(_e.f=_e.inline=Ot(Wt==="("?")":"]"),Ve.highlightFormatting&&(_e.formatting="link-string"),_e.linkHref=!0,nt(_e)):"error"}var tt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ot(it){return function(_e,Wt){var Dn=_e.next();if(Dn===it){Wt.f=Wt.inline=xt,Ve.highlightFormatting&&(Wt.formatting="link-string");var Bn=nt(Wt);return Wt.linkHref=!1,Bn}return _e.match(tt[it]),Wt.linkHref=!0,nt(Wt)}}function gt(it,_e){return it.match(/^([^\]\\]|\\.)*\]:/,!1)?(_e.f=Ht,it.next(),Ve.highlightFormatting&&(_e.formatting="link"),_e.linkText=!0,nt(_e)):fe(it,_e,xt)}function Ht(it,_e){if(it.match(/^\]:/,!0)){_e.f=_e.inline=Xt,Ve.highlightFormatting&&(_e.formatting="link");var Wt=nt(_e);return _e.linkText=!1,Wt}return it.match(/^([^\]\\]|\\.)+/,!0),Me.linkText}function Xt(it,_e){return it.eatSpace()?null:(it.match(/^[^\s]+/,!0),it.peek()===void 0?_e.linkTitle=!0:it.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),_e.f=_e.inline=xt,Me.linkHref+" url")}var Ut={startState:function(){return{f:Be,prevLine:{stream:null},thisLine:{stream:null},block:Be,htmlState:null,indentation:0,inline:xt,text:Je,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(it){return{f:it.f,prevLine:it.prevLine,thisLine:it.thisLine,block:it.block,htmlState:it.htmlState&&ge.copyState(dt,it.htmlState),indentation:it.indentation,localMode:it.localMode,localState:it.localMode?ge.copyState(it.localMode,it.localState):null,inline:it.inline,text:it.text,formatting:!1,linkText:it.linkText,linkTitle:it.linkTitle,linkHref:it.linkHref,code:it.code,em:it.em,strong:it.strong,strikethrough:it.strikethrough,emoji:it.emoji,header:it.header,setext:it.setext,hr:it.hr,taskList:it.taskList,list:it.list,listStack:it.listStack.slice(0),quote:it.quote,indentedCode:it.indentedCode,trailingSpace:it.trailingSpace,trailingSpaceNewLine:it.trailingSpaceNewLine,md_inside:it.md_inside,fencedEndRE:it.fencedEndRE}},token:function(it,_e){if(_e.formatting=!1,it!=_e.thisLine.stream){if(_e.header=0,_e.hr=!1,it.match(/^\s*$/,!0))return Te(_e),null;if(_e.prevLine=_e.thisLine,_e.thisLine={stream:it},_e.taskList=!1,_e.trailingSpace=0,_e.trailingSpaceNewLine=!1,!_e.localState&&(_e.f=_e.block,_e.f!=ze)){var Wt=it.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(_e.indentation=Wt,_e.indentationDiff=null,Wt>0)return null}}return _e.f(it,_e)},innerMode:function(it){return it.block==ze?{state:it.htmlState,mode:dt}:it.localState?{state:it.localState,mode:it.localMode}:{state:it,mode:Ut}},indent:function(it,_e,Wt){return it.block==ze&&dt.indent?dt.indent(it.htmlState,_e,Wt):it.localState&&it.localMode.indent?it.localMode.indent(it.localState,_e,Wt):ge.Pass},blankLine:Te,getType:nt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ut},"xml"),ge.defineMIME("text/markdown","markdown"),ge.defineMIME("text/x-markdown","markdown")})},98101:function(Vn,Cn,pe){(function(ge){ge(pe(89780))})(function(ge){"use strict";ge.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 Re=0;Re<ge.modeInfo.length;Re++){var Ve=ge.modeInfo[Re];Ve.mimes&&(Ve.mime=Ve.mimes[0])}ge.findModeByMIME=function(dt){dt=dt.toLowerCase();for(var Ke=0;Ke<ge.modeInfo.length;Ke++){var st=ge.modeInfo[Ke];if(st.mime==dt)return st;if(st.mimes){for(var Me=0;Me<st.mimes.length;Me++)if(st.mimes[Me]==dt)return st}}if(/\+xml$/.test(dt))return ge.findModeByMIME("application/xml");if(/\+json$/.test(dt))return ge.findModeByMIME("application/json")},ge.findModeByExtension=function(dt){dt=dt.toLowerCase();for(var Ke=0;Ke<ge.modeInfo.length;Ke++){var st=ge.modeInfo[Ke];if(st.ext){for(var Me=0;Me<st.ext.length;Me++)if(st.ext[Me]==dt)return st}}},ge.findModeByFileName=function(dt){for(var Ke=0;Ke<ge.modeInfo.length;Ke++){var st=ge.modeInfo[Ke];if(st.file&&st.file.test(dt))return st}var Me=dt.lastIndexOf("."),kt=Me>-1&&dt.substring(Me+1,dt.length);if(kt)return ge.findModeByExtension(kt)},ge.findModeByName=function(dt){dt=dt.toLowerCase();for(var Ke=0;Ke<ge.modeInfo.length;Ke++){var st=ge.modeInfo[Ke];if(st.name.toLowerCase()==dt)return st;if(st.alias){for(var Me=0;Me<st.alias.length;Me++)if(st.alias[Me].toLowerCase()==dt)return st}}}})},67549:function(Vn,Cn,pe){(function(ge){ge(pe(89780))})(function(ge){"use strict";ge.defineMode("stex",function(Re,Ve){"use strict";function dt(Ae,ne){Ae.cmdState.push(ne)}function Ke(Ae){return Ae.cmdState.length>0?Ae.cmdState[Ae.cmdState.length-1]:null}function st(Ae){var ne=Ae.cmdState.pop();ne&&ne.closeBracket()}function Me(Ae){for(var ne=Ae.cmdState,ee=ne.length-1;ee>=0;ee--){var ce=ne[ee];if(ce.name!="DEFAULT")return ce}return{styleIdentifier:function(){return null}}}function kt(Ae,ne,ee){return function(){this.name=Ae,this.bracketNo=0,this.style=ne,this.styles=ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var bt={};bt.importmodule=kt("importmodule","tag",["string","builtin"]),bt.documentclass=kt("documentclass","tag",["","atom"]),bt.usepackage=kt("usepackage","tag",["atom"]),bt.begin=kt("begin","tag",["atom"]),bt.end=kt("end","tag",["atom"]),bt.label=kt("label","tag",["atom"]),bt.ref=kt("ref","tag",["atom"]),bt.eqref=kt("eqref","tag",["atom"]),bt.cite=kt("cite","tag",["atom"]),bt.bibitem=kt("bibitem","tag",["atom"]),bt.Bibitem=kt("Bibitem","tag",["atom"]),bt.RBibitem=kt("RBibitem","tag",["atom"]),bt.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Ue(Ae,ne){Ae.f=ne}function lt(Ae,ne){var ee;if(Ae.match(/^\\[a-zA-Z@]+/)){var ce=Ae.current().slice(1);return ee=bt.hasOwnProperty(ce)?bt[ce]:bt.DEFAULT,ee=new ee,dt(ne,ee),Ue(ne,jt),ee.style}if(Ae.match(/^\\[$&%#{}_]/)||Ae.match(/^\\[,;!\/\\]/))return"tag";if(Ae.match("\\["))return Ue(ne,function(fe,ye){return yt(fe,ye,"\\]")}),"keyword";if(Ae.match("\\("))return Ue(ne,function(fe,ye){return yt(fe,ye,"\\)")}),"keyword";if(Ae.match("$$"))return Ue(ne,function(fe,ye){return yt(fe,ye,"$$")}),"keyword";if(Ae.match("$"))return Ue(ne,function(fe,ye){return yt(fe,ye,"$")}),"keyword";var se=Ae.next();if(se=="%")return Ae.skipToEnd(),"comment";if(se=="}"||se=="]"){if(ee=Ke(ne),ee)ee.closeBracket(se),Ue(ne,jt);else return"error";return"bracket"}else return se=="{"||se=="["?(ee=bt.DEFAULT,ee=new ee,dt(ne,ee),"bracket"):/\d/.test(se)?(Ae.eatWhile(/[\w.%]/),"atom"):(Ae.eatWhile(/[\w\-_]/),ee=Me(ne),ee.name=="begin"&&(ee.argument=Ae.current()),ee.styleIdentifier())}function yt(Ae,ne,ee){if(Ae.eatSpace())return null;if(ee&&Ae.match(ee))return Ue(ne,lt),"keyword";if(Ae.match(/^\\[a-zA-Z@]+/))return"tag";if(Ae.match(/^[a-zA-Z]+/))return"variable-2";if(Ae.match(/^\\[$&%#{}_]/)||Ae.match(/^\\[,;!\/]/)||Ae.match(/^[\^_&]/))return"tag";if(Ae.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ae.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ce=Ae.next();return ce=="{"||ce=="}"||ce=="["||ce=="]"||ce=="("||ce==")"?"bracket":ce=="%"?(Ae.skipToEnd(),"comment"):"error"}function jt(Ae,ne){var ee=Ae.peek(),ce;return ee=="{"||ee=="["?(ce=Ke(ne),ce.openBracket(ee),Ae.eat(ee),Ue(ne,lt),"bracket"):/[ \t\r]/.test(ee)?(Ae.eat(ee),null):(Ue(ne,lt),st(ne),lt(Ae,ne))}return{startState:function(){var Ae=Ve.inMathMode?function(ne,ee){return yt(ne,ee)}:lt;return{cmdState:[],f:Ae}},copyState:function(Ae){return{cmdState:Ae.cmdState.slice(),f:Ae.f}},token:function(Ae,ne){return ne.f(Ae,ne)},blankLine:function(Ae){Ae.f=lt,Ae.cmdState.length=0},lineComment:"%"}}),ge.defineMIME("text/x-stex","stex"),ge.defineMIME("text/x-latex","stex")})},15525:function(Vn,Cn,pe){(function(ge){ge(pe(89780))})(function(ge){"use strict";var Re={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},Ve={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ge.defineMode("xml",function(dt,Ke){var st=dt.indentUnit,Me={},kt=Ke.htmlMode?Re:Ve;for(var bt in kt)Me[bt]=kt[bt];for(var bt in Ke)Me[bt]=Ke[bt];var Ue,lt;function yt(He,Et){function tt(Ht){return Et.tokenize=Ht,Ht(He,Et)}var Ot=He.next();if(Ot=="<")return He.eat("!")?He.eat("[")?He.match("CDATA[")?tt(ne("atom","]]>")):null:He.match("--")?tt(ne("comment","-->")):He.match("DOCTYPE",!0,!0)?(He.eatWhile(/[\w\._\-]/),tt(ee(1))):null:He.eat("?")?(He.eatWhile(/[\w\._\-]/),Et.tokenize=ne("meta","?>"),"meta"):(Ue=He.eat("/")?"closeTag":"openTag",Et.tokenize=jt,"tag bracket");if(Ot=="&"){var gt;return He.eat("#")?He.eat("x")?gt=He.eatWhile(/[a-fA-F\d]/)&&He.eat(";"):gt=He.eatWhile(/[\d]/)&&He.eat(";"):gt=He.eatWhile(/[\w\.\-:]/)&&He.eat(";"),gt?"atom":"error"}else return He.eatWhile(/[^&<]/),null}yt.isInText=!0;function jt(He,Et){var tt=He.next();if(tt==">"||tt=="/"&&He.eat(">"))return Et.tokenize=yt,Ue=tt==">"?"endTag":"selfcloseTag","tag bracket";if(tt=="=")return Ue="equals",null;if(tt=="<"){Et.tokenize=yt,Et.state=ye,Et.tagName=Et.tagStart=null;var Ot=Et.tokenize(He,Et);return Ot?Ot+" tag error":"tag error"}else return/[\'\"]/.test(tt)?(Et.tokenize=Ae(tt),Et.stringStartCol=He.column(),Et.tokenize(He,Et)):(He.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ae(He){var Et=function(tt,Ot){for(;!tt.eol();)if(tt.next()==He){Ot.tokenize=jt;break}return"string"};return Et.isInAttribute=!0,Et}function ne(He,Et){return function(tt,Ot){for(;!tt.eol();){if(tt.match(Et)){Ot.tokenize=yt;break}tt.next()}return He}}function ee(He){return function(Et,tt){for(var Ot;(Ot=Et.next())!=null;){if(Ot=="<")return tt.tokenize=ee(He+1),tt.tokenize(Et,tt);if(Ot==">")if(He==1){tt.tokenize=yt;break}else return tt.tokenize=ee(He-1),tt.tokenize(Et,tt)}return"meta"}}function ce(He,Et,tt){this.prev=He.context,this.tagName=Et,this.indent=He.indented,this.startOfLine=tt,(Me.doNotIndent.hasOwnProperty(Et)||He.context&&He.context.noIndent)&&(this.noIndent=!0)}function se(He){He.context&&(He.context=He.context.prev)}function fe(He,Et){for(var tt;;){if(!He.context||(tt=He.context.tagName,!Me.contextGrabbers.hasOwnProperty(tt)||!Me.contextGrabbers[tt].hasOwnProperty(Et)))return;se(He)}}function ye(He,Et,tt){return He=="openTag"?(tt.tagStart=Et.column(),be):He=="closeTag"?Te:ye}function be(He,Et,tt){return He=="word"?(tt.tagName=Et.current(),lt="tag",Ge):Me.allowMissingTagName&&He=="endTag"?(lt="tag bracket",Ge(He,Et,tt)):(lt="error",be)}function Te(He,Et,tt){if(He=="word"){var Ot=Et.current();return tt.context&&tt.context.tagName!=Ot&&Me.implicitlyClosed.hasOwnProperty(tt.context.tagName)&&se(tt),tt.context&&tt.context.tagName==Ot||Me.matchClosing===!1?(lt="tag",Be):(lt="tag error",ze)}else return Me.allowMissingTagName&&He=="endTag"?(lt="tag bracket",Be(He,Et,tt)):(lt="error",ze)}function Be(He,Et,tt){return He!="endTag"?(lt="error",Be):(se(tt),ye)}function ze(He,Et,tt){return lt="error",Be(He,Et,tt)}function Ge(He,Et,tt){if(He=="word")return lt="attribute",nt;if(He=="endTag"||He=="selfcloseTag"){var Ot=tt.tagName,gt=tt.tagStart;return tt.tagName=tt.tagStart=null,He=="selfcloseTag"||Me.autoSelfClosers.hasOwnProperty(Ot)?fe(tt,Ot):(fe(tt,Ot),tt.context=new ce(tt,Ot,gt==tt.indented)),ye}return lt="error",Ge}function nt(He,Et,tt){return He=="equals"?Je:(Me.allowMissing||(lt="error"),Ge(He,Et,tt))}function Je(He,Et,tt){return He=="string"?xt:He=="word"&&Me.allowUnquoted?(lt="string",Ge):(lt="error",Ge(He,Et,tt))}function xt(He,Et,tt){return He=="string"?xt:Ge(He,Et,tt)}return{startState:function(He){var Et={tokenize:yt,state:ye,indented:He||0,tagName:null,tagStart:null,context:null};return He!=null&&(Et.baseIndent=He),Et},token:function(He,Et){if(!Et.tagName&&He.sol()&&(Et.indented=He.indentation()),He.eatSpace())return null;Ue=null;var tt=Et.tokenize(He,Et);return(tt||Ue)&&tt!="comment"&&(lt=null,Et.state=Et.state(Ue||tt,He,Et),lt&&(tt=lt=="error"?tt+" error":lt)),tt},indent:function(He,Et,tt){var Ot=He.context;if(He.tokenize.isInAttribute)return He.tagStart==He.indented?He.stringStartCol+1:He.indented+st;if(Ot&&Ot.noIndent)return ge.Pass;if(He.tokenize!=jt&&He.tokenize!=yt)return tt?tt.match(/^(\s*)/)[0].length:0;if(He.tagName)return Me.multilineTagIndentPastTag!==!1?He.tagStart+He.tagName.length+2:He.tagStart+st*(Me.multilineTagIndentFactor||1);if(Me.alignCDATA&&/<!\[CDATA\[/.test(Et))return 0;var gt=Et&&/^<(\/)?([\w_:\.-]*)/.exec(Et);if(gt&>[1])for(;Ot;)if(Ot.tagName==gt[2]){Ot=Ot.prev;break}else if(Me.implicitlyClosed.hasOwnProperty(Ot.tagName))Ot=Ot.prev;else break;else if(gt)for(;Ot;){var Ht=Me.contextGrabbers[Ot.tagName];if(Ht&&Ht.hasOwnProperty(gt[2]))Ot=Ot.prev;else break}for(;Ot&&Ot.prev&&!Ot.startOfLine;)Ot=Ot.prev;return Ot?Ot.indent+st:He.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Me.htmlMode?"html":"xml",helperType:Me.htmlMode?"html":"xml",skipAttribute:function(He){He.state==Je&&(He.state=Ge)},xmlCurrentTag:function(He){return He.tagName?{name:He.tagName,close:He.type=="closeTag"}:null},xmlCurrentContext:function(He){for(var Et=[],tt=He.context;tt;tt=tt.prev)tt.tagName&&Et.push(tt.tagName);return Et.reverse()}}}),ge.defineMIME("text/xml","xml"),ge.defineMIME("application/xml","xml"),ge.mimeModes.hasOwnProperty("text/html")||ge.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Vn,Cn,pe){"use strict";pe.d(Cn,{$u:function(){return bt},BD:function(){return Yt},E9:function(){return kt},FF:function(){return vr},FJ:function(){return ye},Hn:function(){return fe},KX:function(){return Te},NB:function(){return Oe},S0:function(){return zt},UL:function(){return Ue},Vk:function(){return se},Vm:function(){return ve},YI:function(){return wn},ZA:function(){return Ve},Zt:function(){return lt},al:function(){return Ze},bn:function(){return ot},bx:function(){return tn},g2:function(){return $n},h1:function(){return Je},hD:function(){return fn},l4:function(){return st},rU:function(){return Pe},s_:function(){return Gt},uz:function(){return et},z6:function(){return yt}}),Vn=pe.hmd(Vn),function(){var Le;function Ei(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Ri(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Ei(a)}}function an(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var di=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},yi;if(typeof Object.setPrototypeOf=="function")yi=Object.setPrototypeOf;else{var Li;e:{var On={a:!0},Un={};try{Un.__proto__=On,Li=Un.a;break e}catch(a){}Li=!1}yi=Li?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var It=yi;function Kt(a,y){if(a.prototype=di(y.prototype),a.prototype.constructor=a,It)It(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 Ye=typeof pe.g!="undefined"&&pe.g!=null?pe.g:self,nn=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},xn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Nt(a,y){if(y){var x=Ye;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&&xn(x,a,{writable:!0,value:y})}}Nt("Object.assign",function(a){return a||nn}),Nt("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 at=typeof globalThis=="object"&&globalThis||typeof pe.g=="object"&&pe.g.global===pe.g&&pe.g||typeof self=="object"&&self.self===self&&self||{};at.requestAnimationFrame===void 0&&(at.setImmediate===void 0?at.requestAnimationFrame=function(a){at.setTimeout(a,0)}:at.requestAnimationFrame=at.setImmediate);function cn(){}function Nn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&at.clearTimeout(x),x=kn(function(){x=-1,a.apply(b,E)},y)}}function kn(a,y){return at.setTimeout(a,y)}function Jn(a){return at.document.createElement(a)}function St(a){throw Error(a)}function An(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),St(a)}function qn(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),St(x+" is not in the range "+y+": "+a)}function Si(a){at.console&&at.console.log(a)}function rn(a){return typeof a=="object"&&a!==null}function bn(a){return Array.isArray(a)||at.NodeList&&a instanceof at.NodeList||at.HTMLCollection&&a instanceof at.HTMLCollection}function Ft(a){return Array.prototype.slice.call(a)}function Pn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):St("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function yn(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):St("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Sn(){var a=Gi.pop();return a===void 0?[]:a}function Gn(a){a.length=0,Gi.push(a)}function Zn(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(rn(a)&&a.constructor)return Zn(a.constructor);return typeof a}function Qn(a){var y=a;return rn(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 ii(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 ji(a,y,x){Object.defineProperty(fa.prototype,a,{get:y,set:x})}function pn(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="",te=0;te<a.length;te++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,z+=String.fromCharCode(a.charCodeAt(te)^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 Ji=at.navigator!==void 0&&0<at.navigator.userAgent.indexOf("Trident/7"),Ki=at.navigator!==void 0&&at.navigator.platform!==void 0&&at.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Gi=[];Object.freeze([]),cn.className="Util",cn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",cn.adym="gojs.net",cn.vfo="28e645fdb266",cn.className="Util";function gn(a,y,x){Or(this),this.j=a,this.xa=y,this.o=x}gn.prototype.toString=function(){return"EnumValue."+this.xa};function oi(a,y){return y==null||y===""?null:a[y]}Ye.Object.defineProperties(gn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),gn.className="EnumValue";function Bi(){this.ew=[]}Bi.prototype.toString=function(){return this.ew.join("")},Bi.prototype.add=function(a){a!==""&&this.ew.push(a)},Bi.className="StringBuilder";function $i(){}$i.className="PropertyCollection";var Ti={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){at.console&&at.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(te,re){return function(){throw Error("Property "+te.Zl[re.Tj]+" of "+te.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Qi(){}Qi.prototype.reset=function(){},Qi.prototype.next=function(){return!1},Qi.prototype.Ad=function(){return!1},Qi.prototype.first=function(){return null},Qi.prototype.any=function(){return!1},Qi.prototype.all=function(){return!0},Qi.prototype.each=function(){return this},Qi.prototype.map=function(){return this},Qi.prototype.filter=function(){return this},Qi.prototype.de=function(){},Qi.prototype.toString=function(){return"EmptyIterator"},Ye.Object.defineProperties(Qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Qi.prototype.first=Qi.prototype.first,Qi.prototype.hasNext=Qi.prototype.Ad,Qi.prototype.next=Qi.prototype.next,Qi.prototype.reset=Qi.prototype.reset;var pr=null;Qi.className="EmptyIterator",pr=new Qi;function hr(a){this.key=-1,this.value=a}hr.prototype.reset=function(){this.key=-1},hr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},hr.prototype.Ad=function(){return this.next()},hr.prototype.first=function(){return this.key=0,this.value},hr.prototype.any=function(a){return this.key=-1,a(this.value)},hr.prototype.all=function(a){return this.key=-1,a(this.value)},hr.prototype.each=function(a){return this.key=-1,a(this.value),this},hr.prototype.map=function(a){return new hr(a(this.value))},hr.prototype.filter=function(a){return a(this.value)?new hr(this.value):pr},hr.prototype.de=function(){this.value=null},hr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ye.Object.defineProperties(hr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),hr.prototype.first=hr.prototype.first,hr.prototype.hasNext=hr.prototype.Ad,hr.prototype.next=hr.prototype.next,hr.prototype.reset=hr.prototype.reset,hr.className="SingletonIterator";function Vi(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Vi.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Vi.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},Vi.prototype.Ad=function(){return this.next()},Vi.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},Vi.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},Vi.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},Vi.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},Vi.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 te=y[z];(E===null||E(te))&&x.push(a(te))}return a=new Rn,a.s=x,a.xb(),a.iterator},Vi.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 te=y[z];(E===null||E(te))&&a(te)&&x.push(te)}return a=new Rn,a.s=x,a.xb(),a.iterator},Vi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Vi.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ye.Object.defineProperties(Vi.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}}}),Vi.prototype.first=Vi.prototype.first,Vi.prototype.hasNext=Vi.prototype.Ad,Vi.prototype.next=Vi.prototype.next,Vi.prototype.reset=Vi.prototype.reset,Vi.className="ListIterator";function xr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}xr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},xr.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)},xr.prototype.Ad=function(){return this.next()},xr.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},xr.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},xr.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},xr.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},xr.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 Rn,a.s=x,a.xb(),a.iterator},xr.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 Rn,a.s=x,a.xb(),a.iterator},xr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},xr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ye.Object.defineProperties(xr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),xr.prototype.first=xr.prototype.first,xr.prototype.hasNext=xr.prototype.Ad,xr.prototype.next=xr.prototype.next,xr.prototype.reset=xr.prototype.reset,xr.className="ListIteratorBackwards";function Rn(a){Or(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=Rn.prototype,Le.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.toString=function(){return"List()#"+br(this)},Le.add=function(a){return a===null?this:(this._isFrozen&&An(this,a),this.s.push(a),this.xb(),this)},Le.push=function(a){this.add(a)},Le.addAll=function(a){if(a===null)return this;this._isFrozen&&An(this);var y=this.s;if(bn(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},Le.clear=function(){this._isFrozen&&An(this),this.s.length=0,this.xb()},Le.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Le.has=function(a){return this.contains(a)},Le.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Le.M=function(a){var y=this.s;return(0>a||a>=y.length)&&qn(a,"0 <= i < length",Rn,"elt:i"),y[a]},Le.get=function(a){return this.M(a)},Le.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&qn(a,"0 <= i < length",Rn,"setElt:i"),this._isFrozen&&An(this,a),x[a]=y},Le.set=function(a,y){this.cd(a,y)},Le.first=function(){var a=this.s;return a.length===0?null:a[0]},Le.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Le.pop=function(){this._isFrozen&&An(this);var a=this.s;return 0<a.length?a.pop():null},Rn.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},Rn.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},Rn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},Rn.prototype.map=function(a){for(var y=new Rn,x=[],b=this.s,E=b.length,z=0;z<E;z++)x.push(a(b[z]));return y.s=x,y.xb(),y},Rn.prototype.filter=function(a){for(var y=new Rn,x=[],b=this.s,E=b.length,z=0;z<E;z++){var te=b[z];a(te)&&x.push(te)}return y.s=x,y.xb(),y},Le=Rn.prototype,Le.Gb=function(a,y){0>a&&qn(a,">= 0",Rn,"insertAt:i"),this._isFrozen&&An(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Le.remove=function(a){if(a===null)return!1;this._isFrozen&&An(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},Le.delete=function(a){return this.remove(a)},Le.mb=function(a){var y=this.s;(0>a||a>=y.length)&&qn(a,"0 <= i < length",Rn,"removeAt:i"),this._isFrozen&&An(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Le.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&&An(this);for(var E=a,z=y+1;z<b;)x[E++]=x[z++];return x.length=b-(y-a+1),this.xb(),this},Rn.prototype.copy=function(){var a=new Rn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Le=Rn.prototype,Le.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},Le.Iv=function(){for(var a=new _n,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},Le.sort=function(a){return this._isFrozen&&An(this),this.s.sort(a),this.xb(),this},Le.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&An(this);var z=x-y;if(1>=z)return this;if((0>y||y>=E-1)&&qn(y,"0 <= from < length",Rn,"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},Le.reverse=function(){return this._isFrozen&&An(this),this.s.reverse(),this.xb(),this},Ye.Object.defineProperties(Rn.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 pr;var a=this.Sa;return a!==null?(a.reset(),a):new Vi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return pr;var a=this.Hg;return a!==null?(a.reset(),a):new xr(this)}}}),Rn.prototype.reverse=Rn.prototype.reverse,Rn.prototype.sortRange=Rn.prototype.zi,Rn.prototype.sort=Rn.prototype.sort,Rn.prototype.toSet=Rn.prototype.Iv,Rn.prototype.toArray=Rn.prototype.Fa,Rn.prototype.removeRange=Rn.prototype.removeRange,Rn.prototype.removeAt=Rn.prototype.mb,Rn.prototype.delete=Rn.prototype.delete,Rn.prototype.remove=Rn.prototype.remove,Rn.prototype.insertAt=Rn.prototype.Gb,Rn.prototype.pop=Rn.prototype.pop,Rn.prototype.last=Rn.prototype.jc,Rn.prototype.first=Rn.prototype.first,Rn.prototype.set=Rn.prototype.set,Rn.prototype.setElt=Rn.prototype.cd,Rn.prototype.get=Rn.prototype.get,Rn.prototype.elt=Rn.prototype.M,Rn.prototype.indexOf=Rn.prototype.indexOf,Rn.prototype.has=Rn.prototype.has,Rn.prototype.contains=Rn.prototype.contains,Rn.prototype.clear=Rn.prototype.clear,Rn.prototype.addAll=Rn.prototype.addAll,Rn.prototype.push=Rn.prototype.push,Rn.prototype.add=Rn.prototype.add,Rn.prototype.thaw=Rn.prototype.ka,Rn.prototype.freeze=Rn.prototype.freeze,Rn.className="List";function Br(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Br.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Br.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)},Br.prototype.Ad=function(){return this.next()},Br.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},Br.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},Br.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},Br.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},Br.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Rn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Br.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Rn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Br.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Br.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ye.Object.defineProperties(Br.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Br.prototype.first=Br.prototype.first,Br.prototype.hasNext=Br.prototype.Ad,Br.prototype.next=Br.prototype.next,Br.prototype.reset=Br.prototype.reset,Br.className="SetIterator";function _n(a){Or(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=_n.prototype,Le.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.toString=function(){return"Set()#"+br(this)},Le.add=function(a){if(a===null)return this;this._isFrozen&&An(this,a);var y=a;return rn(a)&&(y=no(a)),this.Tb[y]===void 0&&(this.Sb++,a=new qi(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},Le.addAll=function(a){if(a===null)return this;if(this._isFrozen&&An(this),bn(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},Le.contains=function(a){if(a===null)return!1;var y=a;return rn(a)&&(y=br(a),y===void 0)?!1:this.Tb[y]!==void 0},Le.has=function(a){return this.contains(a)},Le.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Le.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Le.first=function(){var a=this.ea;return a===null?null:a.value},_n.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},_n.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},_n.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},_n.prototype.map=function(a){for(var y=new _n,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},_n.prototype.filter=function(a){for(var y=new _n,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},Le=_n.prototype,Le.remove=function(a){if(a===null)return!1;this._isFrozen&&An(this,a);var y=a;if(rn(a)&&(y=br(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},Le.delete=function(a){return this.remove(a)},Le.hp=function(a){if(a===null)return this;if(this._isFrozen&&An(this),bn(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},Le.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&An(this);var y=new _n;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},Le.clear=function(){this._isFrozen&&An(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},_n.prototype.copy=function(){var a=new _n,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},_n.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},_n.prototype.Hv=function(){var a=new Rn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Or(a){a.__gohashid=mo++}function no(a){var y=a.__gohashid;return y===void 0&&(y=mo++,a.__gohashid=y),y}function br(a){return a.__gohashid}Ye.Object.defineProperties(_n.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return pr;var a=this.Sa;return a!==null?(a.reset(),a):new Br(this)}}}),_n.prototype.toList=_n.prototype.Hv,_n.prototype.toArray=_n.prototype.Fa,_n.prototype.clear=_n.prototype.clear,_n.prototype.retainAll=_n.prototype.pA,_n.prototype.removeAll=_n.prototype.hp,_n.prototype.delete=_n.prototype.delete,_n.prototype.remove=_n.prototype.remove,_n.prototype.first=_n.prototype.first,_n.prototype.containsAny=_n.prototype.Ty,_n.prototype.containsAll=_n.prototype.Sy,_n.prototype.has=_n.prototype.has,_n.prototype.contains=_n.prototype.contains,_n.prototype.addAll=_n.prototype.addAll,_n.prototype.add=_n.prototype.add,_n.prototype.thaw=_n.prototype.ka,_n.prototype.freeze=_n.prototype.freeze;var mo=1;_n.className="Set",_n.uniqueHash=Or,_n.hashIdUnique=no,_n.hashId=br;function Jr(a){this.ma=a,this.qa=a.Ja,this.sa=null}Jr.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Jr.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)},Jr.prototype.Ad=function(){return this.next()},Jr.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},Jr.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},Jr.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},Jr.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},Jr.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Rn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Jr.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Rn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},Jr.prototype.de=function(){this.value=this.key=null,this.qa=-1},Jr.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ye.Object.defineProperties(Jr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Jr.prototype.first=Jr.prototype.first,Jr.prototype.hasNext=Jr.prototype.Ad,Jr.prototype.next=Jr.prototype.next,Jr.prototype.reset=Jr.prototype.reset,Jr.className="MapKeySetIterator";function ur(a){_n.call(this),Or(this),this._isFrozen=!0,this.ma=a}Kt(ur,_n),Le=ur.prototype,Le.freeze=function(){return this},Le.ka=function(){return this},Le.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Le.add=function(){St("This Set is read-only: "+this.toString())},Le.contains=function(a){return this.ma.contains(a)},Le.has=function(a){return this.contains(a)},Le.remove=function(){St("This Set is read-only: "+this.toString())},Le.delete=function(a){return this.remove(a)},Le.clear=function(){St("This Set is read-only: "+this.toString())},Le.first=function(){var a=this.ma.ea;return a!==null?a.key:null},ur.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},ur.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},ur.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},ur.prototype.map=function(a){for(var y=new _n,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},ur.prototype.filter=function(a){for(var y=new _n,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},ur.prototype.copy=function(){return new ur(this.ma)},ur.prototype.Iv=function(){var a=new _n,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},ur.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},ur.prototype.Hv=function(){var a=new Rn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ye.Object.defineProperties(ur.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?pr:new Jr(this.ma)}}}),ur.prototype.toList=ur.prototype.Hv,ur.prototype.toArray=ur.prototype.Fa,ur.prototype.toSet=ur.prototype.Iv,ur.prototype.first=ur.prototype.first,ur.prototype.clear=ur.prototype.clear,ur.prototype.delete=ur.prototype.delete,ur.prototype.remove=ur.prototype.remove,ur.prototype.has=ur.prototype.has,ur.prototype.contains=ur.prototype.contains,ur.prototype.add=ur.prototype.add,ur.prototype.thaw=ur.prototype.ka,ur.prototype.freeze=ur.prototype.freeze,ur.className="MapKeySet";function er(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}er.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},er.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},er.prototype.Ad=function(){return this.next()},er.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},er.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},er.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},er.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},er.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Rn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},er.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Rn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},er.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},er.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ye.Object.defineProperties(er.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),er.prototype.first=er.prototype.first,er.prototype.hasNext=er.prototype.Ad,er.prototype.next=er.prototype.next,er.prototype.reset=er.prototype.reset,er.className="MapValueSetIterator";function qi(a,y){this.key=a,this.value=y,this.ll=this.va=null}qi.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},qi.className="KeyValuePair";function Rr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Rr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Rr.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)},Rr.prototype.Ad=function(){return this.next()},Rr.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},Rr.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},Rr.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},Rr.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},Rr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Rn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Rr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Rn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Rr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Rr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ye.Object.defineProperties(Rr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Rr.prototype.first=Rr.prototype.first,Rr.prototype.hasNext=Rr.prototype.Ad,Rr.prototype.next=Rr.prototype.next,Rr.prototype.reset=Rr.prototype.reset,Rr.className="MapIterator";function Ii(a){Or(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=Ii.prototype,Le.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.toString=function(){return"Map()#"+br(this)},Le.add=function(a,y){this._isFrozen&&An(this,a);var x=a;rn(a)&&(x=no(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new qi(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},Le.set=function(a,y){return this.add(a,y)},Le.addAll=function(a){if(a===null)return this;if(bn(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 Ii)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},Le.first=function(){return this.ea},Ii.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Ii.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Ii.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Ii.prototype.map=function(a){for(var y=new Ii,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Ii.prototype.filter=function(a){for(var y=new Ii,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Le=Ii.prototype,Le.contains=function(a){var y=a;return rn(a)&&(y=br(a),y===void 0)?!1:this.Tb[y]!==void 0},Le.has=function(a){return this.contains(a)},Le.I=function(a){var y=a;return rn(a)&&(y=br(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Le.get=function(a){return this.I(a)},Le.remove=function(a){if(a===null)return!1;this._isFrozen&&An(this,a);var y=a;if(rn(a)&&(y=br(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},Le.delete=function(a){return this.remove(a)},Le.clear=function(){this._isFrozen&&An(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},Ii.prototype.copy=function(){var a=new Ii,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Ii.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 qi(E.key,E.value),x++}return y},Ii.prototype.Lf=function(){return new ur(this)},Ye.Object.defineProperties(Ii.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return pr;var a=this.Sa;return a!==null?(a.reset(),a):new Rr(this)}},iteratorKeys:{get:function(){return 0>=this.count?pr:new Jr(this)}},iteratorValues:{get:function(){if(0>=this.count)return pr;var a=this.jf;return a!==null?(a.reset(),a):new er(this)}}}),Ii.prototype.toKeySet=Ii.prototype.Lf,Ii.prototype.toArray=Ii.prototype.Fa,Ii.prototype.clear=Ii.prototype.clear,Ii.prototype.delete=Ii.prototype.delete,Ii.prototype.remove=Ii.prototype.remove,Ii.prototype.get=Ii.prototype.get,Ii.prototype.getValue=Ii.prototype.I,Ii.prototype.has=Ii.prototype.has,Ii.prototype.contains=Ii.prototype.contains,Ii.prototype.first=Ii.prototype.first,Ii.prototype.addAll=Ii.prototype.addAll,Ii.prototype.set=Ii.prototype.set,Ii.prototype.add=Ii.prototype.add,Ii.prototype.thaw=Ii.prototype.ka,Ii.prototype.freeze=Ii.prototype.freeze,Ii.className="Map";function Qe(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):St("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Qr,lo,jr,vo,po;Qe.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Qe.prototype.h=function(a,y){return this.x=a,this.y=y,this},Qe.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Qe.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Qe.prototype.copy=function(){var a=new Qe;return a.x=this.x,a.y=this.y,a},Le=Qe.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function Lr(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 Qe(x,E)}return new Qe}function Fr(a){return a.x.toString()+" "+a.y.toString()}Le.toString=function(){return"Point("+this.x+","+this.y+")"},Le.D=function(a){return a instanceof Qe?this.x===a.x&&this.y===a.y:!1},Le.hi=function(a,y){return this.x===a&&this.y===y},Le.Xa=function(a){return en.B(this.x,a.x)&&en.B(this.y,a.y)},Le.add=function(a){return this.x+=a.x,this.y+=a.y,this},Le.re=function(a){return this.x-=a.x,this.y-=a.y,this},Le.offset=function(a,y){return this.x+=a,this.y+=y,this},Qe.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},Le=Qe.prototype,Le.scale=function(a,y){return this.x*=a,this.y*=y,this},Le.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Le.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Le.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},Le.ab=function(a){return uo(a.x-this.x,a.y-this.y)},Le.direction=function(a,y){return uo(a-this.x,y-this.y)};function uo(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}Le.Ry=function(a,y){return en.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Le.fA=function(a,y,x,b){return en.qh(a,y,x,b,this.x,this.y,this),this},Le.gA=function(a,y){return en.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Le.uA=function(a,y,x,b){return en.No(this.x,this.y,a,y,x,b,this),this},Le.vA=function(a,y){return en.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Le.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},Le.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},Le.transform=function(a){return a.Ga(this),this};function qr(a,y){return y.Cd(a),a}function zo(a,y,x,b,E,z){var te=E-x,re=z-b,oe=te*te+re*re;x-=a,b-=y;var le=-x*te-b*re;return 0>=le||le>=oe?(te=E-a,re=z-y,Math.min(x*x+b*b,te*te+re*re)):(a=te*b-re*x,a*a/oe)}function Ro(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Mr(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)}Le.w=function(){return isFinite(this.x)&&isFinite(this.y)},Qe.alloc=function(){var a=Nr.pop();return a===void 0?new Qe:a},Qe.allocAt=function(a,y){var x=Nr.pop();return x===void 0?new Qe(a,y):(x.x=a,x.y=y,x)},Qe.free=function(a){Nr.push(a)},Qe.prototype.isReal=Qe.prototype.w,Qe.prototype.setSpot=Qe.prototype.yi,Qe.prototype.setRectSpot=Qe.prototype.xi,Qe.prototype.snapToGridPoint=Qe.prototype.vA,Qe.prototype.snapToGrid=Qe.prototype.uA,Qe.prototype.projectOntoLineSegmentPoint=Qe.prototype.gA,Qe.prototype.projectOntoLineSegment=Qe.prototype.fA,Qe.intersectingLineSegments=function(a,y,x,b,E,z,te,re){return en.Rl(a,y,x,b,E,z,te,re)},Qe.prototype.compareWithLineSegmentPoint=Qe.prototype.Ry,Qe.compareWithLineSegment=function(a,y,x,b,E,z){return en.Fl(a,y,x,b,E,z)},Qe.prototype.direction=Qe.prototype.direction,Qe.prototype.directionPoint=Qe.prototype.ab,Qe.prototype.normalize=Qe.prototype.normalize,Qe.prototype.distanceSquared=Qe.prototype.zd,Qe.prototype.distanceSquaredPoint=Qe.prototype.Bf,Qe.prototype.scale=Qe.prototype.scale,Qe.prototype.rotate=Qe.prototype.rotate,Qe.prototype.offset=Qe.prototype.offset,Qe.prototype.subtract=Qe.prototype.re,Qe.prototype.add=Qe.prototype.add,Qe.prototype.equalsApprox=Qe.prototype.Xa,Qe.prototype.equalTo=Qe.prototype.hi,Qe.prototype.equals=Qe.prototype.D,Qe.prototype.set=Qe.prototype.set,Qe.prototype.setTo=Qe.prototype.sg;var Nr=[];Qe.className="Point",Qe.parse=Lr,Qe.stringify=Fr,Qe.distanceLineSegmentSquared=zo,Qe.distanceSquared=Ro,Qe.direction=Mr,Qe.Origin=Qr=new Qe(0,0).ja(),Qe.InfiniteTopLeft=lo=new Qe(-1/0,-1/0).ja(),Qe.InfiniteBottomRight=jr=new Qe(1/0,1/0).ja(),Qe.SixPoint=vo=new Qe(6,6).ja(),Qe.NoPoint=po=new Qe(NaN,NaN).ja(),Qe.parse=Lr,Qe.stringify=Fr,Qe.distanceLineSegmentSquared=zo,Qe.distanceSquared=Ro,Qe.direction=Mr;function pi(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):St("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Tr,Bo,aa,Ho,Ao,_o,ta;pi.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},pi.prototype.h=function(a,y){return this.width=a,this.height=y,this},pi.prototype.sg=function(a,y){return this.width=a,this.height=y,this},pi.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},pi.prototype.copy=function(){var a=new pi;return a.width=this.width,a.height=this.height,a},Le=pi.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ea(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 pi(x,E)}return new pi}function Mt(a){return a.width.toString()+" "+a.height.toString()}Le.toString=function(){return"Size("+this.width+","+this.height+")"},Le.D=function(a){return a instanceof pi?this.width===a.width&&this.height===a.height:!1},Le.hi=function(a,y){return this.width===a&&this.height===y},Le.Xa=function(a){return en.B(this.width,a.width)&&en.B(this.height,a.height)},Le.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},Le.w=function(){return isFinite(this.width)&&isFinite(this.height)},pi.alloc=function(){var a=Pi.pop();return a===void 0?new pi:a},pi.free=function(a){Pi.push(a)},pi.prototype.isReal=pi.prototype.w,pi.prototype.inflate=pi.prototype.Bc,pi.prototype.equalsApprox=pi.prototype.Xa,pi.prototype.equalTo=pi.prototype.hi,pi.prototype.equals=pi.prototype.D,pi.prototype.set=pi.prototype.set,pi.prototype.setTo=pi.prototype.sg;var Pi=[];pi.className="Size",pi.parse=Ea,pi.stringify=Mt,pi.ZeroSize=Tr=new pi(0,0).ja(),pi.OneSize=Bo=new pi(1,1).ja(),pi.SixSize=aa=new pi(6,6).ja(),pi.EightSize=Ho=new pi(8,8).ja(),pi.TenSize=Ao=new pi(10,10).ja(),pi.InfiniteSize=_o=new pi(1/0,1/0).ja(),pi.NoSize=ta=new pi(NaN,NaN).ja(),pi.parse=Ea,pi.stringify=Mt;function _t(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 Qe?(x=a.x,a=a.y,y instanceof Qe?(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 pi?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):St("Incorrect second argument supplied to Rect constructor "+y)):St("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Le=_t.prototype,Le.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Le.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Xi(a,y,x){a.width=y,a.height=x}Le.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},Le.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Le.dd=function(a){return this.x=a.x,this.y=a.y,this},Le.tA=function(a){return this.width=a.width,this.height=a.height,this},_t.prototype.copy=function(){var a=new _t;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Le=_t.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function wi(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 te=0;a[y]==="";)y++;return(b=a[y++])&&(te=parseFloat(b)),new _t(x,E,z,te)}return new _t}function Sr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Le.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Le.D=function(a){return a instanceof _t?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Le.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},Le.Xa=function(a){return en.B(this.x,a.x)&&en.B(this.y,a.y)&&en.B(this.width,a.width)&&en.B(this.height,a.height)};function Zi(a,y){return en.$(a.x,y.x)&&en.$(a.y,y.y)&&en.$(a.width,y.width)&&en.$(a.height,y.height)}Le.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Le.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},Le.contains=function(a,y,x,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},Le.offset=function(a,y){return this.x+=a,this.y+=y,this},Le.Bc=function(a,y){return Ci(this,y,a,y,a)},Le.Co=function(a){return Ci(this,a.top,a.right,a.bottom,a.left)},Le.Fv=function(a){return Ci(this,-a.top,-a.right,-a.bottom,-a.left)},Le.Hz=function(a,y,x,b){return Ci(this,a,y,x,b)};function Ci(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}Le.Ex=function(a){return nr(this,a.x,a.y,a.width,a.height)},Le.Uu=function(a,y,x,b){return nr(this,a,y,x,b)};function nr(a,y,x,b,E){var z=Math.max(a.x,y),te=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=te,a.width=Math.max(0,y-z),a.height=Math.max(0,x-te),a}Le.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Le.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 or(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))}Le.Ye=function(a){return cr(this,a.x,a.y,0,0)},Le.ed=function(a){return cr(this,a.x,a.y,a.width,a.height)},Le.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),cr(this,a,y,x,b)};function cr(a,y,x,b,E){var z=Math.min(a.x,y),te=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=te,a.width=y-z,a.height=x-te,a}Le.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function Pr(a,y,x,b,E,z,te,re){return te===void 0&&(te=0),re===void 0&&(re=0),a<=E&&E+te<=a+x&&y<=z&&z+re<=y+b}function Gr(a,y,x,b,E,z,te,re){return a>te+E||E>x+a?!1:!(y>re+z||z>b+y)}Le.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Le.Mz=function(){return this.width===0&&this.height===0},_t.alloc=function(){var a=Zr.pop();return a===void 0?new _t:a},_t.allocAt=function(a,y,x,b){var E=Zr.pop();return E===void 0?new _t(a,y,x,b):E.h(a,y,x,b)},_t.free=function(a){Zr.push(a)},Ye.Object.defineProperties(_t.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 Qe(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new pi(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Qe(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}}}),_t.prototype.isEmpty=_t.prototype.Mz,_t.prototype.isReal=_t.prototype.w,_t.intersectsLineSegment=function(a,y,x,b,E,z,te,re){return en.Fx(a,y,x,b,E,z,te,re)},_t.prototype.setSpot=_t.prototype.yi,_t.prototype.union=_t.prototype.Kv,_t.prototype.unionRect=_t.prototype.ed,_t.prototype.unionPoint=_t.prototype.Ye,_t.prototype.intersects=_t.prototype.Vu,_t.prototype.intersectsRect=_t.prototype.Yc,_t.prototype.intersect=_t.prototype.Uu,_t.prototype.intersectRect=_t.prototype.Ex,_t.prototype.grow=_t.prototype.Hz,_t.prototype.subtractMargin=_t.prototype.Fv,_t.prototype.addMargin=_t.prototype.Co,_t.prototype.inflate=_t.prototype.Bc,_t.prototype.offset=_t.prototype.offset,_t.prototype.contains=_t.prototype.contains,_t.prototype.containsRect=_t.prototype.Re,_t.prototype.containsPoint=_t.prototype.ca,_t.prototype.equalsApprox=_t.prototype.Xa,_t.prototype.equalTo=_t.prototype.hi,_t.prototype.equals=_t.prototype.D,_t.prototype.setSize=_t.prototype.tA,_t.prototype.setPoint=_t.prototype.dd,_t.prototype.set=_t.prototype.set,_t.prototype.setTo=_t.prototype.sg;var yr=null,kr=null,Zr=[];_t.className="Rect",_t.parse=wi,_t.stringify=Sr,_t.contains=Pr,_t.intersects=Gr,_t.ZeroRect=yr=new _t(0,0,0,0).ja(),_t.NoRect=kr=new _t(NaN,NaN,NaN,NaN).ja(),_t.parse=wi,_t.stringify=Sr,_t.contains=Pr,_t.intersects=Gr;function Oi(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):St("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Oi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Oi.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Oi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Oi.prototype.copy=function(){var a=new Oi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Le=Oi.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function sa(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 Oi;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Oi(x);for(var z=NaN;a[y]==="";)y++;if((b=a[y++])&&(z=parseFloat(b)),isNaN(z))return new Oi(x,E);for(var te=NaN;a[y]==="";)y++;return(b=a[y++])&&(te=parseFloat(b)),isNaN(te)?new Oi(x,E):new Oi(x,E,z,te)}return new Oi}function Ra(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Le.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Le.D=function(a){return a instanceof Oi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Le.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},Le.Xa=function(a){return en.B(this.top,a.top)&&en.B(this.right,a.right)&&en.B(this.bottom,a.bottom)&&en.B(this.left,a.left)},Le.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Oi.alloc=function(){var a=tl.pop();return a===void 0?new Oi:a},Oi.free=function(a){tl.push(a)},Oi.prototype.isReal=Oi.prototype.w,Oi.prototype.equalsApprox=Oi.prototype.Xa,Oi.prototype.equalTo=Oi.prototype.hi,Oi.prototype.equals=Oi.prototype.D,Oi.prototype.set=Oi.prototype.set,Oi.prototype.setTo=Oi.prototype.sg;var Ls=null,Ys=null,tl=[];Oi.className="Margin",Oi.parse=sa,Oi.stringify=Ra,Oi.ZeroMargin=Ls=new Oi(0,0,0,0).ja(),Oi.TwoMargin=Ys=new Oi(2,2,2,2).ja(),Oi.parse=sa,Oi.stringify=Ra;function Ui(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 La,Ba,zs,su,lu,wo,yc,Ml,as,vl,ju,rc,wl,sl,td,nd,kc,_d,id,Ic,Js,uu,xd,Eu,Sc,Vo,ya,ll,Ss,ms,Ua,ss,xs,vs,oc,_l;Ui.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ui.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},Ui.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ui.prototype.copy=function(){var a=new Ui;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Le=Ui.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function is(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function bh(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return La;if(a==="TopLeft")return Ba;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return zs;if(a==="TopRight")return su;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return lu;if(a==="Center")return wo;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return yc;if(a==="BottomLeft")return Ml;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return as;if(a==="BottomRight")return vl;if(a==="TopSide")return ju;if(a==="LeftSide")return rc;if(a==="RightSide")return wl;if(a==="BottomSide")return sl;if(a==="TopBottomSides")return td;if(a==="LeftRightSides")return nd;if(a==="TopLeftSides")return kc;if(a==="TopRightSides")return _d;if(a==="BottomLeftSides")return id;if(a==="BottomRightSides")return Ic;if(a==="NotTopSide")return Js;if(a==="NotLeftSide")return uu;if(a==="NotRightSide")return xd;if(a==="NotBottomSide")return Eu;if(a==="AllSides")return Sc;if(a==="Default")return Vo;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var z=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(z=parseFloat(b));for(var te=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(te=parseFloat(b)),new Ui(x,E,z,te)}return new Ui}function Eh(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Le.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(La)?"None":this.D(Ba)?"TopLeft":this.D(zs)?"Top":this.D(su)?"TopRight":this.D(lu)?"Left":this.D(wo)?"Center":this.D(yc)?"Right":this.D(Ml)?"BottomLeft":this.D(as)?"Bottom":this.D(vl)?"BottomRight":this.D(ju)?"TopSide":this.D(rc)?"LeftSide":this.D(wl)?"RightSide":this.D(sl)?"BottomSide":this.D(td)?"TopBottomSides":this.D(nd)?"LeftRightSides":this.D(kc)?"TopLeftSides":this.D(_d)?"TopRightSides":this.D(id)?"BottomLeftSides":this.D(Ic)?"BottomRightSides":this.D(Js)?"NotTopSide":this.D(uu)?"NotLeftSide":this.D(xd)?"NotRightSide":this.D(Eu)?"NotBottomSide":this.D(Sc)?"AllSides":this.D(Vo)?"Default":"None"},Le.D=function(a){return a instanceof Ui?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},Le.gv=function(){return new Ui(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Le.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(ya))a=rc;else if(a.D(ll))a=wl;else if(a.D(Ss))a=ju;else if(a.D(ms))a=sl;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Le.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Le.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Le.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Le.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Le.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Ui.alloc=function(){var a=Uu.pop();return a===void 0?new Ui:a},Ui.free=function(a){Uu.push(a)},Ui.prototype.isDefault=Ui.prototype.Xb,Ui.prototype.isNone=Ui.prototype.ys,Ui.prototype.isSide=Ui.prototype.$c,Ui.prototype.isNoSpot=Ui.prototype.Mc,Ui.prototype.isSpot=Ui.prototype.sb,Ui.prototype.includesSide=Ui.prototype.Hf,Ui.prototype.opposite=Ui.prototype.gv,Ui.prototype.equals=Ui.prototype.D,Ui.prototype.set=Ui.prototype.set,Ui.prototype.setTo=Ui.prototype.sg;var Uu=[];Ui.className="Spot",Ui.parse=bh,Ui.stringify=Eh,Ui.None=La=is(new Ui(0,0,0,0),0).ja(),Ui.Default=Vo=is(new Ui(0,0,-1,0),-1).ja(),Ui.TopLeft=Ba=new Ui(0,0,0,0).ja(),Ui.TopCenter=zs=new Ui(.5,0,0,0).ja(),Ui.TopRight=su=new Ui(1,0,0,0).ja(),Ui.LeftCenter=lu=new Ui(0,.5,0,0).ja(),Ui.Center=wo=new Ui(.5,.5,0,0).ja(),Ui.RightCenter=yc=new Ui(1,.5,0,0).ja(),Ui.BottomLeft=Ml=new Ui(0,1,0,0).ja(),Ui.BottomCenter=as=new Ui(.5,1,0,0).ja(),Ui.BottomRight=vl=new Ui(1,1,0,0).ja(),Ui.MiddleTop=Ua=zs,Ui.MiddleLeft=ss=lu,Ui.MiddleRight=xs=yc,Ui.MiddleBottom=vs=as,Ui.Top=Ss=zs,Ui.Left=ya=lu,Ui.Right=ll=yc,Ui.Bottom=ms=as,Ui.TopSide=ju=is(new Ui(0,0,1,1),1).ja(),Ui.LeftSide=rc=is(new Ui(0,0,1,2),1).ja(),Ui.RightSide=wl=is(new Ui(0,0,1,4),1).ja(),Ui.BottomSide=sl=is(new Ui(0,0,1,8),1).ja(),Ui.TopBottomSides=td=is(new Ui(0,0,1,9),1).ja(),Ui.LeftRightSides=nd=is(new Ui(0,0,1,6),1).ja(),Ui.TopLeftSides=kc=is(new Ui(0,0,1,3),1).ja(),Ui.TopRightSides=_d=is(new Ui(0,0,1,5),1).ja(),Ui.BottomLeftSides=id=is(new Ui(0,0,1,10),1).ja(),Ui.BottomRightSides=Ic=is(new Ui(0,0,1,12),1).ja(),Ui.NotTopSide=Js=is(new Ui(0,0,1,14),1).ja(),Ui.NotLeftSide=uu=is(new Ui(0,0,1,13),1).ja(),Ui.NotRightSide=xd=is(new Ui(0,0,1,11),1).ja(),Ui.NotBottomSide=Eu=is(new Ui(0,0,1,7),1).ja(),Ui.AllSides=Sc=is(new Ui(0,0,1,15),1).ja(),oc=new Ui(.156,.156).ja(),_l=new Ui(.844,.844).ja(),Ui.parse=bh,Ui.stringify=Eh;function ro(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}ro.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},ro.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},ro.prototype.copy=function(){var a=new ro;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},ro.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},ro.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},ro.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},ro.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},ro.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},ro.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,te=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*te+this.m21*a+this.dx,this.dy=this.m12*te+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},ro.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},ro.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,te=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=z,this.m22=te,this.translate(-y,-x),this},Le=ro.prototype,Le.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Le.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Le.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},Le.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,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))},Le.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))},Le.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,z=this.m11,te=this.m12,re=this.m21,oe=this.m22,le=this.dx,ue=this.dy,me=y*z+x*re+le,we=y*te+x*oe+ue,Ee=b*z+x*re+le,De=b*te+x*oe+ue;return x=y*z+E*re+le,y=y*te+E*oe+ue,z=b*z+E*re+le,b=b*te+E*oe+ue,E=Math.min(me,Ee),me=Math.max(me,Ee),Ee=Math.min(we,De),we=Math.max(we,De),E=Math.min(E,x),me=Math.max(me,x),Ee=Math.min(Ee,y),we=Math.max(we,y),E=Math.min(E,z),me=Math.max(me,z),Ee=Math.min(Ee,b),we=Math.max(we,b),a.h(E,Ee,me-E,we-Ee),a},ro.alloc=function(){var a=rd.pop();return a===void 0?new ro:a},ro.free=function(a){rd.push(a)},ro.prototype.transformRect=ro.prototype.pp,ro.prototype.transformPoint=ro.prototype.Ga,ro.prototype.scale=ro.prototype.scale,ro.prototype.translate=ro.prototype.translate,ro.prototype.rotate=ro.prototype.rotate,ro.prototype.invert=ro.prototype.Vj,ro.prototype.multiplyInverted=ro.prototype.bv,ro.prototype.multiply=ro.prototype.multiply,ro.prototype.reset=ro.prototype.reset,ro.prototype.isIdentity=ro.prototype.ws,ro.prototype.equals=ro.prototype.D,ro.prototype.setTransform=ro.prototype.setTransform,ro.prototype.set=ro.prototype.set;var rd=[];ro.className="Transform",ro.xF="54a702f3e53909c447824c6706603faf4c";var en={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=en.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);en.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,te){if(0>=E&&(E=1e-6),a<x)var re=a,oe=x;else re=x,oe=a;if(y<b)var le=y,ue=b;else le=b,ue=y;if(a===x)return le<=te&&te<=ue&&a-E<=z&&z<=a+E;if(y===b)return re<=z&&z<=oe&&y-E<=te&&te<=y+E;if(oe+=E,re-=E,re<=z&&z<=oe&&(ue+=E,le-=E,le<=te&&te<=ue))if(oe-re>ue-le)if(a-x>E||x-a>E){if(z=(b-y)/(x-a)*(z-a)+y,z-E<=te&&te<=z+E)return!0}else return!0;else if(y-b>E||b-y>E){if(te=(x-a)/(b-y)*(te-y)+a,te-E<=z&&z<=te+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,z,te,re,oe,le,ue,me){if(en.Yb(a,y,te,re,me,x,b)&&en.Yb(a,y,te,re,me,E,z))return en.Yb(a,y,te,re,me,le,ue);var we=(a+x)/2,Ee=(y+b)/2,De=(x+E)/2,je=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(we+De)/2,x=(Ee+je)/2,De=(De+E)/2,je=(je+z)/2;var ct=(b+De)/2,qe=(x+je)/2;return en.cs(a,y,we,Ee,b,x,ct,qe,oe,le,ue,me)||en.cs(ct,qe,De,je,E,z,te,re,oe,le,ue,me)},ax:function(a,y,x,b,E,z,te,re,oe){var le=(x+E)/2,ue=(b+z)/2;return oe.h((((a+x)/2+le)/2+(le+(E+te)/2)/2)/2,(((y+b)/2+ue)/2+(ue+(z+re)/2)/2)/2),oe},My:function(a,y,x,b,E,z,te,re){var oe=(x+E)/2,le=(b+z)/2;return Mr(((a+x)/2+oe)/2,((y+b)/2+le)/2,(oe+(E+te)/2)/2,(le+(z+re)/2)/2)},Dl:function(a,y,x,b,E,z,te,re,oe,le){if(en.Yb(a,y,te,re,oe,x,b)&&en.Yb(a,y,te,re,oe,E,z))cr(le,a,y,0,0),cr(le,te,re,0,0);else{var ue=(a+x)/2,me=(y+b)/2,we=(x+E)/2,Ee=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(ue+we)/2,x=(me+Ee)/2,we=(we+E)/2,Ee=(Ee+z)/2;var De=(b+we)/2,je=(x+Ee)/2;en.Dl(a,y,ue,me,b,x,De,je,oe,le),en.Dl(De,je,we,Ee,E,z,te,re,oe,le)}return le},Qe:function(a,y,x,b,E,z,te,re,oe,le){if(en.Yb(a,y,te,re,oe,x,b)&&en.Yb(a,y,te,re,oe,E,z))le.length===0&&(le.push(a),le.push(y)),le.push(te),le.push(re);else{var ue=(a+x)/2,me=(y+b)/2,we=(x+E)/2,Ee=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(ue+we)/2,x=(me+Ee)/2,we=(we+E)/2,Ee=(Ee+z)/2;var De=(b+we)/2,je=(x+Ee)/2;en.Qe(a,y,ue,me,b,x,De,je,oe,le),en.Qe(De,je,we,Ee,E,z,te,re,oe,le)}return le},jv:function(a,y,x,b,E,z,te,re,oe,le){if(en.Yb(a,y,E,z,le,x,b))return en.Yb(a,y,E,z,le,re,oe);var ue=(a+x)/2,me=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var we=(ue+x)/2,Ee=(me+b)/2;return en.jv(a,y,ue,me,we,Ee,te,re,oe,le)||en.jv(we,Ee,x,b,E,z,te,re,oe,le)},OA:function(a,y,x,b,E,z,te){return te.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+z)/2)/2),te},iv:function(a,y,x,b,E,z,te,re){if(en.Yb(a,y,E,z,te,x,b))cr(re,a,y,0,0),cr(re,E,z,0,0);else{var oe=(a+x)/2,le=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ue=(oe+x)/2,me=(le+b)/2;en.iv(a,y,oe,le,ue,me,te,re),en.iv(ue,me,x,b,E,z,te,re)}return re},ep:function(a,y,x,b,E,z,te,re){if(en.Yb(a,y,E,z,te,x,b))re.length===0&&(re.push(a),re.push(y)),re.push(E),re.push(z);else{var oe=(a+x)/2,le=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ue=(oe+x)/2,me=(le+b)/2;en.ep(a,y,oe,le,ue,me,te,re),en.ep(ue,me,x,b,E,z,te,re)}return re},Eo:function(a,y,x,b,E,z,te,re,oe,le,ue,me,we,Ee){if(en.Yb(a,y,te,re,we,x,b)&&en.Yb(a,y,te,re,we,E,z))return!en.Rl(a,y,te,re,oe,le,ue,me)||(we=(a-te)*(le-me)-(y-re)*(oe-ue),we===0)?!1:(Ee.h(((a*re-y*te)*(oe-ue)-(a-te)*(oe*me-le*ue))/we,((a*re-y*te)*(le-me)-(y-re)*(oe*me-le*ue))/we),!0);var De=(a+x)/2,je=(y+b)/2,ct=(x+E)/2,qe=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(De+ct)/2,x=(je+qe)/2,ct=(ct+E)/2,qe=(qe+z)/2;var Ct=(b+ct)/2,Lt=(x+qe)/2,Rt=1/0,Jt=!1,vn=0,Fi=0;return en.Eo(a,y,De,je,b,x,Ct,Lt,oe,le,ue,me,we,Ee)&&(a=(Ee.x-oe)*(Ee.x-oe)+(Ee.y-le)*(Ee.y-le),a<Rt&&(Rt=a,Jt=!0,vn=Ee.x,Fi=Ee.y)),en.Eo(Ct,Lt,ct,qe,E,z,te,re,oe,le,ue,me,we,Ee)&&(Ee.x-oe)*(Ee.x-oe)+(Ee.y-le)*(Ee.y-le)<Rt&&(Jt=!0,vn=Ee.x,Fi=Ee.y),Jt&&(Ee.x=vn,Ee.y=Fi),Jt},Fo:function(a,y,x,b,E,z,te,re,oe,le,ue,me,we){var Ee=0;if(en.Yb(a,y,te,re,we,x,b)&&en.Yb(a,y,te,re,we,E,z)){if(we=(a-te)*(le-me)-(y-re)*(oe-ue),we===0)return Ee;var De=((a*re-y*te)*(oe-ue)-(a-te)*(oe*me-le*ue))/we,je=((a*re-y*te)*(le-me)-(y-re)*(oe*me-le*ue))/we;if(De>=ue)return Ee;if((oe>ue?oe-ue:ue-oe)<(le>me?le-me:me-le)){if(y<re?(oe=y,a=re):(oe=re,a=y),je<oe||je>a)return Ee}else if(a<te?(oe=a,a=te):oe=te,De<oe||De>a)return Ee;0<we?Ee++:0>we&&Ee--}else{De=(a+x)/2,je=(y+b)/2;var ct=(x+E)/2,qe=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(De+ct)/2,x=(je+qe)/2,ct=(ct+E)/2,qe=(qe+z)/2;var Ct=(b+ct)/2,Lt=(x+qe)/2;Ee+=en.Fo(a,y,De,je,b,x,Ct,Lt,oe,le,ue,me,we),Ee+=en.Fo(Ct,Lt,ct,qe,E,z,te,re,oe,le,ue,me,we)}return Ee},qh:function(a,y,x,b,E,z,te){return en.$(a,x)?(y<b?(x=y,y=b):x=b,z<x?(te.h(a,x),!1):z>y?(te.h(a,y),!1):(te.h(a,z),!0)):en.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(te.h(b,y),!1):E>a?(te.h(a,y),!1):(te.h(E,y),!0)):(E=((a-E)*(a-x)+(y-z)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(te.h(a,y),!1):1.000005<E?(te.h(x,b),!1):(te.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,z,te,re,oe){return en.B(a,x)&&en.B(y,b)?(oe.h(a,y),!1):en.$(E,te)?en.$(a,x)?(en.qh(a,y,x,b,E,z,oe),!1):en.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,oe):(re=(re-z)/(te-E),en.$(a,x)?(x=re*(a-E)+z,y<b?(E=y,y=b):E=b,x<E?(oe.h(a,E),!1):x>y?(oe.h(a,y),!1):(oe.h(a,x),!0)):(te=(b-y)/(x-a),en.$(re,te)?(en.qh(a,y,x,b,E,z,oe),!1):(E=(te*a-re*E+z-y)/(te-re),en.$(te,0)?(a<x?(b=a,a=x):b=x,E<b?(oe.h(b,y),!1):E>a?(oe.h(a,y),!1):(oe.h(E,y),!0)):en.qh(a,y,x,b,E,te*(E-a)+y,oe))))},MA:function(a,y,x,b,E){return en.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,te,re,oe,le){function ue(ct,qe){var Ct=(ct-a)*(ct-a)+(qe-y)*(qe-y);Ct<me&&(me=Ct,oe.h(ct,qe))}var me=1/0;ue(oe.x,oe.y);var we=0,Ee=0,De=0,je=0;if(E<te?(we=E,Ee=te):(we=te,Ee=E),z<re?(De=E,je=te):(De=te,je=E),we=(Ee-we)/2+le,le=(je-De)/2+le,E=(E+te)/2,z=(z+re)/2,we===0||le===0)return oe;if(.5>(x>a?x-a:a-x)){if(we=1-(x-E)*(x-E)/(we*we),0>we)return oe;we=Math.sqrt(we),b=-le*we+z,ue(x,le*we+z),ue(x,b)}else{if(x=(b-y)/(x-a),b=1/(we*we)+x*x/(le*le),re=2*x*(y-x*a)/(le*le)-2*x*z/(le*le)-2*E/(we*we),we=re*re-4*b*(2*x*a*z/(le*le)-2*y*z/(le*le)+z*z/(le*le)+E*E/(we*we)-1+(y-x*a)*(y-x*a)/(le*le)),0>we)return oe;we=Math.sqrt(we),le=(-re+we)/(2*b),ue(le,x*le-x*a+y),we=(-re-we)/(2*b),ue(we,x*we-x*a+y)}return oe},Ff:function(a,y,x,b,E,z,te,re,oe){var le=1e21,ue=a,me=y;if(en.Ve(a,y,a,b,E,z,te,re,oe)){var we=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z);we<le&&(le=we,ue=oe.x,me=oe.y)}return en.Ve(x,y,x,b,E,z,te,re,oe)&&(we=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z),we<le&&(le=we,ue=oe.x,me=oe.y)),en.Ve(a,y,x,y,E,z,te,re,oe)&&(y=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z),y<le&&(le=y,ue=oe.x,me=oe.y)),en.Ve(a,b,x,b,E,z,te,re,oe)&&(a=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z),a<le&&(le=a,ue=oe.x,me=oe.y)),oe.h(ue,me),1e21>le},us:function(a,y,x){return en.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,te,re){var oe=a+x,le=y+b;return E===te?(z<re?(te=z,z=re):te=re,a<=E&&E<=oe&&te<=le&&z>=y):z===re?(E<te?(re=E,E=te):re=te,y<=z&&z<=le&&re<=oe&&E>=a):!!(Pr(a,y,x,b,E,z)||Pr(a,y,x,b,te,re)||en.Rl(a,y,oe,y,E,z,te,re)||en.Rl(oe,y,oe,le,E,z,te,re)||en.Rl(oe,le,a,le,E,z,te,re)||en.Rl(a,le,a,y,E,z,te,re))},Rl:function(a,y,x,b,E,z,te,re){return a===x&&y===b&&E===te&&z===re?a===E&&y===z:0>=en.Fl(a,y,x,b,E,z)*en.Fl(a,y,x,b,te,re)&&0>=en.Fl(E,z,te,re,a,y)*en.Fl(E,z,te,re,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 te=Math.PI;z||(b*=te/180,E*=te/180);var re=b>E?-1:1;z=[];var oe=te/2,le=b;if(b=Math.min(2*te,Math.abs(E-b)),1e-5>b)return oe=le+re*Math.min(b,oe),re=a+x*Math.cos(le),le=y+x*Math.sin(le),a+=x*Math.cos(oe),y+=x*Math.sin(oe),x=(re+a)/2,oe=(le+y)/2,z.push([re,le,x,oe,x,oe,a,y]),z;for(;1e-5<b;)E=le+re*Math.min(b,oe),z.push(en.Vy(x,le,E,a,y)),b-=Math.abs(E-le),le=E;return z},Vy:function(a,y,x,b,E){var z=(x-y)/2,te=a*Math.cos(z),re=a*Math.sin(z),oe=-re,le=te*te+oe*oe,ue=le+te*te+oe*re;return le=4/3*(Math.sqrt(2*le*ue)-ue)/(te*re-oe*te),re=te-le*oe,te=oe+le*te,oe=-te,le=z+y,z=Math.cos(le),le=Math.sin(le),[b+a*Math.cos(y),E+a*Math.sin(y),b+re*z-te*le,E+re*le+te*z,b+re*z-oe*le,E+re*le+oe*z,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,z,te){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/z)*z+b;var re=x;return x+E-a<E/2&&(re=x+E),a=b,b+z-y<z/2&&(a=b+z),te.h(re,a),te},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 te=1,re=0;else te=0,re=1;var oe=te===0?a:y,le=te===0?x:b;return(te===0?E:z)&&(le=-le),te=re,x=te===0?x:b,(te===0?E:z)&&(x=-x),en.az(oe,te===0?a:y,le,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 te=y*b,re=-z+te,oe=-z+Math.sqrt(a*a+te*te);y=re;for(var le=0;9999999999>le&&(y=.5*(re+oe),!(y===re||y===oe));++le){var ue=a/(y+E),me=te/(y+z);if(ue=ue*ue+me*me-1,0<ue)re=y;else if(0>ue)oe=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 $i,um:new $i,Mf:new $i,Nf:0,vm:100};en.za=en.AA;function xi(a){Or(this),this.l=2,a===void 0&&(a=xi.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===xi.o?this.ee=new Rn:(xi.V===null&&(xi.V=new Rn().freeze()),this.ee=xi.V),this.aq=this.ee.Ja,this.Ip=new _t().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Ba,this.gg=vl,this.Rk=this.Sk=NaN,this.Uf=ci}xi.prototype.copy=function(){var a=new xi;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===xi.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},xi.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},xi.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==xi.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},xi.prototype.ka=function(){if(Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==xi.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},xi.prototype.Xa=function(a){if(!(a instanceof xi))return!1;if(this.type!==a.type)return this.type===xi.j&&a.type===xi.o?Mh(this,a):a.type===xi.j&&this.type===xi.o?Mh(a,this):!1;if(this.type===xi.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 en.B(this.startX,a.startX)&&en.B(this.startY,a.startY)&&en.B(this.endX,a.endX)&&en.B(this.endY,a.endY)};function Mh(a,y){return a.type!==xi.j||y.type!==xi.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&en.B(a.startX,y.startX)&&en.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===ra&&en.B(a.endX,y.endX)&&en.B(a.endY,y.endY))))}xi.ia=function(a){return a.toString()},xi.prototype.qb=function(a){a.classType===xi&&(this.type=a)},xi.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case xi.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 xi.u:var y=new _t(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 xi.F:if(y=new _t(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 xi.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()}},xi.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},xi.parse=function(a,y){function x(){return je>=Rt-1?!0:le[je+1].match(Jt)!==null}function b(){return je++,le[je]}function E(Ur){var Dr=parseFloat(b()),Ko=parseFloat(b());ct===ct.toLowerCase()&&(Dr=Lt.x+Dr,Ko=Lt.y+Ko),Ur.h(Dr,Ko)}function z(){return E(Lt),Lt}function te(){return E(Ct),Ct}function re(){var Ur=qe.toLowerCase();return Ur!=="c"&&Ur!=="s"&&Ur!=="q"&&Ur!=="t"?Lt:new Qe(2*Lt.x-Ct.x,2*Lt.y-Ct.y)}y===void 0&&(y=!1);var oe=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(oe,"$1 $2"),a=a.replace(oe,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var le=a.split(" ");for(a=0;a<le.length;a++){var ue=le[a];if(ue.match(/(\.[0-9]*)(\.)/gm)!==null){oe=Sn();for(var me="",we=!1,Ee=0;Ee<ue.length;Ee++){var De=ue[Ee];De!=="."||we?De==="."?(oe.push(me),me="."):me+=De:(we=!0,me+=De)}for(oe.push(me),le.splice(a,1),ue=0;ue<oe.length;ue++)le.splice(a+ue,0,oe[ue]);a+=oe.length-1,Gn(oe)}}var je=-1,ct="",qe="";oe=new Qe(0,0);var Ct=new Qe(0,0),Lt=new Qe(0,0),Rt=le.length;a=DS(null),we=me=ue=!1,Ee=!0,De=null;for(var Jt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(je>=Rt-1);)if(qe=ct,ct=b(),ct!=="")switch(ct.toUpperCase()){case"X":Ee=!0,me=ue=!1;break;case"M":for(De=z(),a.mc===null||Ee===!0?(pp(a,De.x,De.y,ue,!me,we),Ee=!1):a.moveTo(De.x,De.y),oe.assign(Lt);!x();)De=z(),a.lineTo(De.x,De.y);break;case"L":for(;!x();)De=z(),a.lineTo(De.x,De.y);break;case"H":for(;!x();)Lt=new Qe((ct===ct.toLowerCase()?Lt.x:0)+parseFloat(b()),Lt.y),a.lineTo(Lt.x,Lt.y);break;case"V":for(;!x();)Lt=new Qe(Lt.x,(ct===ct.toLowerCase()?Lt.y:0)+parseFloat(b())),a.lineTo(Lt.x,Lt.y);break;case"C":for(;!x();){De=new Qe,E(De);var vn=te(),Fi=z();Hh(a,De.x,De.y,vn.x,vn.y,Fi.x,Fi.y)}break;case"S":for(;!x();)De=re(),vn=te(),Fi=z(),Hh(a,De.x,De.y,vn.x,vn.y,Fi.x,Fi.y);break;case"Q":for(;!x();)De=te(),vn=z(),u0(a,De.x,De.y,vn.x,vn.y);break;case"T":for(;!x();)Ct=De=re(),vn=z(),u0(a,De.x,De.y,vn.x,vn.y);break;case"B":for(;!x();){De=parseFloat(b()),vn=parseFloat(b()),Fi=parseFloat(b());var Yi=parseFloat(b()),Hi=parseFloat(b()),mi=Hi,ni=!1;x()||(mi=parseFloat(b()),x()||(ni=parseFloat(b())!==0)),ct===ct.toLowerCase()&&(Fi+=Lt.x,Yi+=Lt.y),a.arcTo(De,vn,Fi,Yi,Hi,mi,ni)}break;case"A":for(;!x();)De=Math.abs(parseFloat(b())),vn=Math.abs(parseFloat(b())),Fi=parseFloat(b()),Hi=Yi=!1,ni=mi=0,mi=b(),mi.length===1?(Yi=!!parseFloat(mi),Hi=!!parseFloat(b()),mi=parseFloat(b())):mi.length===2?(Yi=!!parseFloat(mi[0]),Hi=!!parseFloat(mi[1]),mi=parseFloat(b())):(Yi=!!parseFloat(mi[0]),Hi=!!parseFloat(mi[1]),mi=parseFloat(mi.slice(2))),ni=parseFloat(b()),ct===ct.toLowerCase()&&(mi=Lt.x+mi,ni=Lt.y+ni),Lt.h(mi,ni),wx(a,De,vn,Fi,Yi,Hi,mi,ni);break;case"Z":Px(a),Lt.assign(oe);break;case"F":for(De="",vn=1;le[je+vn];)if(le[je+vn]==="0")we=!0,vn++;else if(le[je+vn].match(/[Uu]/)!==null)vn++;else if(le[je+vn].match(Jt)===null)vn++;else{De=le[je+vn];break}De.match(/[Mm]/)?ue=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(De="",vn=1;le[je+vn];)if(le[je+vn].match(/[Ff]/)!==null)vn++;else if(le[je+vn].match(Jt)===null)vn++;else{De=le[je+vn];break}De.match(/[Mm]/)?me=!0:a.mc.isShadowed=!1}if(oe=a.os,c0=a,y)for(y=oe.figures.iterator;y.next();)y.value.isFilled=!0;return oe},xi.Ha=function(a,y){for(var x=a.length,b=Qe.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}Qe.free(b)},xi.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===xi.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},xi.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===xi.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 te=b[z];te._isInvalidBounds=!1,te.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),Lh(this,a,!1),cr(a,0,0,0,0),a.freeze()},xi.prototype.ix=function(){var a=new _t;return Lh(this,a,!0),a};function Lh(a,y,x){switch(a.type){case xi.j:case xi.u:case xi.F:x?y.h(a.od,a.pd,0,0):cr(y,a.od,a.pd,0,0),cr(y,a.Dc,a.Ec,0,0);break;case xi.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):cr(y,z.startX,z.startY,0,0);for(var te=z.segments.s,re=te.length,oe=z.startX,le=z.startY,ue=0;ue<re;ue++){var me=te[ue];switch(me.type){case ra:case _a:oe=me.endX,le=me.endY,cr(y,oe,le,0,0);break;case Hs:en.Dl(oe,le,me.point1X,me.point1Y,me.point2X,me.point2Y,me.endX,me.endY,.5,y),oe=me.endX,le=me.endY;break;case Xl:en.iv(oe,le,me.point1X,me.point1Y,me.endX,me.endY,.5,y),oe=me.endX,le=me.endY;break;case Ja:case du:var we=me.type===Ja?yl(me,z):ul(me,z,oe,le),Ee=we.length;if(Ee===0){oe=me.type===Ja?me.centerX:me.endX,le=me.type===Ja?me.centerY:me.endY,cr(y,oe,le,0,0);break}me=null;for(var De=0;De<Ee;De++)me=we[De],en.Dl(me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],.5,y);me!==null&&(oe=me[6],le=me[7]);break;default:St("Unknown Segment type: "+me.type)}}}break;default:St("Unknown Geometry type: "+a.type)}}xi.prototype.normalize=function(){this._isFrozen&&An(this);var a=this.ix();return this.offset(-a.x,-a.y),new Qe(-a.x,-a.y)},xi.prototype.offset=function(a,y){return this._isFrozen&&An(this),this.transform(1,0,0,1,a,y),this},xi.prototype.scale=function(a,y){return this._isFrozen&&An(this),this.transform(a,0,0,y,0,0),this},xi.prototype.rotate=function(a,y,x){this._isFrozen&&An(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=ro.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),ro.free(b),this},Le=xi.prototype,Le.transform=function(a,y,x,b,E,z){switch(this.type){case xi.j:case xi.u:case xi.F:var te=this.od,re=this.pd;this.od=te*a+re*x+E,this.pd=te*y+re*b+z,te=this.Dc,re=this.Ec,this.Dc=te*a+re*x+E,this.Ec=te*y+re*b+z;break;case xi.o:for(var oe=this.figures.s,le=oe.length,ue=0;ue<le;ue++){var me=oe[ue];te=me.startX,re=me.startY,me.startX=te*a+re*x+E,me.startY=te*y+re*b+z,me=me.segments.s;for(var we=me.length,Ee=0;Ee<we;Ee++){var De=me[Ee];switch(De.type){case ra:case _a:te=De.endX,re=De.endY,De.endX=te*a+re*x+E,De.endY=te*y+re*b+z;break;case Hs:te=De.point1X,re=De.point1Y,De.point1X=te*a+re*x+E,De.point1Y=te*y+re*b+z,te=De.point2X,re=De.point2Y,De.point2X=te*a+re*x+E,De.point2Y=te*y+re*b+z,te=De.endX,re=De.endY,De.endX=te*a+re*x+E,De.endY=te*y+re*b+z;break;case Xl:te=De.point1X,re=De.point1Y,De.point1X=te*a+re*x+E,De.point1Y=te*y+re*b+z,te=De.endX,re=De.endY,De.endX=te*a+re*x+E,De.endY=te*y+re*b+z;break;case Ja:te=De.centerX,re=De.centerY,De.centerX=te*a+re*x+E,De.centerY=te*y+re*b+z,y!==0&&(te=180*Math.atan2(y,a)/Math.PI,0>te&&(te+=360),De.startAngle+=te),0>a&&(De.startAngle=180-De.startAngle,De.sweepAngle=-De.sweepAngle),0>b&&(De.startAngle=-De.startAngle,De.sweepAngle=-De.sweepAngle),De.radiusX*=Math.sqrt(a*a+x*x),De.radiusY!==void 0&&(De.radiusY*=Math.sqrt(y*y+b*b));break;case du:if(te=De.endX,re=De.endY,De.endX=te*a+re*x+E,De.endY=te*y+re*b+z,De.radiusX===0||De.radiusY===0)break;y!==0&&(te=180*Math.atan2(y,a)/Math.PI,0>te&&(te+=360),De.xAxisRotation+=te),0>a&&(De.xAxisRotation=180-De.xAxisRotation,De.isClockwiseArc=!De.isClockwiseArc),0>b&&(De.xAxisRotation=-De.xAxisRotation,De.isClockwiseArc=!De.isClockwiseArc),De.radiusX*=Math.sqrt(a*a+x*x),De.radiusY*=Math.sqrt(y*y+b*b);break;default:St("Unknown Segment type: "+De.type)}}}}return this._isInvalidBounds=!0,this},Le.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 xi.j:return en.Yb(x,b,E,z,y,a.x,a.y);case xi.u:var te=_t.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=te.ca(a),_t.free(te),a;case xi.F:te=Math.min(x,E)-y;var re=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:(te=a.x-(te+x),re=a.y-(re+y),1>=te*te/(x*x)+re*re/(y*y));case xi.o:return ac(this,a,y,!0,!1);default:return!1}};function ac(a,y,x,b,E){var z=y.x;y=y.y;for(var te=a.bounds.x-20,re=0,oe,le,ue,me,we=a.figures.s,Ee=we.length,De=0;De<Ee;De++){var je=we[De],ct=!je.isEvenOdd;if(je.isFilled){if(b&&je.ca(z,y,x))return!0;var qe=je.segments;oe=je.startX,le=je.startY;for(var Ct=oe,Lt=le,Rt=qe.s,Jt=0;Jt<=qe.length;Jt++){var vn=void 0;if(Jt!==qe.length){vn=Rt[Jt];var Fi=vn.type;a=vn.endX,me=vn.endY}else Fi=ra,a=Ct,me=Lt;switch(Fi){case _a:if(Ct=cu(z,y,te,y,oe,le,Ct,Lt),isNaN(Ct))return!0;re+=Ct,Ct=a,Lt=me;break;case ra:if(oe=cu(z,y,te,y,oe,le,a,me),isNaN(oe))return!0;re+=oe;break;case Hs:ue=en.Fo(oe,le,vn.point1X,vn.point1Y,vn.point2X,vn.point2Y,a,me,te,y,z,y,.5),re+=ue;break;case Xl:ue=en.Fo(oe,le,(oe+2*vn.point1X)/3,(le+2*vn.point1Y)/3,(2*vn.point1X+a)/3,(2*vn.point1Y+me)/3,a,me,te,y,z,y,.5),re+=ue;break;case Ja:case du:Fi=vn.type===Ja?yl(vn,je):ul(vn,je,oe,le);var Yi=Fi.length;if(Yi===0){if(oe=cu(z,y,te,y,oe,le,vn.type===Ja?vn.centerX:vn.endX,vn.type===Ja?vn.centerY:vn.endY),isNaN(oe))return!0;re+=oe;break}vn=null;for(var Hi=0;Hi<Yi;Hi++){if(vn=Fi[Hi],Hi===0){if(ue=cu(z,y,te,y,oe,le,vn[0],vn[1]),isNaN(ue))return!0;re+=ue}ue=en.Fo(vn[0],vn[1],vn[2],vn[3],vn[4],vn[5],vn[6],vn[7],te,y,z,y,.5),re+=ue}vn!==null&&(a=vn[6],me=vn[7]);break;default:St("Unknown Segment type: "+vn.type)}oe=a,le=me}if(ct){if(re!==0)return!0}else if(re%2!==0)return!0;re=0}else if(je.ca(z,y,E?x:x+2))return!0}return!1}function cu(a,y,x,b,E,z,te,re){if(en.Yb(E,z,te,re,.05,a,y))return NaN;var oe=(a-x)*(z-re);if(oe===0)return 0;var le=((a*b-y*x)*(E-te)-(a-x)*(E*re-z*te))/oe;if(y=(a*b-y*x)*(z-re)/oe,le>=a)return 0;if((E>te?E-te:te-E)<(z>re?z-re:re-z)){if(z<re){if(y<z||y>re)return 0}else if(y<re||y>z)return 0}else if(E<te){if(le<E||le>te)return 0}else if(le<te||le>E)return 0;return 0<oe?1:-1}function Mu(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}Le.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Qe),this.type===xi.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,te=0,re=0;re<E;re++){var oe=b[re],le=oe.length;for(a=0;a<le;a++){var ue=oe[a];if(te+ue>=z)return b=z-te,b=ue===0?0:b/ue,x=x[re],re=x[2*a],E=x[2*a+1],y.h(re+(x[2*a+2]-re)*b,E+(x[2*a+3]-E)*b),y;te+=ue}}return y},Le.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===xi.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,te=0;te<b;te++){var re=x[te],oe=re.length;for(a=0;a<oe;a++){var le=re[a];if(z+le>=E)return E=y[te],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+=le}}return NaN},Le.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===xi.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,te=0,re=0;re<E;re++){var oe=b[re],le=oe.length;for(a=0;a<le;a++){var ue=oe[a];if(te+ue>=z)return b=z-te,b=ue===0?0:b/ue,ue=x[re],x=ue[2*a],re=ue[2*a+1],E=ue[2*a+2],a=ue[2*a+3],y[0]=x+(E-x)*b,y[1]=re+(a-re)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-re)?0:1>Math.abs(E-x)?0<=a-re?90:270:1>Math.abs(a-re)?0<=E-x?0:180:180*Math.atan2(a-re,E-x)/Math.PI,y;te+=ue}}return y},Le.xx=function(a){if(this.type===xi.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 te=x;b=E}else te=E,b=x;return a<=te?te===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-te)}if(x===E)return y<b?te=y:(te=b,b=y),z<=te?te===y?0:1:z>=b?b===y?0:1:Math.abs(z-y)/(b-te);te=(b-y)*(b-y)+(E-x)*(E-x);var re=Qe.alloc();return en.qh(y,x,b,E,z,a,re),a=re.x,z=re.y,Qe.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/te)}}else if(this.type===xi.u){te=this.startX,re=this.startY;var oe=this.endX;if(E=this.endY,te!==oe||re!==E){y=oe-te,x=E-re,z=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,te),oe),a=Math.min(Math.max(a,re),E),te=Math.abs(b-te),oe=Math.abs(b-oe),re=Math.abs(a-re),E=Math.abs(a-E);var le=Math.min(te,oe,re,E);if(le===re)return b/z;if(le===oe)return(y+a)/z;if(le===E)return(2*y+x-b)/z;if(le===te)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,b=Qe.alloc(),E=1/0,re=te=0,oe=y.length;for(var ue=le=0,me=0;me<oe;me++)for(var we=y[me],Ee=x[me],De=we.length,je=0;je<De;je+=2){var ct=we[je],qe=we[je+1];if(je!==0){en.qh(le,ue,ct,qe,a.x,a.y,b);var Ct=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Ct<E&&(E=Ct,te=re,te+=Math.sqrt((b.x-le)*(b.x-le)+(b.y-ue)*(b.y-ue))),re+=Ee[(je-2)/2]}le=ct,ue=qe}return Qe.free(b),a=te/z,0>a?0:1<a?1:a}return 0};function Nh(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===xi.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===xi.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===xi.F){var z=new ys;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var te=new To(Ja);if(te.startAngle=0,te.sweepAngle=360,te.centerX=(a.startX+a.endX)/2,te.centerY=(a.startY+a.endY)/2,te.radiusX=Math.abs(a.startX-a.endX)/2,te.radiusY=Math.abs(a.startY-a.endY)/2,z.add(te),a=yl(te,z),E=a.length,E===0)b.push(te.centerX),b.push(te.centerY);else{te=z.startX,z=z.startY;for(var re=0;re<E;re++){var oe=a[re];en.Qe(te,z,oe[2],oe[3],oe[4],oe[5],oe[6],oe[7],.5,b),te=oe[6],z=oe[7]}}y.push(b),x.push(Pd(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),te=E.startX,z=E.startY,re=te,oe=z;for(var le=E.segments.s,ue=le.length,me=0;me<ue;me++){var we=le[me];switch(we.type){case _a:4<=b.length&&(y.push(b),x.push(Pd(b))),b=[],b.push(we.endX),b.push(we.endY),te=we.endX,z=we.endY,re=te,oe=z;break;case ra:b.push(we.endX),b.push(we.endY),te=we.endX,z=we.endY;break;case Hs:en.Qe(te,z,we.point1X,we.point1Y,we.point2X,we.point2Y,we.endX,we.endY,.5,b),te=we.endX,z=we.endY;break;case Xl:en.ep(te,z,we.point1X,we.point1Y,we.endX,we.endY,.5,b),te=we.endX,z=we.endY;break;case Ja:var Ee=yl(we,E),De=Ee.length;if(De===0){b.push(we.centerX),b.push(we.centerY),te=we.centerX,z=we.centerY;break}for(var je=0;je<De;je++){var ct=Ee[je];en.Qe(te,z,ct[2],ct[3],ct[4],ct[5],ct[6],ct[7],.5,b),te=ct[6],z=ct[7]}break;case du:if(Ee=ul(we,E,te,z),De=Ee.length,je=we.endX,ct=we.endY,De===0){b.push(je),b.push(ct),te=je,z=ct;break}for(je=0;je<De;je++)ct=Ee[je],en.Qe(te,z,ct[2],ct[3],ct[4],ct[5],ct[6],ct[7],.5,b),te=ct[6],z=ct[7];break;default:St("Segment not of valid type: "+we.type)}we.isClosed&&(b.push(re),b.push(oe))}4<=b.length&&(y.push(b),x.push(Pd(b)))}}}function Pd(a){for(var y=[],x=0,b=0,E=a.length,z=0;z<E;z+=2){var te=a[z],re=a[z+1];z!==0&&y.push(Math.sqrt(Ro(x,b,te,re))),x=te,b=re}return y}Le.add=function(a){return this.ee.add(a),this},Le.pm=function(a,y,x,b,E,z,te,re){return this._isFrozen&&An(this),this.fg=new Ui(a,y,E,z).freeze(),this.gg=new Ui(x,b,te,re).freeze(),this},Ye.Object.defineProperties(xi.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 Nh(this),this.tk}},flattenedLengths:{get:function(){return Nh(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===xi.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===xi.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,te=0;te<z;te++)a+=E[te]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&An(this,a),this.na=a,a===xi.o?this.ee=new Rn:(xi.V===null&&(xi.V=new Rn().freeze()),this.ee=xi.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&An(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&An(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&An(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&An(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&An(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&An(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&An(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&An(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),xi.prototype.setSpots=xi.prototype.pm,xi.prototype.add=xi.prototype.add,xi.prototype.getFractionForPoint=xi.prototype.xx,xi.prototype.getPointAndAngleAlongPath=xi.prototype.Qu,xi.prototype.getAngleAlongPath=xi.prototype.wx,xi.prototype.getPointAlongPath=xi.prototype.Pu,xi.prototype.containsPoint=xi.prototype.ca,xi.prototype.transform=xi.prototype.transform,xi.prototype.rotate=xi.prototype.rotate,xi.prototype.scale=xi.prototype.scale,xi.prototype.offset=xi.prototype.offset,xi.prototype.normalize=xi.prototype.normalize,xi.prototype.computeBoundsWithoutOrigin=xi.prototype.ix,xi.prototype.equalsApprox=xi.prototype.Xa,xi.className="Geometry",xi.j=new gn(xi,"Line",0),xi.u=new gn(xi,"Rectangle",1),xi.F=new gn(xi,"Ellipse",2),xi.o=new gn(xi,"Path",3),xi.V=null,xi.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",xi.className="Geometry",xi.stringify=xi.ia,xi.fillPath=xi.nb,xi.parse=xi.parse,xi.Line=xi.j,xi.Rectangle=xi.u,xi.Ellipse=xi.F,xi.Path=xi.o;function ys(a,y,x,b,E){Or(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 Rn,this.sr=this.pl.Ja,this.fw=null}ys.prototype.copy=function(){var a=new ys;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},Le=ys.prototype,Le.Xa=function(a){if(!(a instanceof ys&&en.B(this.startX,a.startX)&&en.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},Le.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},Le.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},Le.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Le.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},Le.add=function(a){return this.pl.add(a),this},Le.ca=function(a,y,x){for(var b=this.startX,E=this.startY,z=b,te=E,re=this.segments.s,oe=re.length,le=0;le<oe;le++){var ue=re[le];switch(ue.type){case _a:z=ue.endX,te=ue.endY,b=ue.endX,E=ue.endY;break;case ra:if(en.Yb(b,E,ue.endX,ue.endY,x,a,y))return!0;b=ue.endX,E=ue.endY;break;case Hs:if(en.cs(b,E,ue.point1X,ue.point1Y,ue.point2X,ue.point2Y,ue.endX,ue.endY,.5,a,y,x))return!0;b=ue.endX,E=ue.endY;break;case Xl:if(en.jv(b,E,ue.point1X,ue.point1Y,ue.endX,ue.endY,.5,a,y,x))return!0;b=ue.endX,E=ue.endY;break;case Ja:case du:var me=ue.type===Ja?yl(ue,this):ul(ue,this,b,E),we=me.length,Ee=ue.type===Ja?ue.centerX:ue.endX,De=ue.type===Ja?ue.centerY:ue.endY;if(we===0){if(en.Yb(b,E,Ee,De,x,a,y))return!0;b=Ee,E=De;break}for(Ee=null,De=0;De<we;De++)if(Ee=me[De],De===0&&en.Yb(b,E,Ee[0],Ee[1],x,a,y)||en.cs(Ee[0],Ee[1],Ee[2],Ee[3],Ee[4],Ee[5],Ee[6],Ee[7],.5,a,y,x))return!0;Ee!==null&&(b=Ee[6],E=Ee[7]);break;default:St("Unknown Segment type: "+ue.type)}if(ue.isClosed&&(b!==z||E!==te)&&en.Yb(b,E,z,te,x,a,y))return!0}return!1},Ye.Object.defineProperties(ys.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&An(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&An(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&An(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&An(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&An(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&An(this,a),this.pl=a,this._isInvalidBounds=!0}}}),ys.prototype.add=ys.prototype.add,ys.prototype.equalsApprox=ys.prototype.Xa,ys.className="PathFigure";function To(a,y,x,b,E,z,te,re){Or(this),a===void 0&&(a=ra),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),te===void 0&&(te=0),a===du?(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 te=="boolean"?te&&(this.isLargeArc=!0):typeof te=="number"&&te&&(this.isLargeArc=!0),re&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===Ja&&(z=Math.max(z,0)),this.Wh=z,typeof te=="number"?(a===Ja&&(te=Math.max(te,0)),this.Pg=te):this.Pg=0),this.ae=null}To.prototype.copy=function(){var a=new To;return a.na=this.na,a.l=this.l&-2,a.Dc=this.Dc,a.Ec=this.Ec,a.Ne=this.Ne,a.Vh=this.Vh,a.Wh=this.Wh,a.Pg=this.Pg,a},Le=To.prototype,Le.Xa=function(a){if(!(a instanceof To)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case _a:case ra:return en.B(this.endX,a.endX)&&en.B(this.endY,a.endY);case Hs:return en.B(this.endX,a.endX)&&en.B(this.endY,a.endY)&&en.B(this.point1X,a.point1X)&&en.B(this.point1Y,a.point1Y)&&en.B(this.point2X,a.point2X)&&en.B(this.point2Y,a.point2Y);case Xl:return en.B(this.endX,a.endX)&&en.B(this.endY,a.endY)&&en.B(this.point1X,a.point1X)&&en.B(this.point1Y,a.point1Y);case Ja:return en.B(this.startAngle,a.startAngle)&&en.B(this.sweepAngle,a.sweepAngle)&&en.B(this.centerX,a.centerX)&&en.B(this.centerY,a.centerY)&&en.B(this.radiusX,a.radiusX)&&en.B(this.radiusY,a.radiusY);case du:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&en.B(this.xAxisRotation,a.xAxisRotation)&&en.B(this.endX,a.endX)&&en.B(this.endY,a.endY)&&en.B(this.radiusX,a.radiusX)&&en.B(this.radiusY,a.radiusY);default:return!1}},Le.qb=function(a){a.classType===To&&(this.type=a)},Le.toString=function(a){switch(a===void 0&&(a=-1),this.type){case _a:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ra:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Hs: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 Xl: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 Ja: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 du:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.close=function(){return this.isClosed=!0,this};function yl(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=en.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var te=ro.alloc();te.reset(),x<b?te.scale(1,b/x):te.scale(x/b,1),xi.Ha(z,te),ro.free(te)}for(x=z.length,b=0;b<x;b++)te=z[b],te[0]+=y,te[1]+=E,te[2]+=y,te[3]+=E,te[4]+=y,te[5]+=E,te[6]+=y,te[7]+=E;return a.ae=z,a.ae}function ul(a,y,x,b){function E(je,ct,qe,Ct){return(je*Ct<ct*qe?-1:1)*Math.acos((je*qe+ct*Ct)/(Math.sqrt(je*je+ct*ct)*Math.sqrt(qe*qe+Ct*Ct)))}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 te=Math.PI/180*a.Ne,re=a.isLargeArc,oe=a.isClockwiseArc,le=a.Dc,ue=a.Ec,me=Math.cos(te),we=Math.sin(te),Ee=me*(x-le)/2+we*(b-ue)/2;te=-we*(x-le)/2+me*(b-ue)/2;var De=Ee*Ee/(y*y)+te*te/(z*z);return 1<De&&(y*=Math.sqrt(De),z*=Math.sqrt(De)),De=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*te*te-z*z*Ee*Ee)/(y*y*te*te+z*z*Ee*Ee)),isNaN(De)&&(De=0),re=De*y*te/z,De=De*-z*Ee/y,isNaN(re)&&(re=0),isNaN(De)&&(De=0),x=(x+le)/2+me*re-we*De,b=(b+ue)/2+we*re+me*De,ue=E(1,0,(Ee-re)/y,(te-De)/z),me=(Ee-re)/y,le=(te-De)/z,Ee=(-Ee-re)/y,re=(-te-De)/z,te=E(me,le,Ee,re),Ee=(me*Ee+le*re)/(Math.sqrt(me*me+le*le)*Math.sqrt(Ee*Ee+re*re)),-1>=Ee?te=Math.PI:1<=Ee&&(te=0),!oe&&0<te&&(te-=2*Math.PI),oe&&0>te&&(te+=2*Math.PI),oe=y>z?1:y/z,Ee=y>z?z/y:1,y=en.jx(0,0,y>z?y:z,ue,ue+te,!0),z=ro.alloc(),z.reset(),z.translate(x,b),z.rotate(a.Ne,0,0),z.scale(oe,Ee),xi.Ha(y,z),ro.free(z),a.ae=y,a.ae}Ye.Object.defineProperties(To.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return(this.l&8)!==0},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{get:function(){return this.na},set:function(a){this._isFrozen&&An(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&An(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&An(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&An(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&An(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&An(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&An(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&An(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&An(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&qn(a,">= zero",To,"radiusX"),this._isFrozen&&An(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&qn(a,">= zero",To,"radiusY"),this._isFrozen&&An(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&An(this,a),a%=360,0>a&&(a+=360),this.Dc=a,this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&An(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&An(this,a),this.l=a?this.l|4:this.l&-5,this._isInvalidBounds=!0}},isLargeArc:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&An(this,a),this.l=a?this.l|16:this.l&-17,this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&An(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),To.prototype.equalsApprox=To.prototype.Xa;var _a=new gn(To,"Move",0),ra=new gn(To,"Line",1),Hs=new gn(To,"Bezier",2),Xl=new gn(To,"QuadraticBezier",3),Ja=new gn(To,"Arc",4),du=new gn(To,"SvgArc",4);To.className="PathSegment",To.Move=_a,To.Line=ra,To.Bezier=Hs,To.QuadraticBezier=Xl,To.Arc=Ja,To.SvgArc=du;function nl(){this.H=null,this.xu=new Qe(0,0).freeze(),this.mt=new Qe(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}nl.prototype.copy=function(){var a=new nl;return this.clone(a)},nl.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},nl.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},nl.prototype.So=function(a,y){var x=this.diagram;return x===null||nh(x,a,y),y},nl.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(nh(x,a,y),y.assign(x.Ps(y))),y},Ye.Object.defineProperties(nl.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}}}),nl.prototype.getMultiTouchDocumentPoint=nl.prototype.Bz,nl.prototype.getMultiTouchViewPoint=nl.prototype.So,nl.className="InputEvent";function od(){this.H=null,this.xa="",this.ar=this.Lr=null}od.prototype.copy=function(){var a=new od;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},od.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ye.Object.defineProperties(od.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}}}),od.className="DiagramEvent";function Pa(){this.Fm=wa,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Pa.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Pa.prototype.copy=function(){var a=new Pa;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=rn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=rn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=rn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=rn(y)&&typeof y.J=="function"?y.J():y,a},Pa.prototype.qb=function(a){a.classType===Pa&&(this.change=a)},Pa.prototype.toString=function(){var a="";return a=this.change===Ll?a+"* ":this.change===wa?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===Ll?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},Pa.prototype.I=function(a){return a?this.oldValue:this.newValue},Pa.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Pa.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Pa.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Pa.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Pa.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ye.Object.defineProperties(Pa.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===Ll&&(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}}}),Pa.prototype.redo=Pa.prototype.redo,Pa.prototype.canRedo=Pa.prototype.canRedo,Pa.prototype.undo=Pa.prototype.undo,Pa.prototype.canUndo=Pa.prototype.canUndo,Pa.prototype.getParam=Pa.prototype.Dz,Pa.prototype.getValue=Pa.prototype.I,Pa.prototype.clear=Pa.prototype.clear;var Ll=new gn(Pa,"Transaction",-1),wa=new gn(Pa,"Property",0),Va=new gn(Pa,"Insert",1),cs=new gn(Pa,"Remove",2);Pa.className="ChangedEvent",Pa.Transaction=Ll,Pa.Property=wa,Pa.Insert=Va,Pa.Remove=cs;function Ps(){this.o=new Rn().freeze(),this.xa="",this.j=!1}Ps.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},Ps.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()},Ps.prototype.canUndo=function(){return this.isComplete},Ps.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()}},Ps.prototype.canRedo=function(){return this.isComplete},Ps.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()}},Ps.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Ii,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===wa&&b.object){var E=y.get(b.object);E||(E=new Ii,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()}},Ye.Object.defineProperties(Ps.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}}}),Ps.prototype.optimize=Ps.prototype.ak,Ps.prototype.redo=Ps.prototype.redo,Ps.prototype.canRedo=Ps.prototype.canRedo,Ps.prototype.undo=Ps.prototype.undo,Ps.prototype.canUndo=Ps.prototype.canUndo,Ps.prototype.clear=Ps.prototype.clear,Ps.className="Transaction";function Na(){this.Pt=new _n,this.Jd=!1,this.u=new Rn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Rn().freeze(),this.hl=new Rn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Na.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},Na.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},Na.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Le=Na.prototype,Le.Xw=function(a){this.Pt.add(a)},Le.Rx=function(a){this.Pt.remove(a)},Le.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},Le.eb=function(a){return a===void 0&&(a=""),ad(this,!0,a)},Le.Kf=function(){return ad(this,!1,"")};function ad(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Si("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var te=a.Ie.count;0<te&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(te-1),a.Ie.freeze()),te=a.hl.count,0<te&&(z=a.hl.M(te-1),a.hl.mb(te-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}Le.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},Na.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Na.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){Si("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Na.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Na.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){Si("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Na.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Pa;for(b.change=Ll,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Na.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Ps);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Si("Change not within a transaction: "+x.toString()))}},Na.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},Ye.Object.defineProperties(Na.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}}}),Na.prototype.handleChanged=Na.prototype.Tu,Na.prototype.redo=Na.prototype.redo,Na.prototype.undo=Na.prototype.undo,Na.prototype.canUndo=Na.prototype.canUndo,Na.prototype.discardHistoryAfterIndex=Na.prototype.lx,Na.prototype.rollbackTransaction=Na.prototype.Kf,Na.prototype.commitTransaction=Na.prototype.eb,Na.prototype.startTransaction=Na.prototype.Ea,Na.prototype.removeModel=Na.prototype.Rx,Na.prototype.addModel=Na.prototype.Xw,Na.prototype.clear=Na.prototype.clear,Na.className="UndoManager";function Do(){Or(this),this.H=Xu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new nl,this.Zr=-1}Do.prototype.toString=function(){return this.name!==""?this.name+" Tool":Zn(this.constructor)},Do.prototype.updateAdornments=function(){},Do.prototype.canStart=function(){return this.isEnabled},Do.prototype.doStart=function(){},Do.prototype.doActivate=function(){this.isActive=!0},Do.prototype.doDeactivate=function(){this.isActive=!1},Do.prototype.doStop=function(){},Do.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Do.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Do.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Do.prototype.doMouseMove=function(){},Do.prototype.doMouseUp=function(){this.stopTool()},Do.prototype.doMouseWheel=function(){},Do.prototype.canStartMultiTouch=function(){return!0},Do.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Qe.allocAt(NaN,NaN)),b=y.So(1,Qe.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}Qe.free(x),Qe.free(b)},Do.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Qe.allocAt(NaN,NaN)),b=y.So(1,Qe.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 Qe((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 te=a.commandHandler;if(z!==a.scale&&te.canResetZoom(z)){var re=a.zoomPoint;a.zoomPoint=E,te.resetZoom(z),a.zoomPoint=re}y.bubbles=!1}Qe.free(x),Qe.free(b)},Do.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Do.prototype.doKeyUp=function(){},Do.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Do.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Do.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Ki?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||(Ki?y.meta:y.control)||y.shift||a.clearSelection()}},Do.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,Rf(a,b,x),b.handled};function Rf(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)}}}Do.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,te=z;for(a.Ck=b,this.doCurrentObjectChanged(z,b),y.handled=!1;z!==null;){var re=z.mouseLeave;if(re!==null&&(b===z||b!==null&&b.rg(z)||(re(y,z,b),E=!0,y.handled)))break;z=z.panel}for(z=te,y.handled=!1;b!==null&&(te=b.mouseEnter,!(te!==null&&(z===b||z!==null&&z.rg(b)||(te(y,b,z),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(z=b,te="";z!==null&&(te=z.cursor,te==="");)z=z.panel;for(a.currentCursor=te,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}},Do.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Do.prototype.doCurrentObjectChanged=function(){},Do.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===sd&&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===sd&&!y.control){b=a.position.copy();var z=y.event;E=z.deltaMode;var te=z.deltaX;z=z.deltaY;var re="pixel";if(te===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(re,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(re,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:re="pixel";break;case 1:re="line";break;case 2:re="page"}te!==0&&a.allowHorizontalScroll&&(te*=a.scrollHorizontalLineChange/16,a.scroll(re,0<te?"right":"left",Math.abs(te))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(re,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,b,y)}}},Do.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Do.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=kn(function(){x.doWaitAfter(b)},a)},Do.prototype.cancelWaitAfter=function(){this.Zr!==-1&&at.clearTimeout(this.Zr),this.Zr=-1},Do.prototype.doWaitAfter=function(){},Do.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof jo);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Do.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},Ye.Object.defineProperties(Do.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof mn&&(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}}}),Do.prototype.startTransaction=Do.prototype.Ea,Do.className="Tool";function fa(){Do.call(this),this.name="ToolManager",this.hb=new Rn,this.ob=new Rn,this.Hb=new Rn,this.F=this.V=850,this.o=new pi(2,2).ja(),this.Ha=5e3,this.ia=sd,this.u=Xd,this.Mp=this.j=null,this.zj=-1}Kt(fa,Do),fa.prototype.initializeStandardTools=function(){},fa.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof jo&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},fa.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===ld&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===ud){y.bubbles=!0;return}if(this.gestureBehavior===ld)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===sd?this.mouseWheelBehavior=wd:this.mouseWheelBehavior===wd&&(this.mouseWheelBehavior=sd)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},fa.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===ud){y.bubbles=!0;return}if(this.gestureBehavior===ld)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}}jf(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function jf(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}fa.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof jo&&(y===a||y.rg(a))||this.hideToolTip()},fa.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()))},fa.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)},fa.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 jo)||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()},fa.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof jo){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 oo&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(at.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=kn(function(){E.hideToolTip()},a)}},fa.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}},fa.prototype.hideToolTip=function(){this.zj!==-1&&(at.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof jo?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof oo&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},fa.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()},fa.prototype.doMouseWheel=function(){this.standardMouseWheel()},fa.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},fa.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},fa.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},fa.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},fa.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)},Ye.Object.defineProperties(fa.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 jo?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}}}),fa.prototype.replaceStandardTool=fa.prototype.gb;var sd=new gn(fa,"WheelScroll",0),wd=new gn(fa,"WheelZoom",1),zf=new gn(fa,"WheelNone",2),Xd=new gn(fa,"GestureZoom",3),ld=new gn(fa,"GestureCancel",4),ud=new gn(fa,"GestureNone",5);fa.className="ToolManager",fa.WheelScroll=sd,fa.WheelZoom=wd,fa.WheelNone=zf,fa.GestureZoom=Xd,fa.GestureCancel=ld,fa.GestureNone=ud;function Fa(){Do.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 Qe(NaN,NaN),this.Fr=new Qe,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new _n().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var sc;Kt(Fa,Do),Fa.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},Fa.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},Fa.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,(Ki?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Fa.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),dn=null,this.isActive=!0,this.tl.set(a.position),Yd(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&&Gs(a),$f(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,dn=this,Hn=this.diagram,this.doSimulatedDragOut()))};function Yd(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof vi?(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 ir,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Fa.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Fa.prototype.Pd=function(a){return a===void 0?new Zc(Qr):this.isGridSnapEnabled?new Zc(new Qe(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Zc(a.copy())},Fa.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),_u(this),Ad(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<sc.count){for(var y=sc,x=y.length,b=0;b<x;b++){var E=y.M(b);xc(E),Il(E),_u(E),E.diagram.ug()}y.clear()}xc(this),this.tl.h(NaN,NaN),Hn!==null&&(Hn.currentCursor=""),dn=Hn=null,Il(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Qd(a,!0)},Fa.prototype.stopTransaction=function(){var a=this.diagram,y=Do.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function _u(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,of(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Fh(){var a=dn;Il(a),lc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Fa.prototype.doCancel=function(){Il(this),lc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Fa.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Fa.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function kl(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):lc(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 Ii,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 vi&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,Yd(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Gh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Il(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 vi&&(x.value.point=new Qe(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function xc(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 Lu(a,y,x){var b=a.diagram,E=a.startPoint,z=Qe.alloc();z.assign(b.lastInput.documentPoint),a.moveParts(y,z.re(E),x),Qe.free(z),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Gs(b),b.hk())}Fa.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Cc(b,a,y,this.dragOptions,x)};function lc(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 vi&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Gh(b,-E.x,-E.y)}y.bd()}}function Jd(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Ol(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var z=x.skipsUndoManager,te=!1;try{if(x.skipsUndoManager=!0,te=of(a,E,b),!a.isActive&&dn===null)return;var re=b!==null?b.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof Yr)){var oe=x.mouseDragOver;oe!==null&&(oe(E),te=!0)}if(!a.isActive&&dn===null||(a.doDragOver(y,b),!a.isActive&&dn===null))return}finally{x.skipsUndoManager=z,te&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}Fa.prototype.findDragOverObject=function(a){var y=this;return Yu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof jo||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Fa.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 of(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 te=0;te<E;te++){var re=a.Cg[te],oe=re.mouseDragLeave;if(oe!==null&&(oe(y,re,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&dn===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=Ah(E);for(E=a.Cg.length,x=0;x<E&&(te=a.Cg[x],re=te.mouseDragEnter,re===null||(re(y,te,z),b=!0,!y.handled));x++);return b}function Ah(a){var y=a.panel;return y!==null?y:a instanceof mr&&!(a instanceof Yr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Hf(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(le){return b.findValidLinkablePort(le,x)});a=Qe.alloc();var z=1/0,te=null;for(E=E.iterator;E.next();){var re=E.value;if(re.part!==null){var oe=re.ga(wo,a);oe=y.Bf(oe),oe<z&&(te=re,z=oe)}}return Qe.free(a),te}function Ol(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,te=null;x.fromNode===null&&(z=Hf(a,x.i(0),!1),z!==null&&(te=z.part));var re=null,oe=null;x.toNode===null&&(re=Hf(a,x.i(x.pointsCount-1),!0),re!==null&&(oe=re.part)),E.isValidLink(te,z,oe,re)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=te,z!==null&&(x.fromPortId=z.portId),x.toNode=oe,re!==null&&(x.toPortId=re.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):Wr(E,te,z,oe,re):Wr(E,null,null,null,null)}}}}Fa.prototype.doDragOver=function(){};function Oc(a,y){var x=a.diagram;a.dragsLink&&Ol(a,!0),_u(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 te=z.mouseDrop;if(te!==null&&(te(E,z),E.handled))break;dg(a,E,z),z=Ah(z)}}else z=x.mouseDrop,z!==null&&z(E);if(a.isActive||dn!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)z=E.key,z instanceof Di&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||dn!==null){for(a=_t.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Di&&mt(x,b,a);_t.free(a)}}}function dg(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Yr||(x=a.mouseDrop,x!==null&&x(y))}function mt(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 vi},!0,function(E){return E instanceof vi},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Fa.prototype.doDropOnto=function(){},Fa.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(kl(this,!1),$f(a,this.copiedParts),Lu(this,this.copiedParts,!1),Ad(a,this.copiedParts)):this.mayMove()?(Il(this),Lu(this,this.draggedParts,!0)):this.mayDragOut()?(kl(this,!1),Lu(this,this.copiedParts,!1)):Il(this),Jd(this,a.lastInput.documentPoint))}},Fa.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?(Il(this),kl(this,!0),$f(a,this.copiedParts),Lu(this,this.copiedParts,!1),Ad(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,Il(this),this.mayMove()&&(Lu(this,this.draggedParts,!0),Jd(this,a.lastInput.documentPoint))),this.Ym=!0,Oc(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&wt(this),a.Ya(),Ad(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Fa.prototype.simulatedMouseMove=function(a,y,x){if(dn===null)return!1;var b=dn.diagram;x instanceof mn||(x=null);var E=Hn;return x!==E&&(E!==null&&E!==b&&(E.ug(),dn.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Hn=x,x!==null&&x!==b&&(Fh(),E=x.toolManager.findTool("Dragging"),E!==null&&(sc.contains(E)||sc.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)},Fa.prototype.simulatedMouseUp=function(a,y,x){if(dn===null)return!1;var b=Hn,E=dn.diagram;if(x===null)return dn.doCancel(),!0;if(x!==b){var z=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&z!==null)return b.ug(),dn.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;Hn=x,b=x.toolManager.findTool("Dragging"),b!==null&&(Fh(),sc.contains(b)||sc.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 Qe),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=dn,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function wt(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Di&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Fa.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Ki?!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())},Fa.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())},Fa.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())},Fa.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Fa.prototype.Az=function(){return dn},Fa.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=dn;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Fa.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Cl(a),a.animationManager.Cc(),a=dn,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Fa.prototype.doSimulatedDragLeave=function(){var a=dn;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Fa.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=dn;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;on(this,y.draggedParts.Lf(),!1,a.firstInput),Lu(this,this.copiedParts,!1),Jd(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Fa.prototype.doSimulatedDrop=function(){var a=this.diagram,y=dn;if(y!==null){var x=y.diagram;if(y.Ym=!0,Il(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),on(this,y.draggedParts.Lf(),!0,a.lastInput),Lu(this,this.copiedParts,!1);var b=new _n;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Oc(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 on(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=_t.alloc();E=b=1/0;for(var te=-1/0,re=-1/0,oe=y.iterator;oe.next();){var le=oe.value;if(le.isVisible()){var ue=le.location;le=ue.x,ue=ue.y,isNaN(le)||isNaN(ue)||(le<b&&(b=le),ue<E&&(E=ue),le>te&&(te=le),ue>re&&(re=ue))}}for(b===1/0?z.h(0,0,0,0):z.h(b,E,te-b,re-E),b=z.x+z.width/2,E=z.y+z.height/2,_t.free(z),z=a.Fr,te=new Ii,re=Qe.alloc(),oe=y.iterator;oe.next();)le=oe.value,le instanceof vi&&le.canCopy()&&(ue=x.I(le),ue!==null&&(ue.points=le.points,Gh(ue,z.x-b,z.y-E),ue.suspendsRouting=!0,te.add(ue,a.Pd())));for(y=y.iterator;y.next();)le=y.value,le.Zc()&&le.canCopy()&&(oe=x.I(le),oe!==null&&(le=le.location,re.h(z.x-(b-le.x),z.y-(E-le.y)),oe.location=re,oe.Va(),te.add(oe,a.Pd(re))));Qe.free(re),a.copiedParts=te,Yd(a,te.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Gh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Fa.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Fa.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Qe},Ye.Object.defineProperties(Fa.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}}}),Fa.prototype.getDraggingSource=Fa.prototype.Az;var dn=null,Hn=null;Fa.className="DraggingTool",sc=new Rn,ji("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),fa.prototype.doCancel=function(){dn!==null&&dn.doCancel(),Do.prototype.doCancel.call(this)};function En(){Do.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new vi,y=new io;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new io,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Di,y=new io,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Bo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Di,y=new io,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Bo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Di=a,this.o=y,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new Ii,this.Of=this.gj=this.Pf=null}Kt(En,Do),En.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},En.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var z=y.Df(),te=pi.alloc();te.width=y.naturalBounds.width*z,te.height=y.naturalBounds.height*z,b.desiredSize=te,pi.free(te),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=wo,z=Qe.alloc(),x.location=y.ga(wo,z),Qe.free(z),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},En.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Bo,y.fromSpot=La,y.toSpot=La),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},En.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},En.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Di){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)}},En.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Di))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Di)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},En.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(me){return E.findValidLinkablePort(me,a)},null,!0);for(b=1/0,y=null,z=z.iterator;z.next();){var te=z.value,re=te.part;if(re instanceof Di){var oe=te.ga(wo,Qe.alloc()),le=x.x-oe.x,ue=x.y-oe.y;Qe.free(oe),oe=le*le+ue*ue,oe<b&&(le=this.validPortsCache.I(te),le!==null?le&&(y=te,b=oe):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,re,te)||!a&&this.isValidLink(re,te,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(te,!0),y=te,b=oe):this.validPortsCache.add(te,!1))}}return y!==null&&(x=y.part,x instanceof Di&&(x.layer===null||x.layer.allowLink))?y:null},En.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},En.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},En.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},En.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Di))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Di))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},En.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)},En.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 _n;return b.add(a),si(this,x,y,b)};function si(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),si(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),si(a,y.labeledLink,x,b))))}En.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!==uh){if(b===Mg){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!li(this,a,y,x,!0)}if(b===Lg){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!li(this,a,y,x,!0)}if(b===Cg)return a===y?a=!0:(b=new _n,b.add(y),a=ti(this,b,a,y,x)),!a;if(b===bg)return!li(this,a,y,x,!1);if(b===Eg)return a===y?a=!0:(b=new _n,b.add(y),a=Mi(this,b,a,y,x)),!a}return!0};function li(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 te=z.value;if(te!==b&&(!E||te.isTreeLink)&&te.toNode===y&&(te=te.fromNode,te!==y&&li(a,te,x,b,E)))return!0}return!1}function ti(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 te=z.value;if(te!==E&&te.toNode===x&&(te=te.fromNode,te!==x&&ti(a,y,te,b,E)))return!0}return!1}function Mi(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 te=z.value;if(te!==E){var re=te.fromNode;if(te=te.toNode,re=re===x?te:re,re!==x&&Mi(a,y,re,b,E))return!0}}return!1}Ye.Object.defineProperties(En.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}}}),En.className="LinkingBaseTool";function Ai(){En.call(this),this.name="Linking",this.V={},this.F=null,this.K=Ni,this.Xd=null}Kt(Ai,En),Ai.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},Ai.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 Di)))return null;var x=this.direction;if(x===Ni||x===gr){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===Ni||x===dr)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Ai.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 Di&&(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 Di&&(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)},Ai.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()},Ai.prototype.doStop=function(){En.prototype.doStop.call(this),this.startObject=null},Ai.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,z=null;try{var te=this.targetPort=this.findTargetPort(this.isForwards);if(te!==null){var re=te.part;re instanceof Di&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=re,E=te):(y=re,x=te,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?(te===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)}}},Ai.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof vi)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)},Ai.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Ai.prototype.doNoLink=function(){},Ye.Object.defineProperties(Ai.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 Ni=new gn(Ai,"Either",0),gr=new gn(Ai,"ForwardsOnly",0),dr=new gn(Ai,"BackwardsOnly",0);Ai.className="LinkingTool",Ai.Either=Ni,Ai.ForwardsOnly=gr,Ai.BackwardsOnly=dr;function ir(){En.call(this),this.name="Relinking";var a=new io;a.figure="Diamond",a.desiredSize=Ho,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new io,a.figure="Diamond",a.desiredSize=Ho,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new _t}Kt(ir,En),ir.prototype.updateAdornments=function(a){if(a!==null&&a instanceof vi){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)}},ir.prototype.makeAdornment=function(a,y){var x=new jo;return x.type=hi.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},ir.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},ir.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 jo&&x.adornedPart instanceof vi))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=Tr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Tr),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},ir.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===yp||x===$h)&&(x=Zl),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}},ir.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()},ir.prototype.doStop=function(){En.prototype.doStop.call(this),this.handle=null},ir.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 te=this.targetPort.part;te instanceof Di&&(this.isForwards?(b=te,E=this.targetPort):(y=te,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()}}},ir.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},ir.prototype.doNoRelink=function(){};function Wr(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)}Ye.Object.defineProperties(ir.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 jo))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),ir.className="RelinkingTool",ji("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),ji("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function sr(){Do.call(this),this.name="LinkReshaping";var a=new io;a.figure="Rectangle",a.desiredSize=aa,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new io,a.figure="Diamond",a.desiredSize=Ho,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Qe,this.Yq=new Rn}Kt(sr,Do),sr.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Ir},sr.prototype.om=function(a,y){a.reshapingBehavior=y},sr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof vi){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)}},sr.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new jo,E.type=hi.Link,x=y.firstPickIndex;var z=y.lastPickIndex,te=b?1:0;if(y.resegmentable&&y.computeCurve()!==$u)for(var re=x+te;re<z-te;re++){var oe=this.makeResegmentHandle(a,re);oe!==null&&(oe.segmentIndex=re,oe.segmentFraction=.5,oe.fromMaxLinks=999,E.add(oe))}for(te=x+1;te<z;te++)if(re=this.makeHandle(a,te),re!==null){if(re.segmentIndex=te,te!==x)if(te===x+1&&b){oe=y.i(x);var le=y.i(x+1);en.B(oe.x,le.x)&&en.B(oe.y,le.y)&&(le=y.i(x-1)),en.B(oe.x,le.x)?(this.om(re,xo),re.cursor="n-resize"):en.B(oe.y,le.y)&&(this.om(re,eo),re.cursor="w-resize")}else te===z-1&&b?(oe=y.i(z-1),le=y.i(z),en.B(oe.x,le.x)&&en.B(oe.y,le.y)&&(oe=y.i(z+1)),en.B(oe.x,le.x)?(this.om(re,xo),re.cursor="n-resize"):en.B(oe.y,le.y)&&(this.om(re,eo),re.cursor="w-resize")):te!==z&&(this.om(re,ko),re.cursor="move");E.add(re)}E.adornedObject=a}return E},sr.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},sr.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},sr.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},sr.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 vi){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}}},sr.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},sr.prototype.stopTransaction=function(){var a=this.diagram,y=Do.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},sr.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},sr.prototype.getResegmentingPoint=function(){return this.handle.ga(wo)},sr.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},sr.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 te=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(zr(this,te,b,E,z,!0)||zr(this,te,b,E,z,!1))){var re=y.points.copy();zr(this,te,b,E,z,!0)?(re.cd(x-2,new Qe(te.x,(z.y+te.y)/2)),re.cd(x+1,new Qe(z.x,(z.y+te.y)/2))):(re.cd(x-2,new Qe((z.x+te.x)/2,te.y)),re.cd(x+1,new Qe((z.x+te.x)/2,z.y))),re.mb(x),re.mb(x-1),y.points=re,y.Wb()}else te=y.i(x+2),Math.abs(E.x-z.x)<this.resegmentingDistance&&Math.abs(E.y-z.y)<this.resegmentingDistance&&(zr(this,b,E,z,te,!0)||zr(this,b,E,z,te,!1))&&(re=y.points.copy(),zr(this,b,E,z,te,!0)?(re.cd(x-1,new Qe(b.x,(b.y+te.y)/2)),re.cd(x+2,new Qe(te.x,(b.y+te.y)/2))):(re.cd(x-1,new Qe((b.x+te.x)/2,b.y)),re.cd(x+2,new Qe((b.x+te.x)/2,te.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else te=Qe.alloc(),en.qh(b.x,b.y,z.x,z.y,E.x,E.y,te)&&te.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),Qe.free(te)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function zr(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}sr.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===xo?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===eo&&(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===xo?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===eo&&(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),te=y.i(b+1);en.B(z.x,E.x)&&en.B(E.y,te.y)?(en.B(z.x,y.i(b-2).x)&&!en.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),en.B(te.y,y.i(b+2).y)&&!en.B(te.x,y.i(b+2).x)?y.m(b+1,te.x,a.y):y.L(b+1,te.x,a.y)):en.B(z.y,E.y)&&en.B(E.x,te.x)?(en.B(z.y,y.i(b-2).y)&&!en.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),en.B(te.x,y.i(b+2).x)&&!en.B(te.y,y.i(b+2).y)?y.m(b+1,a.x,te.y):y.L(b+1,a.x,te.y)):en.B(z.x,E.x)&&en.B(E.x,te.x)?(en.B(z.x,y.i(b-2).x)&&!en.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),en.B(te.x,y.i(b+2).x)&&!en.B(te.y,y.i(b+2).y)?y.m(b+1,a.x,te.y):y.L(b+1,a.x,te.y)):en.B(z.y,E.y)&&en.B(E.y,te.y)&&(en.B(z.y,y.i(b-2).y)&&!en.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),en.B(te.y,y.i(b+2).y)&&!en.B(te.x,y.i(b+2).x)?y.m(b+1,te.x,a.y):y.L(b+1,te.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(wo,Qe.alloc()),b=y.getLinkPointFromPoint(b,E,z,a,!0,Qe.alloc()),y.L(0,b.x,b.y),Qe.free(z),Qe.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(wo,Qe.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,Qe.alloc()),y.L(y.pointsCount-1,a.x,a.y),Qe.free(x),Qe.free(a));y.zf()},sr.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case ko:return a;case xo:return new Qe(y.i(x).x,a.y);case eo:return new Qe(a.x,y.i(x).y);default:case Ir:return y.i(x)}},Ye.Object.defineProperties(sr.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 jo))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}}}),sr.prototype.setReshapingBehavior=sr.prototype.om,sr.prototype.getReshapingBehavior=sr.prototype.Ru;var Ir=new gn(sr,"None",0),eo=new gn(sr,"Horizontal",1),xo=new gn(sr,"Vertical",2),ko=new gn(sr,"All",3);sr.className="LinkReshapingTool",sr.None=Ir,sr.Horizontal=eo,sr.Vertical=xo,sr.All=ko,ji("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function $r(){Do.call(this),this.name="Resizing",this.o=new pi(1,1).freeze(),this.j=new pi(9999,9999).freeze(),this.yg=new pi(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new io;a.alignmentFocus=wo,a.figure="Rectangle",a.desiredSize=aa,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Qe,this.Dw=new pi,this.Tn=new Qe,this.rt=new pi(0,0),this.qt=new pi(1/0,1/0),this.pt=new pi(1,1)}Kt($r,Do),$r.prototype.updateAdornments=function(a){if(!(a===null||a instanceof vi)){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(),vf(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},$r.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new jo,y.type=hi.Spot,y.locationSpot=wo;var x=new Hl;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Ba)),y.add(this.makeHandle(a,su)),y.add(this.makeHandle(a,vl)),y.add(this.makeHandle(a,Ml)),y.add(this.makeHandle(a,Ua)),y.add(this.makeHandle(a,xs)),y.add(this.makeHandle(a,vs)),y.add(this.makeHandle(a,ss))}else if(hc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},$r.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},$r.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=wo),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break e;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof hi)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},$r.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},$r.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))},$r.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},$r.prototype.stopTransaction=function(){var a=this.diagram,y=Do.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},$r.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},$r.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,Qe.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),a.bd(),Qe.free(E)}},$r.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,Qe.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),Qe.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},$r.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 Yr){var b=new Rn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ae;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()}},$r.prototype.computeResize=function(a,y,x,b,E,z){y.Mc()&&(y=wo);var te=this.adornedObject.naturalBounds,re=te.x,oe=te.y,le=te.x+te.width,ue=te.y+te.height,me=1;if(!z){me=te.width;var we=te.height;0>=me&&(me=1),0>=we&&(we=1),me=we/me}return we=Qe.alloc(),en.No(a.x,a.y,re,oe,E.width,E.height,we),a=te.copy(),0>=y.x?0>=y.y?(a.x=Math.max(we.x,le-b.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.y=Math.max(we.y,ue-b.height),a.y=Math.min(a.y,ue-x.height),a.height=Math.max(ue-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width),a.x=le-a.width,a.y=ue-a.height)):1<=y.y?(a.x=Math.max(we.x,le-b.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.height=Math.max(Math.min(we.y-oe,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width),a.x=le-a.width)):(a.x=Math.max(we.x,le-b.width),a.x=Math.min(a.x,le-x.width),a.width=le-a.x,z||(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me,a.y=oe+.5*(ue-oe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(we.x-re,b.width),x.width),a.y=Math.max(we.y,ue-b.height),a.y=Math.min(a.y,ue-x.height),a.height=Math.max(ue-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width),a.y=ue-a.height)):1<=y.y?(a.width=Math.max(Math.min(we.x-re,b.width),x.width),a.height=Math.max(Math.min(we.y-oe,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width))):(a.width=Math.max(Math.min(we.x-re,b.width),x.width),z||(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me,a.y=oe+.5*(ue-oe-a.height))):0>=y.y?(a.y=Math.max(we.y,ue-b.height),a.y=Math.min(a.y,ue-x.height),a.height=ue-a.y,z||(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width,a.x=re+.5*(le-re-a.width))):1<=y.y&&(a.height=Math.max(Math.min(we.y-oe,b.height),x.height),z||(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width,a.x=re+.5*(le-re-a.width))),Qe.free(we),a},$r.prototype.computeReshape=function(){var a=ai;return this.adornedObject instanceof io&&(a=kv(this.adornedObject)),!(a===tr||this.diagram.lastInput.shift)},$r.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},$r.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},$r.prototype.computeCellSize=function(){var a=new pi(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},Ye.Object.defineProperties($r.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 jo))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 jo)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}}}),$r.className="ResizingTool",ji("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function So(){Do.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Qe,this.ue=null;var a=new io;a.figure="Ellipse",a.desiredSize=Ho,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Qe(NaN,NaN),this.u=0,this.F=50}Kt(So,Do),So.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)}},So.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new jo,y.type=hi.Position,y.locationSpot=wo;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(hc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},So.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},So.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)},So.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(wo)},So.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)},So.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Qe(NaN,NaN),this.isActive=a.isMouseCaptured=!1},So.prototype.stopTransaction=function(){var a=this.diagram,y=Do.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},So.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},So.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},So.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()},So.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()}},So.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},Ye.Object.defineProperties(So.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 jo))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 jo)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}}}),So.className="RotatingTool",ji("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Xo(){Do.call(this),this.name="ClickSelecting"}Kt(Xo,Do),Xo.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Xo.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Xo.className="ClickSelectingTool";function _r(){Do.call(this),this.name="Action",this.pk=null}Kt(_r,Do),_r.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},_r.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()},_r.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))}},_r.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()},_r.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())},_r.prototype.doStop=function(){this.pk=null},_r.className="ActionTool";function co(){Do.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Qe(0,0)}Kt(co,Do),co.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)},co.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},co.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 mr)x.Zc()&&(hc(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);rn(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var z=Qe.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gf(this.diagram,b,a,z),b.location=z,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Qe.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Ye.Object.defineProperties(co.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}}}),co.className="ClickCreatingTool";function Xr(){Do.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new mr;a.layerName="Tool",a.selectable=!1;var y=new io;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Kt(Xr,Do),Xr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var y=a.lastInput;return!(!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.timestamp-a.firstInput.timestamp<this.delay||a.Ol(y.documentPoint,!0)!==null))},Xr.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Xr.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Xr.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var b=pi.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),pi.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Xr.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;a.remove(this.box);try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),this.selectInRect(this.computeBoxBounds()),a.R("ChangedSelection",a.selection)}finally{a.currentCursor=""}}this.stopTool()},Xr.prototype.computeBoxBounds=function(){var a=this.diagram;return new _t(a.firstInput.documentPoint,a.lastInput.documentPoint)},Xr.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Ki?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 Rn,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)}},Ye.Object.defineProperties(Xr.prototype,{delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}},isPartialInclusion:{get:function(){return this.o},set:function(a){this.o=a}},box:{get:function(){return this.j},set:function(a){this.j=a}}}),Xr.className="DragSelectingTool";function Cr(){Do.call(this),this.name="Panning",this.Xt=new Qe,this.xy=new Qe,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(at.document,"scroll",a.Kw,!1),a.stopTool()}}Kt(Cr,Do),Cr.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())},Cr.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(at.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Cr.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Cr.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Cr.prototype.doMouseMove=function(){this.move()},Cr.prototype.doMouseUp=function(){this.move(),this.stopTool()},Cr.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)}},Ye.Object.defineProperties(Cr.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Cr.className="PanningTool",ji("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),ji("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),ji("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),ji("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),ji("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function oo(){this.F=this.u=this.j=this.o=null}Ye.Object.defineProperties(oo.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}}}),oo.className="HTMLInfo";function Mo(a,y,x){this.text=a,this.hx=y,this.visible=x}Mo.className="ContextMenuButtonInfo";function Zo(){Do.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Qe,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Kt(Zo,Do);function Wo(a){var y=new oo;y.show=function(E,z,te){te.showDefaultContextMenu()},y.hide=function(E,z){z.hideDefaultContextMenu()},pa=y,a.tu=function(){a.stopTool()},y=Jn("div");var x=Jn("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=Jn("style");at.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",Kr,!1),b.addEventListener(y,"selectstart",Kr,!1),b.addEventListener(x,"contextmenu",Kr,!1)),y.className="goCXforeground",x.className="goCXbackground",at.document.body&&(at.document.body.appendChild(y),at.document.body.appendChild(x)),na=y,ja=x,ds=!0}function Kr(a){return a.preventDefault(),!1}Zo.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)},Zo.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Zo.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Zo.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof mn||(a instanceof Qt?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},Zo.prototype.doActivate=function(){},Zo.prototype.doMouseDown=function(){if(Do.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof jo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Yo(this)},Zo.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof jo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Yo(this)};function Yo(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof oo||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(ia(a,!0),a.isActive||a.stopTool())}Zo.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function ia(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=pa,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Qt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof jo&&!a.currentContextMenu.visible&&a.stopTool()}}Zo.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Zo.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof jo){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 oo&&a.show(y,x,this);this.currentContextMenu=a},Zo.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}},Zo.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof jo?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof oo&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Ta(a){var y=new Rn;return y.add(new Mo("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Mo("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Mo("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Mo("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Mo("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Mo("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Mo("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Mo("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Mo("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Mo("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Mo("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Mo("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Mo("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Zo.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Ta(this)),na.innerHTML="",ja.addEventListener("pointerdown",this.tu,!1);var y=this,x=Jn("ul");x.className="goCXul",na.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=Jn("li"),z.className="goCXli";var te=Jn("a");te.className="goCXa",te.href="#",te.ky=E.hx,te.addEventListener("pointerdown",function(re){return this.ky(a),y.stopTool(),re.preventDefault(),!1},!1),te.textContent=E.text,z.appendChild(te),x.appendChild(z)}}na.style.display="block",ja.style.display="block"},Zo.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===pa){na.style.display="none",ja.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ja,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Ye.Object.defineProperties(Zo.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof jo?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return ds===!1&&pa===null&&Ha&&Wo(this),pa},set:function(a){a===null&&(ds=!0),pa=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var pa=null,ds=!1,ja=null,na=null;Zo.className="ContextMenuTool",ji("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Fo(){Do.call(this),this.name="TextEditing",this.Zh=new ua,this.ia=null,this.V=Co,this.vj=null,this.qa=Po,this.u=1,this.F=!0,this.o=null,this.j=new oo,this.kt=null,Sa(this,this.j)}Kt(Fo,Do);function Sa(a,y){if(Ha){var x=Jn("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(Io)):E==="Tab"?(a.acceptText($o),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Po){var b=a.kt;a.qa===Jo&&(a.qa=ga),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Po){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 ua&&z instanceof Fo)if(z.state===Us)x.style.border="3px solid red",x.focus();else{var te=b.ga(wo),re=E.position,oe=E.scale,le=b.Df()*oe;le<z.minimumEditorScale&&(le=z.minimumEditorScale);var ue=b.naturalBounds.width*le+6,me=b.naturalBounds.height*le+2,we=(te.x-re.x)*oe;te=(te.y-re.y)*oe,re=b.verticalAlignment,oe=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*le,me=re.y*me-re.y*oe+re.offsetY-(.5*me-.5*oe)-oe/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*le+"%",x.style.lineHeight="normal",x.style.width=ue+"px",x.style.left=(we-ue/2|0)-1+"px",x.style.top=(te+me|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=le,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)}}}Fo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||cl&&cl!==this&&(cl.acceptText(Ns),cl&&cl!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof ua&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Co&&!y.isSelected||this.starting===Aa&&2>a.lastInput.clickCount)):!1},Fo.prototype.doStart=function(){cl=this,this.textBlock!==null&&this.doActivate()},Fo.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 ua&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Jo;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new _t(this.textBlock.ga(Ba),this.textBlock.ga(vl));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Fo.prototype.doCancel=function(){this.stopTool()},Fo.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Fo.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Ns)},Fo.prototype.acceptText=function(a){switch(a){case Ns:this.qa===Zs?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Jo||this.qa===Us||this.qa===ga)&&(this.qa=ma,hs(this));break;case Qa:case Io:case $o:(Io!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Jo||this.qa===Us||this.qa===ga)&&(this.qa=ma,hs(this))}};function hs(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=Zs,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=Us,a.doError(E,z))}}Fo.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)},Fo.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Fo.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Po,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Fo.prototype.doStop=function(){cl=null},Fo.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)))},Fo.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ye.Object.defineProperties(Fo.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)}}}),Fo.prototype.measureTemporaryTextBlock=Fo.prototype.Lx;var Qa=new gn(Fo,"LostFocus",0),Ns=new gn(Fo,"MouseDown",1),$o=new gn(Fo,"Tab",2),Io=new gn(Fo,"Enter",3),Go=new gn(Fo,"SingleClick",0),Co=new gn(Fo,"SingleClickSelected",1),Aa=new gn(Fo,"DoubleClick",2),Po=new gn(Fo,"StateNone",0),Jo=new gn(Fo,"StateActive",1),ga=new gn(Fo,"StateEditing",2),ma=new gn(Fo,"StateValidating",3),Us=new gn(Fo,"StateInvalid",4),Zs=new gn(Fo,"StateValidated",5),cl=null;Fo.className="TextEditingTool",Fo.LostFocus=Qa,Fo.MouseDown=Ns,Fo.Tab=$o,Fo.Enter=Io,Fo.SingleClick=Go,Fo.SingleClickSelected=Co,Fo.DoubleClick=Aa,Fo.StateNone=Po,Fo.StateActive=Jo,Fo.StateEditing=ga,Fo.StateValidating=ma,Fo.StateInvalid=Us,Fo.StateValidated=Zs,ji("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function ka(a){Yl||(dl(),Yl=!0),this.H=Xu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Ds,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new _n,this.ce=new za,this.ce.Yd=this,this.Ei=new _n,this.pu=new _n,this.Sr=new _n,this.pr=new _n,a&&Object.assign(this,a)}ka.prototype.Xe=function(a){this.H=a},ka.prototype.canStart=function(){return!0};function il(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),$s(a.H),a.zb=!0)}function Fs(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===Ds?(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===Ql&&y.vc.clear(),a.Qw=!!(a.Pk===Jl&&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(),rl(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==xl&&b!==null&&(delete b.start.scale,delete b.end.scale),at.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Gs(x),Md(x),a.zb=!1,y.start(),y.bc&&(Oa(a),x.Ya(),Pc(y,0),Cl(x,!0),qa(a),x.R("AnimationStarting",a)))}))}}function Ws(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function uc(a,y,x,b){a.isTicking||Ws(a)||y instanceof vi&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}Le=ka.prototype,Le.fv=function(a){return this.ce.fv(a)},Le.Xu=function(a){return this.ce.Xu(a)};function Ia(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 te=z.value;if(te.bc!==!1){e:if(0<te.yl.count)var re=!0;else{for(re=te.vc.iterator;re.next();){var oe=re.key;if(oe instanceof Qt&&oe.diagram!==null||oe instanceof mn){re=!0;break e}}re=!1}re?fu(te,!1):te.Xk=!0}}E.pu.clear(),E.bc!==!1&&(Oa(E),Cl(E.H),qa(E)),at.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),at.requestAnimationFrame(function(){x()}))}function $a(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Oa(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 qa(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Le.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),rl(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),rl(y,this.H)},Le.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},Le.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Xa(this,a))},Le.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),es(this.ce,y,"position",y.position,y.position),Xa(this,a))};function As(a,y,x){!a.zb||y.D(x)||Ws(a)||(a.H.pi||(y=x.copy()),es(a.ce,a.H,"position",y,x))}function da(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Xa(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function _s(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],te=a[1],re=a[2];a=a[3];var oe=y[0],le=y[1],ue=y[2];return y=y[3],re===0||re===100?(z=oe,te=le):(ue===0||ue===100)&&(oe=z,le=te),180<Math.abs(oe-z)&&(oe>z?z+=360:oe+=360),z=E(x,z,oe-z,b)%360,te=E(x,te,le-te,b),re=E(x,re,ue-re,b),x=E(x,a,y-a,b),"hsla("+z+", "+te+"%, "+re+"%, "+x+")"}function dl(){function a(x,b,E,z,te,re){x.position=new Qe(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re))}var y=new Ii;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,z,te,re){te<re?x.mm(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re),!1):x.position=new Qe(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re))}),y.add("location",function(x,b,E,z,te,re){te<re?x.mm(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re),!0):x.location=new Qe(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re))}),y.add("position:placeholder",function(x,b,E,z,te,re){te<re?x.mm(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re),!1):x.position=new Qe(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re))}),y.add("position:nodeCollapse",function(x,b,E,z,te,re){var oe=x.actualBounds,le=E.actualBounds;E=le.x+le.width/2-oe.width/2,oe=le.y+le.height/2-oe.height/2,te<re?x.mm(z(te,b.x,E-b.x,re),z(te,b.y,oe-b.y,re),!1):x.position=new Qe(z(te,b.x,E-b.x,re),z(te,b.y,oe-b.y,re))}),y.add("desiredSize",function(x,b,E,z,te,re){x.desiredSize=new _t(z(te,b.width,E.width-b.width,re),z(te,b.height,E.height-b.height,re))}),y.add("width",function(x,b,E,z,te,re){x.width=z(te,b,E-b,re)}),y.add("height",function(x,b,E,z,te,re){x.height=z(te,b,E-b,re)}),y.add("fill",function(x,b,E,z,te,re){x.fill=_s(b,E,te,re,z)}),y.add("stroke",function(x,b,E,z,te,re){x.stroke=_s(b,E,te,re,z)}),y.add("strokeWidth",function(x,b,E,z,te,re){x.strokeWidth=z(te,b,E-b,re)}),y.add("strokeDashOffset",function(x,b,E,z,te,re){x.strokeDashOffset=z(te,b,E-b,re)}),y.add("background",function(x,b,E,z,te,re){x.background=_s(b,E,te,re,z)}),y.add("areaBackground",function(x,b,E,z,te,re){x.areaBackground=_s(b,E,te,re,z)}),y.add("opacity",function(x,b,E,z,te,re){x.opacity=z(te,b,E-b,re)}),y.add("scale",function(x,b,E,z,te,re){x.scale=z(te,b,E-b,re)}),y.add("angle",function(x,b,E,z,te,re){x.angle=z(te,b,E-b,re)}),hu=y}Ye.Object.defineProperties(ka.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&&qn(a,">= 1",ka,"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}}}),ka.prototype.stopAnimation=ka.prototype.Cc;var hu=null,Yl=!1,Ds=new gn(ka,"Default",1),Jl=new gn(ka,"AnimateLocations",2),Ql=new gn(ka,"None",3);ka.className="AnimationManager",ka.defineAnimationEffect=function(a,y){Yl||(dl(),Yl=!0),hu.add(a,y)},ka.Default=Ds,ka.AnimateLocations=Jl,ka.None=Ql;function za(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=Nu,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Qr,this.vc=new Ii,this.Tt=new Ii,this.yl=new _n,this.Ut=new _n,this.dw=Td,a&&Object.assign(this,a)}za.prototype.suspend=function(){this.Xk=!0},za.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,fu(this,!0),Oa(this.Yd),Cl(this.H),qa(this.Yd),this.H.redraw()};function rl(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}Le=za.prototype,Le.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof mn?a=x:x instanceof Qt&&(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===Ds&&this===y.defaultAnimation&&(this.Lp=Fu,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=cf),Oa(y),this.yl.each(function(b){b.data=null,a.add(b)}),qa(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Ia(y,this),this)},Le.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Le.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof mn?this.H=a:a instanceof Qt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof mr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return es(this,a,y,x,b,E),this};function es(a,y,x,b,E,z){var te=a.vc;if(y instanceof mn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Gu(b),_f(),b=[Su.j,Su.u,Su.o,Su.F],Gu(E),_f(),E=[Su.j,Su.u,Su.o,Su.F]),te.contains(y)){var re=te.I(y),oe=re.start,le=re.end;oe[x]===void 0&&(oe[x]=Ya(b)),le[x]=Ya(E)}else oe={},le={},oe[x]=Ya(b),le[x]=Ya(E),re=oe.position,y instanceof Qt&&re instanceof Qe&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(le.position),re=new gu(oe,le,z),te.add(y,re);te=oe[x],te instanceof Qe&&!te.w()&&te.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof mr?re.Ku.location=Ya(y.location):z&&(re.Ku[x]=Ya(b))}function Ya(a){return a instanceof Qe||a instanceof pi?a.copy():a}Le.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Le.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function fu(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),Oa(x),Pc(a,E),Cl(a.H,!0),qa(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 Pc(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var z=b.key;if(!(z instanceof Qt&&z.diagram===null)){var te=b.value,re=E?te.end:te.start;te=E?te.start:te.end;var oe=hu,le;for(le in te)le==="position"&&(te["position:placeholder"]||te["position:nodeCollapse"])||oe.get(le)===null||oe.get(le)(z,re[le],te[le],a.Lp,y,x,a)}}}Le.stop=function(){return this.bc?(this.Ml(!0),this):this},Le.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,Oa(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=hu;b.next();){var te=b.key,re=b.value,oe=E?re.end:re.start,le=E?re.start:re.end,ue=re.Ku,me;for(me in le)if(z.get(me)!==null){var we=me;!re.Hu||we!=="position:nodeCollapse"&&we!=="position:placeholder"||(we="position"),z.get(we)(te,oe[me],ue[me]!==void 0?ue[me]:re.Hu?oe[me]:le[me],this.Lp,this.Gd,this.Gd,this)}re.Hu&&ue.location!==void 0&&te instanceof mr&&(te.location=ue.location),re.nv&&te instanceof mr&&te.Zb(!1)}if(y.As.clear(),Qd(y,!1),y.Ya(),y.N(),Cl(y,!0),x.defaultAnimation===this){for(me=x.pr.iterator;me.next();)E=me.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Cl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),qa(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),rl(this,null),x.Ml(this),y.$b())}},Le.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Yr&&(b=y.placeholder),b!==null?(x=b.ga(Ba),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Qe(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Yr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Di&&this.Cj(b,y)},Le.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Yr&&(x=y.placeholder),x!==null){var b=x.ga(Ba);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 Yr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Di&&this.Aj(b,y)}},Le.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ye.Object.defineProperties(za.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&qn(a,">= 1",za,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:St("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),za.prototype.getTemporaryState=za.prototype.Ez,za.prototype.stop=za.prototype.stop,za.prototype.add=za.prototype.add,za.prototype.addTemporaryPart=za.prototype.Iy;function Nu(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Fu(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}za.className="Animation",za.EaseLinear=function(a,y,x,b){return x*a/b+y},za.EaseInOutQuad=Nu,za.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},za.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},za.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},za.EaseOutExpo=Fu;function gu(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}gu.className="AnimationState";function ql(a,y,x){this.xd=null,this.rf=a,this.so=x||rs,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Bs))}ql.prototype.copy=function(){var a=new ql(this.rf);a.so=this.so;var y=this.uk;if(y!==null){var x={};y.duration!==void 0&&(x.duration=y.duration),y.finished!==void 0&&(x.finished=y.finished),y.easing!==void 0&&(x.easing=y.easing),a.uk=x}return a};function Da(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))}Ye.Object.defineProperties(ql.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var rs=new gn(ql,"Default",1),Bs=new gn(ql,"Immediate",2),os=new gn(ql,"Bundled",3);ql.className="AnimationTrigger",ql.Default=rs,ql.Immediate=Bs,ql.Bundled=os;function Ca(a){Or(this),this.H=null,this.Pa=new Rn,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}Le=Ca.prototype,Le.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,gl(x)}a.clear(),this.Zq.length=0},Le.Xe=function(a){this.H=a},Le.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,z=0,te=0,re=this.Pa.iterator;re.next();){var oe=re.value;oe instanceof Yr?E++:oe instanceof Di?b++:oe instanceof vi?z++:oe instanceof jo?te++:x++}if(re="",0<x&&(re+=x+" Parts "),0<b&&(re+=b+" Nodes "),0<E&&(re+=E+" Groups "),0<z&&(re+=z+" Links "),0<te&&(re+=te+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,re+=`
|
|
|
`+x.toString(),b=x.data,b!==null&&br(b)&&(re+=" #"+br(b)),x instanceof Di?re+=" "+Qn(b):x instanceof vi&&(re+=" "+Qn(x.fromNode)+" "+Qn(x.toNode));return y+" "+this.Pa.count+": "+re},Le.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=Qe.alloc(),z=this.Pa.s,te=z.length;te--;){var re=z[te];if((b!==!0||vf(re)!==!1)&&re.isVisible()&&(E.assign(a),qr(E,re.oe),re=re.ic(E,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return Qe.free(E),re}return Qe.free(E),null},Le.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Rn||b instanceof _n||(b=new _n),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var z=Qe.alloc(),te=this.Pa.s,re=te.length;re--;){var oe=te[re];if((E!==!0||vf(oe)!==!1)&&oe.isVisible()){z.assign(a),qr(z,oe.oe);var le=oe;oe.ji(z,y,x,b)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||b.add(le))}}return Qe.free(z),b},Le.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 Rn||E instanceof _n||(E=new _n),this.Uh===!1)return E;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var te=this.Pa.s,re=te.length;re--;){var oe=te[re];if((z!==!0||vf(oe)!==!1)&&oe.isVisible()){var le=oe;oe.Cf(a,y,x,b,E)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||E.add(le))}}return E},Le.Nu=function(a,y,x,b,E,z,te){if(this.Uh===!1)return E;for(var re=this.Pa.s,oe=re.length;oe--;){var le=re[oe];if((te!==!0||vf(le)!==!1)&&z(le)&&le.isVisible()){var ue=le;le.Cf(a,y,x,b,E)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||E.add(ue))}}return E},Le.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 Rn||E instanceof _n)&&(z=E),E=!0),z instanceof Rn||z instanceof _n||(z=new _n),this.Uh===!1)return z;var te=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(te=!0);for(var re=Qe.alloc(),oe=Qe.alloc(),le=this.Pa.s,ue=le.length;ue--;){var me=le[ue];if((te!==!0||vf(me)!==!1)&&me.isVisible()){re.assign(a),qr(re,me.oe),oe.h(a.x+y,a.y),qr(oe,me.oe);var we=me;me.og(re,oe,x,b,E,z)&&(x!==null&&(we=x(we)),we===null||b!==null&&!b(we)||z.add(we))}}return Qe.free(re),Qe.free(oe),z},Le.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Sn();for(var E=Sn(),z=0;z<b;z++){var te=x[z];if(te.vw=z,te instanceof vi){if(te.fd===!1)continue}else if(te instanceof jo&&te.adornedPart!==null)continue;var re=te.actualBounds;te.isVisible()&&or(re,y)?(te.Fd(!0),a.push(te)):(te.Fd(!1),te.adornments!==null&&0<te.adornments.count&&E.push(te))}for(y=0;y<a.length;y++)for(x=a[y],Kv(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++)Kv(E[y]);Gn(a),Gn(E)}}};function Ts(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Le.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=Ts(this,a);var z=this.Zq;z.length=0;for(var te=y.scale,re=_t.alloc(),oe=0;oe<b;oe++)this.Oj(a,x[oe],y,z,te,re,!0);if(_t.free(re),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Rl(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 te=Ts(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,le=_t.alloc(),ue=0;ue<z;ue++){var me=E[ue];b.contains(me)&&a.Oj(y,me,x,re,oe,le,!1)}_t.free(le),y.globalAlpha=te}}}Le.Oj=function(a,y,x,b,E,z,te){if(te&&!vf(y))a.Hs(y);else{if(b!==null&&y instanceof vi&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(te=!1,b=y.containingGroup;b!==null;)te?b.tb!==null&&z.Ex(b.tb):b.tb!==null&&(te=!0,z.assign(b.tb)),b=b.containingGroup;var re=y.actualBounds;if(b=!1,te&&y.isVisible()){if(!z.Yc(re)){a.Hs(y);return}b=!z.Re(re)}b&&(a.save(),a instanceof Uo?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),re.width*E>x.Oq||re.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&&(Za(y,a,y.areaBackground,!0,!0,z,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(Za(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),Za(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))}},Le.g=function(a,y,x,b,E){var z=this.diagram;z!==null&&z.cb(wa,a,this,y,x,b,E)},Le.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&gl(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)),zu(this,a,y),a},Le.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var 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,gl(y),a};function zu(a,y,x){if(y=Cd(a,y,x),x instanceof Yr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,z=E.length,te=0;te<z;te++){var re=E[te];if(re===x&&(y=te,0<=b)||0>b&&re.containingGroup===x&&(b=te,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&zu(a,-1,y)}x.svg!==null&&x.svg.remove()}function Cd(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,te=NaN;0<=z&&(te=a.M(z).zOrder,!!isNaN(te));)z--;for(var re=y+1,oe=NaN;re<E&&(oe=a.M(re).zOrder,!!isNaN(oe));)re++;if(!isNaN(te)&&te>b)for(;;){if(z===-1||te<=b){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(te=NaN;0<=--z&&(te=a.M(z).zOrder,isNaN(te)););}else if(!isNaN(oe)&&oe<b)for(;;){if(re===E||oe>=b){if(re--,re===y)break;return a.mb(y),a.Gb(re,x),re}for(oe=NaN;++re<E&&(oe=a.M(re).zOrder,isNaN(oe)););}return y}Ye.Object.defineProperties(Ca.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&St("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&St("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&qn(a,"0 <= value <= 1",Ca,"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))}}}),Ca.prototype.findObjectsNear=Ca.prototype.og,Ca.prototype.findObjectsIn=Ca.prototype.Cf,Ca.prototype.findObjectsAt=Ca.prototype.ji,Ca.prototype.findObjectAt=Ca.prototype.ic,Ca.className="Layer";function mn(a,y){if(ip||(hl(),ip=!0),Or(this),Xu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Ha){var x=this,b=function(){x.removeEventListener(at.document,"DOMContentLoaded",b,!1),x.setRTL()};at.document.body!==null?this.setRTL():x.addEventListener(at.document,"DOMContentLoaded",b,!1)}this.ol=null,Uf.add("Model",qo);var E=this;return this.Hb=function(z){var te=E.partManager;if(z.model===te.diagram.model&&te.diagram.aa){te.diagram.aa=!1;try{var re=z.change;z.modelChange===""&&re===wa&&te.updateDataBindings(z.object,z.propertyName)}finally{te.diagram.aa=!0}}},this.Oc=function(z){E.partManager.doModelChanged(z)},this.hu=this.ku=null,af(this),this.model=xy(),this.Wg=!0,qd(this),this.layout=new Ma,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 rp,a!==void 0&&(typeof a=="string"||at.Element&&a instanceof Element?Dh(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Rc,Xu;function af(a){a.Yd=new ka,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Rn,a.pj=new Ii,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Qe(NaN,NaN).freeze(),a.du=new Qe(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Qe(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new ro,a.zu=new Qe(NaN,NaN).freeze(),a.ut=new _t(NaN,NaN,NaN,NaN).freeze(),a.rj=new Oi(0,0,0,0).freeze(),a.sj=Td,a.nu=!1,a.Zt=null,a.fu=null,a.yh=xl,a.zk=Vo,a.Fg=xl,a.pq=Vo,a.yt=Ba,a.Bt=Ba,a.Fc=!0,a.pn=!1,a.De=new _n,a.Eh=new Ii,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Oi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new nl,a.bq.diagram=a,a.Qg=new nl,a.Qg.diagram=a,a.cj=new nl,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,Wp(a),a.ai=new _n,a.Ht=!0,a.uu=hd,a.pw=!1,a.wu=uh,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 Ii,a.Xn=new Rn,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 Oi(5).freeze(),a.Hw=new _n().freeze(),a.Nt=999999999,a.nw=new _n().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 _n,a.ow=new _n,a.Xh=null,a.aw=new pi(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Qe,bounds:new _t,Py:new pi,bA:new pi,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new _t(NaN,NaN,NaN,NaN).freeze(),a.wo=new pi(NaN,NaN).freeze(),a.Sp=new _t(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Ii;var y=new Di,x=new ua;x.bind(new fs("text","",Qn)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Di,x=new ua,x.stroke="brown",x.bind(new fs("text","",Qn)),y.add(x),a.Lg.add("Comment",y),y=new Di,y.selectable=!1,y.avoidable=!1,x=new io,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new pi(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Ii,y=new Yr,y.selectionObjectName="GROUPPANEL",y.type=hi.Vertical,x=new ua,x.font="bold 12pt sans-serif",x.bind(new fs("text","",Qn)),y.add(x),x=new hi(hi.Auto),x.name="GROUPPANEL";var b=new io;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Hl,b.padding=new Oi(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Ii,y=new vi,x=new io,x.isPanelMain=!0,y.add(x),x=new io,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new vi,x=new io,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new jo,y.type=hi.Auto,x=new io,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Hl,x.margin=new Oi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new jo,y.type=hi.Link,x=new io,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 qo,a.toolManager=new fa,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ae,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Ed(),a.eq=null,a.fq=po,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 Qe,a.zy=500,a.wp=new Qe,a.wq=!1}mn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Ih=null,Bd="",bd(this,!1),this.Xn.clear(),fp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function bd(a,y){a.animationManager.Cc(!0),a.Hw=new _n().freeze(),a.nw=new _n().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=[],te=a.Wa.length;if(y){for(y=0;y<te;y++)for(var re=a.Wa.s[y].parts;re.next();){var oe=re.value;oe!==E&&oe.data===null&&z.push(oe)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<te;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(),fp(),a.Og.clear(),Gi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),z}function Ed(){return null}mn.prototype.reset=function(){this.clear(),this.vb=!0,af(this),Ec(this),this.Wg=!0,qd(this),this.layout=new Ma,this.Wg=!1,this.model=xy(),this.model.undoManager=new Na,this.vb=this.rn=!1,this.N()},mn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=at.document.body);var y=Jn("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},mn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=at.document.body);var y=0;if(Ha){var x=np;y=Rc,x===null&&(x=np=Jn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Rc=Jn("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||Ki||(y=11)}this.Db=y,this.Gw=!0},mn.prototype.qb=function(a){a.classType===mn&&(this.autoScale=a)},mn.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 Dh(a,y){if(Ha){if(y!=null||St("Diagram setup requires an argument DIV."),a.Ka!==null&&St("Diagram has already completed setup."),typeof y=="string"?a.Ka=at.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:St("No DIV or DIV id supplied: "+y),a.Ka===null&&St("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&St("Invalid div id; div already has a Diagram associated with it."),!a.ol&&at.ResizeObserver){var x=Nn(function(){a.$b()},250);a.ol=new at.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}at.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=at.go;var E=new al(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",at.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),Fd(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new al(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,Ha){E=Jn("div");var z=Jn("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=Zf,E.addEventListener("pointerdown",eh),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=z}a.hk=Nn(function(){a.Yh=null,a.N()},300),a.Ov=Nn(function(){Md(a)},250),a.preventDefault=function(te){return te.preventDefault(),!1},a.$j=function(te){if(a.isEnabled){var re=jl(a,te,!0);re.bubbles=!0;var oe=0,le=0;re.delta=0,te.deltaX!==void 0?(te.deltaX!==0&&(oe=0<te.deltaX?1:-1),te.deltaY!==0&&(le=0<te.deltaY?1:-1),re.delta=Math.abs(te.deltaX)>Math.abs(te.deltaY)?-oe:-le):te.wheelDeltaX!==void 0?(te.wheelDeltaX!==0&&(oe=0<te.wheelDeltaX?-1:1),te.wheelDeltaY!==0&&(le=0<te.wheelDeltaY?-1:1),re.delta=Math.abs(te.wheelDeltaX)>Math.abs(te.wheelDeltaY)?-oe:-le):te.wheelDelta!==void 0&&te.wheelDelta!==0&&(re.delta=0<te.wheelDelta?1:-1),a.doMouseWheel(),eu(re,te)}},a.aA=function(te){a.isEnabled&&(a.Vk=!1,jl(a,te,!0),te=a.currentTool,te.cancelWaitAfter(),te.standardMouseOver())},a.ui=function(te){if(a.isEnabled){a.Vk=!0;var re=a.Yt;re[te.pointerId]===void 0&&(re[te.pointerId]=te),re=a.oj;var oe=!1;if(re[0]===null||re[0].pointerId!==te.pointerId&&re[0].pointerType===te.pointerType)if(re[1]!==null&&re[1].pointerId===te.pointerId)re[1]=te,oe=!0;else if(re[0]===null)re[0]=te;else if(re[1]===null)re[1]=te,oe=!0;else{te.preventDefault();return}else re[0]=te;(re=te.pointerType==="touch"||te.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var le=oe;oe=Bh(a,te,!0,!1,!0,le),wc(a,te,oe),oe.targetDiagram=dd(te,te.target),oe.targetObject=null,le||oe.clone(a.bq),le=a.uw,re=re?25:10,te.timeStamp-a.tw<a.zy&&!(Math.abs(le.x-te.screenX)>re||Math.abs(le.y-te.screenY)>re)?a.yq++:a.yq=1,oe.clickCount=a.yq,a.tw=te.timeStamp,a.uw.sg(te.screenX,te.screenY),a.doMouseDown(),te.button===1?te.preventDefault():eu(oe,te)}},a.dk=function(te){if(a.isEnabled){a.Vk=!0;var re=a.oj;if(re[0]===null||re[0].pointerId!==te.pointerId&&re[0].pointerType===te.pointerType){if(re[1]!==null&&re[1].pointerId===te.pointerId){re[1]=te;return}if(re[0]===null)re[0]=te;else return}else re[0]=te;if(re[0].pointerId===te.pointerId){re=Bh(a,te,!1,!1,!1,re[1]!==null);var oe=at.document.elementFromPoint(te.clientX,te.clientY)||null;oe!==null&&oe.shadowRoot!==void 0&&oe.shadowRoot!==null&&(oe=oe.shadowRoot.elementFromPoint(te.clientX,te.clientY));var le=a,ue=te;oe&&oe.H&&(ue=te,le=oe.H),re.targetDiagram=le,wc(a,ue,re),re.targetObject=null,a.doMouseMove(),eu(re,te)}}},a.fk=function(te){if(a.isEnabled){a.Vk=!0;var re=te.pointerType==="touch"||te.pointerType==="pen",oe=a.Yt;if(re&&a.qu)delete oe[te.pointerId],te.preventDefault();else if(oe=a.oj,oe[0]===null||oe[0].pointerId!==te.pointerId&&oe[0].pointerType===te.pointerType)oe[1]!==null&&oe[1].pointerId===te.pointerId&&(oe[1]=null);else{oe[0]=null,oe=Bh(a,te,!1,!0,!0,!1);var le=at.document.elementFromPoint(te.clientX,te.clientY)||null;le!==null&&le.shadowRoot!==void 0&&le.shadowRoot!==null&&(le=le.shadowRoot.elementFromPoint(te.clientX,te.clientY)),le!==null&&le.H instanceof mn&&le.H!==a&&wc(le.H,te,oe),le===null&&(le=te.target),wc(a,te,oe),oe.clickCount=a.yq,oe.targetDiagram=dd(te,le),oe.targetObject=null,a.doMouseUp(),eu(oe,te),re&&(a.wq=!1)}}},a.ek=function(te){if(a.isEnabled){a.Vk=!1;var re=a.Yt;re[te.pointerId]&&delete re[te.pointerId],re=a.oj,re[0]!==null&&re[0].pointerId===te.pointerId&&(re[0]=null),re[1]!==null&&re[1].pointerId===te.pointerId&&(re[1]=null),te.pointerType!=="touch"&&te.pointerType!=="pen"&&(te=a.currentTool,te.cancelWaitAfter(),te.standardMouseOver())}},a.ck=function(te){var re=a.oj;re[0]!==null&&re[0].pointerId===te.pointerId?(re[0]=null,a.wq=!1):re[1]!==null&&re[1].pointerId===te.pointerId&&(re[1]=null)},a.Vp=b.Z["d"+hh[1]+hh[2]+"wI"+dh.slice(1,5)]["b"+Bx.slice(1,y)](b.Z,df,y,y),b.Vc(!0),Qg(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}mn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},mn.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function Qg(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(at,"resize",a.Ov,!1)}function Gs(a){30<a.Sq&&(a.Yh=1)}function Qd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Ti&&Ti.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}mn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:at.devicePixelRatio||1},mn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},mn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},mn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},mn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},mn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},mn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},mn.prototype.doFocus=function(){this.focus()},mn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=at.scrollX||at.pageXOffset,y=at.scrollY||at.pageYOffset;this.ta.focus(),at.scrollTo(a,y)}},mn.prototype.Oy=function(){this.H.R("GainedFocus")},mn.prototype.Ny=function(){this.H.R("LostFocus")};function Md(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===xl&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function qd(a){var y=new Ca;y.name="Background",a.Al(y),y=new Ca,y.name="",a.Al(y),y=new Ca,y.name="Foreground",a.Al(y),y=new Ca,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Ca,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Ca,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function sf(a){var y=new hi(hi.Grid);y.name="GRID";var x=new io;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new io,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new io,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new io,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new io,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new io,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new mr,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 Zf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Hc(this.H)}function eh(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Hc(this.H)}mn.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,te=b.x-z.left,re=b.y-z.top,oe=b.width+z.left+z.right,le=b.height+z.top+z.bottom,ue=b.right+z.right;z=b.bottom+z.bottom;var me=E.x;b=E.y;var we=E.width,Ee=E.height,De=E.right,je=E.bottom;E=this.scale;var ct=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":ct=ct+a.scrollWidth-a.clientWidth;break;case"reverse":ct=a.scrollWidth-ct-a.clientWidth}var qe=ct;we<oe||Ee<le?(ct=Qe.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==qe&&(ct.x=qe/E+te,this.ju=qe),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(ct.y=a.scrollTop/E+re,this.lu=a.scrollTop),this.position=ct,Qe.free(ct),this.Ee=this.qr=!1):(ct=Qe.alloc(),a.uy&&this.allowHorizontalScroll&&(te<me&&(this.position=ct.h(qe+te,this.position.y)),ue>De&&(this.position=ct.h(-(y.scrollWidth-this.Aa)+qe-this.Aa/E+ue,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<b&&(this.position=ct.h(this.position.x,a.scrollTop+re)),z>je&&(this.position=ct.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+z))),Qe.free(ct),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ue=b.right,De=E.right,z=b.bottom,je=E.bottom,te=b.x,me=E.x,re=b.y,b=E.y,we>=oe&&te>=me&&ue<=De&&(x.style.width="1px"),Ee>=le&&re>=b&&z<=je&&(x.style.height="1px"))}},mn.prototype.computeBounds=function(a){return a===void 0&&(a=new _t),$s(this),th(this,a)};function th(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 te=b[z];if(te.visible&&te.isInDocumentBounds){te=te.Pa.s;for(var re=te.length,oe=0;oe<re;oe++){var le=te[oe];le.isInDocumentBounds&&le.isVisible()&&(le=le.actualBounds,le.w()&&(x?(x=!1,y.assign(le)):y.ed(le)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}mn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(bn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof vi||(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 vi||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new _t(NaN,NaN,0,0):x};function pu(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=Qe.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=_t.allocAt(0,0,b.width,b.height);var E=Qe.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,_t.free(b),Qe.free(E),Qe.free(x)}x=a.yh,y&&a.Fg!==xl&&(x=a.Fg);var z=x!==xl?Ld(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/z;var te=a.ya/z,re=a.zk,oe=a.pq;y&&!re.sb()&&(oe.sb()||oe.Xb())&&(re=oe.Xb()?wo:oe),lf(a,a.documentBounds,E,te,re,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,en.B(z.x,x)&&en.B(z.y,b)&&en.B(z.width,E)&&en.B(z.height,te)||a.onViewportBoundsChanged(new _t(x,b,E,te),z,y,!1)}}function Ld(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),te=a.ya+(a.Be?a.Db:0),re=z/E,oe=te/b;return y===tu?(y=Math.min(oe,re),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Oh?(y=oe>re?(te-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}mn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Td,this.scale=Ld(this,tu),a!==Td&&(pu(this,!1),lf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Le=mn.prototype,Le.BA=function(a,y){y===void 0&&(y=tu);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===tu||y===Oh)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===Oh?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 Qe(a.x,a.y)}},Le.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Qe(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))},Le.zz=function(a){if(a instanceof Qt){this.eq=a;var y=Qe.alloc();this.fq=this.op(a.ga(Ba,y)),Qe.free(y)}else this.eq=null,this.fq=po};function lf(a,y,x,b,E,z){var te=Qe.allocAt(a.pa.x,a.pa.y),re=te.x,oe=te.y;if(a.eq!==null){var le=Qe.alloc();le=a.eq.ga(Ba,le),re=le.x-a.fq.x/a.scale,oe=le.y-a.fq.y/a.scale,E=La,Qe.free(le)}(z||a.scrollMode===Td)&&(E.sb()&&(x>y.width&&(re=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(oe=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?(re=Math.min(re+x/2,y.right+Math.max(z,E.right)-x/2),re=Math.max(re,y.left-Math.max(z,E.left)+x/2),re-=x/2):re>y.left?re=y.left:re<y.right-x&&(re=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(oe=Math.min(oe+b/2,y.bottom+Math.max(x,E.bottom)-b/2),oe=Math.max(oe,y.top-Math.max(x,E.top)+b/2),oe-=b/2):oe>y.top?oe=y.top:oe<y.bottom-b&&(oe=y.bottom-b)),te.x=isFinite(re)?re:-a.yb.left,te.y=isFinite(oe)?oe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,te),te.x=y.x,te.y=y.y),As(a.Yd,a.pa,te),a.pa.h(te.x,te.y),Ec(a),Qe.free(te)}Le.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Yu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof mr)return a}else if(a=Yu(this,a,function(x){return x.part}),a instanceof mr)return a;return null},Le.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),$s(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 Yu(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),$s(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}Le.lz=function(a,y,x){return y===void 0&&(y=!0),jc(this,a,function(b){return b.part},y?function(b){return b instanceof mr&&b.canSelect()}:null,x)};function jc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof Rn||E instanceof _n||(E=new _n),$s(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,b,E)}return E}Le.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Rn||b instanceof _n||(b=new _n),$s(this);for(var E=this.Wa.iteratorBackwards;E.next();){var z=E.value;z.visible&&z.ji(a,y,x,b)}return b},Le.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),Nd(this,a,function(E){return E instanceof mr&&(!x||E.canSelect())},y,b)},Le.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Rn||E instanceof _n||(E=new _n),$s(this);for(var z=this.Wa.iteratorBackwards;z.next();){var te=z.value;te.visible&&te.Cf(a,y,x,b,E)}return E},Le.Nu=function(a,y,x,b,E,z){var te=new _n;$s(this);for(var re=this.Wa.iteratorBackwards;re.next();){var oe=re.value;oe.visible&&oe.Nu(a,y,x,b,te,E,z)}return te};function Nd(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 Rn||E instanceof _n||(E=new _n),$s(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.Cf(y,z,x,b,E)}return E}Le.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),cd(this,a,y,function(z){return z instanceof mr&&(!b||z.canSelect())},x,E)},Le.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 Rn||E instanceof _n)&&(z=E),E=!0),z instanceof Rn||z instanceof _n||(z=new _n),$s(this);for(var te=this.Wa.iteratorBackwards;te.next();){var re=te.value;re.visible&&re.og(a,y,x,b,E,z)}return z};function cd(a,y,x,b,E,z){var te=null;for(te===void 0&&(te=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Rn||E instanceof _n)&&(z=E),E=!0),z instanceof Rn||z instanceof _n||(z=new _n),$s(a),a=a.Wa.iteratorBackwards;a.next();){var re=a.value;re.visible&&!re.isTemporary&&re.og(y,x,te,b,E,z)}return z}mn.prototype.acceptEvent=function(a){return jl(this,a,a instanceof MouseEvent)};function jl(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?wc(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),Ki&&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=dd(y,y.target),b.targetObject=null,b}function dd(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 Bh(a,y,x,b,E,z){var te=a.Qg;return a.Qg=a.cj,a.cj=te,te.diagram=a,te.clickCount=1,a=te.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),te.modifiers=a,te.event=y,te.timestamp=y.timeStamp,te.button=y.button,te.buttons=y.buttons,Ki&&y.button===0&&y.ctrlKey&&(te.button=2),te.down=x,te.up=b,te.handled=!1,te.bubbles=E,te.isMultiTouch=z,te}function eu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}mn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=jl(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(),eu(x,a)},mn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=jl(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(),eu(x,a)},mn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=jl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),eu(x,a)},mn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=jl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),eu(x,a)},mn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Qe(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?qr(new Qe(y,a),this.Ab):new Qe(y,a)};function wc(a,y,x){var b=a.ta,E=a.Aa,z=a.ya,te=0,re=0;b!==null&&(b=b.getBoundingClientRect(),te=y.clientX-E/b.width*b.left,re=y.clientY-z/b.height*b.top),x.viewPoint.h(te,re),a.Ab!==null?(y=Qe.allocAt(te,re),a.Ab.Cd(y),x.documentPoint.assign(y),Qe.free(y)):x.documentPoint.h(te,re)}function nh(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))}}mn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function ih(a){a.ld||$s(a),a.Va()}mn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Le=mn.prototype,Le.Pz=function(){return this.kg},Le.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Cl(this),this.hf=!1,this.du=new Qe(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&kn(function(){b.ld=!1,il(y,"Model"),a(b)},1)},Le.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;at.requestAnimationFrame(function(){y.kg&&y.bd()})}},Le.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Cl(this))};function zc(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Hc(a)||(y&&$s(a),x&&pu(a,!1))}function Cl(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,te=0;te<z;te++){var re=E[te];pt(re,!1),re.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(oe){oe.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Md(a),zc(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(bc(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),$s(a),z=!1,(!a.hf||a.xh)&&(a.hf?xg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),xg(a,!1)),z=!0),a.Jk=!1,$s(a),a.ou||ih(a),zc(a,!0,!1),te=!1,z?(x=_t.alloc(),x.assign(a.viewportBounds),a.hf||(te=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Th(a)),a.R("LayoutCompleted"),zc(a,!0,!1),_t.free(x)):x.Ok&&x.Qw&&(a.Fg!==xl?a.scale=Ld(a,a.Fg):a.yh!==xl?a.scale=Ld(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),pu(a,!0)),z&&te&&a.eb("Initial Layout"),$s(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Th(a){if(a.Fg!==xl)a.scale=Ld(a,a.Fg);else if(a.yh!==xl)a.scale=Ld(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}pu(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),bc(a)}function $s(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 _n,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Yr&&b.U&65536&&(b.U=b.U^65536)})}}Le.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Yr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Yr&&x.isVisible()&&xa(this,x);for(a.reset();a.next();)x=a.value,x instanceof vi&&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 jo&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function xa(a,y){for(var x=Sn(),b=Sn(),E=y.memberParts;E.next();){var z=E.value;z.isVisible()&&(z instanceof Yr?(vt(z)||Bt(z)||mf(z))&&xa(a,z):z instanceof vi?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(Gn(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();Gn(b)}Le.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},Le.gc=function(a){if(this.Ka!==null){if(this.ta===null&&St("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Du(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,te=Math.round(y.y*E)/E,re=this.Ab;for(re.reset(),E!==1&&re.scale(E),y.x===0&&y.y===0||re.translate(-z,-te),a.ti=null,va(a,re.m11,re.m12,re.m21,re.m22,re.dx,re.dy),this.pb!==1&&(a.globalAlpha=this.pb),Sl(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?Id(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(ro.prototype.Cd=ro.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,Du(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 e;z=this.Ab,z.reset(),te=this.Mb,re=this.pa;var oe=this.Ca,le=Math.round(re.x*oe)/oe,ue=Math.round(re.y*oe)/oe;for(oe!==1&&z.scale(oe),re.x===0&&re.y===0||z.translate(-le,-ue),a.setTransform(te,0,0,te,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Sl(this,a),re=0;re<E;re++)a.setTransform(te,0,0,te,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[re].gc(a,this);if(y=!1,this.Yf?Id(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(ro.prototype.Cd=ro.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=Ti&&Ti.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 ls(a,y,x,b,E,z,te,re,oe,le){if(a.Ka!==null){a.ta===null&&St("No canvas specified"),te===void 0&&(te=null),re===void 0&&(re=null),oe===void 0&&(oe=!1),le===void 0&&(le=!1),Du(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ue=a.Ca;a.Ca=E;var me=a.Wa.s,we=me.length;try{var Ee=new _t(z.x,z.y,b.width/E,b.height/E),De=Ee.copy();De.Co(x),bc(a,De),$s(a),a.Fd(me,we,a,Ee),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),re!==null&&re!==""&&(y.fillStyle=re,y.ox(0,0,b.width,b.height));var je=a.Mb;y.scale(je,je);var ct=ro.alloc();ct.reset(),ct.translate(x.left,x.top),ct.scale(E),z.x===0&&z.y===0||ct.translate(-z.x,-z.y),y.setTransform(ct.m11,ct.m12,ct.m21,ct.m22,ct.dx,ct.dy),y.yc(),y instanceof Uo&&va(y,ct.m11,ct.m12,ct.m21,ct.m22,ct.dx,ct.dy),ro.free(ct),Sl(a,y),y.globalAlpha=a.pb;var qe=a.Qj("Grid");if(te){var Ct=new _n,Lt=te.iterator;for(Lt.reset();Lt.next();){var Rt=Lt.value;Rt instanceof mr&&(le||Rt.layer!==qe)&&(Rt.Gj(),Ct.add(Rt))}for(le=0;le<we;le++)Rl(me[le],y,a,Ct,oe);Ct.each(function(vn){return vn.Gj()})}else for(Ct=0;Ct<we;Ct++){var Jt=me[Ct];Jt===qe?le&&Jt.gc(y,a,!0):Jt.gc(y,a,oe)}a.$i=!1,a.Yf&&Id(a.Yf,a)&&a.Vp()}finally{a.Ca=ue,a.ib.Vc(!0),a.vd=!0,a.Fd(me,we,a,a.viewportBounds),bc(a),a.ib instanceof Uo&&(a.ib.Nj.PA(),a.redraw())}}}Le.Gf=function(a){return this.Rg[a]},Le.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Le.Tx=function(){this.Rg=new $i,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Ki||Ji),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Sl(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Le.Ql=function(a){return this.on[a]},Le.sA=function(a,y){this.on[a]=y},Le.Sx=function(){this.on=new $i,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Le.set=function(a){return Object.assign(this,a),this},Le.Du=function(a){return this.nm(a)},Le.nm=function(a){return Au(this,a),this};function Au(a,y){var x=a instanceof hi,b=a instanceof mn,E;for(E in y){E===""&&St("Setting properties requires non-empty property names");var z=a,te=E;if(x||b){var re=E.indexOf(".");if(0<re){var oe=E.substring(0,re);x?z=a.fb(oe):(z=a[oe],z==null&&(z=a.toolManager[oe])),rn(z)?te=E.substr(re+1):St("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+E)}}if(te[0]!=="_"&&!ii(z,te))if(b&&te==="ModelChanged"){a.Yw(y[te]);continue}else if(b&&te==="Changed"){a.Pe(y[te]);continue}else if(b&&ii(a.toolManager,te))z=a.toolManager;else if(b&&qg(a,te)){a.Bj(te,y[te]);continue}else if(a instanceof ar&&te==="Changed"){a.Pe(y[te]);continue}else St('Trying to set undefined property "'+te+'" on object: '+z.toString());z[te]=y[E],te[0]==="_"&&z instanceof Qt&&z.Vw(te)}}Le.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Ii,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Le.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},mn.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!==cf&&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=_t.alloc(),yg(this,this.computeBounds(b)),_t.free(b)),b=this.ta,b===null||b instanceof bo)))){var te=this.Mb;E=this.Aa*te;var re=this.ya*te,oe=this.scale*te;z=Math.round(Math.round(y.x*oe)-Math.round(a.x*oe)),y=Math.round(Math.round(y.y*oe)-Math.round(a.y*oe)),oe=this.jw,a=this.oy,oe.width!==E&&(oe.width=E),oe.height!==re&&(oe.height=re),a.clearRect(0,0,E,re),oe=190*te;var le=70*te,ue=Math.max(z,0),me=Math.max(y,0),we=Math.floor(E-ue),Ee=Math.floor(re-me);a.drawImage(b.Oa,ue,me,we,Ee,0,0,we,Ee),Id(this.Yf,this)&&a.clearRect(0,0,oe,le),b=Sn(),a=Sn(),Ee=Math.abs(z),we=Math.abs(y);var De=ue===0?0:E-Ee;ue=Qe.allocAt(De,0),Ee=Qe.allocAt(Ee+De,re),a.push(new _t(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y)));var je=this.Ab;if(je.reset(),je.scale(te,te),this.Ca!==1&&je.scale(this.Ca),te=this.pa,(te.x!==0||te.y!==0)&&isFinite(te.x)&&isFinite(te.y)&&je.translate(-te.x,-te.y),qr(ue,je),qr(Ee,je),b.push(new _t(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),De=me===0?0:re-we,ue.h(0,De),Ee.h(E,we+De),a.push(new _t(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),qr(ue,je),qr(Ee,je),b.push(new _t(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),Id(this.Yf,this)&&(E=0<z?0:-z,re=0<y?0:-y,ue.h(E,re),Ee.h(oe+E,le+re),a.push(new _t(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),qr(ue,je),qr(Ee,je),b.push(new _t(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y)))),Qe.free(ue),Qe.free(Ee),zc(this,!1,!0),this.Ka===null&&St("No div specified"),this.ta===null&&St("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Du(this),re=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*re,this.ya*re),E.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,te=this.Ca,oe=Math.round(z.x*te)/te,le=Math.round(z.y*te)/te,y=this.Ab,y.reset(),te!==1&&y.scale(te),z.x===0&&z.y===0||y.translate(-oe,-le),E.save(),E.beginPath(),z=a.length,te=0;te<z;te++)oe=a[te],oe.width!==0&&oe.height!==0&&E.rect(Math.floor(oe.x),Math.floor(oe.y),Math.ceil(oe.width),Math.ceil(oe.height));for(E.clip(),E.setTransform(re,0,0,re,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),Sl(this,E),E.globalAlpha=this.pb,re=0;re<z;re++)if(te=y[re],oe=b,te.visible&&te.pb!==0){le=Ts(te,E),me=te.Zq,me.length=0,ue=this.scale,we=_t.alloc(),Ee=te.Pa.s,je=Ee.length,De=oe.length;for(var ct=0;ct<je;ct++){var qe=Ee[ct],Ct=qf(qe,qe.actualBounds);e:{for(var Lt=2/ue,Rt=4/ue,Jt=0;Jt<De;Jt++){var vn=oe[Jt];if(vn.width!==0&&vn.height!==0&&Ct.Vu(vn.x-Lt,vn.y-Lt,vn.width+Rt,vn.height+Rt)){Ct=!0;break e}}Ct=!1}Ct&&te.Oj(E,qe,this,me,ue,we,!0)}_t.free(we),E.globalAlpha=le}E.restore(),E.Vc(!0),this.Yf&&Id(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Gn(b),Gn(a),this.ld=!1}}else this.bd();x&&(Gs(this),this.bd(),Qd(this,!0))}else x?(Gs(this),this.bd(),Qd(this,!0)):this.bd()}};function Du(a){a.pn!==!1&&(a.pn=!1,Fd(a,a.Aa,a.ya))}function Fd(a,y,x){Ec(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Hc(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,te=a.gf?a.Db:0,re=a.Be?a.Db:0,oe=E.clientWidth||x+te,le=E.clientHeight||b+re,ue=a.viewportBounds;E=ue.x;var me=ue.y,we=ue.width,Ee=ue.height;if((oe!==x+te||le!==b+re)&&(a.gf=!1,a.Be=!1,re=te=0,a.Aa=oe,a.ya=le,z=a.pn=!0,Ec(a)),!a.hf||!a.viewportBounds.w())return!0;var De=a.ku,je=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var ct=a.documentBounds,qe=0,Ct=0,Lt=0,Rt=0,Jt=ue.width,vn=ue.height,Fi=a.rj;a.contentAlignment.sb()?(ct.width>Jt&&(qe=Fi.left,Ct=Fi.right),ct.height>vn&&(Lt=Fi.top,Rt=Fi.bottom)):(qe=Fi.left,Ct=Fi.right,Lt=Fi.top,Rt=Fi.bottom);var Yi=ct.width+qe+Ct,Hi=ct.height+Lt+Rt;Fi=a.scale;var mi=Yi>oe/Fi,ni=Hi>le/Fi;if(!(z||a.gf||a.Be||mi||ni))return!0;qe=ct.x-qe,oe=ue.x,Ct=ct.right+Ct,le=ue.right+te,Lt=ct.y-Lt;var Ur=ue.y;ct=ct.bottom+Rt,ue=ue.bottom+re;var Dr="1px";if(Rt="1px",a.scrollMode===Td&&(mi||ni)&&(mi&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(mi=1,qe+1<oe&&(mi=Math.max((oe-qe)*Fi+a.Aa,mi)),Ct>le+1&&(mi=Math.max((Ct-le)*Fi+a.Aa,mi)),Jt+te+1<Yi&&(mi=Math.max((Yi-Jt)*Fi+a.Aa,mi)),Dr=mi.toString()+"px"),ni&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(mi=1,Lt+1<Ur&&(mi=Math.max((Ur-Lt)*Fi+a.ya,mi)),ct>ue+1&&(mi=Math.max((ct-ue)*Fi+a.ya,mi)),vn+re+1<Hi&&(mi=Math.max((Hi-vn)*Fi+a.ya,mi)),Rt=mi.toString()+"px")),mi=Dr!=="1px",ni=Rt!=="1px",mi&&ni||!mi&&!ni||(ni&&(le-=a.Db),mi&&(ue-=a.Db),Yi<Jt+te||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(te=1,qe+1<oe&&(te=Math.max((oe-qe)*Fi+a.Aa,te)),Ct>le+1&&(te=Math.max((Ct-le)*Fi+a.Aa,te)),Jt+1<Yi&&(te=Math.max((Yi-Jt)*Fi+a.Aa,te)),Dr=te.toString()+"px"),mi=Dr!=="1px",te=a.ya,mi!==a.Be&&(te=mi?a.ya-a.Db:a.ya+a.Db),Hi<vn+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,Lt+1<Ur&&(re=Math.max((Ur-Lt)*Fi+te,re)),ct>ue+1&&(re=Math.max((ct-ue)*Fi+te,re)),vn+1<Hi&&(re=Math.max((Hi-vn)*Fi+te,re)),Rt=re.toString()+"px"),ni=Rt!=="1px"),a.qr&&mi===a.Be&&ni===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(mi!==a.Be&&(Dr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=mi,je.style.width=Dr,ni!==a.gf&&(Rt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=Qe.alloc(),ni?(y.style.left=a.Db+"px",a.position=re.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=re.h(a.pa.x-a.Db/a.scale,a.pa.y)),Qe.free(re))),z&&Ec(a),a.gf=ni,je.style.height=Rt,a.gu=!0,z&&(a.pn=!0),y=De.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Jt+1<Yi?y=(a.position.x-qe)*Fi:qe+1<oe?y=De.scrollWidth-De.clientWidth:Ct>le+1&&(y=a.position.x*Fi)),a.tn)switch(a.bu){case"negative":y=-(De.scrollWidth-y-De.clientWidth);break;case"reverse":y=De.scrollWidth-y-De.clientWidth}return De.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(vn+1<Hi?De.scrollTop=(a.position.y-Lt)*Fi:Lt+1<Ur?De.scrollTop=De.scrollHeight-De.clientHeight:ct>ue+1&&(De.scrollTop=a.position.y*Fi)),oe=a.Aa,le=a.ya,De.style.width=oe+(a.gf?a.Db:0)+"px",De.style.height=le+(a.Be?a.Db:0)+"px",x!==oe||b!==le||a.animationManager.zb?(x=_t.allocAt(E,me,we,Ee),a.onViewportBoundsChanged(x,a.viewportBounds,Fi,z),_t.free(x),!1):!0}Le=mn.prototype,Le.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&St("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&St('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(Va,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Le.oi=function(a){this.partManager.oi(a);var y=this;Yf(a,function(x){kh(y,x)}),(a instanceof jo||a instanceof Yr&&a.placeholder!==null)&&a.v(),a.data!==null&&Yf(a,function(x){vy(y.partManager,x)}),Bt(a)!==!0&&mf(a)!==!0||this.De.add(a),jS(a,!0,this),HS(a)?(a.actualBounds.w()&&this.N(qf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(qf(a,a.actualBounds)),this.$b()},Le.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Yf(a,function(x){yy(y.partManager,x,y)}),this.De.remove(a),HS(a)?(a.actualBounds.w()&&this.N(qf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(qf(a,a.actualBounds)),this.$b()},Le.remove=function(a){rh(this,a,!0)};function rh(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(cs,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}Le.Is=function(a,y){if(y===void 0&&(y=!1),bn(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 _n,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Le.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},mn.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=Wf(this)),this.toolManager!==null){var E=new Ii;if(a!==null)if(bn(a))for(var z=0;z<a.length;z++)Hu(this,E,a[z],x,b);else for(a=a.iterator;a.next();)Hu(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Hu(this,E,a.value,x,b);for(a=this.nodes;a.next();)Hu(this,E,a.value,x,b);for(a=this.links;a.next();)Hu(this,E,a.value,x,b)}Cc(this,E,y,b,x)}};function Hu(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=Wf(a)),x instanceof Di){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Yr&&(x.placeholder!==null||E.dragsMembers))for(z=x.memberParts;z.next();)Hu(a,y,z.value,b,E,E.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var te=z.value;if(!y.contains(te)){var re=te.fromNode,oe=te.toNode;re!==null&&y.contains(re)&&oe!==null&&y.contains(oe)&&Hu(a,y,te,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Hu(a,y,x.value,b,E)}else if(x instanceof vi)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Hu(a,y,x.value,b,E);else x instanceof jo||y.add(x,a.Pd(E,x,x.location))}function Cc(a,y,x,b,E){if(y!==null&&y.count!==0){var z=Qe.alloc(),te=Qe.alloc();te.assign(x),isNaN(te.x)&&(te.x=0),isNaN(te.y)&&(te.y=0),(x=a.Mr)||$f(a,y);for(var re=Sn(),oe=Sn(),le=y.iterator,ue=Qe.alloc();le.next();){var me=le.key,we=le.value;if(me.Zc()){var Ee=hg(a,me,y);Ee!==null?re.push(new ie(me,we,Ee)):(!E||me.canMove())&&(Ee=we.point,z.assign(Ee),a.computeMove(me,z.add(te),b,ue),me.location=ue,we.shifted===void 0&&(we.shifted=new Qe),we.shifted.assign(ue.re(Ee)))}else le.key instanceof vi&&oe.push(le.sa)}for(Qe.free(ue),E=re.length,le=0;le<E;le++)me=re[le],z.assign(me.info.point),me.Su.shifted===void 0&&(me.Su.shifted=new Qe),me.node.location=z.add(me.Su.shifted);for(E=Qe.alloc(),le=Qe.alloc(),me=oe.length,we=0;we<me;we++){var De=oe[we];if(Ee=De.key,Ee instanceof vi)if(Ee.suspendsRouting){Ee.Tg=null,ue=Ee.fromNode;var je=Ee.toNode;if(a.draggedLink!==null&&b.dragsLink)if(je=De.value.point,Ee.dragComputation===null)y.add(Ee,a.Pd(b,Ee,te)),Gh(Ee,te.x-je.x,te.y-je.y);else{De=Qe.allocAt(0,0),(ue=Ee.i(0))&&ue.w()&&De.assign(ue);var ct=ue=Qe.alloc().assign(De).add(te);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(ct=Qe.alloc(),Gf(a,Ee,ue,ct,b)),ue.assign(Ee.dragComputation(Ee,ue,ct)).re(De),y.add(Ee,a.Pd(b,Ee,ue)),Gh(Ee,ue.x-je.x,ue.y-je.y),Qe.free(De),Qe.free(ue),ct!==ue&&Qe.free(ct)}else ue!==null&&(E.assign(ue.location),ct=y.I(ue),ct!==null&&E.re(ct.point)),je!==null&&(le.assign(je.location),ct=y.I(je),ct!==null&&le.re(ct.point)),ue!==null&&je!==null?E.Xa(le)?(ue=De.value.point,je=z,je.assign(E),je.re(ue),y.add(Ee,a.Pd(b,Ee,E)),Gh(Ee,je.x,je.y)):(Ee.suspendsRouting=!1,Ee.bb()):(De=De.value.point,ue=ue!==null?E:je!==null?le:te,y.add(Ee,a.Pd(b,Ee,ue)),Gh(Ee,ue.x-De.x,ue.y-De.y))}else(Ee.fromNode===null||Ee.toNode===null)&&(ue=De.value.point,y.add(Ee,a.Pd(b,Ee,te)),Gh(Ee,te.x-ue.x,te.y-ue.y))}Qe.free(z),Qe.free(te),Qe.free(E),Qe.free(le),Gn(re),Gn(oe),x||($s(a),Ad(a,y))}}mn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new Qe),b.assign(y),a===null)return b;var E=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=Qe.alloc(),Gf(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var te=a.minLocation,re=te.x;isNaN(re)&&(re=z?Math.round(1e3*a.location.x)/1e3:a.location.x),te=te.y,isNaN(te)&&(te=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var oe=a.maxLocation,le=oe.x;return isNaN(le)&&(le=z?Math.round(1e3*a.location.x)/1e3:a.location.x),oe=oe.y,isNaN(oe)&&(oe=z?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(re,Math.min(x.x,le)),Math.max(te,Math.min(x.y,oe))),E!==y&&Qe.free(E),b};function Wf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Gf(a,y,x,b,E){if(E===void 0&&(E=Wf(a)),b.assign(x),y!==null){var z=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var te=E.gridSnapOrigin,re=te.x;if(te=te.y,E=E.gridSnapCellSpot,z!==null){var oe=z.gridCellSize;isNaN(a)&&(a=oe.width),isNaN(y)&&(y=oe.height),z=z.gridOrigin,isNaN(re)&&(re=z.x),isNaN(te)&&(te=z.y)}z=Qe.allocAt(0,0),z.yi(0,0,a,y,E),en.No(x.x,x.y,re+z.x,te+z.y,a,y,b),Qe.free(z)}}function $f(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof vi&&(y.suspendsRouting=!0)}function Ad(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof vi&&(x.suspendsRouting=!1,iy(x)&&x.bb())}a.Mr=!1}}function hg(a,y,x){return y=y.containingGroup,y!==null&&(a=hg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Le=mn.prototype,Le.Pd=function(a,y,x){if(x===void 0)return new Zc(Qr);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Zc(new Qe(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Zc(x.copy())};function fg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&St("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&St("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&St("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&St("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&St("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Le.Al=function(a){fg(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(Va,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Le.Ww=function(a,y){fg(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(cs,"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(Va,"layers",this,null,a,null,z),this.N(),0>b&&this.Ya(),this},Le.Cy=function(a,y){fg(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(cs,"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(Va,"layers",this,null,a,null,z+1),this.N(),0>b&&this.Ya(),this},Le.kA=function(a){if(a.diagram!==this&&St("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(cs,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Le.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Le.Yw=function(a){return this.pf===null&&(this.pf=new Rn),this.pf.add(a),this.model.Pe(a),this},Le.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Le.Pe=function(a){return this.zg===null&&(this.zg=new Rn),this.zg.add(a),this},Le.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Le.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Ll&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},Le.cb=function(a,y,x,b,E,z,te){z===void 0&&(z=null),te===void 0&&(te=null);var re=new Pa;re.diagram=this,re.change=a,re.propertyName=y,re.object=x,re.oldValue=b,re.oldParam=z,re.newValue=E,re.newParam=te,this.ds(re)},Le.g=function(a,y,x,b,E){this.cb(wa,a,this,y,x,b,E)},mn.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===wa){var E=a.object;if(ba(E,a.propertyName,a.I(y)),E instanceof Qt){var z=E.part;z!==null&&z.Wb()}this.isModified=!0}else if(b===Va){var te=a.object,re=a.newParam,oe=a.newValue;if(te instanceof hi)if(typeof re=="number"&&oe instanceof Qt){y?te.pc(re):te.Gb(re,oe);var le=te.part;le!==null&&le.Wb()}else typeof re=="number"&&oe instanceof Cs&&(oe.isRow?dS(te,re,y?void 0:oe):hS(te,re,y?void 0:oe));else if(te instanceof Ca){var ue=a.oldParam===!0;typeof re=="number"&&oe instanceof mr&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),te.pc(ue?re:-1,oe,ue)):te.oi(re,oe,ue))}else te instanceof mn?typeof re=="number"&&oe instanceof Ca&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):St("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===cs){var me=a.object,we=a.oldParam,Ee=a.oldValue;if(me instanceof hi)typeof we=="number"&&Ee instanceof Qt?y?me.Gb(we,Ee):me.pc(we):typeof we=="number"&&Ee instanceof Cs&&(Ee.isRow?dS(me,we,y?Ee:void 0):hS(me,we,y?Ee:void 0));else if(me instanceof Ca){var De=a.newParam===!0;typeof we=="number"&&Ee instanceof mr&&(y?0>me.Pa.indexOf(Ee)&&me.oi(we,Ee,De):(Ee.isSelected=!1,Ee.isHighlighted=!1,Ee.Wb(),me.pc(De?we:-1,Ee,De)))}else me instanceof mn?typeof we=="number"&&Ee instanceof Ca&&(y?(Ee.Xe(this),this.Wa.Gb(we,Ee)):this.Wa.mb(we)):St("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ll&&St("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},mn.prototype.Ea=function(a){return this.undoManager.Ea(a)},mn.prototype.eb=function(a){return this.undoManager.eb(a)},mn.prototype.Kf=function(){return this.undoManager.Kf()},mn.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}},mn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},mn.prototype.rp=function(){this.partManager.rp()};function gg(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Ec(a),a.N(),a.Ee=!0,b.zb&&(Ws(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Ec(a);else{a.vb=!0;var E=a.viewportBounds.copy(),z=a.Aa,te=a.ya,re=a.zoomPoint.x,oe=a.zoomPoint.y,le=a.contentAlignment;isNaN(re)&&(le.$c()?le.Hf(rc)?re=0:le.Hf(wl)&&(re=z-1):re=le.sb()?le.x*(z-1):z/2),isNaN(oe)&&(le.$c()?le.Hf(ju)?oe=0:le.Hf(sl)&&(oe=te-1):oe=le.sb()?le.y*(te-1):te/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=Qe.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,Qe.free(z),a.Ca=x,Ec(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),pu(a,!1),b.zb&&(Ws(b)||b.ce.add(b.H,"scale",y,a.Ca))}}mn.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!==xl||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof fa&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),jf(E,this)),this.vb||this.invalidateViewport(a,y),bc(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 bc(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=pi.alloc(),E=1,z=1,te=x.O.s,re=te.length,oe=0;oe<re;oe++){var le=te[oe],ue=Math.abs(le.interval);2>ue||(Ev(le.figure)?z=z*ue/en.vx(z,ue):E=E*ue/en.vx(E,ue))}if(te=x.gridCellSize,b.h(z*te.width,E*te.height),y!==void 0)E=y.width,z=y.height,a=y.x,te=y.y;else{if(y=_t.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){_t.free(y);return}E=y.width,z=y.height,a=y.x,te=y.y,_t.free(y)}x.width=E+2*b.width,x.height=z+2*b.height,y=Qe.alloc(),en.No(a,te,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),pi.free(b),x.part.location=y,Qe.free(y)}}mn.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)}},mn.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))},mn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),bn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof mr||St("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 mr||St("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},mn.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()}},Le=mn.prototype,Le.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Le.Jz=function(a){a=new _n().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 mr||St("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Le.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,z=Qe.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)),Qe.free(z);return}St("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):St("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Qe.free(z)},Le.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},Le.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Le.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},Le.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,z=b+a.height,te=y.m11,re=y.m12,oe=y.m21,le=y.m22,ue=y.dx,me=y.dy,we=x*te+b*oe+ue;y=x*re+b*le+me;var Ee=E*te+b*oe+ue;return a=E*re+b*le+me,b=x*te+z*oe+ue,x=x*re+z*le+me,te=E*te+z*oe+ue,E=E*re+z*le+me,z=Math.min(we,Ee),we=Math.max(we,Ee),Ee=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,b),we=Math.max(we,b),Ee=Math.min(Ee,x),y=Math.max(y,x),z=Math.min(z,te),we=Math.max(we,te),Ee=Math.min(Ee,E),y=Math.max(y,E),new _t(z,Ee,we-z,y-Ee)},Le.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),qr(a.copy(),this.Ab)};function pg(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function mg(a){return a=Uf.get(a),a!==null?new a:new qo}mn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Ll&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(oe){return oe.diagram=E}),a.mouseMoveTools.each(function(oe){return oe.diagram=E}),a.mouseUpTools.each(function(oe){return oe.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===Ll){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),$s(this));var z=this.animationManager;b==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Fs(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 te=a.isTransactionFinished;if(te&&(pg(this),this.As.clear(),$a(this.animationManager)),!this.Rt&&te&&this.lastInput.targetDiagram){this.Rt=!0;var re=this;kn(function(){re.currentTool.standardMouseOver(),re.Rt=!1},10)}}}finally{this.aa=!0}}}};function kh(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)oh(a,y[b])}function oh(a,y){if(y instanceof ru){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof _n&&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 vg(a,y){if(y instanceof ru){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 _n&&x.Bg.remove(a),fp(b));break}}}}}mn.prototype.Wd=function(){this.partManager.Wd()},mn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},mn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},mn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},mn.prototype.Vb=function(a){return this.partManager.Vb(a)},mn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Le=mn.prototype,Le.Lc=function(a){return this.partManager.Lc(a)},Le.ii=function(a){return this.partManager.ii(a)},Le.Kc=function(a){return this.partManager.Kc(a)},Le.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:an(Ri(y)))},Le.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:an(Ri(y)))};function Ec(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 yg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),pu(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Le.Va=function(){if(this.Zi){var a=_t.alloc();yg(this,this.computeBounds(a)),_t.free(a)}},Le.rz=function(){for(var a=new _n,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},Le.qz=function(){return this.ai.iterator},Le.Uz=function(a){$s(this),a&&ah(this,!0),this.ld?xg(this,!1):(this.Jk=!0,Cl(this))};function ah(a,y){for(var x=a.ai.iterator;x.next();)Sg(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function Sg(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)Sg(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function xg(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||il(z,"Layout")),a.xh=!1;for(var te=a.ai.iterator;te.next();)Pg(a,te.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),$s(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||Fs(z),a.aa=x}}}function Pg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Pg(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),xa(a,y),E.isValidLayout=!0):a.xh=!0)}}Le.yz=function(){for(var a=new Rn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function Wp(a){function y(E){var z=E.toLowerCase(),te=new Rn;x.add(E,te),x.add(z,te),b.add(E,E),b.add(z,E)}var x=new Ii,b=new Ii;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 qg(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Dd(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;St("Unknown DiagramEvent name: "+y)}Le.Bj=function(a,y){return a=Dd(this,a),a!==null&&a.add(y),this},Le.am=function(a,y){a=Dd(this,a),a!==null&&a.remove(y)},Le.R=function(a,y,x){var b=Dd(this,a),E=new od;if(E.diagram=this,a=qg(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 Kf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Le.Yj=function(a,y){return uf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},mn.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?th(this,a):a.assign(this.documentBounds)};function uf(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new lm(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=ep(a,x)),x===null){y=_t.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var z=a.nodes;z.next();){var te=z.value,re=te.layer;re!==null&&re.visible&&!re.isTemporary&&Vf(a,te,b,y)}_t.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=_t.alloc(),z=x.memberParts;z.next();)te=z.value,te instanceof Di&&Vf(a,te,b,y);_t.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&o1(E);return E}function ep(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?ep(a,y.containingGroup):null}function Vf(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(Sp(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(Kh,x,y+1);else for(var te=x;te<=y;te++)z[te]=Kh}else if(y instanceof Yr)for(y=y.memberParts;y.next();)E=y.value,E instanceof Di&&Vf(a,E,x,b)}}function sh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}mn.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():wg(this)};function wg(a){a.vk===-1&&(a.vk=kn(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=_t.alloc(),a.computeBounds(y),y.ed(a.documentBounds),yg(a,y),_t.free(y),a.Fc=!0,a.bd(),wg(a))}},a.vp))}mn.prototype.ug=function(){this.vk!==-1&&(at.clearTimeout(this.vk),this.vk=-1)},mn.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=_t.allocAt(0,0,b.width*E,b.height*E);var z=Qe.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var te=Math.max(this.scrollHorizontalLineChange,1);te|=0,z.x-=te,a.x<b.x+x.left/2&&(z.x-=te),a.x<b.x+x.left/4&&(z.x-=4*te)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(te=Math.max(this.scrollHorizontalLineChange,1),te|=0,z.x+=te,a.x>b.x+b.width-x.right/2&&(z.x+=te),a.x>b.x+b.width-x.right/4&&(z.x+=4*te));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(te=Math.max(this.scrollVerticalLineChange,1),te|=0,z.y-=te,a.y<b.y+x.top/2&&(z.y-=te),a.y<b.y+x.top/4&&(z.y-=4*te)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(te=Math.max(this.scrollVerticalLineChange,1),te|=0,z.y+=te,a.y>b.y+b.height-x.bottom/2&&(z.y+=te),a.y>b.y+b.height-x.bottom/4&&(z.y+=4*te)),z.Xa(Qr)||(y=new Qe(y.x+z.x/E,y.y+z.y/E)),_t.free(b),Qe.free(z),y},Le=mn.prototype,Le.Cs=function(){return null},Le.av=function(){return null},Le.bs=function(a,y){this.pj.add(a,y)},Le.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Yr&&(y.$p=null)})};function lh(a,y,x){function b(){var ue=+new Date;for(z=!0,te.reset();te.next();)if(!te.value[0].al){z=!1;break}z||ue-le>oe?y(x,E,re):at.requestAnimationFrame(b)}for(var E=x.callback,z=!0,te=a.Og.iterator;te.next();)if(!te.value[0].al){z=!1;break}if(typeof E!="function"||z)return y(x,E,a);var re=a,oe=x.callbackTimeout||300,le=+new Date;return at.requestAnimationFrame(function(){b()}),null}Le.Wz=function(a){return Ha?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Le.Jx=function(a){return a===void 0&&(a={}),lh(this,this.Xz,a)},Le.Xz=function(a,y,x){var b=tp(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 dh+"data":E=b.getImageData(0,0,x.width,x.height);break;case dh:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&St('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function tp(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&St("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 te=y.maxSize;y.maxSize===void 0&&(te=x==="SVG"?new pi(1/0,1/0):new pi(2e3,2e3));var re=y.position||null,oe=y.parts||null,le=y.padding===void 0?1:y.padding,ue=y.background||null,me=y.omitTemporary;me===void 0&&(me=!0);var we=y.document||document,Ee=y.elementFinished||null,De=y.showTemporary;De===void 0&&(De=!me),y=y.showGrid,y===void 0&&(y=De),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof le=="number"?le=new Oi(le):le instanceof Oi||St("MakeImage padding must be a Margin or a number."),le.left=Math.max(le.left,0),le.right=Math.max(le.right,0),le.top=Math.max(le.top,0),le.bottom=Math.max(le.bottom,0),a.ib.Vc(!0),me=new al(null,we,void 0,!0);var je=me.context;if(!(E||z||oe||re))return me.width=a.Aa+Math.ceil(le.left+le.right),me.height=a.ya+Math.ceil(le.top+le.bottom),x==="SVG"?b===null?null:(b.resize(me.width,me.height,me.width,me.height),b.ownerDocument=we,b.hs=Ee,ls(a,b.context,le,new pi(me.width,me.height),a.Ca,a.pa,oe,ue,De,y),b.context):(a.Xm=!1,ls(a,je,le,new pi(me.width,me.height),a.Ca,a.pa,oe,ue,De,y),a.Xm=!0,me.context);var ct=a.Pp,qe=a.documentBounds.copy();if(qe.Fv(a.yb),De)for(var Ct=a.Wa.s,Lt=Ct.length,Rt=0;Rt<Lt;Rt++){var Jt=Ct[Rt];if(Jt.visible&&Jt.isTemporary){Jt=Jt.Pa.s;for(var vn=Jt.length,Fi=0;Fi<vn;Fi++){var Yi=Jt[Fi];Yi.isInDocumentBounds&&Yi.isVisible()&&(Yi=Yi.actualBounds,Yi.w()&&qe.ed(Yi))}}}if(Ct=new Qe(qe.x,qe.y),oe!==null){for(Lt=new _t(0,0,0,0),Rt=!0,Jt=oe.iterator,Jt.reset();Jt.next();)vn=Jt.value,vn instanceof mr&&(Fi=vn.layer,Fi!==null&&!Fi.visible||Fi!==null&&!De&&Fi.isTemporary||!vn.isVisible()||(vn=vn.actualBounds,vn.w()&&(Rt?(Rt=!1,Lt.assign(vn)):Lt.ed(vn))));qe.width=Lt.width,qe.height=Lt.height,Ct.x=Lt.x,Ct.y=Lt.y}return re!==null&&re.w()&&(Ct=re,z||(z=ct)),Lt=re=0,le!==null&&(re=le.left+le.right,Lt=le.top+le.bottom),Rt=Jt=0,E!==null&&(Jt=E.width,Rt=E.height,isFinite(Jt)&&(Jt=Math.max(0,Jt-re)),isFinite(Rt)&&(Rt=Math.max(0,Rt-Lt))),E!==null&&z!==null?(z==="NaN"&&(z=ct),E.w()?(E=Jt,qe=Rt):isNaN(Rt)?(E=Jt,qe=qe.height*z):(E=qe.width*z,qe=Rt)):E!==null?E.w()?(z=Math.min(Jt/qe.width,Rt/qe.height),E=Jt,qe=Rt):isNaN(Rt)?(z=Jt/qe.width,E=Jt,qe=qe.height*z):(z=Rt/qe.height,E=qe.width*z,qe=Rt):z!==null?z==="NaN"&&te.w()?(z=Math.min((te.width-re)/qe.width,(te.height-Lt)/qe.height),z>ct?(z=ct,E=qe.width,qe=qe.height):(E=te.width,qe=te.height)):(E=qe.width*z,qe=qe.height*z):(z=ct,E=qe.width,qe=qe.height),le!==null?(E+=re,qe+=Lt):le=new Oi(0),te!==null&&(ct=te.width,te=te.height,isNaN(ct)&&(ct=2e3),isNaN(te)&&(te=2e3),isFinite(ct)&&(E=Math.min(E,ct)),isFinite(te)&&(qe=Math.min(qe,te))),me.width=Math.ceil(E),me.height=Math.ceil(qe),x==="SVG"?b===null?null:(b.resize(me.width,me.height,me.width,me.height),b.ownerDocument=we,b.hs=Ee,ls(a,b.context,le,new pi(Math.ceil(E),Math.ceil(qe)),z,Ct,oe,ue,De,y),b.context):(a.Xm=!1,ls(a,je,le,new pi(Math.ceil(E),Math.ceil(qe)),z,Ct,oe,ue,De,y),a.Xm=!0,me.context)}Ye.Object.defineProperties(mn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Se||(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 bo(this,at.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 bo(this,at.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(at,"resize",this.Ov,!1),this.removeEventListener(at,"wheel",this.$j,!0),Xu===this&&(Xu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Dh(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)&&qn(a,"0 <= value <= 1",mn,"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),pu(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),pu(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),pu(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),pu(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&qn(a,">= 0",mn,"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&&qn(a,">= 0",mn,"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 qn(a,">= 0",mn,"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||pg(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&St("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=bd(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,il(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=mg(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(at,"pointermove",this.dk,!0),this.addEventListener(at,"pointerdown",this.ui,!0),this.addEventListener(at,"pointerup",this.fk,!0),this.addEventListener(at,"pointerout",this.ek,!0),this.addEventListener(at,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(at,"wheel",this.$j,!0),this.addEventListener(at,"selectstart",this.preventDefault,!1)):(this.removeEventListener(at,"pointermove",this.dk,!0),this.removeEventListener(at,"pointerdown",this.ui,!0),this.removeEventListener(at,"pointerup",this.fk,!0),this.removeEventListener(at,"pointerout",this.ek,!0),this.removeEventListener(at,"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(at,"wheel",this.$j,!0),this.removeEventListener(at,"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=Qe.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),As(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Ec(this):(this.vb=!0,a=this.scale,lf(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)}Qe.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=sf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=sf(this)),a.type!==hi.Grid&&St("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),bc(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),Ec(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||St("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new Oi(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===Td&&pu(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,pu(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,gg(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&&gg(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!==xl&&pu(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||St("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||St("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):qn(a,"> 0",mn,"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)):qn(a,"> 0",mn,"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),pu(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 Oi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&St("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Qp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==hd&&a!==ts&&a!==ch&&St("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new pi(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 Oi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ye.Object.defineProperties(mn,{licenseKey:{get:function(){return Ng.jc()},set:function(a){Ng.add(a.replace(/\s/g,""))}},version:{get:function(){return kd}}}),mn.prototype.makeImageData=mn.prototype.Jx,mn.prototype.makeImage=mn.prototype.Wz,mn.prototype.cacheGroupExternalLinks=mn.prototype.Fu,mn.prototype.addRenderer=mn.prototype.bs,mn.prototype.makeSVG=mn.prototype.av,mn.prototype.makeSvg=mn.prototype.Cs,mn.prototype.stopAutoScroll=mn.prototype.ug,mn.prototype.doAutoScroll=mn.prototype.gs,mn.prototype.isUnoccupied=mn.prototype.Yj,mn.prototype.raiseDiagramEvent=mn.prototype.R,mn.prototype.removeDiagramListener=mn.prototype.am,mn.prototype.addDiagramListener=mn.prototype.Bj,mn.prototype.findTreeRoots=mn.prototype.yz,mn.prototype.layoutDiagram=mn.prototype.Uz,mn.prototype.findTopLevelGroups=mn.prototype.qz,mn.prototype.findTopLevelNodesAndLinks=mn.prototype.rz,mn.prototype.ensureBounds=mn.prototype.Va,mn.prototype.findLinksByExample=mn.prototype.ls,mn.prototype.findNodesByExample=mn.prototype.ms,mn.prototype.findLinkForData=mn.prototype.Kc,mn.prototype.findNodeForData=mn.prototype.ii,mn.prototype.findPartForData=mn.prototype.Lc,mn.prototype.findLinkForKey=mn.prototype.findLinkForKey,mn.prototype.findNodeForKey=mn.prototype.Vb,mn.prototype.findPartForKey=mn.prototype.findPartForKey,mn.prototype.rebuildParts=mn.prototype.Wd,mn.prototype.transformViewToDoc=mn.prototype.Ps,mn.prototype.transformRectDocToView=mn.prototype.zA,mn.prototype.transformDocToView=mn.prototype.op,mn.prototype.centerRect=mn.prototype.es,mn.prototype.scrollToRect=mn.prototype.tv,mn.prototype.scroll=mn.prototype.scroll,mn.prototype.highlightCollection=mn.prototype.Jz,mn.prototype.highlight=mn.prototype.Iz,mn.prototype.selectCollection=mn.prototype.rA,mn.prototype.select=mn.prototype.select,mn.prototype.updateAllRelationshipsFromData=mn.prototype.rp,mn.prototype.updateAllTargetBindings=mn.prototype.updateAllTargetBindings,mn.prototype.commit=mn.prototype.commit,mn.prototype.rollbackTransaction=mn.prototype.Kf,mn.prototype.commitTransaction=mn.prototype.eb,mn.prototype.startTransaction=mn.prototype.Ea,mn.prototype.raiseChanged=mn.prototype.g,mn.prototype.raiseChangedEvent=mn.prototype.cb,mn.prototype.removeChangedListener=mn.prototype.ik,mn.prototype.addChangedListener=mn.prototype.Pe,mn.prototype.removeModelChangedListener=mn.prototype.mA,mn.prototype.addModelChangedListener=mn.prototype.Yw,mn.prototype.findLayer=mn.prototype.Qj,mn.prototype.removeLayer=mn.prototype.kA,mn.prototype.addLayerAfter=mn.prototype.Cy,mn.prototype.addLayerBefore=mn.prototype.Ww,mn.prototype.addLayer=mn.prototype.Al,mn.prototype.moveParts=mn.prototype.moveParts,mn.prototype.copyParts=mn.prototype.Kj,mn.prototype.removeParts=mn.prototype.Is,mn.prototype.remove=mn.prototype.remove,mn.prototype.add=mn.prototype.add,mn.prototype.clearDelayedGeometries=mn.prototype.bx,mn.prototype.setProperties=mn.prototype.nm,mn.prototype.attach=mn.prototype.Du,mn.prototype.set=mn.prototype.set,mn.prototype.resetInputOptions=mn.prototype.Sx,mn.prototype.setInputOption=mn.prototype.sA,mn.prototype.getInputOption=mn.prototype.Ql,mn.prototype.resetRenderingHints=mn.prototype.Tx,mn.prototype.setRenderingHint=mn.prototype.Xx,mn.prototype.getRenderingHint=mn.prototype.Gf,mn.prototype.maybeUpdate=mn.prototype.bd,mn.prototype.requestUpdate=mn.prototype.$b,mn.prototype.delayInitialization=mn.prototype.Xy,mn.prototype.isUpdateRequested=mn.prototype.Pz,mn.prototype.invalidateDocumentBounds=mn.prototype.Ya,mn.prototype.findObjectsNear=mn.prototype.og,mn.prototype.findPartsNear=mn.prototype.mz,mn.prototype.findObjectsIn=mn.prototype.Cf,mn.prototype.findPartsIn=mn.prototype.ux,mn.prototype.findObjectsAt=mn.prototype.ji,mn.prototype.findPartsAt=mn.prototype.lz,mn.prototype.findObjectAt=mn.prototype.ic,mn.prototype.findPartAt=mn.prototype.Ol,mn.prototype.focusObject=mn.prototype.zz,mn.prototype.alignDocument=mn.prototype.Jy,mn.prototype.zoomToRect=mn.prototype.BA,mn.prototype.zoomToFit=mn.prototype.zoomToFit,mn.prototype.diagramScroll=mn.prototype.kx,mn.prototype.focus=mn.prototype.focus;var Uf=new Ii,np=null,Ha=at.document!==void 0,Ih=null,Bd="",xl=new gn(mn,"None",0),tu=new gn(mn,"Uniform",1),Oh=new gn(mn,"UniformToFill",2),uh=new gn(mn,"CycleAll",10),Cg=new gn(mn,"CycleNotDirected",11),bg=new gn(mn,"CycleNotDirectedFast",12),Eg=new gn(mn,"CycleNotUndirected",13),Mg=new gn(mn,"CycleDestinationTree",14),Lg=new gn(mn,"CycleSourceTree",15),Td=new gn(mn,"DocumentScroll",1),cf=new gn(mn,"InfiniteScroll",2),hd=new gn(mn,"TreeParentCollapsed",21),ts=new gn(mn,"AllParentsCollapsed",22),ch=new gn(mn,"AnyParentsCollapsed",23),Ng=new Rn,kd="2.3.10",dh="image",df=null,ip=!1;function hl(){if(Ha){var a=at.document.createElement("canvas"),y=a.getContext("2d"),x=pn("7ca11abfd022028846");y[x]=pn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",cn.Dx+"4ae6247590da4bb21c324ba3a84e385776",ro.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",en.za],E=1;5>E;E++)y[pn("7ca11abfd7330390")](pn(b[E-1]),10,15*E);for(y[x]=pn("39f046ebb36e4b"),x=1;5>x;x++)y[pn("7ca11abfd7330390")](pn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(ro.prototype.Cd=ro.prototype.Eu),df=a}}mn.className="Diagram",mn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=at.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof mn?y.H:null},mn.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},mn.useDOM=function(a){Ha=a?at.document!==void 0:!1},mn.isUsingDOM=function(){return Ha},mn.None=xl,mn.Uniform=tu,mn.UniformToFill=Oh,mn.CycleAll=uh,mn.CycleNotDirected=Cg,mn.CycleNotDirectedFast=bg,mn.CycleNotUndirected=Eg,mn.CycleDestinationTree=Mg,mn.CycleSourceTree=Lg,mn.DocumentScroll=Td,mn.InfiniteScroll=cf,mn.TreeParentCollapsed=hd,mn.AllParentsCollapsed=ts,mn.AnyParentsCollapsed=ch;function rp(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Id(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=at[pn("76a715b2f73f148a")][pn("72ba13b5")]||"";if(a.Rc=!0,Ha){var b=mn[pn("76a115b6ed251eaf4692")];if(b)for(var E=Ng.iterator;E.next()&&(b=E.value,b=pn(b).split(pn("39e9")),!(6>b.length));){var z=pn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var te=pn(cn[pn("6cae19")]).split(".");if(z[0]>te[0]||z[0]===te[0]&&z[1]>=te[1]){var re=at[pn("74a900bae4370f8b51")][pn("6fbb13a1c2311e8a57")].toLowerCase();if(te=re[pn("73a612b6fb191d")](pn("3aad1ab6e022098b4dc4")),z=pn(b[2]),-1<te&&(re=re[pn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<te),!a.Rc))break;for(te=x[pn("76ad18b4f73e")],re=x[pn("73a612b6fb191d")](pn("35e7"))+2;re<te;re++)y+=x[re];if(te=y[pn("73a612b6fb191d")](z),0>te&&z!==pn("7da71ca0ad381e90")&&(te=y[pn("73a612b6fb191d")](pn("76a715b2ef3e149757"))),0>te&&(te=y[pn("73a612b6fb191d")](pn("76a715b2ef3e149757"))),0>te&&(te=y[pn("73a612b6fb191d")](pn("2bfa41fdb3784bca12"))),0>te&&(te=x[pn("73a612b6fb191d")](pn("7baa19a6f76c1988428554"))),a.Rc=!(0<=te&&te<y[pn("73a612b6fb191d")](pn("35"))||y[pn("73a612b6fb191d")](pn("35"))===-1),!a.Rc||x[pn("73a612b6fb191d")](pn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[pn("73a612b6fb191d")](z)),!a.Rc)||(te=at[pn("76a715b2f73f148a")][pn("69ad17a1e03e")],re=te[pn("73a612b6fb191d")](pn("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(te[pn("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){te=at.document.createElement("div");for(var oe=b[0].replace(/[A-Za-z]/g,"");4>oe.length;)oe+="9";if(re=oe,oe=oe.substr(oe.length-4),b="",b+=["gsh","gsf"][parseInt(oe.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(oe.substr(0,1),10)%4],te[pn("79a417a0f0181a8946")]=b,at.document[pn("78a712aa")]){at.document[pn("78a712aa")][pn("7bb806b6ed32388c4a875b")](te),oe=at.getComputedStyle(te).getPropertyValue(pn("78a704b7e62456904c9b12701b6532a8"));var le=at.getComputedStyle(te).getPropertyValue(pn("75b817b0ea2202"));if(at.document[pn("78a712aa")][pn("68ad1bbcf533388c4a875b")](te),oe){if(te=at[pn("77a902b0eb1b1e804a8a")],le==="0."+parseInt(re,10)%100||oe.indexOf(parseInt(z[1]+z[2],16))!==-1&&oe.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(te&&te(pn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,z=0;z<document.styleSheets.length;z++){te=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ue in te)if(b===te[ue].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ue=x[pn("76ad18b4f73e")],E=x[pn("73a612b6fb191d")](pn("35e7"))+2;E<ue;E++)y+=x[E];x=y[pn("73a612b6fb191d")](pn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[pn("73a612b6fb191d")](pn("35")))}}}return 0<a.Rc&&a!==a.wy}rp.className="DiagramHelper";function Zc(a){this.j=a===void 0?new Qe:a,this.o=new Qe}Ye.Object.defineProperties(Zc.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 hh="DraggingInfo";Zc.className="DraggingInfo";function ie(a,y,x){this.node=a,this.info=y,this.Su=x}ie.className="DraggingNodeInfoPair";function ae(){this.reset()}ae.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new pi(NaN,NaN).freeze(),this.gridSnapCellSpot=Ba,this.gridSnapOrigin=new Qe(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ae.className="DraggingOptions";function he(a,y){if(typeof a=="string"||at.Element&&a instanceof Element)var x=mn.call(this,a)||this;else x=mn.call(this)||this,y=a;return de(x),y&&x.nm(y),x}Kt(he,mn);function de(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=zs,a.layout=new qs}he.prototype.reset=function(){mn.prototype.reset.call(this),de(this)},he.className="Palette";function Se(a,y){if(typeof a=="string"||at.Element&&a instanceof Element)var x=mn.call(this,a)||this;else x=mn.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 mr;var E=new io;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 Oi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new ht,x.toolManager.mouseMoveTools),x.click=function(){var z=b.observed;if(z!==null){var te=z.viewportBounds,re=b.lastInput.documentPoint;z.position=new Qe(re.x-te.width/2,re.y-te.height/2)}},x.Pf=function(){b.Ya(),Xe(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&&Xe(b)},x.autoScale=tu,x.vb=!1,y&&Object.assign(x,y),x}Kt(Se,mn),Se.prototype.computePixelRatio=function(){return 1},Se.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(Du(this),this.ql===null){var x=new al(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),Ie(this)}finally{this.ta=a,this.ib=y}}}mn.prototype.redraw.call(this)},Se.prototype.gc=function(){if(this.Ka===null&&St("No div specified"),this.ta===null&&St("No canvas specified"),!(this.ta instanceof bo)&&(Kv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Du(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?Ie(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 Ie(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=_t.alloc().assign(a.viewportBounds).ed(y.viewportBounds),bc(y,E),_t.free(E),$s(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 te=0;te<z;te++){var re=y[te],oe=a;if(re.visible&&re.opacity!==0){var le=re.diagram.grid.part;if(!x&&re.isTemporary)b&&le.layer===re&&(re=Ts(re,E),le.gc(E,oe),E.globalAlpha=re);else{for(var ue=Ts(re,E),me=oe.scale,we=_t.alloc(),Ee=re.Pa.s,De=Ee.length,je=0;je<De;je++){var ct=Ee[je];(b||ct!==le)&&re.Oj(E,ct,oe,null,me,we,!1)}_t.free(we),E.globalAlpha=ue}}}}}function Xe(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=pi.alloc();E.h(x.width,x.height),b.desiredSize=E,pi.free(E),a=2/a.scale,b instanceof io&&(b.strokeWidth=a),y.location=new Qe(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Se.prototype.computeBounds=function(){var a=this.observed;if(a===null)return yr;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Se.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Se.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Xe(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))},Ye.Object.defineProperties(Se.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Se&&St("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,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),Xe(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),Xe(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)}}}),Se.className="Overview";function ht(){Fa.call(this),this.j=null}Kt(ht,Fa),ht.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 Qe(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Qe(a.x-this.j.x,a.y-this.j.y)),!0)},ht.prototype.doActivate=function(){this.j=null,Fa.prototype.doActivate.call(this)},ht.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},ht.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 Qe(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new Qe(a.x-this.j.x,a.y-this.j.y)}}},ht.className="OverviewDraggingTool";function ut(){Or(this),this.H=Xu,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=yr,this.hb=!0,this.cg=null,this.ob=200}ut.prototype.toString=function(){return"CommandHandler"},ut.prototype.Xe=function(a){this.H=a},ut.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Ki?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()},ut.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},ut.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof fa&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},ut.prototype.canStopCommand=function(){return!0},ut.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=""}},ut.prototype.canSelectAll=function(){return this.diagram.allowSelect},ut.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 _n,x=a.selection.iterator;x.next();)yf(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=""}},ut.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},ut.prototype.copySelection=function(){var a=this.diagram,y=new _n;for(a=a.selection.iterator;a.next();)yf(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},ut.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},ut.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},ut.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},ut.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Ih=null,Bd="";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 Rn,x.addAll(z),Ih=x,Bd=y.model.dataFormat}}y.R("ClipboardChanged",x)},ut.prototype.pasteFromClipboard=function(){var a=new _n,y=Ih;if(y===null)return a;var x=this.diagram;if(Bd!==x.model.dataFormat)return a;var b=x.model,E=!1,z=!1,te=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(z=b.Ij,b.Ij=this.copiesGroupKey),te=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=z),y=te.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},ut.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);Cc(y,z,new Qe(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=""}},ut.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Ih===null||Ih.count===0||Bd!==a.model.dataFormat)},ut.prototype.undo=function(){this.diagram.undoManager.undo()},ut.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},ut.prototype.redo=function(){this.diagram.undoManager.redo()},ut.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},ut.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===xl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ut.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==xl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ut.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===xl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ut.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==xl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ut.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},ut.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},ut.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;il(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=yr):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Fs(y)},ut.prototype.canZoomToFit=function(){return this.diagram.allowZoom},ut.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(oe){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;il(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Zt(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 oe=E.pop();0<E.length&&oe instanceof Di&&oe.isTreeExpanded&&(!(oe instanceof Yr)||oe.isSubGraphExpanded);)oe=E.pop();0<E.length?(oe instanceof mr&&y.tv(oe.actualBounds),oe instanceof Di&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof Yr&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof mr&&y.es(oe.actualBounds),y.am("LayoutCompleted",te)),y.eb("Scroll To Part")},te=function(){kn(z,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",te),z()}}else{var re=y.position.copy();y.es(a.actualBounds),re.Xa(y.position)&&x.Cc()}}};function Zt(a,y,x){if(y.isVisible())return x;if(y instanceof jo)Zt(a,y.adornedPart,x);else if(y instanceof vi){var b=y.fromNode;b!==null&&Zt(a,b,x),y=y.toNode,y!==null&&Zt(a,y,x)}else y instanceof Di&&(b=y.labeledLink,b!==null&&Zt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Zt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Zt(a,y,x));return x}ut.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof mr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},ut.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),il(y.animationManager,"Collapse Tree");var x=new Rn;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 Di&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},ut.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Di&&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 Di&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ut.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),il(y.animationManager,"Expand Tree");var x=new Rn;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 Di&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},ut.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Di)||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 Di&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ut.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 Rn,z=a.selection.iterator;z.next();){var te=z.value;te.Zc()&&te.canGroup()&&E.add(te)}for(var re=new Rn,oe=E.iterator;oe.next();){var le=oe.value;z=!1;for(var ue=E.iterator;ue.next();)if(le.Td(ue.value)){z=!0;break}z||re.add(le)}if(0<re.count){var me=re.first().containingGroup;if(me!==null)for(;me!==null;){E=!1;for(var we=re.iterator;we.next();)if(!we.value.Td(me)){E=!0;break}if(E)me=me.containingGroup;else break}if(x instanceof Yr)hc(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ee=y.copyNodeData(x);rn(Ee)&&(y.xf(Ee),b=a.ii(Ee))}if(b!==null){me!==null&&this.isValidMember(me,b)&&(b.containingGroup=me);for(var De=re.iterator;De.next();){var je=De.value;this.isValidMember(b,je)&&(je.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},ut.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 zn(a){var y=Sn();for(a=a.iterator;a.next();){var x=a.value;x instanceof vi||y.push(x)}a=new _n,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],z=!0,te=0;te<x;te++)if(E.Td(y[te])){z=!1;break}z&&a.add(E)}return Gn(y),a}ut.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof vi)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},ut.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 Rn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var z=E.value;z instanceof Yr&&z.canUngroup()&&b.add(z)}var te=new Rn;if(0<b.count){y.clearSelection(!0);for(var re=b.iterator;re.next();){var oe=re.value;oe.expandSubGraph();var le=oe.containingGroup,ue=le!==null&&le.data!==null?x.wa(le.data):void 0;te.addAll(oe.memberParts);for(var me=te.iterator;me.next();){var we=me.value;if(we.isSelected=!0,!(we instanceof vi)){var Ee=we.data;Ee!==null?x.mp(Ee,ue):we.containingGroup=le}}y.remove(oe)}}y.R("SelectionUngrouped",b,te)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},ut.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 Yr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Yr&&y.canUngroup())return!0;return!1},ut.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=zn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},ut.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),il(y.animationManager,"Collapse SubGraph");var x=new Rn;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 Yr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},ut.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Yr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Yr&&y.isSubGraphExpanded)return!0;return!1},ut.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),il(y.animationManager,"Expand SubGraph");var x=new Rn;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 Yr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},ut.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Yr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Yr&&!y.isSubGraphExpanded)return!0;return!1},ut.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 ua&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},ut.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 ua))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 ua&&x.editable}),a!==null))return!0;return!1},ut.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 Qt?E=a.ga(wo):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new Qe(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,ia(x,!1,a)}},ut.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)},ut.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 Ii,a===null)return b;for(var z=a.iterator;z.next();)Hu(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 vi&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Ye.Object.defineProperties(ut.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||St("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),ut.className="CommandHandler",Ed=function(){return new ut};function Qt(){Or(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Qe(NaN,NaN).freeze(),this.jd=ta,this.Ab=new ro,this.wh=new ro,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Ls,this.uc=new _t(NaN,NaN,NaN,NaN).freeze(),this.Ib=new _t(NaN,NaN,NaN,NaN).freeze(),this.dc=new _t(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Vo,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var ci,ai,tr,lr,wr,Vr,yo,ao,Eo,Qo;Qt.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=Ft(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Qt.prototype.Vw=function(a){var y=this.Dh;if(bn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Qt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Qt.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},Qt.prototype.copy=function(){return this.clone()},Le=Qt.prototype,Le.qb=function(a){a.classType===vi?a.name.indexOf("Orient")===0?this.segmentOrientation=a:St("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Qt&&(this.stretch=a)},Le.toString=function(){return Zn(this.constructor)+"#"+br(this)},Le.th=function(){this.A!==null&&(this.A.nc=!0)};function so(a){a.A===null?a.A=new Ar:a.A.nc&&(a.A=a.A.copy())}Le.Xc=function(){if(this.ba===null){var a=new to;a.Xi=La,a.yj=La,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Le.cb=function(a,y,x,b,E,z,te){var re=this.part;if(re!==null&&(re.gk(a,y,x,b,E,z,te),x===this&&a===wa&&xe(this)&&ha(this,re,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new Ii),te=z.undoManager.transactionLevel===0,a.startCondition===Bs?te=!0:a.startCondition===os&&(te=!1),te?(z=new za,Da(a,z),te=this.jo.get(a),te!==null&&te.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,b,E),z.start()):(il(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof hi&&x===re&&(re.l&16777216)!==0&&re.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)re=x[E],re instanceof hi&&Yf(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function ha(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var z=E.value,te=null;if(z.sourceName!==null){if(te=L1(z,b,a),te===null)continue;z.sp(a,te,x,null)}else if(z.isToModel){var re=y.diagram;re===null||re.skipsModelSourceBindings||z.sp(a,re.model.modelData,x,b)}else{if(re=b.data,re===null)continue;var oe=y.diagram;oe===null||oe.skipsModelSourceBindings||z.sp(a,re,x,b)}te===a&&(re=b.ks(z.Ai),re!==null&&z.Mv(re,te,x))}}Le.ks=function(a){return this.bindingId===a?this:null},Le.g=function(a,y,x){this.cb(wa,a,this,y,x)},Le.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 ro);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),z.pp(E)}};function ws(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}Le.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?zo(a.x,a.y,0,0,0,b.height)<=y||zo(a.x,a.y,0,b.height,b.width,b.height)<=y||zo(a.x,a.y,b.width,b.height,b.width,0)<=y||zo(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},Le.se=function(){return!0},Le.ca=function(a){var y=Qe.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Qe.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),z=b.Ql("extraTouchArea"),te=z/2,re=this.naturalBounds;b=this.Df()*b.scale;var oe=1/b;if(re.width*b<E&&re.height*b<E)return a=Pr(x.x-te*oe,x.y-te*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),Qe.free(y),a}return E=!1,(this instanceof jo||this instanceof io?Pr(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)),Qe.free(y),E},Le.gh=function(a){var y=this.naturalBounds;return Pr(0,0,y.width,y.height,a.x,a.y)},Le.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=_t.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=Qe.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)))),Qe.free(E),_t.free(y),b},Le.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=Qe.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)))),Qe.free(E),b},Le.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=Qe.allocAt(0,0),E=Qe.allocAt(0,x.height),z=Qe.allocAt(x.width,x.height),te=Qe.allocAt(x.width,0),re=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(z))||a.ca(y.Ga(te)))re=!0;else{x=_t.allocAt(0,0,x.width,x.height);var oe=Qe.allocAt(a.x,a.y);x.ca(y.Cd(oe))?re=!0:(oe.h(a.x,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.y),x.ca(y.Cd(oe))&&(re=!0)))),Qe.free(oe),_t.free(x),!re&&(en.us(a,b,E)||en.us(a,E,z)||en.us(a,z,te)||en.us(a,te,b))&&(re=!0)}return Qe.free(b),Qe.free(E),Qe.free(z),Qe.free(te),re},Le.ga=function(a,y){if(y===void 0&&(y=new Qe),a instanceof Ui){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Le.mi=function(a){a===void 0&&(a=new _t);var y=this.naturalBounds,x=this.oe,b=Qe.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),cr(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),cr(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),cr(a,b.x,b.y,0,0),Qe.free(b),a},Le.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},Le.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Le.qs=function(a,y){return y===void 0&&(y=new Qe),y.assign(a),this.oe.Cd(y),y},Le.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Le.Sj=function(a,y,x,b,E){var z=this.transform,te=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*te,oe=-z.m12*te,le=-z.m21*te,ue=z.m11*te,me=te*(z.m21*z.dy-z.m22*z.dx),we=te*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,en.Ff(z.left,z.top,z.right,z.bottom,a,y,x,b,E)):(te=a*re+y*le+me,a=a*oe+y*ue+we,y=x*re+b*le+me,x=x*oe+b*ue+we,E.h(0,0),b=this.naturalBounds,x=en.Ff(0,0,b.width,b.height,te,a,y,x,E),E.transform(z),x)},Qt.prototype.measure=function(a,y,x,b){if(vt(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 te=this.kq();z===90||z===270?(a=isFinite(E.height)?E.height+te:a,y=isFinite(E.width)?E.width+te:y):(a=isFinite(E.width)?E.width+te:a,y=isFinite(E.height)?E.height+te:y),E=x||0,te=b||0;var re=this instanceof hi;switch(Fl(this,!0)){case ai:te=E=0,re&&(y=a=1/0);break;case ci:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(te=y);break;case lr:isFinite(a)&&a>x&&(E=a),te=0,re&&(y=1/0);break;case wr:isFinite(y)&&y>b&&(te=y),E=0,re&&(a=1/0)}re=this.maxSize;var oe=this.minSize;E>re.width&&oe.width<re.width&&(E=re.width),te>re.height&&oe.height<re.height&&(te=re.height),x=Math.max(E,oe.width),b=Math.max(te,oe.height),re.width<x&&(x=Math.min(oe.width,x)),re.height<b&&(b=Math.min(oe.height,b)),a=Math.min(re.width,a),y=Math.min(re.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()||St("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),pt(this,!1)}},Qt.prototype.Wl=function(){},Qt.prototype.Dd=function(){return!1},Qt.prototype.arrange=function(a,y,x,b,E){this.Uk();var z=_t.alloc();z.assign(this.Ib),this.Ib.ka(),Bt(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&&zh(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 ua&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||St("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Vt(this,!1),_t.free(z)},Le=Qt.prototype,Le.eh=function(){};function Pl(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 te=x.top+x.bottom;switch(x=z.width+y,z=z.height+te,b+=y,E+=te,y=Fl(a,!0),x===b&&z===E&&(y=ai),y){case ai:(x>b||z>E)&&(pt(a,!0),a.measure(x>b?b:x,z>E?E:z,0,0));break;case ci:pt(a,!0),a.measure(b,E,0,0);break;case lr:pt(a,!0),a.measure(b,z,0,0);break;case wr:pt(a,!0),a.measure(x,E,0,0)}}}Le.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||_v(x,!0),this.N(),Zi(a,y)||(x.oh(),this.Pn(x)))},Le.Pn=function(a){this.portId!==null&&(_v(a,!0),a instanceof Di&&$S(a,this))},Le.gc=function(a,y){if(!vu(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 hi&&zh(this),te=this.Ib;if(z){var re=this.Ib,oe=this.dc,le=this.areaBackground,ue=this.Ma;le===null&&ue===null||a.yc(),le!==null&&(Za(this,a,le,!0,!0,oe,re),le instanceof Oo&&le.type===Qu?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(le)):a.fillRect(re.x,re.y,re.width,re.height)),ue!==null&&(Za(this,a,ue,!0,!1,oe,re),ue instanceof Oo&&ue.type===Qu?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(ue)):a.fillRect(re.x,re.y,re.width,re.height)),this.hh(a,y)}if(!z&&(z||te.width!==0&&te.height!==0&&!isNaN(te.x)&&!isNaN(te.y))){z=this.transform,re=this.panel,this.l&4096&&Is(this),le=this.part,oe=!1;var me=0;le&&y.Gf("drawShadows")&&(oe=le.isShadowed)&&(ue=le.shadowOffset,me=Math.max(ue.y,ue.x)*y.scale*y.Mb),ue=this.Dd();var we;if(!(we=y.$i||!ue)){var Ee=this.naturalBounds;we=this.wh;var De=we.m11,je=we.m21,ct=we.dx,qe=we.m12,Ct=we.m22,Lt=we.dy,Rt,Jt=Rt=0;we=Rt*De+Jt*je+ct;var vn=Rt*qe+Jt*Ct+Lt;Rt=Ee.width+me,Jt=0;var Fi=Rt*De+Jt*je+ct;Rt=Rt*qe+Jt*Ct+Lt,Jt=Math.min(we,Fi);var Yi=Math.min(vn,Rt),Hi=Math.max(we+0,Fi)-Jt,mi=Math.max(vn+0,Rt)-Yi;we=Jt,vn=Yi,Rt=Ee.width+me,Jt=Ee.height+me,Fi=Rt*De+Jt*je+ct,Rt=Rt*qe+Jt*Ct+Lt,Jt=Math.min(we,Fi),Yi=Math.min(vn,Rt),Hi=Math.max(we+Hi,Fi)-Jt,mi=Math.max(vn+mi,Rt)-Yi,we=Jt,vn=Yi,Rt=0,Jt=Ee.height+me,Fi=Rt*De+Jt*je+ct,Rt=Rt*qe+Jt*Ct+Lt,Jt=Math.min(we,Fi),Yi=Math.min(vn,Rt),Hi=Math.max(we+Hi,Fi)-Jt,mi=Math.max(vn+mi,Rt)-Yi,we=Jt,vn=Yi,me=y.viewportBounds,Ee=me.x,De=me.y,we=!(we>me.width+Ee||Ee>Hi+we||vn>me.height+De||De>mi+vn)}if(we){if(we=(this.l&256)!==0,a.clipInsteadOfFill&&(we=!1),this instanceof ua&&(a.font=this.font),we){if(vn=re.se()?re.naturalBounds:re.actualBounds,Hi=Math.max(te.x,vn.x),mi=Math.max(te.y,vn.y),me=Math.min(te.right,vn.right)-Hi,Ee=Math.min(te.bottom,vn.bottom)-mi,De=this.tb,De!==null&&(Hi=De.x,mi=De.y,me=De.width,Ee=De.height),Hi>te.width+te.x||te.x>vn.width+vn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Hi,mi,me,Ee),a.clip()}if(ue){if(!le.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}oe&&(vn=le.shadowOffset,a.Ev(vn.x*y.scale*this.scale*y.Mb,vn.y*y.scale*this.scale*y.Mb,le.shadowBlur),Xs(a),a.shadowColor=le.shadowColor)}oe&&this.shadowVisible===!0?Xs(a):oe&&this.shadowVisible===!1&&Al(a),le=this.naturalBounds,this.areaBackground!==null&&(a.yc(),mu(this,a,le,te)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),oe&&ks(this,re)&&this.shadowVisible===null&&Al(a),this.Ma!==null&&(a.yc(),zl(this,a,le,te)),oe&&(this.Ma!==null||this.areaBackground!==null||ks(this,re))?(Zu(this,!0),this.shadowVisible===null&&Al(a)):Zu(this,!1),this.hh(a,y),oe&&this.l&512&&Xs(a),ue&&oe&&Al(a),we&&(a.restore(),a.Vc(this instanceof hi)),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 ks(a,y){return y===null?!1:(zh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===hi.Auto||y.type===hi.Spot)&&y.Pb()!==a)}Le.Dv=function(){};function mu(a,y,x,b){Za(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Oo&&a.areaBackground.type===Qu?(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 zl(a,y,x,b){var E=a.kq(),z=x.x,te=x.y,re=x.width+E,oe=x.height+E;Za(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof Oo&&a.Ma.type===Qu?(y.beginPath(),y.rect(z-E/2,te-E/2,re,oe),y.ng(a.Ma)):y.fillRect(z-E/2,te-E/2,re,oe)}function fl(a,y,x){for(var b=y.O.s,E=b.length,z=-1,te=0;te<E;te++)if(b[te]===a){z=te;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===hi.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 vu(a,y,x){if(!(y instanceof Uo))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&&fl(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),Xs(y),y.shadowColor=a.shadowColor}a instanceof ua&&(y.font=a.font),y.yd=null;var te=a.transform;z=a instanceof hi;var re=a instanceof hi?zh(a):!1;a.l&4096&&Is(a);var oe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,z&&re?(Ju(y,1,0,0,1,0,0),a.svg=y.ad):z?(Ju(y,te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),a.svg=y.ad):Ju(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var le=te.copy().Vj();y.rb.ha=[le.m11,le.m12,le.m21,le.m22,le.dx,le.dy],mu(a,y,E,oe),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[te.m11,te.m12,te.m21,te.m22,te.dx,te.dy]),a.background!==null&&(z?(re&&(y.rb.ha=[te.m11,te.m12,te.m21,te.m22,te.dx,te.dy]),zl(a,y,E,oe),re&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[te.m11,te.m12,te.m21,te.m22,te.dx,te.dy],zl(a,y,E,oe)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),te=y.yd,E=a.part,re=!1,E&&x.Gf("drawShadows")&&(re=E.isShadowed),y.clipInsteadOfFill&&(re=!1),a.Dd()&&re&&Xs(y),re&&a.shadowVisible===!0?Xs(y):re&&a.shadowVisible===!1&&Al(y),E=a.panel,re&&ks(a,E)&&a.shadowVisible===null&&Al(y),y.Il&&(le=x.computePixelRatio(),le="drop-shadow("+y.shadowOffsetX/le+"px "+y.shadowOffsetY/le+"px "+y.shadowBlur/le/2+"px "+y.shadowColor+")",a.background!==null&&te.Ma.setAttributeNS(null,"filter",le),a.areaBackground!==null&&te.gd.setAttributeNS(null,"filter",le)),re&&(a.Ma!==null||a.areaBackground!==null||ks(a,E))?(Zu(a,!0),a.shadowVisible===null&&Al(y)):Zu(a,!1),E=re,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),te=y.Gv.hs,re=z?a.svg:y.yd,le=a.svg,!z&&le!==null&&re!==le&&le.parentNode===a.panel.svg?(a.svg.replaceWith(re),a.svg=re,re!==null&&a.$o(y,b,oe,re),Nl(y,le),!0):(a.svg=re,te!==null&&re===null&&(Wu(y),y.nh.pop()),re===null||(a.$o(y,b,oe,re),y.Il&&(x=x.computePixelRatio(),a.Dv(re,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Xs(y),a.Dd()&&Al(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&re.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&re.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(re):y.Nj.prepend(re),y.ti=re):b!==null&&fl(a,b,re),te!==null&&te(a,re)),!0)}Le.$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 te=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,te=z.width,x=z.height),z=b.getAttribute("clip-path");var re=null;z!==null&&(re=a.svg.getElementById(z.split("#")[1].slice(0,-1))),re===null?(z="CLIP"+mo++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:E,width:te,height:x}),this instanceof hi&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),re.appendChild(y),a.svg.appendChild(re),b.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=re.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",te.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),Nl(a,b)};function Nl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function gl(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Ri(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()}}Le.hh=function(){},Le.lv=function(){this.Uc=!0},Le.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var b=this.transform,E=this instanceof hi?zh(this):!1;if(!(this instanceof hi&&E))if(this instanceof ru){var z=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],z!==null&&Ka(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",pl(a)):y.setAttributeNS(null,"transform",pl(a))}else if(!x||this instanceof hi)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof io){z=y.getElementsByTagName("path");for(var te=0;te<z.length;te++)z[te].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):(te=b.copy().Vj(),a.rb.ha=[te.m11,te.m12,te.m21,te.m22,te.dx,te.dy],mu(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(te=y.gd.getAttribute("filter"),te!==null&&a.ad.setAttribute("filter",te),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&fd(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(fd(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof hi))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),zl(this,a,this.naturalBounds,this.actualBounds),y.Ma?(fd(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&&fd(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Le.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function Za(a,y,x,b,E,z,te){if(x!==null){var re=1,oe=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===jh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var le=a.kq();if(re=z.width,oe=z.height,E?(re=te.width,oe=te.height):b||(re+=le,oe+=le),(z=y instanceof Gc)&&x.xe&&(x.type===lp||x.yk===re&&x.ft===oe))var ue=x.xe;else{var me=0,we=0,Ee=0,De=0,je=0,ct=0;if(ct=je=0,E?(je=te.x,ct=te.y):b||(je-=le/2,ct-=le/2),me=x.start.x*re+x.start.offsetX,we=x.start.y*oe+x.start.offsetY,Ee=x.end.x*re+x.end.offsetX,De=x.end.y*oe+x.end.offsetY,me+=je,Ee+=je,we+=ct,De+=ct,x.type===gh)ue=y.createLinearGradient(me,we,Ee,De);else if(x.type===Qu)ct=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(je=0,ct=Math.max(re,oe)/2):je=x.startRadius,ue=y.createRadialGradient(me,we,je,Ee,De,ct);else if(x.type===lp)try{ue=y.createPattern(x.pattern,"repeat")}catch(Ct){ue=null}if(x.type!==lp&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)ue.addColorStop(E.key,E.value);if(z&&(x.xe=ue,ue!==null&&(x.yk=re,x.ft=oe),ue===null&&x.type===lp&&x.yk!==-1)){x.yk=-1;var qe=a.diagram;qe!==null&&x.yk===-1&&kn(function(){qe.redraw()},600)}}b?y.fillStyle=ue:y.strokeStyle=ue}}}Le.rg=function(a){if(a instanceof hi)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},Le.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Le.If=function(){for(var a=this instanceof hi?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Is(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){ke(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)}ke(a,!1),$e(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,$e(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,$e(a,!1)))}Le.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Qe.alloc();z.yi(y,x,b,E,wo),a.rotate(this.Kb,z.x,z.y),Qe.free(z)}},Le.v=function(a){if(!vt(this)){a===void 0&&(a=!1),pt(this,!0),Vt(this,!0);var y=this.panel;y===null||a||y.v()}},Le.Uj=function(){vt(this)||(pt(this,!0),Vt(this,!0))};function bl(a){if(!Bt(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Di&&a.Bd(),y.$b())),Vt(a,!0)}}Le.Uk=function(){!(this.l&2048)&&(ke(this,!0),$e(this,!0))},Le.Wu=function(){$e(this,!0)},Le.N=function(){var a=this.part;a!==null&&a.N()};function Fl(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===hi.Table?cc(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===hi.Auto&&b.Pb()===a?Os(a,ci,y):x===Vr?b!==null?b.type===hi.Spot&&b.Pb()===a?Os(a,ci,y):(x=b.defaultStretch,x===Vr?Os(a,ai,y):Os(a,x,y)):Os(a,ai,y):Os(a,x,y)}function cc(a,y,x,b){var E=a.stretch;if(E!==Vr)return Os(a,E,b);var z=E=null;switch(y.stretch){case wr:z=!0;break;case ci:z=!0}switch(x.stretch){case lr:E=!0;break;case ci:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===lr||y===ci),z===null&&(z=y===wr||y===ci),E===!0&&z===!0?Os(a,ci,b):E===!0?Os(a,lr,b):z===!0?Os(a,wr,b):Os(a,ai,b)}function Os(a,y,x){if(x)return y;if(y===ai||(x=a.desiredSize,x.w()))return ai;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===lr)return ai;if(y===ci)return wr}else{if(y===wr)return ai;if(y===ci)return lr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===wr)return ai;if(y===ci)return lr}else{if(y===lr)return ai;if(y===ci)return wr}return y}function Zu(a,y){a.l=y?a.l|512:a.l&-513}function xe(a){return(a.l&1024)!==0}function Ce(a,y){a.l=y?a.l|1024:a.l&-1025}function ke(a,y){a.l=y?a.l|2048:a.l&-2049}function $e(a,y){a.l=y?a.l|4096:a.l&-4097}function vt(a){return(a.l&8192)!==0}function pt(a,y){a.l=y?a.l|8192:a.l&-8193}function Bt(a){return(a.l&16384)!==0}function Vt(a,y){a.l=y?a.l|16384:a.l&-16385}Le.Gj=function(){this.svg=null},Le.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Le.Av=function(){},Le.zv=function(a){return this.pa=a,bl(this),!0},Le.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Le.kq=function(){return 0};function Fn(a){var y=a.part;if(y instanceof Di&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||$S(y,a)}}function Xn(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof hi?a instanceof Di?a.Bd():a.qm(a,function(x){Fn(x)}):Fn(a))}Le.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new fs(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&fS(a)&&St("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new Rn),this.localBindings.add(E),this},Le.set=function(a){return Object.assign(this,a),this},Le.Du=function(a){return jn(this,a),this},Le.apply=function(a){return a(this),this},Le.nm=function(a){return Au(this,a),this},Le.pz=function(){return this.ih()},Le.ih=function(){for(var a=this instanceof hi?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Le.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Ii),this.animationTriggers.add(a.propertyName,a),this};function Wn(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=ki.I(a);typeof z=="function"?(x=Ft(arguments),b=z(x),rn(b)||St('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=at.go[a]}if(b===null&&(E!=null&&E.constructor||St("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 mn&&1<x.length){z=b;var te=x[1];(typeof te=="string"||te instanceof HTMLDivElement)&&(Dh(z,te),E++)}for(;E<x.length;E++)z=x[E],z===void 0?St("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):jn(b,z);return b}function jn(a,y){if(typeof y=="string")if(a instanceof ua)a.text=y;else if(a instanceof io)a.figure=y;else if(a instanceof ru)a.source=y;else if(a instanceof hi)y=Mc.I(y),y!==null&&(a.type=y);else if(a instanceof Oo){var x=oi(Oo,y);x!==null?a.type=x:St("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof xi?(y=oi(xi,y),y!==null&&(a.type=y)):a instanceof To&&(y=oi(To,y),y!==null&&(a.type=y));else if(y instanceof Qt)a instanceof hi||St("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Cs){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 Cs?Qm(b,y):St("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof gn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Es)a.type=y;else if(y instanceof fs)a instanceof Qt||a instanceof Cs?a.bind(y):St("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof ql)a instanceof Qt?a.Jv(y):St("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof ys)a instanceof xi&&a.type===xi.o?a.figures.add(y):St("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof To)a instanceof ys?a.segments.add(y):St("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Ma)a instanceof mn||a instanceof Yr?a.layout=y:St("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)jn(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Oo){x=new $i;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);Au(a,x)}else if(a instanceof Cs){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&St("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)&&St("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new $i;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Au(a,E)}else Au(a,y);else St('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function In(a,y){ki.add(a,y)}function ri(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}Ye.Object.defineProperties(Qt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Ar),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 Ar),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 Ar),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(so(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&&(so(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Zl},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Hr),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Zl&&(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 Hr),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 Hr),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Qr},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Hr),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Vr},set:function(a){var y=this.stretch;y!==a&&(so(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&&(so(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)&&qn(a,"0 <= value <= 1",Qt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(qf(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(qf(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(),Xn(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&ff(a,"GraphObject.areaBackground"),a instanceof Oo&&a.freeze(),so(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&ff(a,"GraphObject.background"),a instanceof Oo&&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 mr)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 Qe(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&&St("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Xn(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 io&&this.qc(),this.g("desiredSize",b,a),xe(this)&&(a=this.part,a!==null&&(ha(this,a,"width"),ha(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 pi(a,this.jd.height).freeze(),this.v(),this instanceof io&&this.qc(),this.g("desiredSize",y,a),xe(this)&&(a=this.part,a!==null&&ha(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 pi(this.jd.width,a).freeze(),this.v(),this instanceof io&&this.qc(),this.g("desiredSize",y,a),xe(this)&&(a=this.part,a!==null&&ha(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Tr},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(),so(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:_o},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(),so(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 Oi(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&&Is(this),this.Ab}},oe:{get:function(){return this.l&4096&&Is(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(so(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:ai},set:function(a){this.reshapingBehavior!==a&&(so(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&St("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),bl(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&&qn(a,">= 0",Qt,"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&&qn(a,">= 1",Qt,"columnSpan"),so(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&&qn(a,">= 0",Qt,"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&&qn(a,">= 1",Qt,"rowSpan"),so(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&&(so(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 Di||St("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Qv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,US(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:La},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Fn(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&qn(a,">= 0",Qt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Fn(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),Fn(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&&qn(a,">= 0",Qt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:La},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Fn(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&qn(a,">= 0",Qt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Fn(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),Fn(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&&qn(a,">= 0",Qt,"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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Qt.prototype.trigger=Qt.prototype.Jv,Qt.prototype.findBindingPanel=Qt.prototype.ih,Qt.prototype.findTemplateBinder=Qt.prototype.pz,Qt.prototype.setProperties=Qt.prototype.nm,Qt.prototype.apply=Qt.prototype.apply,Qt.prototype.attach=Qt.prototype.Du,Qt.prototype.set=Qt.prototype.set,Qt.prototype.isEnabledObject=Qt.prototype.If,Qt.prototype.isVisibleObject=Qt.prototype.Ed,Qt.prototype.isContainedBy=Qt.prototype.rg,Qt.prototype.getNearestIntersectionPoint=Qt.prototype.rs,Qt.prototype.getLocalPoint=Qt.prototype.qs,Qt.prototype.getDocumentScale=Qt.prototype.Df,Qt.prototype.getDocumentAngle=Qt.prototype.li,Qt.prototype.getDocumentBounds=Qt.prototype.mi,Qt.prototype.getDocumentPoint=Qt.prototype.ga,Qt.prototype.intersectsRect=Qt.prototype.Yc,Qt.prototype.containedInRect=Qt.prototype.fh,Qt.prototype.containsRect=Qt.prototype.Re,Qt.prototype.containsPoint=Qt.prototype.ca,Qt.prototype.raiseChanged=Qt.prototype.g,Qt.prototype.raiseChangedEvent=Qt.prototype.cb,Qt.prototype.addCopyProperty=Qt.prototype.Vw;var ki=null;Qt.className="GraphObject",ki=new Ii,In("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=Wn(hi,hi.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof hi){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"},Wn(io,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ui(0,0,2.76142374915397,2.761423749153969),spot2:new Ui(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 hi&&(x=b.fb("ButtonBorder"),x instanceof io)){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 hi&&(x=b.fb("ButtonBorder"),x instanceof io&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof hi&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof io){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var te=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=te,te=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=te,x.skipsUndoManager=z}}},y.actionUp=function(x,b){if(b.If()&&b instanceof hi&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof io){var z=x.diagram,te=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=te}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof hi&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof io){var z=x.diagram,te=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=te}}},y.actionMove=function(x,b){if(b.If()&&b instanceof hi&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof io))){var z=E.skipsUndoManager;E.skipsUndoManager=!0;var te=b._buttonFillPressed;x.fill!==te&&(x.fill=te),te=b._buttonStrokePressed,x.stroke!==te&&(x.stroke=te),E.skipsUndoManager=z}}},y}),In("TreeExpanderButton",function(){var a=Wn("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Wn(io,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ho},new fs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new fs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof jo&&(x=x.adornedPart),x instanceof Di){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}),In("SubGraphExpanderButton",function(){var a=Wn("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Wn(io,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ho},new fs("figure","isSubGraphExpanded",function(y,x){return x=x.panel,y?x._subGraphExpandedFigure:x._subGraphCollapsedFigure}).cp()));return a.click=function(y,x){if(x=x.part,x instanceof jo&&(x=x.adornedPart),x instanceof Yr){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}),In("ToolTip",function(){return Wn(jo,hi.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Qe(0,3),shadowBlur:5},Wn(io,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Ui(0,0,4,6),spot2:new Ui(1,1,-4,-4)}))}),In("ContextMenu",function(){return Wn(jo,hi.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Qe(0,3),shadowBlur:5},new fs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),In("ContextMenuButton",function(){var a=Wn("Button");a.stretch=lr;var y=a.fb("ButtonBorder");return y instanceof io&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Ui(0,0,2,3),y.spot2=new Ui(1,1,-2,-2)),a}),In("PanelExpanderButton",function(a){var y=ri(a,"COLLAPSIBLE"),x=Wn("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},Wn(io,{name:"ButtonIcon",strokeWidth:2},new fs("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof io&&(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 te=E.ih();te===null&&(te=E.part),te!==null&&(E=te.fb(y),E!==null&&(b.handled=!0,z.Ea("Collapse/Expand Panel"),E.visible=!E.visible,z.eb("Collapse/Expand Panel")))}},x}),In("CheckBoxButton",function(a){var y=ri(a);return a=Wn("Button",{desiredSize:new pi(14,14)},Wn(io,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:ci,geometryStretch:tr,visible:!1},y!==""?new fs("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof hi){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}),In("CheckBox",function(a){a=ri(a),a=Wn("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Oi(0,1,0,0)});var y=Wn(hi,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Oi(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}),Qt.None=ai=new gn(Qt,"None",0),Qt.Default=Vr=new gn(Qt,"Default",0),Qt.Vertical=wr=new gn(Qt,"Vertical",4),Qt.Horizontal=lr=new gn(Qt,"Horizontal",5),Qt.Fill=ci=new gn(Qt,"Fill",3),Qt.Uniform=tr=new gn(Qt,"Uniform",1),Qt.UniformToFill=yo=new gn(Qt,"UniformToFill",2),Qt.FlipVertical=ao=new gn(Qt,"FlipVertical",1),Qt.FlipHorizontal=Eo=new gn(Qt,"FlipHorizontal",2),Qt.FlipBoth=Qo=new gn(Qt,"FlipBoth",3),Qt.make=Wn,Qt.getBuilders=function(){var a=new Ii,y;for(y in ki)if(y!==y.toLowerCase()){var x=ki.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Qt.defineBuilder=In,Qt.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=ki.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof Qt))return y&&b.set(y),b;St('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Qt.takeBuilderArgument=ri;function Ar(){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=Tr,this.o=_o,this.hg=Vr,this.ob=this.Bi=1,this.Pf=ai,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Ar.prototype.copy=function(){var a=new Ar;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 Hr(){this.u=-1/0,this.o=0,this.F=Qr,this.rr=Zl,this.j=this.V="None"}Hr.prototype.copy=function(){var a=new Hr;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},Hr.className="LinkElementSettings";function to(){this.yj=this.Xi=Vo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}to.prototype.copy=function(){var a=new to;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},to.className="LinkSettings";function ho(){this.ha=[1,0,0,1,0,0]}ho.prototype.copy=function(){var a=new ho;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},ho.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},ho.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},ho.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,te=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]=te,this.translate(-y,-x)}},ho.className="STransform";function Lo(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Lo.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Lo.className="SGradient";function bo(a,y,x){this.ownerDocument=a=y===void 0?at.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 Uo(this,x)}bo.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},bo.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),rn(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},bo.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},bo.prototype.focus=function(){this.Oa.focus()},bo.prototype.mx=function(){this.ownerDocument=null},Ye.Object.defineProperties(bo.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}}}),bo.className="SVGSurface";function Uo(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 ho,this.j=Wu(this),this.Nj=Wu(this,"gojs-diagram"),this.Hl=this.ti=null;var x=mo++,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 va(a,y,x,b,E,z,te){a.Nj===void 0?Ju(a,y,x,b,E,z,te):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+z+", "+te+")")}Le=Uo.prototype,Le.arc=function(a,y,x,b,E,z,te,re){var oe=2*Math.PI,le=oe-1e-6,ue=x*Math.cos(b),me=x*Math.sin(b),we=a+ue,Ee=y+me,De=z?0:1;b=z?b-E:E-b,(1e-6<Math.abs(te-we)||1e-6<Math.abs(re-Ee))&&this.path.push(["L",we,+Ee]),0>b&&(b=b%oe+oe),b>le?(this.path.push(["A",x,x,0,1,De,a-ue,y-me]),this.path.push(["A",x,x,0,1,De,we,Ee])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),De,a+x*Math.cos(E),y+x*Math.sin(E)])},Le.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Le.Se=function(a){this.addPath(this.path,this.rb,a||0)},Le.bezierCurveTo=function(a,y,x,b,E,z){this.path.push(["C",a,y,x,b,E,z])},Le.clearRect=function(){},Le.clip=function(){this.Yl.clipPath=!0},Le.closePath=function(){this.path.push(["z"])},Le.createLinearGradient=function(a,y,x,b){var E=new Lo("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},Le.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+mo++,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(dh,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},Le.createRadialGradient=function(a,y,x,b,E,z){var te=new Lo("radial");return te.x1=a,te.y1=y,te.r1=x,te.x2=b,te.y2=E,te.r2=z,te};function Ka(a,y,x,b,E,z,te,re,oe){b=re/b,E=oe/E,z===0&&te===0||a.rb.translate(z,te),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}Le.drawImage=function(a,y,x,b,E,z,te,re,oe){var le="";a instanceof HTMLCanvasElement&&(le=a.toDataURL()),a instanceof HTMLImageElement&&(le=a.getAttribute("src"));var ue=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(z=y,te=x,re=b=ue,oe=E=a),b=b||0,E=E||0,re=re||0,oe=oe||0,Ka(this,y,x,b,E,z||0,te||0,re,oe),z={x:0,y:0,width:ue||b,height:a||E,href:le},en.$(b,re)&&en.$(E,oe)?le.toLowerCase().indexOf(".svg")===-1&&le.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||b!==ue||E!==a)&&(b+=y,E+=x,z["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),Wa(this,dh,z,this.rb),this.addElement(dh,z)},Le.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),ol(this,this.Yl)},Le.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Le.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},Wa(this,"fill",a,this.rb),this.addElement("rect",a)},Le.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},Wa(this,"fill",a,this.rb),ol(this,a),this.svg.prepend(this.Ud("rect",a))},Le.fillText=function(a,y,x){a=[a,y,x],y=this.textAlign,y==="left"?y="start":y==="right"?y="end":y==="center"&&(y="middle"),y={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":y},Wa(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Le.lineTo=function(a,y){this.path.push(["L",a,y])},Le.moveTo=function(a,y){this.path.push(["M",a,y])},Le.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},Le.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"])},Le.restore=function(){this.rb=this.stack.pop(),this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle,this.font=a.font,this.globalAlpha=a.globalAlpha,this.lineCap=a.lineCap,this.lineDashOffset=a.lineDashOffset,this.lineJoin=a.lineJoin,this.lineWidth=a.lineWidth,this.miterLimit=a.miterLimit,this.shadowBlur=a.shadowBlur,this.shadowColor=a.shadowColor,this.shadowOffsetX=a.shadowOffsetX,this.shadowOffsetY=a.shadowOffsetY,this.strokeStyle=a.strokeStyle,this.textAlign=a.textAlign,this.bk=a.bk},Le.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,bk:this.bk});for(var a=[],y=0;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},Le.setTransform=function(a,y,x,b,E,z){a===1&&y===0&&x===0&&b===1&&E===0&&z===0||Ju(this,a,y,x,b,E,z)};function pl(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Le.scale=function(a,y){this.rb.scale(a,y)},Le.translate=function(a,y){this.rb.translate(a,y)},Le.transform=function(){},Le.yc=function(){},Le.stroke=function(){yu(this,this.Yl)},Le.jk=function(){this.clipInsteadOfFill||this.stroke()},Le.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Le.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function Wa(a,y,x,b){y==="fill"?ol(a,x):y==="stroke"&&yu(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function ol(a,y){a.fillStyle instanceof Lo?y.fill=Wc(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 nu(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Lo?y.setAttributeNS(null,"fill",Wc(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 yu(a,y){if(a.strokeStyle instanceof Lo)y.stroke=Wc(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 Wc(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"+mo++,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=[],te=0;te<y;te++){var re=E[te],oe=re.color;re={offset:re.offset,"stop-color":oe},/^rgba\(/.test(oe)&&(oe=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(oe),re["stop-color"]="rgb("+oe[1]+","+oe[2]+","+oe[3]+")",re["stop-opacity"]=oe[4]),z.push(re)}for(z.sort(function(le,ue){return le.offset>ue.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",z[E]));return a.svg.appendChild(x),"url(#"+b+")"}Le.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var z=Ft(a[E]),te=[z.shift()];if(te[0]==="A")te.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)te.push(z.shift()+","+z.shift());b.push(te.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,Wa(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var re in a)re!=="transform"&&y.setAttributeNS(null,re,a[re]);else{re=y.getElementsByTagName("path");for(var oe in a)oe!=="transform"&&re[x].setAttributeNS(null,oe,a[oe])}else this.addElement("path",a)};function Ju(a,y,x,b,E,z,te){var re=new ho;re.ha=[y,x,b,E,z,te],y={},Wa(a,"g",y,re),re=a.addElement("g",y),a.nh.push(re)}function Wu(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Le.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Al(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Xs(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Le.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Le.fs=function(){this.Ct=!1},Le.Vc=function(){},Le.Wx=function(){},Uo.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Uo.prototype.getImageData=function(){return null},Uo.prototype.measureText=function(){return null};function fd(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()))}Uo.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Uo.className="SVGContext",mn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new bo(this,at.document));var y=new bo(this,at.document,!0);a===void 0&&(a=new $i);var x=this;return lh(this,function(b,E){return b=tp(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},mn.prototype.makeSvg=mn.prototype.Cs,mn.prototype.av=function(a){return this.Cs(a)},mn.prototype.makeSVG=mn.prototype.av;function al(a,y,x,b){this.ownerDocument=y=y===void 0?at.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Gc(y,x,b),y.H=a}al.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},al.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},al.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},al.prototype.focus=function(){this.Oa.focus()},al.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Ye.Object.defineProperties(al.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}}}),al.className="CanvasSurface";function Gc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&St("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new ro,this.isTemporary=!!x}Le=Gc.prototype,Le.Wx=function(a){this.Z.imageSmoothingEnabled=a},Le.arc=function(a,y,x,b,E,z){this.Z.arc(a,y,x,b,E,z)},Le.beginPath=function(){this.Z.beginPath()},Le.Se=function(){},Le.bezierCurveTo=function(a,y,x,b,E,z){this.Z.bezierCurveTo(a,y,x,b,E,z)},Le.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},Le.clip=function(){this.Z.clip()},Le.closePath=function(){this.Z.closePath()},Le.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},Le.createPattern=function(a,y){return this.Z.createPattern(a,y)},Le.createRadialGradient=function(a,y,x,b,E,z){return this.Z.createRadialGradient(a,y,x,b,E,z)},Le.drawImage=function(a,y,x,b,E,z,te,re,oe){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,z,te,re,oe)},Le.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Le.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Le.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Le.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Le.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},Le.lineTo=function(a,y){this.Z.lineTo(a,y)},Le.measureText=function(a){return this.Z.measureText(a)},Le.moveTo=function(a,y){this.Z.moveTo(a,y)},Le.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},Le.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},Le.restore=function(){this.Z.restore()},Le.save=function(){this.yc(),this.Z.save()},Gc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Le=Gc.prototype,Le.setTransform=function(a,y,x,b,E,z){this.El.setTransform(a,y,x,b,E,z)},Le.scale=function(a,y){this.El.scale(a,y)},Le.translate=function(a,y){this.El.translate(a,y)},Le.stroke=function(){this.Z.stroke()},Le.transform=function(a,y,x,b,E,z){if(a!==1||y!==0||x!==0||b!==1||E!==0||z!==0){var te=this.El,re=te.m11*a+te.m21*y;a=te.m12*a+te.m22*y,y=te.m11*x+te.m21*b,x=te.m12*x+te.m22*b,te.dx=te.m11*E+te.m21*z+te.dx,te.dy=te.m12*E+te.m22*z+te.dy,te.m11=re,te.m12=a,te.m21=y,te.m22=x}},Le.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Le.ng=function(a,y){if(a instanceof Oo&&a.type===Qu){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},Le.jk=function(){this.Hm||this.stroke()},Le.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Le.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Le.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(hf),a.lineDashOffset=0)},Le.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Le.Hs=function(){},Ye.Object.defineProperties(Gc.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 hf=Object.freeze([]);Gc.className="CanvasSurfaceContext";function $c(){this.F=this.o=this.u=this.j=0}$c.className="ColorNumbers";function Oo(a,y){sp||(ap(),sp=!0),Or(this),this._isFrozen=!1,a===void 0?(this.na=jh,this.xk="black"):typeof a=="string"?(this.na=jh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===gh?(this.Qd=zs,this.Lk=as):this.Lk=a===Qu?this.Qd=wo:this.Qd=La,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Oo.prototype.copy=function(){var a=new Oo;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},Le=Oo.prototype,Le.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Le.qb=function(a){a.classType===Oo&&(this.type=a)},Le.toString=function(){var a="Brush(";if(this.type===jh)a+=this.color;else if(a=this.type===gh?a+"Linear ":this.type===Qu?a+"Radial ":this.type===lp?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},Le.addColorStop=function(a,y){return this._isFrozen&&An(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&qn(a,"0 <= loc <= 1",Oo,"addColorStop:loc"),this.we===null&&(this.we=new Ii),this.we.add(a,y),this.na===jh&&(this.type=gh),this.xe=null,this},Le.Vz=function(a,y){if(this._isFrozen&&An(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===jh)Gu(this.color),this.color=fh(a,y);else if((this.type===gh||this.type===Qu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Gu(x.value),this.addColorStop(x.key,fh(a,y));return this};function Rh(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,Gu(a),fh(y,x)}Le.Wy=function(a,y){if(this._isFrozen&&An(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===jh)Gu(this.color),this.color=fh(-a,y);else if((this.type===gh||this.type===Qu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Gu(x.value),this.addColorStop(x.key,fh(-a,y));return this};function Fg(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,Gu(a),fh(-y,x)}function Kc(a,y,x){Gu(a),a=oa.j;var b=oa.u,E=oa.o,z=oa.F;return Gu(y),x===void 0&&(x=.5),"rgba("+Math.round((oa.j-a)*x+a)+", "+Math.round((oa.u-b)*x+b)+", "+Math.round((oa.o-E)*x+E)+", "+Math.round((oa.F-z)*x+z)+")"}Le.Gx=function(){if(this.type===jh)return Od(this.color);if((this.type===gh||this.type===Qu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Qu)return Od(a.first().value);if(a.get(.5)!==null)return Od(a.get(.5));if(a.count===2)return a=a.Fa(),Od(Kc(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,z=1;y.next();){var te=y.key,re=Math.abs(.5-y.key);E>z&&re<E?(x=te,E=re):z>=E&&re<z&&(b=te,z=re)}return x>b&&(z=x,x=b,b=z,z=E),E=b-x,Od(Kc(a.get(x),a.get(b),1-z/E))}return!1};function Od(a){return a?a instanceof Oo?a.Gx():(Gu(a),128>(299*oa.j+587*oa.u+114*oa.o)/1e3):!1}function fh(a,y){switch(y){case up:y=100*Xf(oa.j);var x=100*Xf(oa.u),b=100*Xf(oa.o);return Qs.j=.4124564*y+.3575761*x+.1804375*b,Qs.u=.2126729*y+.7151522*x+.072175*b,Qs.o=.0193339*y+.119192*x+.9503041*b,Qs.F=oa.F,y=Gp(Qs.j/pf[0]),x=Gp(Qs.u/pf[1]),b=Gp(Qs.o/pf[2]),dc.j=116*x-16,dc.u=500*(y-x),dc.o=200*(x-b),dc.F=Qs.F,dc.j=Math.min(100,Math.max(0,dc.j+100*a)),a=(dc.j+16)/116,y=a-dc.o/200,Qs.j=pf[0]*Ag(dc.u/500+a),Qs.u=pf[1]*(dc.j>gf*Dg?Math.pow(a,3):dc.j/gf),Qs.o=pf[2]*Ag(y),Qs.F=dc.F,a=-.969266*Qs.j+1.8760108*Qs.u+.041556*Qs.o,y=.0556434*Qs.j+-.2040259*Qs.u+1.0572252*Qs.o,oa.j=255*op((3.2404542*Qs.j+-1.5371385*Qs.u+-.4985314*Qs.o)/100),oa.u=255*op(a/100),oa.o=255*op(y/100),oa.F=Qs.F,oa.j=Math.round(oa.j),255<oa.j?oa.j=255:0>oa.j&&(oa.j=0),oa.u=Math.round(oa.u),255<oa.u?oa.u=255:0>oa.u&&(oa.u=0),oa.o=Math.round(oa.o),255<oa.o?oa.o=255:0>oa.o&&(oa.o=0),"rgba("+oa.j+", "+oa.u+", "+oa.o+", "+oa.F+")";case iS:return _f(),Su.o=Math.min(100,Math.max(0,Su.o+100*a)),"hsla("+Su.j+", "+Su.u+"%, "+Su.o+"%, "+Su.F+")";default:St("Unknown color space: "+y)}}function Gu(a){sp||(ap(),sp=!0);var y=Bg;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,oa.j=a[0],oa.u=a[1],oa.o=a[2],oa.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,oa.j=0,oa.u=0,oa.o=0,oa.F=1)}}function _f(){var a=oa.j/255,y=oa.u/255,x=oa.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 te=a=0;else{switch(b){case a:te=(y-x)/z%6;break;case y:te=(x-a)/z+2;break;case x:te=(a-y)/z+4}te*=60,0>te&&(te+=360),a=z/(1-Math.abs(2*E-1))}Su.j=Math.round(te),Su.u=Math.round(100*a),Su.o=Math.round(100*E),Su.F=oa.F}function Xf(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function op(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function Gp(a){return a>Dg?Math.pow(a,1/3):(gf*a+16)/116}function Ag(a){var y=a*a*a;return y>Dg?y:(116*a-16)/gf}function ff(a,y){typeof a!="string"&&(a instanceof Oo||St("Value for "+y+" must be a color string or a Brush, not "+a))}function ap(){Bg=Ha?new al(null,void 0,{willReadFrequently:!0}).context:null}Ye.Object.defineProperties(Oo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&An(this,a),this.na=a,this.start.Mc()&&(a===gh?this.start=zs:a===Qu&&(this.start=wo)),this.end.Mc()&&(a===gh?this.end=as:a===Qu&&(this.end=wo)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&An(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&An(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&An(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&An(this,a),0>a&&qn(a,">= zero",Oo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&An(this,a),0>a&&qn(a,">= zero",Oo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&An(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&An(this,a),this.cr=a,this.xe=null}}}),Oo.prototype.isDark=Oo.prototype.Gx,Oo.prototype.darkenBy=Oo.prototype.Wy,Oo.prototype.lightenBy=Oo.prototype.Vz,Oo.prototype.addColorStop=Oo.prototype.addColorStop;var Dg=216/24389,gf=24389/27,pf=[95.047,100,108.883],Bg=null,oa=new $c,Su=new $c,Qs=new $c,dc=new $c,sp=!1;Oo.className="Brush";var jh;Oo.Solid=jh=new gn(Oo,"Solid",0);var gh;Oo.Linear=gh=new gn(Oo,"Linear",1);var Qu;Oo.Radial=Qu=new gn(Oo,"Radial",2);var lp;Oo.Pattern=lp=new gn(Oo,"Pattern",4);var up;Oo.Lab=up=new gn(Oo,"Lab",5);var iS;Oo.HSL=iS=new gn(Oo,"HSL",6),Oo.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},Oo.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;sp||(ap(),sp=!0);var y=Bg;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)},Oo.lighten=function(a){return Rh(a)},Oo.lightenBy=Rh,Oo.darken=function(a){return Fg(a)},Oo.darkenBy=Fg,Oo.mix=Kc,Oo.isDark=Od;function Es(){this.xa="Base"}Es.prototype.measure=function(){},Es.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Es.prototype.arrange=function(){},Es.prototype.Ly=function(a,y,x,b,E,z){a.arrange(y,x,b,E,z)},Es.prototype.iA=function(a){a.Uj()},Es.prototype.gc=function(){},Ye.Object.defineProperties(Es.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return hi}}}),Es.prototype.remeasureObject=Es.prototype.iA,Es.prototype.arrangeElement=Es.prototype.Ly,Es.prototype.measureElement=Es.prototype.Yz,Es.className="PanelLayout";function jm(){this.xa="Base"}Kt(jm,Es),jm.prototype.measure=function(a,y,x,b,E,z,te){var re=b.length;a=ph(a);for(var oe=0;oe<re;oe++){var le=b[oe];if(le.visible||le===a){var ue=le.margin,me=ue.right+ue.left;ue=ue.top+ue.bottom,le.measure(y,x,z,te);var we=le.measuredBounds;me=Math.max(we.width+me,0),ue=Math.max(we.height+ue,0),we=le.position.x;var Ee=le.position.y;isFinite(we)||(we=0),isFinite(Ee)||(Ee=0),le instanceof io&&le.isGeometryPositioned&&(le=le.strokeWidth/2,we-=le,Ee-=le),cr(E,we,Ee,me,ue)}}},jm.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],te=z.measuredBounds,re=z.margin,oe=z.position.x,le=z.position.y;if(oe=isNaN(oe)?-a:oe-a,le=isNaN(le)?-x:le-x,z instanceof io&&z.isGeometryPositioned){var ue=z.strokeWidth/2;oe-=ue,le-=ue}z.visible&&z.arrange(oe+re.left,le+re.top,te.width,te.height)}};function zm(){this.xa="Base"}Kt(zm,Es),zm.prototype.measure=function(a,y,x,b,E,z,te){var re=b.length;y=Sn(),z=ph(a);for(var oe=0;oe<re;oe++){var le=b[oe];if(le.visible||le===z){var ue=Fl(le,!1);if(ue!==ai&&ue!==lr)y.push(le);else{le.measure(1/0,x,0,te),ue=le.margin,le=le.measuredBounds;var me=Math.max(le.height+ue.top+ue.bottom,0);E.width+=Math.max(le.width+ue.right+ue.left,0),E.height=Math.max(E.height,me)}}}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++)oe=y[a],(oe.visible||oe===z)&&(ue=oe.margin,re=ue.right+ue.left,ue=ue.top+ue.bottom,oe.measure(1/0,x,0,te),oe=oe.measuredBounds,ue=Math.max(oe.height+ue,0),E.width+=Math.max(oe.width+re,0),E.height=Math.max(E.height,ue));Gn(y)},zm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.top,te=a.isOpposite,re=te?x.width:E.left,oe=0;oe<b;oe++){var le=z,ue=y[oe];if(ue.visible){var me=ue.measuredBounds,we=ue.margin,Ee=we.top+we.bottom,De=z+E.bottom,je=me.height,ct=Fl(ue,!1);(isNaN(ue.desiredSize.height)&&ct===ci||ct===wr)&&(je=Math.max(x.height-Ee-De,0)),Ee=je+Ee+De,De=ue.alignment,De.Xb()&&(De=a.defaultAlignment),De.sb()||(De=wo),te&&(re-=me.width+we.left+we.right),ue.arrange(re+De.offsetX+we.left,le+De.offsetY+we.top+(x.height*De.y-Ee*De.y),me.width,je),te||(re+=me.width+we.left+we.right)}}};function Hm(){this.xa="Base"}Kt(Hm,Es),Hm.prototype.measure=function(a,y,x,b,E,z){var te=b.length;x=Sn();for(var re=ph(a),oe=0;oe<te;oe++){var le=b[oe];if(le.visible||le===re){var ue=Fl(le,!1);if(ue!==ai&&ue!==wr)x.push(le);else{var me=le.margin;ue=me.right+me.left,me=me.top+me.bottom,le.measure(y,1/0,z,0),le=le.measuredBounds,Xi(E,Math.max(E.width,Math.max(le.width+ue,0)),E.height+Math.max(le.height+me,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++)oe=x[a],(oe.visible||oe===re)&&(le=oe.margin,te=le.right+le.left,le=le.top+le.bottom,oe.measure(y,1/0,z,0),oe=oe.measuredBounds,le=Math.max(oe.height+le,0),E.width=Math.max(E.width,Math.max(oe.width+te,0)),E.height+=le);Gn(x)}},Hm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.left,te=a.isOpposite,re=te?x.height:E.top,oe=0;oe<b;oe++){var le=z,ue=y[oe];if(ue.visible){var me=ue.measuredBounds,we=ue.margin,Ee=we.left+we.right,De=z+E.right,je=me.width,ct=Fl(ue,!1);(isNaN(ue.desiredSize.width)&&ct===ci||ct===lr)&&(je=Math.max(x.width-Ee-De,0)),Ee=je+Ee+De,De=ue.alignment,De.Xb()&&(De=a.defaultAlignment),De.sb()||(De=wo),te&&(re-=me.height+we.bottom+we.top),ue.arrange(le+De.offsetX+we.left+(x.width*De.x-Ee*De.x),re+De.offsetY+we.top,je,me.height),te||(re+=me.height+we.bottom+we.top)}}};function Zm(){this.xa="Base"}Kt(Zm,Es),Zm.prototype.measure=function(a,y,x,b,E,z,te){var re=b.length,oe=a.Pb(),le=oe.margin,ue=le.right+le.left,me=le.top+le.bottom;oe.measure(y,x,z,te);var we=oe.measuredBounds;z=we.width,te=we.height;var Ee=Math.max(z+ue,0),De=Math.max(te+me,0),je=a.isClipping,ct=_t.allocAt(-le.left,-le.top,Ee,De),qe=_t.allocAt(0,0,z,te);Cv(oe,qe,!0),z=qe.width,te=qe.height;for(var Ct=!0,Lt=ph(a),Rt=0;Rt<re;Rt++){var Jt=b[Rt];we=y;var vn=x;if(Jt!==oe&&(Jt.visible||Jt===Lt)){le=Jt.margin;var Fi=le.left,Yi=le.top;switch(Ee=le.right+le.left,De=le.top+le.bottom,le=Fl(Jt,!1),le){case ci:we=z,vn=te,Yi=Fi=De=Ee=0;break;case lr:we=z,Fi=Ee=0;break;case wr:vn=te,Yi=De=0}Jt.measure(we,vn,0,0),we=Jt.measuredBounds,Ee=Math.max(we.width+Ee,0),De=Math.max(we.height+De,0),le=Jt.alignment,le.Xb()&&(le=a.defaultAlignment),le.sb()||(le=wo);var Hi=Jt.alignmentFocus;if(Hi.Xb()&&(Hi=wo),vn=null,Jt instanceof hi&&Jt.$e!==""&&(vn=Jt.fb(Jt.$e),vn===Jt&&(vn=null)),Fi=qe.x-Fi,Yi=qe.y-Yi,vn!==null){for(Jt.arrange(0,0,we.width,we.height),we=vn.actualBounds,we=Qe.allocAt(we.x+(Hi.x*we.width-Hi.offsetX),we.y+(Hi.y*we.height-Hi.offsetY)),vn=vn.panel;vn!==Jt;)vn.transform.Ga(we),vn=vn.panel;Fi+=le.x*z+le.offsetX-we.x,Yi+=le.y*te+le.offsetY-we.y,Qe.free(we)}else Fi+=le.x*z+le.offsetX-(Hi.x*we.width+Hi.offsetX),Yi+=le.y*te+le.offsetY-(Hi.y*we.height+Hi.offsetY);Ct?(Ct=!1,E.h(Fi,Yi,Ee,De)):cr(E,Fi,Yi,Ee,De)}}switch(Ct?E.assign(ct):je?E.Uu(qe.x,qe.y,qe.width,qe.height):cr(E,ct.x,ct.y,ct.width,ct.height),_t.free(ct),_t.free(qe),le=oe.stretch,le===Vr&&(le=Fl(oe,!1)),le){case ai:return;case ci:if(!isFinite(y)&&!isFinite(x))return;break;case lr:if(!isFinite(y))return;break;case wr:if(!isFinite(x))return}for(we=oe.measuredBounds,z=we.width,te=we.height,Ee=Math.max(z+ue,0),De=Math.max(te+me,0),le=oe.margin,qe=_t.allocAt(-le.left,-le.top,Ee,De),Cv(oe,qe,!0),z=qe.width,te=qe.height,y=0;y<re;y++)x=b[y],x===oe||!x.visible&&x!==Lt||(le=x.margin,Ee=le.right+le.left,De=le.top+le.bottom,we=x.measuredBounds,Ee=Math.max(we.width+Ee,0),De=Math.max(we.height+De,0),ue=x.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=wo),x=x.alignmentFocus,x.Xb()&&(x=wo),Ct?(Ct=!1,E.h(ue.x*z+ue.offsetX-(x.x*we.width+x.offsetX)-le.left,ue.y*te+ue.offsetY-(x.y*we.height+x.offsetY)-le.top,Ee,De)):cr(E,ue.x*z+ue.offsetX-(x.x*we.width+x.offsetX)-le.left,ue.y*te+ue.offsetY-(x.y*we.height+x.offsetY)-le.top,Ee,De));Ct?E.assign(ct):je?E.Uu(qe.x,qe.y,qe.width,qe.height):cr(E,ct.x,ct.y,ct.width,ct.height),_t.free(qe)},Zm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),z=E.measuredBounds,te=z.width,re=z.height,oe=a.padding;z=oe.left,oe=oe.top;var le=z-x.x,ue=oe-x.y;for(E.arrange(le,ue,te,re),te=_t.allocAt(0,0,te,re),Cv(E,te,!1),re=0;re<b;re++){var me=y[re];if(me!==E){le=me.measuredBounds;var we=le.width,Ee=le.height;ue=me.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=wo);var De=me.alignmentFocus;if(De.Xb()&&(De=wo),le=null,me instanceof hi&&me.$e!==""&&(le=me.fb(me.$e),le===me&&(le=null)),le!==null){var je=le.actualBounds;for(De=Qe.allocAt(je.x+(De.x*je.width-De.offsetX),je.y+(De.y*je.height-De.offsetY)),le=le.panel;le!==me;)le.transform.Ga(De),le=le.panel;le=ue.x*te.width+ue.offsetX-De.x,ue=ue.y*te.height+ue.offsetY-De.y,Qe.free(De)}else le=ue.x*te.width+ue.offsetX-(De.x*we+De.offsetX),ue=ue.y*te.height+ue.offsetY-(De.y*Ee+De.offsetY);le+=te.x-x.x,ue+=te.y-x.y,me.visible&&me.arrange(z+le,oe+ue,we,Ee)}}_t.free(te)};function Cv(a,y,x){var b=null;if(a instanceof hi&&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 Wm(){this.xa="Base"}Kt(Wm,Es),Wm.prototype.measure=function(a,y,x,b,E,z,te){var re=b.length,oe=a.Pb(),le=oe.margin,ue=y,me=x,we=le.right+le.left,Ee=le.top+le.bottom;oe.measure(y,x,z,te),le=oe.measuredBounds;var De=0,je=null;oe instanceof io&&(je=oe,De=je.strokeWidth*je.scale);var ct=Math.max(le.width+we,0);le=Math.max(le.height+Ee,0);var qe=Lv(oe),Ct=qe.x*ct+qe.offsetX;qe=qe.y*le+qe.offsetY;var Lt=Nv(oe),Rt=Lt.x*ct+Lt.offsetX;for(Lt=Lt.y*le+Lt.offsetY,isFinite(y)&&(ue=Math.max(Math.abs(Ct-Rt)-De,0)),isFinite(x)&&(me=Math.max(Math.abs(qe-Lt)-De,0)),De=pi.alloc(),De.h(0,0),a=ph(a),Lt=0;Lt<re;Lt++)qe=b[Lt],qe===oe||!qe.visible&&qe!==a||(le=qe.margin,ct=le.right+le.left,Ct=le.top+le.bottom,qe.measure(ue,me,0,0),le=qe.measuredBounds,ct=Math.max(le.width+ct,0),le=Math.max(le.height+Ct,0),De.h(Math.max(ct,De.width),Math.max(le,De.height)));if(re===1)E.width=ct,E.height=le,pi.free(De);else{switch(qe=Lv(oe),Lt=Nv(oe),re=b=0,Lt.x!==qe.x&&Lt.y!==qe.y&&(b=De.width/Math.abs(Lt.x-qe.x),re=De.height/Math.abs(Lt.y-qe.y)),pi.free(De),De=0,je!==null&&(De=je.strokeWidth*je.scale,kv(je)===tr&&(b=re=Math.max(b,re))),b+=Math.abs(qe.offsetX)+Math.abs(Lt.offsetX)+De,re+=Math.abs(qe.offsetY)+Math.abs(Lt.offsetY)+De,je=oe.stretch,je===Vr&&(je=Fl(oe,!1)),je){case ai:te=z=0;break;case ci:isFinite(y)&&(b=y),isFinite(x)&&(re=x);break;case lr:isFinite(y)&&(b=y),te=0;break;case wr:z=0,isFinite(x)&&(re=x)}oe.Uj(),oe.measure(b,re,z,te),E.width=oe.measuredBounds.width+we,E.height=oe.measuredBounds.height+Ee}},Wm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,z=_t.alloc();z.h(0,0,1,1);var te=b.margin,re=te.left;te=te.top;var oe=a.padding,le=oe.left;oe=oe.top,b.arrange(le+re,oe+te,E.width,E.height);var ue=Lv(b),me=Nv(b),we=ue.y*E.height+ue.offsetY,Ee=me.x*E.width+me.offsetX;for(me=me.y*E.height+me.offsetY,z.x=ue.x*E.width+ue.offsetX,z.y=we,cr(z,Ee,me,0,0),z.x+=re+le,z.y+=te+oe,E=0;E<x;E++)re=y[E],re!==b&&(le=re.measuredBounds,te=re.margin,oe=Math.max(le.width+te.right+te.left,0),ue=Math.max(le.height+te.top+te.bottom,0),we=re.alignment,we.Xb()&&(we=a.defaultAlignment),we.sb()||(we=wo),oe=z.width*we.x+we.offsetX-oe*we.x+te.left+z.x,te=z.height*we.y+we.offsetY-ue*we.y+te.top+z.y,re.visible&&(Pr(z.x,z.y,z.width,z.height,oe,te,le.width,le.height)?re.arrange(oe,te,le.width,le.height):re.arrange(oe,te,le.width,le.height,new _t(z.x,z.y,z.width,z.height))));_t.free(z)};function Gm(){this.xa="Base",this.name="Table"}Kt(Gm,Es),Gm.prototype.measure=function(a,y,x,b,E){for(var z=b.length,te=Sn(),re=Sn(),oe=0;oe<z;oe++){var le=b[oe],ue=le instanceof hi?le:null;if(ue!==null&&zh(ue)&&le.visible){re.push(ue);for(var me=ue.O.s,we=me.length,Ee=0;Ee<we;Ee++){var De=me[Ee];ue.type===hi.TableRow?De.row=le.row:ue.type===hi.TableColumn&&(De.column=le.column),te.push(De)}}else te.push(le)}z=te.length,z===0&&(a.Fb(0),a.Eb(0));for(var je=[],ct=0;ct<z;ct++){var qe=te[ct];qe.visible&&(pt(qe,!0),Vt(qe,!0),je[qe.row]||(je[qe.row]=[]),je[qe.row][qe.column]||(je[qe.row][qe.column]=[]),je[qe.row][qe.column].push(qe))}Gn(te);var Ct=Sn(),Lt=Sn(),Rt=Sn(),Jt={count:0},vn={count:0},Fi=y,Yi=x,Hi=a.rowDefs,mi=a.colDefs,ni=null;z=Hi.length;for(var Ur=0;Ur<z;Ur++)ni=Hi[Ur],ni!==void 0&&(ni.actual=0);z=mi.length;for(var Dr=0;Dr<z;Dr++)ni=mi[Dr],ni!==void 0&&(ni.actual=0);for(var Ko=je.length,la=0,Rs=0;Rs<Ko;Rs++)je[Rs]&&(la=Math.max(la,je[Rs].length));var Vs=Math.min(a.topIndex,Ko-1),Dl=Math.min(a.leftIndex,la-1),js=0;Ko=je.length;for(var Xh=ph(a),gs=0;gs<Ko;gs++)if(je[gs]){la=je[gs].length;var Yc=a.Fb(gs);Yc.actual=0;for(var Bl=Yc.oc=0;Bl<la;Bl++)if(je[gs][Bl]){var Yh=a.Eb(Bl);Ct[Bl]===void 0&&(Yh.actual=0,Yh.oc=0,Ct[Bl]=!0);for(var Vu=je[gs][Bl],pc=Vu.length,ku=0;ku<pc;ku++){var Pu=Vu[ku];if(Pu.visible||Pu===Xh){var Ff=1<Pu.rowSpan||1<Pu.columnSpan;Ff&&(gs<Vs||Bl<Dl||Lt.push(Pu));var Jc=Pu.margin,Bp=Jc.right+Jc.left,Iu=Jc.top+Jc.bottom,Tl=cc(Pu,Yc,Yh,!1),Am=Pu.desiredSize,$g=!isNaN(Am.height),md=!isNaN(Am.width)&&$g;if(Ff||Tl===ai||md||gs<Vs||Bl<Dl||(Jt[Bl]!==void 0||Tl!==ci&&Tl!==lr||(Jt[Bl]=-1,Jt.count++),vn[gs]!==void 0||Tl!==ci&&Tl!==wr||(vn[gs]=-1,vn.count++),Rt.push(Pu)),Pu.measure(1/0,1/0,0,0),!(gs<Vs||Bl<Dl)){var wu=Pu.measuredBounds,rg=Math.max(wu.width+Bp,0),Ou=Math.max(wu.height+Iu,0);if(Pu.rowSpan===1&&(Tl===ai||Tl===lr)){ni=a.Fb(gs);var Af=ni.Wc();js=Math.max(Ou-ni.actual,0),js+Af>Yi&&(js=Math.max(Yi-Af,0));var hv=ni.oa===0;ni.oc=ni.oc+js,ni.actual=ni.oa+js,Yi=Math.max(Yi-(js+(hv?Af:0)),0)}if(Pu.columnSpan===1&&(Tl===ai||Tl===wr)){ni=a.Eb(Bl);var Dm=ni.Wc();js=Math.max(rg-ni.actual,0),js+Dm>Fi&&(js=Math.max(Fi-Dm,0));var Yy=ni.oa===0;ni.oc=ni.oc+js,ni.actual=ni.oa+js,Fi=Math.max(Fi-(js+(Yy?Dm:0)),0)}Ff&&Pu.Uj()}}}}}Gn(Ct);var Kd=0,yh=0;z=a.columnCount;for(var Kg=0;Kg<z;Kg++){var Df=mi[Kg];Df!==void 0&&(Kd+=isNaN(Df.Hc)?Df.oc:Df.Hc,Df.oc!==0&&(Kd+=Df.Wc()))}z=a.rowCount;for(var Tp=0;Tp<z;Tp++){var Bf=Hi[Tp];Bf!==void 0&&(yh+=isNaN(Bf.Hc)?Bf.oc:Bf.Hc,Bf.oc!==0&&(yh+=Bf.Wc()))}Fi=Math.max(y-Kd,0);var Vd=Yi=Math.max(x-yh,0),Jh=Fi;z=Rt.length;for(var Cu=0;Cu<z;Cu++){var vd=Rt[Cu],fv=a.Fb(vd.row),Sh=a.Eb(vd.column),kp=vd.measuredBounds,Qc=vd.margin,og=Qc.right+Qc.left,yd=Qc.top+Qc.bottom;Jt[vd.column]=Sh.oc===0&&Jt[vd.column]!==void 0?Math.max(kp.width+og,Jt[vd.column]):null,vn[vd.row]=fv.oc===0&&vn[vd.row]!==void 0?Math.max(kp.height+yd,vn[vd.row]):null}var Vg=0,Ip=0,Bc;for(Bc in vn)Bc!=="count"&&(Vg+=vn[Bc]);for(Bc in Jt)Bc!=="count"&&(Ip+=Jt[Bc]);for(var el=pi.alloc(),Bm=0;Bm<z;Bm++){var Vl=Rt[Bm];if(Vl.visible||Vl===Xh){var ps=a.Fb(Vl.row),Ul=a.Eb(Vl.column),xh=0;isFinite(Ul.width)?xh=Ul.width:(isFinite(Fi)&&Jt[Vl.column]!==null?Ip===0?xh=Ul.actual+Fi:xh=Jt[Vl.column]/Ip*Jh:Jt[Vl.column]!==null?xh=Fi:xh=Ul.actual||Fi,xh=Math.max(0,xh-Ul.Wc()));var Qh=0;switch(isFinite(ps.height)?Qh=ps.height:(isFinite(Yi)&&vn[Vl.row]!==null?Vg===0?Qh=ps.actual+Yi:Qh=vn[Vl.row]/Vg*Vd:vn[Vl.row]!==null?Qh=Yi:Qh=ps.actual||Yi,Qh=Math.max(0,Qh-ps.Wc())),el.h(Math.max(Ul.minimum,Math.min(xh,Ul.maximum)),Math.max(ps.minimum,Math.min(Qh,ps.maximum))),Tl=cc(Vl,ps,Ul,!1),Tl){case lr:el.height=Math.max(el.height,ps.actual+Yi);break;case wr:el.width=Math.max(el.width,Ul.actual+Fi)}var ag=Vl.margin,Jy=ag.right+ag.left,gv=ag.top+ag.bottom;Vl.Uj(),Vl.measure(el.width,el.height,Ul.minimum,ps.minimum);var Op=Vl.measuredBounds,sg=Math.max(Op.width+Jy,0),Ug=Math.max(Op.height+gv,0);isFinite(Fi)&&(sg=Math.min(sg,el.width)),isFinite(Yi)&&(Ug=Math.min(Ug,el.height));var bu=0;bu=ps.actual,ps.actual=Math.max(ps.actual,Ug),ps.oc=Math.max(ps.oc,Ug),js=ps.actual-bu,Yi=Math.max(Yi-js,0),vn[Vl.row]===null&&(Vd=Math.max(Vd-js,0)),bu=Ul.actual,Ul.actual=Math.max(Ul.actual,sg),Ul.oc=Math.max(Ul.oc,sg),js=Ul.actual-bu,Fi=Math.max(Fi-js,0),Jt[Vl.column]===null&&(Jh=Math.max(Jh-js,0))}}Gn(Rt);var Ph=pi.alloc(),qc=Sn(),ic=Sn();if(z=Lt.length,z!==0){for(var Tf=0;Tf<Ko;Tf++)if(je[Tf]){la=je[Tf].length;var Rp=a.Fb(Tf);qc[Tf]=Rp.actual;for(var kf=0;kf<la;kf++)if(je[Tf][kf]){var pv=a.Eb(kf);ic[kf]=pv.actual}}}for(var jp=0;jp<z;jp++){var ns=Lt[jp];if(ns.visible||ns===Xh){var Tc=a.Fb(ns.row),mc=a.Eb(ns.column);switch(el.h(Math.max(mc.minimum,Math.min(y,mc.maximum)),Math.max(Tc.minimum,Math.min(x,Tc.maximum))),Tl=cc(ns,Tc,mc,!1),Tl){case ci:ic[mc.index]!==0&&(el.width=Math.min(el.width,ic[mc.index])),qc[Tc.index]!==0&&(el.height=Math.min(el.height,qc[Tc.index]));break;case lr:ic[mc.index]!==0&&(el.width=Math.min(el.width,ic[mc.index]));break;case wr:qc[Tc.index]!==0&&(el.height=Math.min(el.height,qc[Tc.index]))}isFinite(mc.width)&&(el.width=mc.width),isFinite(Tc.height)&&(el.height=Tc.height),Ph.h(0,0);for(var mv=mc.minimum,Ru=Tc.minimum,qh=1;qh<ns.rowSpan&&!(ns.row+qh>=a.rowCount);qh++)ni=a.Fb(ns.row+qh),js=0,js=Tl===ci||Tl===wr?Math.max(ni.minimum,qc[ns.row+qh]===0?ni.maximum:Math.min(qc[ns.row+qh],ni.maximum)):Math.max(ni.minimum,isNaN(ni.Hc)?ni.maximum:Math.min(ni.Hc,ni.maximum)),Ph.height+=js,Ru+=ni.minimum;for(var vc=1;vc<ns.columnSpan&&!(ns.column+vc>=a.columnCount);vc++)ni=a.Eb(ns.column+vc),js=0,js=Tl===ci||Tl===lr?Math.max(ni.minimum,ic[ns.column+vc]===0?ni.maximum:Math.min(ic[ns.column+vc],ni.maximum)):Math.max(ni.minimum,isNaN(ni.Hc)?ni.maximum:Math.min(ni.Hc,ni.maximum)),Ph.width+=js,mv+=ni.minimum;el.width+=Ph.width,el.height+=Ph.height;var zp=ns.margin,If=zp.right+zp.left,Tm=zp.top+zp.bottom;ns.measure(el.width,el.height,mv,Ru);for(var Hp=ns.measuredBounds,Sd=Math.max(Hp.width+If,0),lg=Math.max(Hp.height+Tm,0),Of=0,Zp=0;Zp<ns.rowSpan&&!(ns.row+Zp>=a.rowCount);Zp++)ni=a.Fb(ns.row+Zp),Of+=ni.total||0;if(Of<lg){var ef=lg-Of,Ud=lg-Of;if(ns.spanAllocation!==null)for(var tf=ns.spanAllocation,wh=0;wh<ns.rowSpan&&!(0>=ef)&&!(ns.row+wh>=a.rowCount);wh++){ni=a.Fb(ns.row+wh);var nf=ni.oa||0,ug=tf(ns,ni,Ud);ni.actual=Math.min(ni.maximum,nf+ug),ni.oa!==nf&&(ef-=ni.oa-nf)}for(;0<ef;){var ed=ni.oa||0;if(isNaN(ni.height)&&ni.maximum>ed&&(ni.actual=Math.min(ni.maximum,ed+ef),ni.oa!==ed&&(ef-=ni.oa-ed)),ni.index===0)break;ni=a.Fb(ni.index-1)}}for(var _g=0,rf=0;rf<ns.columnSpan&&!(ns.column+rf>=a.columnCount);rf++)ni=a.Eb(ns.column+rf),_g+=ni.total||0;if(_g<Sd){var Xg=Sd-_g,Qy=Sd-_g;if(ns.spanAllocation!==null)for(var Ch=ns.spanAllocation,cg=0;cg<ns.columnSpan&&!(0>=Xg)&&!(ns.column+cg>=a.columnCount);cg++){ni=a.Eb(ns.column+cg);var km=ni.oa||0,qy=Ch(ns,ni,Qy);ni.actual=Math.min(ni.maximum,km+qy),ni.oa!==km&&(Xg-=ni.oa-km)}for(;0<Xg;){var vv=ni.oa||0;if(isNaN(ni.width)&&ni.maximum>vv&&(ni.actual=Math.min(ni.maximum,vv+Xg),ni.oa!==vv&&(Xg-=ni.oa-vv)),ni.index===0)break;ni=a.Eb(ni.index-1)}}}}Gn(Lt),pi.free(Ph),pi.free(el),qc!==void 0&&Gn(qc),ic!==void 0&&Gn(ic);var Yg=0,Jg=0,yv=a.desiredSize,px=a.maxSize;Tl=Fl(a,!0);var Im=yh=Kd=0,Om=0;z=a.columnCount;for(var Sv=0;Sv<z;Sv++)mi[Sv]!==void 0&&(ni=a.Eb(Sv),isFinite(ni.width)?(Im+=ni.width,Im+=ni.Wc()):qm(ni)===Up?(Im+=ni.oa,Im+=ni.Wc()):ni.oa!==0&&(Kd+=ni.oa,Kd+=ni.Wc()));isFinite(yv.width)?Yg=Math.min(yv.width,px.width):Yg=Tl!==ai&&isFinite(y)?y:Kd,Yg=Math.max(Yg,a.minSize.width),Yg=Math.max(Yg-Im,0);for(var Jx=Kd===0?1:Math.max(Yg/Kd,1),xv=0;xv<z;xv++)mi[xv]!==void 0&&(ni=a.Eb(xv),isFinite(ni.width)||qm(ni)===Up||(ni.actual=ni.oa*Jx),ni.position=E.width,ni.oa!==0&&(E.width+=ni.oa,E.width+=ni.Wc()));z=a.rowCount;for(var Pv=0;Pv<z;Pv++)Hi[Pv]!==void 0&&(ni=a.Fb(Pv),isFinite(ni.height)?(Om+=ni.height,Om+=ni.Wc()):qm(ni)===Up?(Om+=ni.oa,Om+=ni.Wc()):ni.oa!==0&&(yh+=ni.oa,yh+=ni.Wc()));isFinite(yv.height)?Jg=Math.min(yv.height,px.height):Jg=Tl!==ai&&isFinite(x)?x:yh,Jg=Math.max(Jg,a.minSize.height),Jg=Math.max(Jg-Om,0);for(var Qx=yh===0?1:Math.max(Jg/yh,1),wv=0;wv<z;wv++)Hi[wv]!==void 0&&(ni=a.Fb(wv),isFinite(ni.height)||qm(ni)===Up||(ni.actual=ni.oa*Qx),ni.position=E.height,ni.oa!==0&&(E.height+=ni.oa,E.height+=ni.Wc()));z=re.length;for(var eS=0;eS<z;eS++){var Rm=re[eS],tS=0,nS=0;Rm.type===hi.TableRow?(tS=E.width,ni=a.Fb(Rm.row),nS=ni.actual):(ni=a.Eb(Rm.column),tS=ni.actual,nS=E.height),Rm.measuredBounds.h(0,0,tS,nS),pt(Rm,!1)}Gn(re),a.inRowsCols=je},Gm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,z=E.left;E=E.top;var te=a.inRowsCols;if(te!==null){for(var re,oe,le=te.length,ue=0,me=0;me<le;me++)te[me]&&(ue=Math.max(ue,te[me].length));oe=a.rowDefs,re=a.colDefs;var we=me=0,Ee=Math.min(a.topIndex,le-1);if(0<oe.length){for(;Ee!==le&&(oe[Ee]===void 0||oe[Ee].oa===0);)Ee++;Ee=Math.max(Math.min(Ee,le-1),0),me=-oe[Ee].position}var De=Math.min(a.leftIndex,ue-1);if(0<re.length){for(;De!==ue&&(re[De]===void 0||re[De].oa===0);)De++;De=Math.max(Math.min(De,ue-1),0),we=-re[De].position}for(var je=0,ct=0;je!==le&&oe[je]===void 0;)je++;for(;ct!==le&&re[ct]===void 0;)ct++;ue=a.part,a.Fb(je),a.Eb(ct);for(var qe=0;qe<y.length;qe++){var Ct=y[qe];if(Ct instanceof hi&&Ct.visible&&zh(Ct)){if(Ct.type===hi.TableRow){re=a.Fb(Ct.row);var Lt=a.Eb(ct)}else re=a.Fb(je),Lt=a.Eb(Ct.column);oe=re.position+me+E,re.oa!==0&&(oe+=re.Io(Math.max(je,Ee))),re=Lt.position+we+z,Lt.oa!==0&&(re+=Lt.Io(Math.max(ct,De))),Lt=Ct.measuredBounds,Ct.Uk(),Ct.actualBounds.ka();var Rt=Ct.actualBounds,Jt=_t.allocAt(Rt.x,Rt.y,Rt.width,Rt.height);Rt.x=Ct.type===hi.TableRow?z:re,Rt.y=Ct.type===hi.TableColumn?E:oe,Rt.width=Lt.width,Rt.height=Lt.height,Ct.actualBounds.freeze(),Vt(Ct,!1),Zi(Jt,Rt)||ue===null||(ue.oh(),Ct.Pn(ue)),_t.free(Jt)}}for(qe=pi.alloc(),Ct=0;Ct<le;Ct++)if(te[Ct]){for(ue=te[Ct].length,Lt=a.Fb(Ct),oe=Lt.position+me+E,Lt.oa!==0&&(oe+=Lt.Io(Math.max(je,Ee))),Rt=0;Rt<ue;Rt++)if(te[Ct][Rt]){Jt=a.Eb(Rt),re=Jt.position+we+z,Jt.oa!==0&&(re+=Jt.Io(Math.max(ct,De)));for(var vn=te[Ct][Rt],Fi=vn.length,Yi=0;Yi<Fi;Yi++){var Hi=vn[Yi],mi=Hi.measuredBounds;qe.h(0,0);for(var ni=1;ni<Hi.rowSpan&&!(Ct+ni>=a.rowCount);ni++){var Ur=a.Fb(Ct+ni);Ur.oa!==0&&(qe.height+=Ur.total)}for(ni=1;ni<Hi.columnSpan&&!(Rt+ni>=a.columnCount);ni++)Ur=a.Eb(Rt+ni),Ur.oa!==0&&(qe.width+=Ur.total);var Dr=Jt.oa+qe.width,Ko=Lt.oa+qe.height;ni=re,Ur=oe;var la=Dr,Rs=Ko,Vs=re,Dl=oe,js=Dr,Xh=Ko;re+Dr>x.width&&(js=Math.max(x.width-re,0)),oe+Ko>x.height&&(Xh=Math.max(x.height-oe,0));var gs=Hi.alignment;if(gs.Xb()){gs=a.defaultAlignment,gs.sb()||(gs=wo);var Yc=gs.x,Bl=gs.y,Yh=gs.offsetX;gs=gs.offsetY;var Vu=Jt.alignment,pc=Lt.alignment;Vu.sb()&&(Yc=Vu.x,Yh=Vu.offsetX),pc.sb()&&(Bl=pc.y,gs=pc.offsetY)}else Yc=gs.x,Bl=gs.y,Yh=gs.offsetX,gs=gs.offsetY;(isNaN(Yc)||isNaN(Bl))&&(Bl=Yc=.5,gs=Yh=0),Vu=mi.width,pc=mi.height;var ku=Hi.margin,Pu=ku.left+ku.right,Ff=ku.top+ku.bottom,Jc=cc(Hi,Lt,Jt,!1);!isNaN(Hi.desiredSize.width)||Jc!==ci&&Jc!==lr||(Vu=Math.max(Dr-Pu,0)),!isNaN(Hi.desiredSize.height)||Jc!==ci&&Jc!==wr||(pc=Math.max(Ko-Ff,0)),Dr=Hi.maxSize,Ko=Hi.minSize,Vu=Math.min(Dr.width,Vu),pc=Math.min(Dr.height,pc),Vu=Math.max(Ko.width,Vu),pc=Math.max(Ko.height,pc),Dr=pc+Ff,ni+=la*Yc-(Vu+Pu)*Yc+Yh+ku.left,Ur+=Rs*Bl-Dr*Bl+gs+ku.top,Hi.visible&&(Pr(Vs,Dl,js,Xh,ni,Ur,mi.width,mi.height)?Hi.arrange(ni,Ur,Vu,pc):Hi.arrange(ni,Ur,Vu,pc,new _t(Vs,Dl,js,Xh)))}}}for(pi.free(qe),a=0;a<b;a++)x=y[a],z=x instanceof hi?x:null,z!==null&&zh(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function $m(){this.xa="Base"}Kt($m,Es),$m.prototype.measure=function(){},$m.prototype.arrange=function(){};function Km(){this.xa="Base"}Kt(Km,Es),Km.prototype.measure=function(){},Km.prototype.arrange=function(){};function Vm(){this.xa="Base"}Kt(Vm,Es),Vm.prototype.measure=function(a,y,x,b,E,z,te){1<b.length&&St("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,z,te);var re=b.measuredBounds,oe=b.margin,le=oe.right+oe.left;if(oe=oe.top+oe.bottom,isFinite(y)||isFinite(x)){var ue=b.scale,me=re.width;re=re.height;var we=Math.max(y-le,0),Ee=Math.max(x-oe,0),De=1;a.viewboxStretch===tr?me!==0&&re!==0&&(De=Math.min(we/me,Ee/re)):me!==0&&re!==0&&(De=Math.max(we/me,Ee/re)),De===0&&(De=1e-4),b.Ca*=De,ue!==b.scale&&(pt(b,!0),b.measure(1/0,1/0,z,te))}re=b.measuredBounds,E.width=isFinite(y)?y:Math.max(re.width+le,0),E.height=isFinite(x)?x:Math.max(re.height+oe,0)},Vm.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 te=y.alignment;te.Xb()&&(te=a.defaultAlignment),te.sb()||(te=wo),y.arrange(x.width*te.x-z*te.x+te.offsetX,x.height*te.y-E*te.y+te.offsetY,b.width,b.height)};function $p(){this.xa="Base"}Kt($p,Es),$p.prototype.measure=function(){},$p.prototype.arrange=function(){},$p.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,te=a.actualBounds,re=z.width,oe=z.height,le=Math.ceil(re/E),ue=Math.ceil(oe/b),me=a.gridOrigin,we=me.x;me=me.y,y.save(),y.beginPath(),y.rect(0,0,re,oe),y.clip(),y.Se();for(var Ee=[],De=a.O.s,je=De.length,ct=0;ct<je;ct++){var qe=De[ct],Ct=[];if(Ee.push(Ct),qe.visible){var Lt=qe.interval;if(!(0>Lt)){qe=Ev(qe.figure);for(var Rt=0;Rt<je;Rt++)if(Rt!==ct){var Jt=De[Rt];Jt.visible&&Ev(Jt.figure)===qe&&(Jt=Jt.interval,Jt>Lt&&Ct.push(Jt))}}}}for(De=a.O.s,je=De.length,ct=0;ct<je;ct++){var vn=De[ct];if(vn.visible&&(Ct=vn.interval||1,qe=Math.abs(Ct),!(2>E*qe*x))){if(Lt=vn.segmentIndex,(!isFinite(Lt)||isNaN(Lt))&&(Lt=0),0>Lt&&(Lt=qe-Math.min(-Lt,qe)),Lt=Math.round(Lt%qe),qe=vn.opacity,Rt=1,qe!==1){if(qe===0)continue;Rt=y.globalAlpha,y.globalAlpha=Rt*qe}Jt=Ee[ct];var Fi=!1,Yi=vn.strokeDashArray;if(Yi!==null&&(Fi=!0,y.js(Yi,vn.strokeDashOffset)),vn.figure==="LineV"&&vn.stroke!==null&&0<vn.strokeWidth){for(y.lineWidth=vn.strokeWidth,Za(a,y,vn.stroke,!1,!1,z,te),y.beginPath(),Yi=vn=Math.floor((we-E)/E);Yi<=vn+le;Yi++){var Hi=Yi*E+we;0<=Hi&&Hi<=re&&Um(Yi,Ct,Lt,Jt)&&(y.moveTo(Hi,0),y.lineTo(Hi,oe))}y.stroke(),y.Se()}else if(vn.figure==="LineH"&&vn.stroke!==null&&0<vn.strokeWidth){for(y.lineWidth=vn.strokeWidth,Za(a,y,vn.stroke,!1,!1,z,te),y.beginPath(),Yi=vn=Math.floor((me-b)/b);Yi<=vn+ue;Yi++)Hi=Yi*b+me,0<=Hi&&Hi<=oe&&Um(Yi,Ct,Lt,Jt)&&(y.moveTo(0,Hi),y.lineTo(re,Hi));y.stroke(),y.Se()}else if(vn.figure==="BarV"&&vn.fill!==null)for(Za(a,y,vn.fill,!0,!1,z,te),vn=vn.width,isNaN(vn)&&(vn=E),Hi=Yi=Math.floor((we-E)/E);Hi<=Yi+le;Hi++){var mi=Hi*E+we;0<=mi+vn&&mi<=re&&Um(Hi,Ct,Lt,Jt)&&y.fillRect(mi,0,vn,oe)}else if(vn.figure==="BarH"&&vn.fill!==null)for(Za(a,y,vn.fill,!0,!1,z,te),vn=vn.height,isNaN(vn)&&(vn=b),Hi=Yi=Math.floor((me-b)/b);Hi<=Yi+ue;Hi++)mi=Hi*b+me,0<=mi+vn&&mi<=oe&&Um(Hi,Ct,Lt,Jt)&&y.fillRect(0,mi,re,vn);Fi&&y.fs(),qe!==1&&(y.globalAlpha=Rt)}}y.restore(),y.Vc(!1)};function Um(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 _m(){this.xa="Base"}Kt(_m,Es),_m.prototype.measure=function(a,y,x,b,E){var z=b.length;if(a instanceof jo||a instanceof vi){var te=null,re=null;if(a instanceof vi&&(te=a),a instanceof jo&&(re=a,te=re.adornedPart,a.j===null&&(a.j=[])),te instanceof vi){var oe=te;if(z===0)Xi(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var le=a instanceof jo?null:te.path;y=te.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ue=oe.points,me=te.pointsCount;re!==null?re.Ul(!1):te!==null&&te.Ul(!1),re=y.width;var we=y.height,Ee=a.j;if(Ee.length=0,le!==null){rS(a,re,we,le);var De=le.measuredBounds;x.ed(De),Ee.push(De)}De=ro.alloc();for(var je=Qe.alloc(),ct=Qe.alloc(),qe=0;qe<z;qe++){var Ct=b[qe];if(Ct!==le)if(Ct.isPanelMain&&Ct instanceof io){rS(a,re,we,Ct);var Lt=Ct.measuredBounds;x.ed(Lt),Ee.push(Lt)}else if(2>me)Ct.measure(1/0,1/0,0,0),Lt=Ct.measuredBounds,x.ed(Lt),Ee.push(Lt);else{var Rt=Ct.segmentIndex,Jt=Ct.segmentFraction,vn=Ct.alignmentFocus;vn.Mc()&&(vn=wo);var Fi=Ct.segmentOrientation,Yi=Ct.segmentOffset;if(isNaN(Rt)){var Hi=oe.ua;Lt=Sn(),Hi.Qu(Jt,Lt);var mi=Qe.allocAt(Lt[0],Lt[1]);if(mi.add(oe.i(0)),Hi.type===xi.j?mi.offset(-Hi.startX,-Hi.startY):(Hi=Hi.figures.first(),Hi!==null&&mi.offset(-Hi.startX,-Hi.startY)),Hi=Lt[2],Fi!==Zl){var ni=oe.computeAngle(Ct,Fi,Hi);Ct.Kb=ni}ni=mi.x-y.x;var Ur=mi.y-y.y;Qe.free(mi),Gn(Lt)}else if(Rt<-me||Rt>=me)Lt=Qe.alloc(),oe.vg(),oe.computeMidPoint(Lt),Hi=oe.midAngle,Fi!==Zl&&(ni=oe.computeAngle(Ct,Fi,Hi),Ct.Kb=ni),ni=Lt.x-y.x,Ur=Lt.y-y.y,Qe.free(Lt);else{if(ni=0,0<=Rt?(Ur=ue.M(Rt),Lt=Rt<me-1?ue.M(Rt+1):Ur):(ni=me+Rt,Ur=ue.M(ni),Lt=0<ni?ue.M(ni-1):Ur),Ur.Xa(Lt)){0<=Rt?(Hi=0<Rt?ue.M(Rt-1):Ur,ni=Rt<me-2?ue.M(Rt+2):Lt):(Hi=ni<me-1?ue.M(ni+1):Ur,ni=1<ni?ue.M(ni-2):Lt),mi=Hi.Bf(Ur);var Dr=Lt.Bf(ni);Hi=mi>Dr+10?0<=Rt?Hi.ab(Ur):Ur.ab(Hi):Dr>mi+10?0<=Rt?Lt.ab(ni):ni.ab(Lt):0<=Rt?Hi.ab(ni):ni.ab(Hi)}else Hi=0<=Rt?Ur.ab(Lt):Lt.ab(Ur);Fi!==Zl&&(ni=oe.computeAngle(Ct,Fi,Hi),Ct.Kb=ni),ni=Ur.x+(Lt.x-Ur.x)*Jt-y.x,Ur=Ur.y+(Lt.y-Ur.y)*Jt-y.y}Ct.measure(1/0,1/0,0,0),Lt=Ct.measuredBounds,mi=Ct.naturalBounds;var Ko=0;Ct instanceof io&&(Ko=Ct.strokeWidth),Dr=mi.width+Ko;var la=mi.height+Ko;De.reset(),De.translate(-Lt.x,-Lt.y),De.scale(Ct.scale,Ct.scale),De.rotate(Fi===Zl?Ct.angle:Hi,Dr/2,la/2),Fi!==im&&Fi!==om||De.rotate(90,Dr/2,la/2),Fi!==rm&&Fi!==am||De.rotate(-90,Dr/2,la/2),Fi===b0&&(45<Hi&&135>Hi||225<Hi&&315>Hi)&&De.rotate(-Hi,Dr/2,la/2),mi=new _t(0,0,Dr,la),je.xi(mi,vn),De.Ga(je),vn=-je.x+Ko/2*Ct.scale,Ct=-je.y+Ko/2*Ct.scale,ct.assign(Yi),Ko=isNaN(Yi.x);var Rs=isNaN(Yi.y);if(Ko||Rs){Dr=Dr/2+3,la=la/2+3;var Vs=45<=Hi&&135>=Hi,Dl=225<=Hi&&315>=Hi;Fi===Zl&&(Vs||Dl)?(ct.x=Rs?Dr:Yi.y,ct.y=Ko?la:Yi.x,Vs?0<=Rt||isNaN(Rt)&&.5>Jt||!Ko||(ct.y=-la):Dl&&((0<=Rt||isNaN(Rt)&&.5>Jt)&&Ko&&(ct.y=-la),Rs&&(ct.x=-Dr))):(Ko&&(ct.x=0<=Rt||isNaN(Rt)&&.5>Jt?Dr:-Dr),Rs&&(ct.y=-la),ct.rotate(Hi))}else ct.rotate(Hi);ni+=ct.x,Ur+=ct.y,mi.set(Lt),mi.h(ni+vn,Ur+Ct,Lt.width,Lt.height),Ee.push(mi),x.ed(mi)}}if(te!==null)for(b=te.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Xi(E,x.width||0,x.height||0),ro.free(De),Qe.free(je),Qe.free(ct)}}}},_m.prototype.arrange=function(a,y){var x=y.length;if(a instanceof jo||a instanceof vi){var b=a,E=null;a instanceof jo&&(E=a,b=E.adornedPart);var z=a instanceof jo?null:b.path,te=a.j;if(te.length!==0){var re=0;if(z!==null&&re<te.length){var oe=te[re];re++,z.arrange(oe.x-a.jg.x,oe.y-a.jg.y,oe.width,oe.height)}for(oe=0;oe<x;oe++){var le=y[oe];if(le!==z&&re<te.length){var ue=te[re];re++,le.arrange(ue.x-a.jg.x,ue.y-a.jg.y,ue.width,ue.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof vi)for(z=a.labelNodes;z.next();){var me=a;te=z.value,re=te.segmentIndex,oe=te.segmentFraction;var we=te.alignmentFocus;if(le=te.segmentOrientation,ue=te.segmentOffset,isNaN(re)){var Ee=me.ua,De=Sn();Ee.Qu(oe,De);var je=Qe.allocAt(De[0],De[1]);je.add(me.i(0)),Ee.type===xi.j||(Ee=Ee.figures.first()),je.offset(-Ee.startX,-Ee.startY),Ee=De[2],le!==Zl&&(me=me.computeAngle(te,le,Ee),te.angle=me),me=je.x;var ct=je.y;Qe.free(je),Gn(De)}else if(re<-x||re>=x)De=Qe.alloc(),Ee=me,ct=De,Ee.vg(),Ee.computeMidPoint(ct),Ee=me.midAngle,le!==Zl&&(me=me.computeAngle(te,le,Ee),te.angle=me),me=De.x,ct=De.y,Qe.free(De);else{if(je=0,0<=re?(De=y.s[re],ct=re<x-1?y.s[re+1]:De):(je=x+re,De=y.s[je],ct=0<je?y.s[je-1]:De),De.Xa(ct)){0<=re?(Ee=0<re?y.s[re-1]:De,je=re<x-2?y.s[re+2]:ct):(Ee=je<x-1?y.s[je+1]:De,je=1<je?y.s[je-2]:ct);var qe=Ee.Bf(De),Ct=ct.Bf(je);Ee=qe>Ct+10?0<=re?Ee.ab(De):De.ab(Ee):Ct>qe+10?0<=re?ct.ab(je):je.ab(ct):0<=re?Ee.ab(je):je.ab(Ee)}else Ee=0<=re?De.ab(ct):ct.ab(De);le!==Zl&&(me=me.computeAngle(te,le,Ee),te.angle=me),me=De.x+(ct.x-De.x)*oe,ct=De.y+(ct.y-De.y)*oe}if(we.ys())te.location=new Qe(me,ct);else{we.Mc()&&(we=wo),De=ro.alloc(),De.reset(),De.scale(te.scale,te.scale),De.rotate(te.angle,0,0);var Lt=te.naturalBounds;je=_t.allocAt(0,0,Lt.width,Lt.height),qe=Qe.alloc(),qe.xi(je,we),De.Ga(qe),we=-qe.x,Ct=-qe.y;var Rt=Lt.width,Jt=Lt.height;Lt=Qe.alloc(),Lt.assign(ue);var vn=isNaN(ue.x),Fi=isNaN(ue.y);if(vn||Fi){Rt=Rt/2+3,Jt=Jt/2+3;var Yi=45<=Ee&&135>=Ee,Hi=225<=Ee&&315>=Ee;le===Zl&&(Yi||Hi)?(Lt.x=Fi?Rt:ue.y,Lt.y=vn?Jt:ue.x,Yi?0<=re||isNaN(re)&&.5>oe||!vn||(Lt.y=-Jt):Hi&&((0<=re||isNaN(re)&&.5>oe)&&vn&&(Lt.y=-Jt),Fi&&(Lt.x=-Rt))):(vn&&(Lt.x=0<=re||isNaN(re)&&.5>oe?Rt:-Rt),Fi&&(Lt.y=-Jt),Lt.rotate(Ee))}else Lt.rotate(Ee);me+=Lt.x,ct+=Lt.y,De.pp(je),we+=je.x,Ct+=je.y,re=Qe.allocAt(me+we,ct+Ct),te.move(re),Qe.free(re),Qe.free(Lt),Qe.free(qe),_t.free(je),ro.free(De)}}E!==null?E.Ul(!1):b.Ul(!1),b=TS(a),a.location.h(a.position.x+b.x,a.position.y+b.y),Qe.free(b)}};function rS(a,y,x,b){if(vt(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof jo&&a.type===hi.Link&&a.adornedObject instanceof io&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof vi&&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 jo&&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),pt(b,!1)}}function Kp(){this.xa="Base"}Kt(Kp,Es),Kp.prototype.measure=function(a,y,x,b,E,z,te){var re=a.Pb();a.graduatedBounds=[];var oe=re.margin,le=oe.right+oe.left,ue=oe.top+oe.bottom;re.measure(y,x,z,te);var me=re.measuredBounds,we=new _t(-oe.left,-oe.top,Math.max(me.width+le,0),Math.max(me.height+ue,0));a.graduatedBounds.push(we),E.assign(we);for(var Ee=re.geometry,De=re.strokeWidth,je=Ee.flattenedSegments,ct=Ee.flattenedLengths,qe=Ee.flattenedTotalLength,Ct=je.length,Lt=0,Rt=0,Jt=Sn(),vn=0;vn<Ct;vn++){var Fi=je[vn],Yi=[];Rt=Lt=0;for(var Hi=Fi.length,mi=0;mi<Hi;mi+=2){var ni=Fi[mi],Ur=Fi[mi+1];if(mi!==0){var Dr=180*Math.atan2(Ur-Rt,ni-Lt)/Math.PI;0>Dr&&(Dr+=360),Yi.push(Dr)}Lt=ni,Rt=Ur}Jt.push(Yi)}if(a.graduatedIntervals===null){for(var Ko=[],la=a.O.s,Rs=la.length,Vs=0;Vs<Rs;Vs++){var Dl=la[Vs],js=[];if(Ko.push(js),Dl.visible){var Xh=Dl.interval;if(!(0>Xh)){for(var gs=0;gs<Rs;gs++)if(gs!==Vs){var Yc=la[gs];if(Yc.visible&&Dl.constructor===Yc.constructor){var Bl=Yc.interval;Bl>Xh&&js.push(Bl)}}}}}a.graduatedIntervals=Ko}var Yh=a.graduatedIntervals,Vu=a.O.s,pc=Vu.length,ku=0,Pu=0,Ff=qe;a.graduatedMarks=[];for(var Jc,Bp=0;Bp<pc;Bp++){var Iu=Vu[Bp];if(Jc=[],Iu.visible&&Iu!==re){var Tl=Math.abs(Iu.interval),Am=a.graduatedTickUnit;if(!(2>Am*Tl*qe/a.graduatedRange&&Iu.graduatedSkip===null)){var $g=ct[0][0],md=0,wu=0;Pu=qe*Iu.graduatedStart-1e-4,Ff=qe*Iu.graduatedEnd+1e-4;var rg=Am*Tl,Ou=a.graduatedTickBase;if(Ou<a.graduatedMin){var Af=(a.graduatedMin-Ou)/rg;Af=Af%1===0?Af:Math.floor(Af+1),Ou+=Af*rg}else Ou>a.graduatedMin+rg&&(Ou-=Math.floor((Ou-a.graduatedMin)/rg)*rg);for(var hv=Yh[Bp],Dm=Ou,Yy=1e-6*a.graduatedMax,Kd=1;Ou<=a.graduatedMax+Yy;Kd++){e:{for(var yh=hv.length,Kg=0;Kg<yh;Kg++){var Df=(Ou-a.graduatedTickBase)%(hv[Kg]*a.graduatedTickUnit),Tp=1e-6*a.graduatedTickUnit;if(Df<Tp&&Df>-Tp){var Bf=!1;break e}}Bf=!0}if(Bf&&(Ou>a.graduatedMax&&(Ou=a.graduatedMax),Iu.graduatedSkip===null||Iu instanceof ua&&!Iu.graduatedSkip(Ou,Iu)||Iu instanceof io&&!Iu.graduatedSkip(Ou,Iu))&&(ku=(Ou-a.graduatedMin)*qe/a.graduatedRange,ku>qe&&(ku=qe),Pu<=ku&&ku<=Ff)){for(var Vd=Jt[md][wu],Jh=ct[md][wu];md<ct.length;){for(;ku>$g&&wu<ct[md].length-1;)wu++,Vd=Jt[md][wu],Jh=ct[md][wu],$g+=Jh;if(ku<=$g)break;md++,wu=0,Vd=Jt[md][wu],Jh=ct[md][wu],$g+=Jh}var Cu=je[md],vd=Cu[2*wu],fv=Cu[2*wu+1],Sh=(ku-($g-Jh))/Jh,kp=new Qe(vd+(Cu[2*wu+2]-vd)*Sh+De/2-Ee.bounds.x,fv+(Cu[2*wu+3]-fv)*Sh+De/2-Ee.bounds.y);kp.scale(re.scale,re.scale);e:{var Qc=Vd,og=Jt[md];if(!(.5005>Sh&&.4995<Sh)){var yd=Qc;if(.5>Sh?0<wu?yd=og[wu-1]:en.$(Cu[0],Cu[Cu.length-2])&&en.$(Cu[1],Cu[Cu.length-1])&&(yd=og[og.length-1]):.5<Sh&&(wu+1<og.length?yd=og[wu+1]:en.$(Cu[0],Cu[Cu.length-2])&&en.$(Cu[1],Cu[Cu.length-1])&&(yd=og[0])),Qc!==yd){var Vg=Math.abs(Qc-yd);if(180<Vg&&(Qc<yd?Qc+=360:yd+=360,Vg=Math.abs(Qc-yd)),5e-4>Sh||.9995<Sh){Vd=(Qc+yd)/2%360;break e}if(10>Vg){var Ip=1-Math.abs(.5-Sh);Vd=(Qc*Ip+yd*(1-Ip))%360;break e}}}Vd=Qc}if(Iu instanceof ua){var Bc="";Iu.graduatedFunction!==null?(Bc=Iu.graduatedFunction(Ou,Iu),Bc=Bc!=null?Bc.toString():""):Bc=(+Ou.toFixed(2)).toString(),Bc!==""&&Jc.push({$l:kp,angle:Vd,text:Bc})}else Jc.push({$l:kp,angle:Vd})}Ou=Dm+Kd*rg}}}a.graduatedMarks.push(Jc)}Gn(Jt);var el=a.graduatedMarks;if(el!==null)for(var Bm=b.length,Vl=0;Vl<Bm;Vl++){var ps=b[Vl],Ul=el[Vl];if(ps.visible&&ps!==re&&Ul.length!==0){if(ps instanceof io){var xh=a,Qh=E,ag=ps.alignmentFocus;ag.Mc()&&(ag=zs);var Jy=ps.angle;ps.Kb=0,ps.measure(1/0,1/0,0,0),ps.Kb=Jy;var gv=ps.measuredBounds,Op=gv.width,sg=gv.height,Ug=_t.allocAt(0,0,Op,sg),bu=Qe.alloc();bu.xi(Ug,ag),_t.free(Ug);for(var Ph=-bu.x,qc=-bu.y,ic=new _t,Tf=Ul.length,Rp=0;Rp<Tf;Rp++)for(var kf=Ul[Rp],pv=kf.$l.x,jp=kf.$l.y,ns=kf.angle,Tc=0;4>Tc;Tc++){switch(Tc){case 0:bu.h(Ph,qc);break;case 1:bu.h(Ph+Op,qc);break;case 2:bu.h(Ph,qc+sg);break;case 3:bu.h(Ph+Op,qc+sg)}bu.rotate(ns+ps.angle),bu.offset(pv,jp),Rp===0&&Tc===0?ic.h(bu.x,bu.y,0,0):ic.Ye(bu),bu.offset(-pv,-jp),bu.rotate(-ns-ps.angle)}Qe.free(bu),xh.graduatedBounds!==null&&xh.graduatedBounds.push(ic),cr(Qh,ic.x,ic.y,ic.width,ic.height)}else if(ps instanceof ua){var mc=a,mv=E;mc.temporaryTextBlock===null&&(mc.temporaryTextBlock=new ua);var Ru=mc.temporaryTextBlock;SS(Ru,ps);var qh=ps.alignmentFocus;qh.Mc()&&(qh=zs);for(var vc=ps.segmentOrientation,zp=ps.segmentOffset,If=new _t,Tm=0,Hp=0,Sd=0,lg=0,Of=0,Zp=Ul.length,ef=0;ef<Zp;ef++){var Ud=Ul[ef];Tm=Ud.$l.x,Hp=Ud.$l.y,Sd=Ud.angle,Of=lg=ps.angle,vc!==Zl&&(Of=vc===nm||vc===C0?Sd+ps.angle:Sd,lg=vi.computeAngle(vc,Of)),Ru.Kb=lg,Ru.text=Ud.text||"",Ru.measure(1/0,1/0,0,0);var tf=Ru.measuredBounds,wh=Ru.naturalBounds,nf=wh.width,ug=wh.height,ed=ro.alloc();ed.reset(),ed.translate(-tf.x,-tf.y),ed.scale(Ru.scale,Ru.scale),ed.rotate(Of,nf/2,ug/2),vc!==im&&vc!==om||ed.rotate(90,nf/2,ug/2),vc!==rm&&vc!==am||ed.rotate(-90,nf/2,ug/2),vc===b0&&(45<Sd&&135>Sd||225<Sd&&315>Sd)&&ed.rotate(-Sd,nf/2,ug/2);var _g=_t.allocAt(0,0,nf,ug),rf=Qe.alloc();rf.xi(_g,qh),ed.Ga(rf);var Xg=-rf.x,Qy=-rf.y,Ch=Qe.alloc();Ch.assign(zp),isNaN(Ch.x)&&(Ch.x=nf/2+3),isNaN(Ch.y)&&(Ch.y=-(ug/2+3)),Ch.rotate(Sd),Tm+=Ch.x+Xg,Hp+=Ch.y+Qy;var cg=new _t(Tm,Hp,tf.width,tf.height),km=new _t(tf.x,tf.y,tf.width,tf.height),qy=new _t(wh.x,wh.y,wh.width,wh.height);Ud.Sz=lg,Ud.lineCount=Ru.lineCount,Ud.lines=[Ru.Cb,Ru.Ih,Ru.df,Ru.Le,Ru.Qc,Ru.Qb,Ru.ze],Ud.actualBounds=cg,Ud.measuredBounds=km,Ud.naturalBounds=qy,ef===0?If.assign(cg):If.ed(cg),Qe.free(Ch),Qe.free(rf),_t.free(_g),ro.free(ed)}mc.graduatedBounds!==null&&mc.graduatedBounds.push(If),cr(mv,If.x,If.y,If.width,If.height)}pt(ps,!1)}}},Kp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var z=a.graduatedBounds,te=0,re=z[te];te++,b!==null&&b.arrange(re.x-x.x,re.y-x.y,re.width,re.height);for(var oe=y.length,le=0;le<oe;le++){var ue=y[le];re=E[le],ue.visible&&ue!==b&&re.length!==0&&(re=z[te],te++,ue.arrange(re.x-x.x,re.y-x.y,re.width,re.height))}a.graduatedBounds=null}}},Kp.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,z=E.width,te=E.height;E=y instanceof Uo,y.save(),y.beginPath(),y.rect(-1,-1,z+1,te+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),te=a.Df()*x.scale,0>=te&&(te=1);for(var re=z.actualBounds,oe=a.O.s,le=a.graduatedMarks,ue=oe.length,me=0;me<ue;me++){var we=oe[me],Ee=le[me],De=Ee.length;if(we.visible&&we!==z&&Ee.length!==0){if(we instanceof io){if(!(2>a.graduatedTickUnit*we.interval*z.geometry.flattenedTotalLength/a.graduatedRange*te&&we.graduatedSkip===null)){var je=we.measuredBounds,ct=we.strokeWidth*we.scale,qe=we.alignmentFocus;qe.Mc()&&(qe=zs);for(var Ct=0;Ct<De;Ct++){var Lt=Ee[Ct].$l,Rt=Ee[Ct].angle,Jt=qe,vn=we.Ab;vn.reset(),vn.translate(Lt.x+re.x,Lt.y+re.y),vn.rotate(Rt+we.angle,0,0),vn.translate(-je.width*Jt.x+Jt.offsetX+ct/2,-je.height*Jt.y+Jt.offsetY+ct/2),vn.scale(we.scale,we.scale),ke(we,!1),we.wh.set(we.Ab),we.Kk=we.scale,$e(we,!1),we.gc(y,x),E&&(a.svg.appendChild(we.svg),we.svg=null),we.Ab.reset()}}}else if(we instanceof ua)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new ua),je=a.temporaryTextBlock,SS(je,we),ct=0;ct<De;ct++)qe=Ee[ct],qe.actualBounds&&qe.measuredBounds&&qe.naturalBounds&&(je.ec=qe.text||"",je.Kb=qe.Sz||0,je.Gc=qe.lineCount||0,Ct=qe.lines,Ct!==void 0&&(je.Cb=Ct[0],je.Ih=Ct[1],je.df=Ct[2],je.Le=Ct[3],je.Qc=Ct[4],je.Qb=Ct[5],je.ze=Ct[6]),qe.naturalBounds&&(je.dc=qe.naturalBounds),qe.actualBounds&&(Ct=qe.actualBounds,je.arrange(Ct.x,Ct.y,Ct.width,Ct.height)),Ct=qe.actualBounds,je.arrange(Ct.x,Ct.y,Ct.width,Ct.height),Lt=qe.measuredBounds,qe=qe.naturalBounds,Rt=je.Ab,Rt.reset(),Rt.translate(Ct.x+re.x,Ct.y+re.y),Rt.translate(-Lt.x,-Lt.y),je.no(Rt,qe.x,qe.y,qe.width,qe.height),ke(je,!1),je.wh.set(je.Ab),je.Kk=je.scale,$e(je,!1),je.Ng=we.part,je.Me=we.panel,je.gc(y,x),je.Me=null,je.Ng=null,E&&(a.svg.appendChild(je.svg),je.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function hi(a,y){if(Qt.call(this),this.na=null,a===void 0)this.na=hi.Position;else if(typeof a=="string"){var x=Mc.I(a);x!==null&&(this.na=x)}else a instanceof Es?this.na=a:a&&(this.na=hi.Position,y=a);this.na===null&&St("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===hi.Grid?1048576:0),this.O=new Rn,this.yb=Ls,this.Tm=Vo,this.Uf=Vr,this.$g=null,this.$e="",this.jg=new _t(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=tr,this.jn=Ao,this.kn=Qr,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Kt(hi,Qt),hi.prototype.cloneProtected=function(a){Qt.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},hi.prototype.Af=function(a){Qt.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},hi.prototype.copy=function(){var a=Qt.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,te=z.count;if(z.Gb(te,E),z=a.part,z!==null){z.Rh=null,E.portId!==null&&z instanceof Di&&(z.Te=!0);var re=a.diagram;re!==null&&re.undoManager.isUndoingRedoing||z.cb(Va,"elements",a,null,E,null,te)}}return a}return null},Le=hi.prototype,Le.toString=function(){return"Panel("+this.type.name+")#"+br(this)},Le.Pn=function(a){Qt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},Le.hh=function(a,y){if(this.na===hi.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===hi.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===hi.Table)if(a.yc(),a instanceof Uo){var x=a.yd;a.yd=Wu(a,"gojs-ts"),bv(this,a),a.nh.pop(),a.yd=x}else bv(this,a);(x=this.isClipping&&this.na===hi.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,z=E.length,te=0;te<z;te++){var re=E[te];x&&re===b&&(a.clipInsteadOfFill=!0),re.gc(a,y),x&&re===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function bv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Xm(a,y,!0,x,!0),b!==null&&Xm(a,y,!1,b,!0),x!==null&&oS(a,y,!0,x),b!==null&&oS(a,y,!1,b),x!==null&&Xm(a,y,!0,x,!1),b!==null&&Xm(a,y,!1,b,!1)}function oS(a,y,x,b){for(var E=b.length,z=a.actualBounds,te=a.naturalBounds,re=!0,oe=0;oe<E;oe++){var le=b[oe];if(le!==void 0&&le.actual!==0)if(re)re=!1;else{if(x){if(le.position>te.height)continue}else if(le.position>te.width)continue;var ue=le.separatorStrokeWidth;isNaN(ue)&&(ue=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var me=le.separatorStroke;if(me===null&&(me=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ue!==0&&me!==null){Za(a,y,me,!1,!1,te,z),me=!1;var we=le.separatorDashArray;we===null&&(we=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),we!==null&&(me=!0,y.js(we,0)),y.beginPath(),we=le.position+ue,x?we>te.height&&(ue-=we-te.height):we>te.width&&(ue-=we-te.width),le=le.position+ue/2,y.lineWidth=ue,ue=a.yb,x?(le+=ue.top,we=te.width-ue.right,y.moveTo(ue.left,le),y.lineTo(we,le)):(le+=ue.left,we=te.height-ue.bottom,y.moveTo(le,ue.top),y.lineTo(le,we)),y.stroke(),y.Se(),me&&y.fs()}}}}function Xm(a,y,x,b,E){for(var z=b.length,te=a.actualBounds,re=a.naturalBounds,oe=aS(a,!0),le=aS(a,!1),ue=0;ue<z;ue++){var me=b[ue];if(me!==void 0&&me.background!==null&&me.coversSeparators!==E&&me.actual!==0){var we=x?te.height:te.width;if(!(me.position>we)){var Ee=me.Wc(),De=me.separatorStrokeWidth;isNaN(De)&&(De=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var je=me.separatorStroke;je===null&&(je=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(je===null||me.index===(x?oe:le))&&(De=0),Ee-=De,De=me.position+De,Ee+=me.actual,De+Ee>we&&(Ee=we-De),0>=Ee||(we=a.yb,Za(a,y,me.background,!0,!1,re,te),x?y.fillRect(we.left,De+we.top,te.width-(we.left+we.right),Ee):y.fillRect(De+we.left,we.top,Ee,te.height-(we.top+we.bottom)))}}}}function aS(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 Ev(a){return a==="LineV"||a==="BarV"}Le.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Le.kk=function(a,y,x){if(!Qt.prototype.kk.call(this,a,y,x))return!1;if(this.type===hi.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,bv(this,a),a.yd=null;else if(this.na===hi.Grid||this.na===hi.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},Le.nk=function(){return!0},Le.$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,te=0;te<y.length;te++)if(y[te].Ed()){var re=y[te].actualBounds;E=te===0?re.x:Math.min(re.x,E),z=te===0?re.y:Math.min(re.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 Qt.prototype.$o.call(this,a,y,x,b)},Le.Sj=function(a,y,x,b,E){var z=this.se(),te=this.transform,re=1/(te.m11*te.m22-te.m12*te.m21),oe=te.m22*re,le=-te.m12*re,ue=-te.m21*re,me=te.m11*re,we=re*(te.m21*te.dy-te.m22*te.dx),Ee=re*(te.m12*te.dx-te.m11*te.dy);if(this.areaBackground!==null)return te=this.actualBounds,en.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E);if(this.background!==null)return z=a*oe+y*ue+we,re=a*le+y*me+Ee,a=x*oe+b*ue+we,oe=x*le+b*me+Ee,E.h(0,0),x=this.naturalBounds,z=en.Ff(0,0,x.width,x.height,z,re,a,oe,E),E.transform(te),z;z||(oe=1,ue=le=0,me=1,Ee=we=0),re=a*oe+y*ue+we,a=a*le+y*me+Ee,oe=x*oe+b*ue+we,x=x*le+b*me+Ee,E.h(oe,x),b=(oe-re)*(oe-re)+(x-a)*(x-a),le=!1,me=this.O.s,Ee=me.length,ue=Qe.alloc(),we=null,y=1/0;var De=null,je=this.isClipping&&this.na===hi.Spot;je&&(De=Qe.alloc(),we=this.Pb(),(le=we.Sj(re,a,oe,x,De))&&(y=(re-De.x)*(re-De.x)+(a-De.y)*(a-De.y)));for(var ct=0;ct<Ee;ct++){var qe=me[ct];qe.visible&&qe!==we&&qe.Sj(re,a,oe,x,ue)&&(le=!0,qe=(re-ue.x)*(re-ue.x)+(a-ue.y)*(a-ue.y),qe<b&&(b=qe,E.set(ue)))}return je&&(y>b&&E.set(De),Qe.free(De)),Qe.free(ue),z&&E.transform(te),le},Le.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Qt.prototype.Gj.call(this)},Le.v=function(a){if(!vt(this)){Qt.prototype.v.call(this,a),a=null,(this.na===hi.Auto||this.na===hi.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=Fl(E,!1);(E instanceof Hl||E instanceof hi||E instanceof ua||z!==ai)&&E.v(!0)}}}},Le.Uj=function(){if(!vt(this)){pt(this,!0),Vt(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Le.Uk=function(){if(!(this.l&2048)){ke(this,!0),$e(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Le.Wu=function(){$e(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Le.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var z=this.desiredSize,te=this.minSize;x===void 0&&(x=te.width,b=te.height),x=Math.max(x,te.width),b=Math.max(b,te.height);var re=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,re.width)),isNaN(z.height)||(y=Math.min(z.height,re.height)),a=Math.max(x,a),y=Math.max(b,y);var oe=this.yb;a=Math.max(a-oe.left-oe.right,0),y=Math.max(y-oe.top-oe.bottom,0);var le=this.O.s;le.length!==0&&this.na.measure(this,a,y,le,E,x,b),a=E.width+oe.left+oe.right,oe=E.height+oe.top+oe.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(oe=z.height),a=Math.min(re.width,a),oe=Math.min(re.height,oe),a=Math.max(te.width,a),oe=Math.max(te.height,oe),a=Math.max(x,a),oe=Math.max(b,oe),Xi(E,a,oe),Xi(this.naturalBounds,a,oe),this.Ge(0,0,a,oe)},Le.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function ph(a){return a.part!==null?a.part.locationObject:null}Le.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=Fl(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var te=this.Kg,re=te.left+te.right;switch(te=te.top+te.bottom,y===x&&z===b&&(a=ai),a){case ai:(y>x||z>b)&&(this.v(),this.measure(y>x?x:y,z>b?b:z,0,0));break;case ci:this.v(!0),this.measure(x+re,b+te,0,0);break;case lr:this.v(!0),this.measure(x+re,z+te,0,0);break;case wr:this.v(!0),this.measure(y+re,b+te,0,0)}}this.na.arrange(this,E,this.jg)}},Le.gh=function(a){var y=this.naturalBounds,x=ph(this);if(Pr(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Qe.allocAt(0,0);b--;){var z=y[b];if((z.visible||z===x)&&(qr(E.set(a),z.transform),z.ca(E)))return Qe.free(E),!0}return Qe.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},Le.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},Le.qm=function(a,y){if(y(this,a),a instanceof hi){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Yf(a,y){sS(a,a,y)}function sS(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 hi&&sS(a,z,x)}}function vx(a,y){lS(a,a,y)}function lS(a,y,x){if(x(y),y instanceof hi){y=y.O.s;for(var b=y.length,E=0;E<b;E++)lS(a,y[E],x)}}Le.Nl=function(a){return uS(this,this,a)};function uS(a,y,x){if(x(y))return y;if(y instanceof hi){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var z=uS(a,y[E],x);if(z!==null)return z}}return null}Le.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Vp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof hi){var z=E.fb(a);if(z!==null)return z}if(E.name===a)return E}return null};function cS(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof hi?x=Math.max(x,cS(E)):E instanceof io&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}Le.se=function(){return!(this.type===hi.TableRow||this.type===hi.TableColumn)};function zh(a){return a.type===hi.TableRow||a.type===hi.TableColumn}Le.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Bt(this)))return null;var b=this.naturalBounds,E=1/this.Df(),z=this.se(),te=z?a:qr(Qe.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,le=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),le=oe/2),Pr(-(le*E),-(le*E),b.width+oe*E,b.height+oe*E,te.x,te.y)){if(!this.isAtomic){E=this.O.s;var ue=E.length;if(re=Qe.alloc(),le=(oe=this.isClipping&&this.na===hi.Spot)?this.Pb():null,oe&&(le.se()?qr(re.set(a),le.transform):re.set(a),!le.ca(re)))return Qe.free(re),z||Qe.free(te),null;for(var me=ph(this);ue--;){var we=E[ue];if((we.visible||we===me)&&(we.se()?qr(re.set(a),we.transform):re.set(a),!oe||we!==le)){var Ee=null;if(we instanceof hi?Ee=we.ic(re,y,x):we.pickable===!0&&we.ca(re)&&(Ee=we),Ee!==null&&(y!==null&&(Ee=y(Ee)),Ee!==null&&(x===null||x(Ee))))return Qe.free(re),z||Qe.free(te),Ee}}Qe.free(re)}return this.background===null&&this.areaBackground===null?(z||Qe.free(te),null):(a=Pr(0,0,b.width,b.height,te.x,te.y)?this:null,z||Qe.free(te),a)}return z||Qe.free(te),null},Le.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(),te=z?a:qr(Qe.allocAt(a.x,a.y),this.transform);if(E=Pr(0,0,E.width,E.height,te.x,te.y),zh(this)||E){if(!this.isAtomic){for(var re=this.O.s,oe=re.length,le=Qe.alloc(),ue=ph(this);oe--;){var me=re[oe];if(me.visible||me===ue){me.se()?qr(le.set(a),me.transform):le.set(a);var we=me;me=me instanceof hi?me:null,(me!==null?me.ji(le,y,x,b):we.ca(le))&&we.pickable!==!1&&(y!==null&&(we=y(we)),we===null||x!==null&&!x(we)||b.add(we))}}Qe.free(le)}return z||Qe.free(te),E&&(this.background!==null||this.areaBackground!==null)}return z||Qe.free(te),!1},Le.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 te=z;if(z===void 0&&(te=ro.alloc(),te.reset()),te.multiply(this.transform),this.fh(a,te))return Mv(this,y,x,E),z===void 0&&ro.free(te),!0;if(this.Yc(a,te)){if(!this.isAtomic)for(var re=ph(this),oe=this.O.s,le=oe.length;le--;){var ue=oe[le];if(ue.visible||ue===re){var me=ue.actualBounds,we=this.naturalBounds;me.x>we.width||me.y>we.height||0>me.x+me.width||0>me.y+me.height||(me=ue,ue=ue instanceof hi?ue:null,we=ro.alloc(),we.set(te),(ue!==null?ue.Cf(a,y,x,b,E,we):ws(me,a,b,we))&&(y!==null&&(me=y(me)),me===null||x!==null&&!x(me)||E.add(me)),ro.free(we))}}return z===void 0&&ro.free(te),b}return z===void 0&&ro.free(te),!1};function Mv(a,y,x,b){for(var E=a.O.s,z=E.length;z--;){var te=E[z];if(te.visible){var re=te.actualBounds,oe=a.naturalBounds;re.x>oe.width||re.y>oe.height||0>re.x+re.width||0>re.y+re.height||(te instanceof hi&&Mv(te,y,x,b),y!==null&&(te=y(te)),te===null||x!==null&&!x(te)||b.add(te))}}}Le.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 te=this.naturalBounds,re=this.se(),oe=re?a:qr(Qe.allocAt(a.x,a.y),this.transform),le=re?y:qr(Qe.allocAt(y.x,y.y),this.transform),ue=oe.Bf(le),me=0<oe.x&&oe.x<te.width&&0<oe.y&&oe.y<te.height||zo(oe.x,oe.y,0,0,0,te.height)<=ue||zo(oe.x,oe.y,0,te.height,te.width,te.height)<=ue||zo(oe.x,oe.y,te.width,te.height,te.width,0)<=ue||zo(oe.x,oe.y,te.width,0,0,0)<=ue;if(te=oe.zd(0,0)<=ue&&oe.zd(0,te.height)<=ue&&oe.zd(te.width,0)<=ue&&oe.zd(te.width,te.height)<=ue,re||(Qe.free(oe),Qe.free(le)),me){if(!this.isAtomic){oe=Qe.alloc(),le=Qe.alloc(),ue=ph(this);for(var we=this.O.s,Ee=we.length;Ee--;){var De=we[Ee];if(De.visible||De===ue){var je=De.actualBounds,ct=this.naturalBounds;(!re||!(je.x>ct.width||je.y>ct.height||0>je.x+je.width||0>je.y+je.height))&&(De.se()?(je=De.transform,qr(oe.set(a),je),qr(le.set(y),je)):(oe.set(a),le.set(y)),je=De,De=De instanceof hi?De:null,(De!==null?De.og(oe,le,x,b,E,z):je.tx(oe,le,E))&&(x!==null&&(je=x(je)),je===null||b!==null&&!b(je)||z.add(je)))}}Qe.free(oe),Qe.free(le)}return E?me:te}return!1};function Lv(a){var y=null;return a instanceof io&&(y=a.spot1,y===Vo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Ba),y}function Nv(a){var y=null;return a instanceof io&&(y=a.spot2,y===Vo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=vl),y}Le.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},Le.M=function(a){return this.O.M(a)},Le.Gb=function(a,y){y instanceof mr&&St("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&St("Cannot make a Panel contain itself: "+this.toString()),St("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&St("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==hi.Grid||y instanceof io||St("Can only add Shapes to a Grid Panel, not: "+y),this.na!==hi.Graduated||y instanceof io||y instanceof ua||St("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 Ii),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var z=-1,te=this.O.s,re=te.length,oe=0;oe<re;oe++)if(te[oe]===y){z=oe;break}if(z!==-1){if(z===a||z+1>=E.count&&a>=E.count)return;E.mb(z),b=z}else St("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),vt(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof hi&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Jm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Di&&(x.Te=!0),x.Te&&x instanceof Di&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(cs,"elements",this,y,null,b,null),x.cb(Va,"elements",this,null,y,null,a)))};function Fv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Le.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)},Le.mb=function(a){0<=a&&this.pc(a,!0)},Le.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),pt(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 Di&&(b instanceof hi?b.qm(b,function(te,re){Qv(z,re,y)}):Qv(z,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(cs,"elements",this,b,null,a,null))},Le.Fb=function(a){0>a&&qn(a,">= 0",hi,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Cs;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Va,"rowdefs",this,null,x,null,a)}return y[a]},Le.oA=function(a){if(0>a&&qn(a,">= 0",hi,"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(cs,"rowdefs",this,x,null,a,null),this.v()}}};function dS(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof Cs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Le.Eb=function(a){0>a&&qn(a,">= 0",hi,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Cs;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Va,"coldefs",this,null,x,null,a)}return y[a]},Le.jA=function(a){if(0>a&&qn(a,">= 0",hi,"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(cs,"coldefs",this,x,null,a,null),this.v()}}};function hS(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Cs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Le.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Qm(y,a),this},Le.Hy=function(a,y){return(a=this.Fb(a))&&Qm(a,new Cs(y)),this},Le.By=function(a,y){return(a=this.Eb(a))&&Qm(a,new Cs(y)),this},Le.nz=function(a){if(0>a||this.type!==hi.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},Le.fz=function(a){if(0>a||this.type!==hi.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},Le.Fz=function(a,y){if(y===void 0&&(y=new Qe(NaN,NaN)),this.type!==hi.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Le.Gz=function(a){if(this.type!==hi.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function fS(a){return a=a.allBindings,a!==null&&a._isFrozen}function hc(a){var y=a.allBindings;if(y===null)a.data!==null&&St("Template cannot have .data be non-null: "+a),a.allBindings=y=new Rn;else if(y._isFrozen)return;var x=new Rn;Fv(a,!1),a.qm(a,function(le,ue){ue.th();var me=ue.localBindings;if(me!==null)for(Ce(ue,!1),me=me.iterator;me.next();){var we=me.value;we.mode===gm&&Ce(ue,!0);var Ee=we.sourceName;Ee!==null&&(Ee==="/"&&Fv(le,!0),Ee=L1(we,le,ue),Ee!==null&&(x.add(Ee),Ee.srcBindings===null&&(Ee.srcBindings=new Rn),Ee.srcBindings.add(we))),y.add(we)}if(ue instanceof hi&&ue.type===hi.Table){if(0<ue.rowCount){for(le=ue.rowDefs,me=le.length,we=0;we<me;we++)if(Ee=le[we],Ee!==void 0&&Ee.be!==null)for(var De=Ee.be.iterator;De.next();){var je=De.value;je.xd=Ee,je.to=2,je.wl=Ee.index,y.add(je)}}if(0<ue.columnCount){for(ue=ue.colDefs,le=ue.length,me=0;me<le;me++)if(we=ue[me],we!==void 0&&we.be!==null)for(Ee=we.be.iterator;Ee.next();)De=Ee.value,De.xd=we,De.to=1,De.wl=we.index,y.add(De)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Ce(E,!0);for(var z=E.srcBindings.iterator;z.next();){var te=z.value;E.localBindings===null&&(E.localBindings=new Rn),E.localBindings.add(te)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,z=E.xd,z!==null){E.xd=null;var re=E.targetProperty,oe=re.indexOf(".");0<oe&&z instanceof hi&&(te=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(te),oe!==null?(z=oe,E.targetProperty=re):Si('Warning: unable to find GraphObject named "'+te+'" for Binding: '+E.toString())),z instanceof Cs?(te=br(z.panel),E.Ai=te===void 0?-1:te,z.panel.bindingId=E.Ai):z instanceof Qt?(te=br(z),E.Ai=te===void 0?-1:te,z.bindingId=E.Ai):St("Unknown type of binding target: "+z)}y.freeze(),a instanceof mr&&a.Zc()&&a.Va()}Le.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof hi&&(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&&hc(y),y},Le.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,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,te=x.Ai;if(te!==-1){if(z=this.ks(te),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 hi))continue;E===1?z=z.Eb(x.wl):E===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,b)}}},Le.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function yx(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,z=null;E<x&&(z=a[E],!(z instanceof hi&&z.data!==null));)E++,z=a[E];if(x-E!==b)return!0;if(z===null)return 0<b;for(var te=0;E<x&&te<b;){if(z=a[E],!(z instanceof hi)||z.data!==y[te])return!0;E++,te++}return!1}function Vp(a){if(a.type===hi.Spot||a.type===hi.Auto)return Math.min(a.O.length,1);if(a.type===hi.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof io&&b.isPanelMain))break}return x}return a.type===hi.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof hi&&zh(a))?1:0}Le.mv=function(){for(var a=Vp(this);this.O.length>a;)this.pc(this.O.length-1,!1);gS(this,this.itemArray)};function gS(a,y){var x=Vp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var b=0;b<x;b++)Ym(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var z=y[E],te=b<a.O.length?a.O.M(b):null;if(te instanceof hi){if(te.data!==z){var re=Dv(a,te.data),oe=Dv(a,z),le=oe!==re;le||(re=Bv(a,re),le=Bv(a,oe)!==re),le?(a.pc(b,!1),Ym(a,z,E,!1)):te.data=z}}else Ym(a,z,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,Av(a,x,0),vt(a)||a.v(),a.graduatedIntervals=null,a.If()||Jm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Di&&(y.Te=!0),y.Te&&y instanceof Di&&(y.wc=null))}}function Ym(a,y,x,b){if(!(y==null||0>x)){var E=Dv(a,y);if(E=Bv(a,E),E!==null){if(hc(E),E=E.copy(),E.l&16777216){var z=a.ih();z!==null&&Fv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Ii),a.ge.add(y,E)),z=x+Vp(a),a.Gb(z,E),b&&(E.ub=y,Av(a,z,x),E.ub=null),E.data=y}}}function Av(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof hi){var E=y,z=x;b.type===hi.TableRow?b.row=E:b.type===hi.TableColumn&&(b.column=E),b.itemIndex=z}y++,x++}}function Dv(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=us(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;St("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Bv(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(pS||(pS=!0,Si('No item template Panel found for category "'+y+'" on '+a),Si(" Using default item template."),a=new hi,y=new ua,y.bind(new fs("text","",Qn)),a.add(y),mS=a),b=mS)),b}function Jm(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof hi){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var z=y[E];x&&z instanceof hi&&!z.isEnabled||Jm(a,z,x)}}}function gd(a,y){y.name=a,Mc.add(a,y)}Ye.Object.defineProperties(hi.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===hi.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&&qn(a,">= 0",hi,"padding"),a=new Oi(a)):(0>a.left&&qn(a.left,">= 0",hi,"padding:value.left"),0>a.right&&qn(a.right,">= 0",hi,"padding:value.right"),0>a.top&&qn(a.top,">= 0",hi,"padding:value.top"),0>a.bottom&&qn(a.bottom,">= 0",hi,"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:Ls},set:function(a){typeof a=="number"&&(a=new Oi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new qu),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 Oo)&&(a instanceof Oo&&a.freeze(),this.T===null&&(this.T=new qu),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 qu),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)||St("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 qu),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 Oo)&&(a instanceof Oo&&a.freeze(),this.T===null&&(this.T=new qu),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 qu),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)||St("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 qu),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 qu),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||St("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&bc(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||St("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&bc(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 mh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),xe(this)&&(a=this.part,a!==null&&ha(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 mh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),xe(this)&&(a=this.part,a!==null&&ha(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 mh),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 mh),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 mh,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 mh,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 mh,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 mh,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 qu),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new qu),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:e0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new qu),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:e0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new qu),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&St("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new qu),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&St("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new qu),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 mr&&!(this instanceof jo);hc(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof vi?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof mr&&(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 Ar),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&&yy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&vy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||gS(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 Ii}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof mr||a.isPanelMain)&&St("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););so(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&&(so(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 Yr&&(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&&Jm(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))}}}),Ye.Object.defineProperties(hi,{Position:{get:function(){return Mc.I("Position")}},Horizontal:{get:function(){return Mc.I("Horizontal")}},Vertical:{get:function(){return Mc.I("Vertical")}},Spot:{get:function(){return Mc.I("Spot")}},Auto:{get:function(){return Mc.I("Auto")}},Table:{get:function(){return Mc.I("Table")}},Viewbox:{get:function(){return Mc.I("Viewbox")}},TableRow:{get:function(){return Mc.I("TableRow")}},TableColumn:{get:function(){return Mc.I("TableColumn")}},Link:{get:function(){return Mc.I("Link")}},Grid:{get:function(){return Mc.I("Grid")}},Graduated:{get:function(){return Mc.I("Graduated")}}}),hi.prototype.rebuildItemElements=hi.prototype.mv,hi.prototype.findItemPanelForData=hi.prototype.sx,hi.prototype.updateTargetBindings=hi.prototype.La,hi.prototype.copyTemplate=hi.prototype.Uy,hi.prototype.graduatedValueForPoint=hi.prototype.Gz,hi.prototype.graduatedPointForValue=hi.prototype.Fz,hi.prototype.findColumnForLocalX=hi.prototype.fz,hi.prototype.findRowForLocalY=hi.prototype.nz,hi.prototype.addColumnDefinition=hi.prototype.By,hi.prototype.addRowDefinition=hi.prototype.Hy,hi.prototype.addRowColumnDefinition=hi.prototype.Gy,hi.prototype.removeColumnDefinition=hi.prototype.jA,hi.prototype.getColumnDefinition=hi.prototype.Eb,hi.prototype.removeRowDefinition=hi.prototype.oA,hi.prototype.getRowDefinition=hi.prototype.Fb,hi.prototype.removeAt=hi.prototype.mb,hi.prototype.remove=hi.prototype.remove,hi.prototype.insertAt=hi.prototype.Gb,hi.prototype.elt=hi.prototype.M,hi.prototype.add=hi.prototype.add,hi.prototype.findObject=hi.prototype.fb,hi.prototype.findInVisualTree=hi.prototype.Nl,hi.prototype.walkVisualTreeFrom=hi.prototype.qm,hi.prototype.findMainElement=hi.prototype.Pb;var pS=!1,mS=null,Mc=new Ii;hi.className="Panel",hi.definePanelLayout=gd,gd("Position",new jm),gd("Vertical",new Hm),gd("Auto",new Wm),gd("Link",new _m);function mh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}mh.prototype.copy=function(){var a=new mh;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},mh.className="GradPanelSettings";function qu(){this.Pc=[],this.Oc=[],this.j=this.ob=e0,this.hb=this.Hb=0,this.Qp=Ls,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}qu.prototype.copy=function(a){for(var y=new qu,x=this.Pc,b=x.length,E=y.Pc,z=0;z<b;z++)if(x[z]!==void 0){var te=x[z].copy();te.wi(a),E[z]=te}for(x=this.Oc,b=x.length,E=y.Oc,z=0;z<b;z++)x[z]!==void 0&&(te=x[z].copy(),te.wi(a),E[z]=te);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},qu.className="TablePanelSettings";function Cs(a){Or(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Vo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Tv,this.hg=Vr,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}Cs.prototype.copy=function(){var a=new Cs;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=Ft(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Qm(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=Ft(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Le=Cs.prototype,Le.qb=function(a){a.classType===Cs&&(this.sizing=a)},Le.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+br(this)},Le.wi=function(a){this.Me=a},Le.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},Le.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===hi.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,z=0;z<E;z++){var te=b?y.rowDefs[z]:y.colDefs[z];if(te!==void 0&&te.oa!==0){x=te.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)},Le.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(wa,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 qm(a){if(a.sizing===Tv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Le.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new fs(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&fS(y)&&St("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new Rn),this.be.add(E),this},Ye.Object.defineProperties(Cs.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&&qn(a,">= 0",Cs,"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&&qn(a,">= 0",Cs,"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))&&qn(a,">= 0",Cs,"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&&qn(a,">= 0",Cs,"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 Oi(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&ff(a,"RowColumnDefinition.separatorStroke"),a instanceof Oo&&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)||St("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&&ff(a,"RowColumnDefinition.background"),a instanceof Oo&&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}}}),Cs.prototype.computeEffectiveSpacing=Cs.prototype.Wc,Cs.prototype.computeEffectiveSpacingTop=Cs.prototype.Io;var Tv=new gn(Cs,"Default",0),Up=new gn(Cs,"None",1),e0=new gn(Cs,"ProportionalExtra",2);Cs.className="RowColumnDefinition",Cs.Default=Tv,Cs.None=Up,Cs.ProportionalExtra=e0;function io(a,y){Qt.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)}Kt(io,Qt),io.prototype.cloneProtected=function(a){Qt.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=Ft(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 Jf(a){a.Na===null?a.Na=new Ov:a.Na.nc&&(a.Na=a.Na.copy())}Le=io.prototype,Le.th=function(){Qt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Le.qb=function(a){a===ai||a===tr||a===yo||a===Vr?this.geometryStretch=a:Qt.prototype.qb.call(this,a)},Le.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+br(this)};function cp(a,y,x,b){var E=x.length;if(!(4>E)){var z=b.measuredBounds,te=Math.max(1,z.width);z=z.height;for(var re=x[0],oe=x[1],le,ue,me,we,Ee,De,je=0,ct=Sn(),qe=2;qe<E;qe+=2)le=x[qe],ue=x[qe+1],me=le-re,re=ue-oe,me===0&&(me=.001),we=re/me,Ee=Math.atan2(re,me),De=Math.sqrt(me*me+re*re),ct.push([me,Ee,we,De]),je+=De,re=le,oe=ue;re=x[0],oe=x[1],me=b.measuredBounds.width,b instanceof io&&(me-=b.strokeWidth),1>me&&(me=1),E=x=me,le=te/2,ue=le!==0,qe=0,De=ct[qe],me=De[0],Ee=De[1],we=De[2],De=De[3];for(var Ct=0;.1<=je;){if(Ct===0&&(ue?(E=x,E-=le,je-=le,ue=!1):E=x,E===0&&(E=1)),E>je){Gn(ct);return}E>De?(Ct=E-De,E=De):Ct=0;var Lt=Math.sqrt(E*E/(1+we*we));if(0>me&&(Lt=-Lt),re+=Lt,oe+=we*Lt,a.translate(re,oe),a.rotate(Ee),a.translate(-(te/2),-(z/2)),Ct===0&&b.hh(a,y),a.translate(te/2,z/2),a.rotate(-Ee),a.translate(-re,-oe),je-=E,De-=E,Ct!==0){if(qe++,qe===ct.length){Gn(ct);return}De=ct[qe],me=De[0],Ee=De[1],we=De[2],De=De[3],E=Ct}}Gn(ct)}}Le.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,te=this.naturalBounds;b!==null&&Za(this,a,b,!0,!1,te,z);var re=this.part,oe=this.ig;if(x===null||oe!==0||re===null||!this.isPanelMain&&re.Pb()!==this||(oe=re.type===hi.Link&&re instanceof jo&&re.category==="Selection"&&re.adornedObject instanceof io&&re.adornedPart.Pb()===re.adornedObject?re.adornedObject.strokeWidth:0),oe===0&&(x=null),x!==null&&oe!==0&&(Za(this,a,x,!1,!1,te,z),a.lineWidth=oe,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,re&&y.Gf("drawShadows")&&(z=re.isShadowed),a.Il===!1&&(z=!1),re=!0,x===null||b!==null&&b!=="transparent"||(re=!1),te=!1,oe=this.strokeDashArray,oe!==null&&(te=!0,a.js(oe,this.strokeDashOffset)),E.type===xi.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===xi.u){var le=E.startX;oe=E.startY;var ue=E.endX,me=E.endY;E=Math.min(le,ue);var we=Math.min(oe,me);le=Math.abs(ue-le),oe=Math.abs(me-oe),a.beginPath(),a.rect(E,we,le,oe),b!==null&&a.ng(b),x!==null&&(re&&z&&Al(a),a.jk(),re&&z&&Xs(a)),a.Se()}else if(E.type===xi.F)le=E.startX,oe=E.startY,ue=E.endX,me=E.endY,E=Math.abs(ue-le)/2,we=Math.abs(me-oe)/2,le=Math.min(le,ue)+E,oe=Math.min(oe,me)+we,a.beginPath(),a.moveTo(le,oe-we),a.bezierCurveTo(le+en.wg*E,oe-we,le+E,oe-en.wg*we,le+E,oe),a.bezierCurveTo(le+E,oe+en.wg*we,le+en.wg*E,oe+we,le,oe+we),a.bezierCurveTo(le-en.wg*E,oe+we,le-E,oe+en.wg*we,le-E,oe),a.bezierCurveTo(le-E,oe-en.wg*we,le-en.wg*E,oe-we,le,oe-we),a.closePath(),b!==null&&a.ng(b),x!==null&&(re&&z&&Al(a),a.jk(),re&&z&&Xs(a)),a.Se();else if(E.type===xi.o)for(E=E.figures,oe=E.length,we=0;we<oe;we++){le=E.s[we],a.beginPath(),a.moveTo(le.startX,le.startY),ue=le.segments.s,me=ue.length;for(var Ee=null,De=0;De<me;De++){var je=ue[De];switch(je.type){case _a:a.moveTo(je.endX,je.endY);break;case ra:a.lineTo(je.endX,je.endY);break;case Hs:a.bezierCurveTo(je.point1X,je.point1Y,je.point2X,je.point2Y,je.endX,je.endY);break;case Xl:a.quadraticCurveTo(je.point1X,je.point1Y,je.endX,je.endY);break;case Ja:if(je.radiusX===je.radiusY){var ct=Math.PI/180;a.arc(je.point1X,je.point1Y,je.radiusX,je.startAngle*ct,(je.startAngle+je.sweepAngle)*ct,0>je.sweepAngle,Ee!==null?Ee.endX:le.startX,Ee!==null?Ee.endY:le.startY)}else if(Ee=yl(je,le),ct=Ee.length,ct===0)a.lineTo(je.centerX,je.centerY);else for(var qe=0;qe<ct;qe++){var Ct=Ee[qe];qe===0&&a.lineTo(Ct[0],Ct[1]),a.bezierCurveTo(Ct[2],Ct[3],Ct[4],Ct[5],Ct[6],Ct[7])}break;case du:if(qe=ct=0,Ee!==null&&Ee.type===Ja){if(Ee=yl(Ee,le),Ct=Ee.length,Ct===0){a.lineTo(je.endX,je.endY);break}Ee=Ee[Ct-1]||null,Ee!==null&&(ct=Ee[6],qe=Ee[7])}else ct=Ee!==null?Ee.endX:le.startX,qe=Ee!==null?Ee.endY:le.startY;if(Ee=ul(je,le,ct,qe),ct=Ee.length,ct===0){a.lineTo(je.endX,je.endY);break}for(qe=0;qe<ct;qe++)Ct=Ee[qe],a.bezierCurveTo(Ct[2],Ct[3],Ct[4],Ct[5],Ct[6],Ct[7]);break;default:St("Segment not of valid type: "+je.type)}je.isClosed&&a.closePath(),Ee=je}ue=le.isFilled,z?le.isShadowed?(ue===!0&&b!=="transparent"&&b!==null&&a.ng(b,le.isEvenOdd),x!==null&&(ue&&re&&Al(a),a.jk(),ue&&re&&Xs(a))):(Al(a),ue&&b!=="transparent"&&b!==null&&a.ng(b,le.isEvenOdd),x!==null&&a.jk(),Xs(a)):(ue&&b!==null&&a.ng(b,le.isEvenOdd),x!==null&&a.jk()),a.Se(we)}if(te&&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=Sn(),z.type===xi.j)b.push(z.startX),b.push(z.startY),b.push(z.endX),b.push(z.endY),cp(a,y,b,x);else if(z.type===xi.o)for(z=z.figures.iterator;z.next();){for(re=z.value,b.length=0,b.push(re.startX),b.push(re.startY),te=re.startX,E=re.startY,oe=te,we=E,le=re.segments.s,ue=le.length,me=0;me<ue;me++){switch(De=le[me],De.type){case _a:cp(a,y,b,x),b.length=0,b.push(De.endX),b.push(De.endY),te=De.endX,E=De.endY,oe=te,we=E;break;case ra:b.push(De.endX),b.push(De.endY),te=De.endX,E=De.endY;break;case Hs:en.Qe(te,E,De.point1X,De.point1Y,De.point2X,De.point2Y,De.endX,De.endY,.5,b),te=De.endX,E=De.endY;break;case Xl:en.ep(te,E,De.point1X,De.point1Y,De.endX,De.endY,.5,b),te=De.endX,E=De.endY;break;case Ja:if(je=yl(De,re),Ee=je.length,Ee===0){b.push(De.centerX),b.push(De.centerY),te=De.centerX,E=De.centerY;break}for(ct=0;ct<Ee;ct++)qe=je[ct],en.Qe(te,E,qe[2],qe[3],qe[4],qe[5],qe[6],qe[7],.5,b),te=qe[6],E=qe[7];break;case du:if(je=ul(De,re,te,E),Ee=je.length,Ee===0){b.push(De.endX),b.push(De.endY),te=De.endX,E=De.endY;break}for(ct=0;ct<Ee;ct++)qe=je[ct],en.Qe(te,E,qe[2],qe[3],qe[4],qe[5],qe[6],qe[7],.5,b),te=qe[6],E=qe[7];break;default:St("Segment not of valid type: "+De.type)}De.isClosed&&(b.push(oe),b.push(we),cp(a,y,b,x))}cp(a,y,b,x)}else if(z.type===xi.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),cp(a,y,b,x);else if(z.type===xi.F){if(E=new ys,E.startX=z.endX,E.startY=(z.startY+z.endY)/2,te=new To(Ja),te.startAngle=0,te.sweepAngle=360,te.centerX=(z.startX+z.endX)/2,te.centerY=(z.startY+z.endY)/2,te.radiusX=Math.abs(z.startX-z.endX)/2,te.radiusY=Math.abs(z.startY-z.endY)/2,E.add(te),z=yl(te,E),re=z.length,re===0)b.push(te.centerX),b.push(te.centerY);else for(te=E.startX,E=E.startY,oe=0;oe<re;oe++)we=z[oe],en.Qe(te,E,we[2],we[3],we[4],we[5],we[6],we[7],.5,b),te=we[6],E=we[7];cp(a,y,b,x)}Gn(b),a.restore(),a.Vc(!1)}}}},Le.kk=function(a,y,x){return!Qt.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},Le.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Qt.prototype.nk.call(this,a)},Le.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Le.ga=function(a,y){if(y===void 0&&(y=new Qe),a instanceof Ui){a.Mc()&&St("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},Le.mi=function(a){a===void 0&&(a=new _t);var y=this.naturalBounds,x=this.oe;y=_t.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=Qe.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),cr(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),cr(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),cr(a,b.x,b.y,0,0),_t.free(y),Qe.free(b),a},Le.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!==xi.j||y||(E+=2);var z=_t.alloc();if(z.assign(b),z.Bc(E+2,E+2),!z.ca(a))return _t.free(z),!1;if(b=E+1e-4,x.type===xi.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:(_t.free(z),en.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===xi.u){y=x.startX;var te=x.startY,re=x.endX;if(x=x.endY,z.x=Math.min(y,re),z.y=Math.min(te,x),z.width=Math.abs(re-y),z.height=Math.abs(x-te),this.fill===null){if(z.Bc(-b,-b),z.ca(a))return _t.free(z),!1;z.Bc(b,b)}return this.stroke!==null&&z.Bc(E,E),a=z.ca(a),_t.free(z),a}if(x.type===xi.F){te=x.startX,E=x.startY,re=x.endX;var oe=x.endY;if(x=Math.min(te,re),y=Math.min(E,oe),te=Math.abs(re-te)/2,E=Math.abs(oe-E)/2,x=a.x-(x+te),y=a.y-(y+E),this.fill===null){if(te-=b,E-=b,0>=te||0>=E||1>=x*x/(te*te)+y*y/(E*E))return _t.free(z),!1;te+=b,E+=b}return this.stroke!==null&&(te+=b,E+=b),_t.free(z),0>=te||0>=E?!1:1>=x*x/(te*te)+y*y/(E*E)}if(x.type===xi.o)return _t.free(z),this.fill===null?Mu(x,a.x,a.y,E):ac(x,a,E,1<this.strokeWidth,y);St("Unknown Geometry type: "+x.type)},Le.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 te=this.geometry.bounds;else{var re=this.figure,oe=Iv[re];if(oe===void 0){var le=en.Ze[re];typeof le=="string"&&(le=en.Ze[le]),typeof le=="function"?(oe=le(null,100,100),Iv[re]=oe):St("Unsupported Figure: "+re)}te=oe.bounds}re=te.width,oe=te.height,le=te.width;var ue=te.height;switch(Fl(this,!0)){case ai:b=x=0;break;case ci:le=Math.max(a-z,0),ue=Math.max(y-z,0);break;case lr:le=Math.max(a-z,0),b=0;break;case wr:x=0,ue=Math.max(y-z,0)}isFinite(E.width)&&(le=E.width),isFinite(E.height)&&(ue=E.height);var me=this.maxSize,we=this.minSize;switch(x=Math.max(x-z,we.width),b=Math.max(b-z,we.height),le=Math.min(me.width,le),ue=Math.min(me.height,ue),le=isFinite(le)?Math.max(x,le):Math.max(re,x),ue=isFinite(ue)?Math.max(b,ue):Math.max(oe,b),x=kv(this),x){case ai:break;case ci:re=le,oe=ue;break;case tr:x=Math.min(le/re,ue/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:St(x+" is not a valid geometryStretch.")}this.Rd!==null?(re===0&&(re=.001),oe===0&&(oe=.001),x=this.Rd!==null?this.Rd:this.ua,te=x.bounds,b=re/te.width,te=oe/te.height,isFinite(b)||(b=1),isFinite(te)||(te=1),this.ua=b===1&&te===1?x:x.copy().scale(b,te)):this.ua!==null&&en.$(this.ua.Sk,a-z)&&en.$(this.ua.Rk,y-z)||(this.ua=io.makeGeometry(this,re,oe)),te=this.ua.bounds,a===1/0||y===1/0?this.Ge(te.x-z/2,te.y-z/2,a===0&&re===0?0:te.width+z,y===0&&oe===0?0:te.height+z):this.Ge(-(z/2),-(z/2),le+z,ue+z),E.w()?(le=E.width,ue=E.height,le=Math.min(me.width,le),ue=Math.min(me.height,ue),le=Math.max(we.width,le),ue=Math.max(we.height,ue),this.dc.h(0,0,le,ue)):this.dc.assign(te)};function kv(a){var y=a.geometryStretch;return a.Rd!==null?y===Vr?ci:y:y===Vr?Iv[a.figure].defaultStretch:y}Le.eh=function(a,y,x,b){Pl(this,a,y,x,b)},Le.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Le.Sj=function(a,y,x,b,E){var z=this.transform,te=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*te,oe=-z.m12*te,le=-z.m21*te,ue=z.m11*te,me=te*(z.m21*z.dy-z.m22*z.dx),we=te*(z.m12*z.dx-z.m11*z.dy);z=a*re+y*le+me,te=a*oe+y*ue+we,re=x*re+b*le+me,oe=x*oe+b*ue+we,me=this.ig/2,le=this.ua,le===null&&(this.measure(1/0,1/0),le=this.ua);var Ee=le.bounds;if(ue=!1,le.type===xi.j)if(1.5>=this.strokeWidth)ue=en.Ve(le.startX,le.startY,le.endX,le.endY,z,te,re,oe,E);else{if(le.startX===le.endX?(b=me,ue=0):(y=(le.endY-le.startY)/(le.endX-le.startX),ue=me/Math.sqrt(1+y*y),b=ue*y),y=Sn(),a=new Qe,en.Ve(le.startX+b,le.startY+ue,le.endX+b,le.endY+ue,z,te,re,oe,a)&&y.push(a),a=new Qe,en.Ve(le.startX-b,le.startY-ue,le.endX-b,le.endY-ue,z,te,re,oe,a)&&y.push(a),a=new Qe,en.Ve(le.startX+b,le.startY+ue,le.startX-b,le.startY-ue,z,te,re,oe,a)&&y.push(a),a=new Qe,en.Ve(le.endX+b,le.endY+ue,le.endX-b,le.endY-ue,z,te,re,oe,a)&&y.push(a),re=y.length,re===0)return Gn(y),!1;for(ue=!0,oe=1/0,b=0;b<re;b++)a=y[b],x=(a.x-z)*(a.x-z)+(a.y-te)*(a.y-te),x<oe&&(oe=x,E.x=a.x,E.y=a.y);Gn(y)}else if(le.type===xi.u)ue=en.Ff(Ee.x-me,Ee.y-me,Ee.x+Ee.width+me,Ee.y+Ee.height+me,z,te,re,oe,E);else if(le.type===xi.F){y=_t.allocAt(Ee.x,Ee.y,Ee.width,Ee.height).Bc(me,me);e:if(y.width===0)ue=en.Ve(y.x,y.y,y.x,y.y+y.height,z,te,re,oe,E);else if(y.height===0)ue=en.Ve(y.x,y.y,y.x+y.width,y.y,z,te,re,oe,E);else{if(a=y.width/2,le=y.height/2,b=y.x+a,ue=y.y+le,x=9999,z!==re&&(x=(te-oe)/(z-re)),9999>Math.abs(x)){if(oe=te-ue-x*(z-b),0>a*a*x*x+le*le-oe*oe){E.x=NaN,E.y=NaN,ue=!1;break e}me=Math.sqrt(a*a*x*x+le*le-oe*oe),re=(-(a*a*x*oe)+a*le*me)/(le*le+a*a*x*x)+b,a=(-(a*a*x*oe)-a*le*me)/(le*le+a*a*x*x)+b,le=x*(re-b)+oe+ue,oe=x*(a-b)+oe+ue,Math.abs((z-re)*(z-re))+Math.abs((te-le)*(te-le))<Math.abs((z-a)*(z-a))+Math.abs((te-oe)*(te-oe))?(E.x=re,E.y=le):(E.x=a,E.y=oe)}else{if(re=le*le,oe=z-b,re-=re/(a*a)*oe*oe,0>re){E.x=NaN,E.y=NaN,ue=!1;break e}oe=Math.sqrt(re),re=ue+oe,oe=ue-oe,Math.abs(re-te)<Math.abs(oe-te)?(E.x=z,E.y=re):(E.x=z,E.y=oe)}ue=!0}_t.free(y)}else if(le.type===xi.o){we=Qe.alloc();var De=re-z,je=oe-te,ct=De*De+je*je,qe=z,Ct=te;if(0<ct&&Ee.contains(qe,Ct)&&(we.x=qe,we.y=Ct,this.ca(we)))for(De!==0&&.5>Math.abs(De)?(je*=.5/De,De=.5):je!==0&&.5>Math.abs(je)&&(De*=.5/je,je=.5),qe-=De,Ct-=je;Ee.contains(qe,Ct);)qe-=De,Ct-=je;for(E.x=re,E.y=oe,je=0;je<le.figures.count;je++){var Lt=le.figures.s[je],Rt=Lt.isFilled?qe:z,Jt=Lt.isFilled?Ct:te,vn=Lt.segments;Ee=Lt.startX,De=Lt.startY;for(var Fi=Ee,Yi=De,Hi=0;Hi<vn.count;Hi++){var mi=vn.s[Hi],ni=mi.type,Ur=mi.endX,Dr=mi.endY,Ko=!1;switch(ni){case _a:Fi=Ur,Yi=Dr;break;case ra:Ko=n0(Ee,De,Ur,Dr,Rt,Jt,re,oe,we);break;case Hs:Ko=en.Eo(Ee,De,mi.point1X,mi.point1Y,mi.point2X,mi.point2Y,Ur,Dr,Rt,Jt,re,oe,.6,we);break;case Xl:Ko=en.Eo(Ee,De,Ee+2/3*(mi.point1X-Ee),De+2/3*(mi.point1Y-De),Ur+2/3*(mi.point1X-Ur),Dr+2/3*(mi.point1Y-Dr),Ur,Dr,Rt,Jt,re,oe,.6,we);break;case Ja:case du:ni=mi.type===Ja?yl(mi,Lt):ul(mi,Lt,Ee,De);var la=ni.length;if(la===0){Ko=n0(Ee,De,mi.type===Ja?mi.centerX:mi.endX,mi.type===Ja?mi.centerY:mi.endY,Rt,Jt,re,oe,we);break}for(Dr=null,Ur=0;Ur<la;Ur++){if(Dr=ni[Ur],Ur===0&&n0(Ee,De,Dr[0],Dr[1],Rt,Jt,re,oe,we)){var Rs=t0(Rt,Jt,we,ct,E);Rs<ct&&(ct=Rs,ue=!0)}en.Eo(Dr[0],Dr[1],Dr[2],Dr[3],Dr[4],Dr[5],Dr[6],Dr[7],Rt,Jt,re,oe,.6,we)&&(Rs=t0(Rt,Jt,we,ct,E),Rs<ct&&(ct=Rs,ue=!0))}Ur=Dr[6],Dr=Dr[7];break;default:St("Unknown Segment type: "+ni)}Ee=Ur,De=Dr,Ko&&(Ko=t0(Rt,Jt,we,ct,E),Ko<ct&&(ct=Ko,ue=!0)),mi.isClosed&&(Ur=Fi,Dr=Yi,n0(Ee,De,Ur,Dr,Rt,Jt,re,oe,we)&&(mi=t0(Rt,Jt,we,ct,E),mi<ct&&(ct=mi,ue=!0)))}}z=x-a,te=b-y,re=Math.sqrt(z*z+te*te),re!==0&&(z/=re,te/=re),E.x-=z*me,E.y-=te*me,Qe.free(we)}else St("Unknown Geometry type: "+le.type);return ue?(this.transform.Ga(E),!0):!1};function t0(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 n0(a,y,x,b,E,z,te,re,oe){if(en.$(a,x)&&en.$(y,b)||en.$(E,te)&&en.$(z,re))return!1;var le=!1,ue=(E-te)*(y-b)-(z-re)*(a-x);return ue===0?!1:(oe.x=((E*re-z*te)*(a-x)-(E-te)*(a*b-y*x))/ue,oe.y=((E*re-z*te)*(y-b)-(z-re)*(a*b-y*x))/ue,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(oe.y>a||en.$(oe.y,a))&&(oe.y<y||en.$(oe.y,y))&&(le=!0)):(y=a<x?a:x,a=a<x?x:a,(oe.x>y||en.$(oe.x,y))&&(oe.x<a||en.$(oe.x,a))&&(le=!0)),le)}Le.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var b=this.strokeWidth/2,E=!1,z=Qe.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)))),Qe.free(z),E},Le.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=ro.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,z=a.top;a=a.bottom;var te=Qe.alloc();if(te.h(b,z),x.Ga(te),this.gh(te,!0)||(te.h(E,z),x.Ga(te),this.gh(te,!0))||(te.h(b,a),x.Ga(te),this.gh(te,!0))||(te.h(E,a),x.Ga(te),this.gh(te,!0)))return Qe.free(te),!0;var re=Qe.alloc(),oe=Qe.alloc();return x.set(y),x.bv(this.transform),x.Vj(),re.x=E,re.y=z,re.transform(x),te.x=b,te.y=z,te.transform(x),y=!1,Qf(this,te,re,oe)?y=!0:(te.x=E,te.y=a,te.transform(x),Qf(this,te,re,oe)?y=!0:(re.x=b,re.y=a,re.transform(x),Qf(this,te,re,oe)?y=!0:(te.x=b,te.y=z,te.transform(x),Qf(this,te,re,oe)&&(y=!0)))),Qe.free(te),ro.free(x),Qe.free(re),Qe.free(oe),y};function Qf(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)}Le.tx=function(a,y,x){function b(ct,qe){for(var Ct=ct.length,Lt=0;Lt<Ct;Lt+=2)if(qe.zd(ct[Lt],ct[Lt+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 te=y.bounds,re=te.x,oe=te.y,le=te.x+te.width;if(te=te.y+te.height,Ro(a.x,a.y,re,oe)<=E&&Ro(a.x,a.y,le,oe)<=E&&Ro(a.x,a.y,re,te)<=E&&Ro(a.x,a.y,le,te)<=E)return!0}if(re=y.startX,oe=y.startY,le=y.endX,te=y.endY,y.type===xi.j){if(x=(re-le)*(a.x-le)+(oe-te)*(a.y-te),zo(a.x,a.y,re,oe,le,te)<=(0<=(le-re)*(a.x-re)+(te-oe)*(a.y-oe)&&0<=x?E:z))return!0}else{if(y.type===xi.u)return y=!1,x&&(y=zo(a.x,a.y,re,oe,re,te)<=E||zo(a.x,a.y,re,oe,le,oe)<=E||zo(a.x,a.y,le,oe,le,te)<=E||zo(a.x,a.y,re,te,le,te)<=E),y;if(y.type===xi.F){y=a.x-(re+le)/2,z=a.y-(oe+te)/2;var ue=Math.abs(le-re)/2,me=Math.abs(te-oe)/2;if(ue===0||me===0)return zo(a.x,a.y,re,oe,le,te)<=E;if(x){if(a=en.$y(ue,me,y,z),a*a<=E)return!0}else return!(Ro(y,z,-ue,0)>=E||Ro(y,z,0,-me)>=E||Ro(y,z,0,me)>=E||Ro(y,z,ue,0)>=E)}else if(y.type===xi.o){if(le=y.bounds,z=le.x,re=le.y,oe=le.x+le.width,le=le.y+le.height,a.x>oe&&a.x<z&&a.y>le&&a.y<re&&zo(a.x,a.y,z,re,z,le)>E&&zo(a.x,a.y,z,re,oe,re)>E&&zo(a.x,a.y,oe,le,z,le)>E&&zo(a.x,a.y,oe,le,oe,re)>E)return!1;if(z=Math.sqrt(E),x){if(this.fill===null?Mu(y,a.x,a.y,z):ac(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],te=z.startX,ue=z.startY,a.zd(te,ue)>E)return!1;for(re=z.segments.s,oe=re.length,le=0;le<oe;le++)switch(me=re[le],me.type){case _a:case ra:if(te=me.endX,ue=me.endY,a.zd(te,ue)>E)return!1;break;case Hs:var we=Sn();if(en.Qe(te,ue,me.point1X,me.point1Y,me.point2X,me.point2Y,me.endX,me.endY,.8,we),te=b(we,a),Gn(we),te||(te=me.endX,ue=me.endY,a.zd(te,ue)>E))return!1;break;case Xl:if(we=Sn(),en.ep(te,ue,me.point1X,me.point1Y,me.endX,me.endY,.8,we),te=b(we,a),Gn(we),te||(te=me.endX,ue=me.endY,a.zd(te,ue)>E))return!1;break;case Ja:case du:we=me.type===Ja?yl(me,z):ul(me,z,te,ue);var Ee=we.length;if(Ee===0){if(te=me.type===Ja?me.centerX:me.endX,ue=me.type===Ja?me.centerY:me.endY,a.zd(te,ue)>E)return!1;break}me=null;for(var De=Sn(),je=0;je<Ee;je++)if(me=we[je],De.length=0,en.Qe(me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],.8,De),b(De,a))return Gn(De),!1;Gn(De),me!==null&&(te=me[6],ue=me[7]);break;default:St("Unknown Segment type: "+me.type)}}return!0}}}return!1},Le.qc=function(){this.ua=null},Le.kq=function(){return this.ig};function vS(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=nm,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=xs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Ui(1-xs.x,xs.y)))}io.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Rd[a.toArrow];else a.fromArrow!=="None"?b=Rd[a.fromArrow]:(b=en.Ze[a.figure],typeof b=="string"&&(b=en.Ze[b]),b===void 0&&St("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=en.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function yS(a){var y=Rd[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Rd[x],y===void 0){var b=null,E;for(E in en.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=xi.parse(en.um[b],!1),Rd[b]=a,x!==b&&(Rd[x]=b),b}}return typeof y=="string"?y:y instanceof xi?a:null}Ye.Object.defineProperties(io.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),xe(this)&&(a=this.part,a!==null&&ha(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=xi.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Qe.allocAt(-y.x,-y.y),Qe.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&ff(a,"Shape.fill"),a instanceof Oo&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&ff(a,"Shape.stroke"),a instanceof Oo&&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 qn(a,"value >= 0",io,"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"?qn(a,'"butt", "round", or "square"',io,"strokeCap"):(Jf(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"?qn(a,'"miter", "bevel", or "round"',io,"strokeJoin"):(Jf(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){Jf(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)||St("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&&(Jf(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=en.Ze[a];typeof x=="function"?x=a:(x=en.Ze[a.toLowerCase()])||St("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=yS(a);x===null?St("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Hr),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),vS(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=yS(a);x===null?St("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Hr),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),vS(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Vo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Jf(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Vo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Jf(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&&(Jf(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Vr},set:function(a){var y=this.geometryStretch;y!==a&&(Jf(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 jd),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&bc(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 jd),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 jd),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 jd),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),io.prototype.intersectsRect=io.prototype.Yc,io.prototype.containedInRect=io.prototype.fh,io.prototype.getNearestIntersectionPoint=io.prototype.rs,io.prototype.getDocumentBounds=io.prototype.mi,io.prototype.getDocumentPoint=io.prototype.ga;var Rd=new $i,Iv=new $i;io.className="Shape",io.getFigureGenerators=function(){var a=new Ii,y;for(y in en.Ze)y!==y.toLowerCase()&&a.add(y,en.Ze[y]);return a.freeze(),a},io.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=en.Ze;b[a]=y,b[x]=a},io.getArrowheadGeometries=function(){var a=new Ii;for(b in en.um)if(Rd[b]===void 0){var y=xi.parse(en.um[b],!1);Rd[b]=y,y=b.toLowerCase(),y!==b&&(Rd[y]=b)}for(var x in Rd)if(x!==x.toLowerCase()){var b=Rd[x];b instanceof xi&&a.add(x,b)}return a.freeze(),a},io.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=xi.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||St("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=Rd;b[a]=x,b[y]=a};function Ov(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Vr,this.gg=this.fg=Vo}Ov.prototype.copy=function(){var a=new Ov;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 ua(a,y){return Qt.call(this),s0||(iu=Ha?new al(null).context:null,s0=!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}Kt(ua,Qt),ua.prototype.cloneProtected=function(a){Qt.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 pd(a){a.da===null?a.da=new Gv:a.da.nc&&(a.da=a.da.copy())}Le=ua.prototype,Le.th=function(){Qt.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function SS(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}Le.qb=function(a){a.classType===ua?this.wrap=a:Qt.prototype.qb.call(this,a)},Le.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Le.v=function(){Qt.prototype.v.call(this)},Le.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,te=Xp(this),re=a.textAlign=this.textAlign,oe=y.tn;re==="start"?re=oe?"right":"left":re==="end"&&(re=oe?"left":"right"),oe=this.isUnderline;var le=this.isStrikethrough;Za(this,a,this.xc,!0,!1,x,b),(oe||le)&&Za(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ue=this.oe,me=ue.dx-(te*ue.m21+ue.dx);ue=ue.dy-(te*ue.m22+ue.dy);var we=y.scale;switch(8>(me*me+ue*ue)*we*we&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Uo&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,me=this.spacingBelow,this.flip){case Eo:a.translate(E,0),a.scale(-1,1);break;case ao:a.translate(0,z),a.scale(1,-1);break;case Qo:a.translate(E,z),a.scale(-1,-1)}if(a.yc(),ue=this.Gc,we=(y+te+me)*ue,z>we&&(b=this.verticalAlignment,b=b.y*z-b.y*we+b.offsetY),ue===1&&this.ze!==null)me=this.Cb,me>E&&(me=E),this.Oj(this.ze,a,0,b+y,E,te,me,x,re,oe,le);else if(this.Qc!==null&&this.Qb!==null)for(we=0;we<ue;we++){var Ee=this.Qc[we];Ee>E&&(Ee=E),b+=y,this.Oj(this.Qb[we],a,0,b,E,te,Ee,x,re,oe,le),b+=te+me}switch(this.flip){case Eo:a.scale(-1,1),a.translate(-E,0);break;case ao:a.scale(1,-1),a.translate(0,-z);break;case Qo:a.scale(-1,-1),a.translate(-E,-z)}}},Le.Oj=function(a,y,x,b,E,z,te,re,oe,le,ue){var me=0;if(re)oe==="left"?me=0:oe==="right"?me=E-te:oe==="center"&&(me=(E-te)/2),y.fillRect(x+me,b+.25*z,te,1);else{if(oe==="left"?me=0:oe==="right"?me=E:oe==="center"&&(me=E/2),E=i0!==null?i0(this,z):.75*z,y.fillText(a,x+me,b+E),a=z/20|0,a===0&&(a=1),oe==="right"?me-=te:oe==="center"&&(me-=te/2),le){re=r0!==null?r0(this,z):.8*z,oe=x+me,le=b+re,E=x+me+te,re=b+re;var we=a;y.beginPath(),y.lineWidth=we,y.moveTo(oe,le),y.lineTo(E,re),y.stroke(),y.Se(),y instanceof Uo&&y.ad.classList.add("gojs-td")}ue&&(ue=b+z-z/2.2|0,a%2!==0&&(ue+=.5),b=x+me,z=ue,x=x+me+te,te=ue,me=a,y.beginPath(),y.lineWidth=me,y.moveTo(b,z),y.lineTo(x,te),y.stroke(),y.Se(),y instanceof Uo&&y.ad.classList.add("gojs-td"))}},Le.kk=function(a,y,x){if(!Qt.prototype.kk.call(this,a,y,x))return!1;if(Za(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++)nu(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,nu(a,y,!0);return!0},Le.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Qt.prototype.nk.call(this,a)},Le.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Le.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;iu!==null&&MS!==z&&(MS=iu.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var te;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),z.length===0)z=8;else if(this.isMultiline){for(var re=te=0,oe=!1;!oe;){var le=z.indexOf(`
|
|
|
`,re);le===-1&&(le=z.length,oe=!0),re=z.substr(re,le-re),this.formatting===Yp&&(re=re.trim()),te=Math.max(te,Lc(re)),re=le+1}z=te}else te=z.indexOf(`
|
|
|
`,0),0<=te&&(z=z.substr(0,te)),z=Lc(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)),te=PS(this,z),isNaN(this.desiredSize.height)?te=Math.min(te,y/this.scale):te=this.desiredSize.height,oe=te,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===o0&&(y=this.Ae,y=this.overflow===o0?xS(y):0,le=this.spacingAbove+this.spacingBelow,le=Math.max(0,Xp(this)+le),oe=Math.min(this.maxLines-1,Math.max(Math.floor(oe/le+.01)-1,0)),!(oe+1>=this.Qb.length))){for(this.l|=16777216,le=this.Qb[oe],y=Math.max(1,a-y);Lc(le)>y&&1<le.length;)le=le.substr(0,le.length-1);le+=Jp,y=Lc(le),this.Qb[oe]=le,this.Qb=this.Qb.slice(0,oe+1),this.Qc[oe]=y,this.Qc=this.Qc.slice(0,oe+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===wS||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),te=Math.max(b,te),Xi(this.dc,z,te),this.Ge(0,0,z,te),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},Le.eh=function(a,y,x,b){Pl(this,a,y,x,b)};function _p(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 Rv(a,y,x,b){var E=a.formatting===Yp;E&&(y=y.trim());var z=0,te=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,Xp(a)+re);var oe=a.overflow===o0?xS(te):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,re);else if(te=y,a.wrap===jv){a.Le=1;var le=Lc(y);if(oe===0||le<=x)a.Cb=Math.max(a.Cb,le),_p(a,y,a.Cb),b!==null&&b.h(le,re);else{for(z=dp(a,te),te=te.substr(z.length),y=dp(a,te),le=Lc(z+y);0<y.length&&le<=x;)z+=y,te=te.substr(y.length),y=dp(a,te),le=z+y,E&&(le=le.trim()),le=Lc(le);for(E&&(y=y.trim()),z+=y,x=Math.max(1,x-oe);Lc(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=Jp;var ue=Lc(z);a.Cb=ue,_p(a,z,ue),b!==null&&b.h(ue,re)}}else{for(oe=0,te.length===0&&(oe=1,_p(a,te,0));0<te.length;){for(y=dp(a,te),te=te.substr(y.length);Lc(y)>x;){var me=1;for(le=Lc(y.substr(0,me)),ue=0;le<=x;)me++,ue=le,le=Lc(y.substr(0,me));if(me===1){var we=le;z=Math.max(z,le)}else we=ue,z=Math.max(z,ue);if(me--,1>me&&(me=1),_p(a,y.substr(0,me),we),oe++,y=y.substr(me),a.Gc+oe>a.maxLines)break}for(ue=dp(a,te),le=Lc(y+ue);0<ue.length&&le<=x;)y+=ue,te=te.substr(ue.length),ue=dp(a,te),le=y+ue,E&&(le=le.trim()),le=Lc(le);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ue.length===0?(me=le,z=Math.max(z,le)):(me=ue=Lc(y),z=Math.max(z,ue)),_p(a,y,me),oe++,a.Gc+oe>a.maxLines))break}a.Le=Math.min(a.maxLines,oe),a.Cb=Math.max(a.Cb,z),b!==null&&b.h(a.Cb,re*a.Le)}}function dp(a,y){if(a.wrap===CS)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===bS&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function Lc(a){return iu===null?8*a.length:iu.measureText(a).width}function Xp(a){if(a.df!==null)return a.df;var y=a.Ae;if(iu===null){var x=16;return a.df=x}return Zv[y]!==void 0&&5e3>ES?x=Zv[y]:(x=1.3*iu.measureText("M").width,Zv[y]=x,ES++),a.df=x}function xS(a){if(iu===null)return 6;if(a0[a]!==void 0&&5e3>Wv)var y=a0[a];else y=iu.measureText(Jp).width,a0[a]=y,Wv++;return y}function PS(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,Xp(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,te,re=!1;!re;){if(te=x.indexOf(`
|
|
|
`,z),te===-1&&(te=x.length,re=!0),z<=te){if(z=x.substr(z,te-z),a.wrap!==jv){a.Le=0;var oe=pi.alloc();Rv(a,z,y,oe),E+=oe.height,pi.free(oe),a.Gc+=a.Le}else Rv(a,z,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(re=!0)}z=te+1}return a.Lq=E}Ye.Object.defineProperties(ua.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"||(pd(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:ai},set:function(a){var y=this.flip;y!==a&&(pd(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Ss},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),pd(this),this.da.Yr=a,bl(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=pi.alloc();Rv(this,this.ec,999999,a);var y=a.width;pi.free(a),a=PS(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Xi(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:zv},set:function(a){var y=this.wrap;y!==a&&(pd(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Hv},set:function(a){var y=this.overflow;y!==a&&(pd(this),this.da.$q=a,this.v(),this.g("overflow",y,a))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&ff(a,"TextBlock.stroke"),a instanceof Oo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Xp(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&&(pd(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&&(pd(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 jd),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 jd),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 jd),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 jd),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 jd),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&&(pd(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&&(pd(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&&(pd(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&&(pd(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Yp},set:function(a){var y=this.formatting;y!==a&&(pd(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&&qn(a,"> 0",ua,"maxLines"),pd(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 i0=null,r0=null,jv=new gn(ua,"None",0),wS=new gn(ua,"WrapFit",1),zv=new gn(ua,"WrapDesiredSize",2),CS=new gn(ua,"WrapBreakAll",3),Hv=new gn(ua,"OverflowClip",0),o0=new gn(ua,"OverflowEllipsis",1),Yp=new gn(ua,"FormatTrim",0),bS=new gn(ua,"FormatNone",0),Sx=/[ \u200b\u00ad]/,Zv=new $i,ES=0,a0=new $i,Wv=0,Jp="...",MS="",iu=null,s0=!1;ua.className="TextBlock";function Gv(){this.nc=!1,this.Hd=null,this.Xf=ai,this.gq=Yp,this.Jq=1/0,this.$q=Hv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Ss,this.$r=zv}Gv.prototype.copy=function(){var a=new Gv;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},ua.getEllipsis=function(){return Jp},ua.setEllipsis=function(a){Jp=a,a0=new $i,Wv=0},ua.getBaseline=function(){return i0},ua.setBaseline=function(a){i0=a},ua.getUnderline=function(){return r0},ua.setUnderline=function(a){r0=a},ua.isValidFont=function(a){if(s0||(iu=Ha?new al(null).context:null,s0=!0),iu===null)return!0;var y=iu.font;if(a===y||a==="10px sans-serif")return!0;iu.font="10px sans-serif",iu.font=a;var x=iu.font;if(x!=="10px sans-serif")return iu.font=y,!0;iu.font="19px serif";var b=iu.font;return iu.font=a,x=iu.font,iu.font=y,x!==b},ua.FormatNone=bS,ua.FormatTrim=Yp,ua.None=jv,ua.OverflowClip=Hv,ua.OverflowEllipsis=o0,ua.WrapBreakAll=CS,ua.WrapDesiredSize=zv,ua.WrapFit=wS;function jd(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}jd.prototype.copy=function(){var a=new jd;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},jd.className="GradElementSettings";function ru(a,y){Qt.call(this),this.Eg=null,this.qo="",this.Xg=kr,this.Nk=ci,this.Zg=this.Hd=null,this.Mk=wo,this.Xf=ai,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 hp;Kt(ru,Qt),ru.prototype.cloneProtected=function(a){Qt.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},ru.prototype.qb=function(a){a===ai||a===tr||a===yo?this.imageStretch=a:Qt.prototype.qb.call(this,a)},ru.prototype.toString=function(){return"Picture("+this.source+")#"+br(this)};function fp(a){a===void 0&&(a=""),a!==""?hp[a]&&(delete hp[a],l0--):(hp=new $i,l0=0)}function LS(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")||"",te=E.Og.I(z);if(te!==null)for(var re=te.length,oe=0;oe<re;oe++)z=te[oe],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()||(pt(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")||"",te=E.Og.I(z);if(te!==null){E=te.length,z=Sn();for(var re=0;re<E;re++)z.push(te[re]);if(y.hn)for(re=0;re<E;re++)te=z[re],te.Hd!==null&&te.Hd(te,x);Gn(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}ru.prototype.hA=function(){if(this.source!==""){fp(this.source);var a=this.source;this.source="",this.source=a}},ru.prototype.redraw=function(){this.N(),this.Uc=!0},ru.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 Gc)){var E=a instanceof Uo;b=this.naturalBounds;var z=0,te=0,re=this.qn,oe=re?+x.width:x.naturalWidth;if(re=re?+x.height:x.naturalHeight,oe===void 0&&x.videoWidth&&(oe=x.videoWidth),re===void 0&&x.videoHeight&&(re=x.videoHeight),oe=oe||b.width,re=re||b.height,oe!==0&&re!==0){var le=oe,ue=re;this.sourceRect.w()&&(z=this.Xg.x,te=this.Xg.y,oe=this.Xg.width,re=this.Xg.height);var me=oe,we=re,Ee=this.Nk,De=this.Mk;switch(Ee){case ai:if(this.sourceRect.w())break;me>=b.width&&(z=z+De.offsetX+(me*De.x-b.width*De.x)),we>=b.height&&(te=te+De.offsetY+(we*De.y-b.height*De.y)),oe=Math.min(b.width,me),re=Math.min(b.height,we);break;case ci:me=b.width,we=b.height;break;case tr:case yo:Ee===tr?(Ee=Math.min(b.height/we,b.width/me),me*=Ee,we*=Ee):Ee===yo&&(Ee=Math.max(b.height/we,b.width/me),me*=Ee,we*=Ee,me>=b.width&&(z=(z+De.offsetX+(me*De.x-b.width*De.x)/me)*oe),we>=b.height&&(te=(te+De.offsetY+(we*De.y-b.height*De.y)/we)*re),oe*=1/(me/b.width),re*=1/(we/b.height),me=b.width,we=b.height)}Ee=this.Df()*y.scale;var je=me*Ee*we*Ee,ct=oe*re/je,qe=x.__goCache;Ee=null;var Ct=xx;if(!E){if(x.sq&&qe!==void 0&&4<je&&ct>Ct*Ct)for(qe.gi===null&&(FS(qe,4,le,ue,x),FS(qe,16,le,ue,x)),E=qe.gi,le=E.length,ue=0;ue<le&&E[ue].ratio*E[ue].ratio<ct;ue++)Ee=E[ue];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new al(null).context;try{E.drawImage(this.Eg,0,0)}catch(Lt){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Lt){this.vl=!0}}if(this.vl)return}}switch(E=me<b.width?De.offsetX+(b.width*De.x-me*De.x):0,De=we<b.height?De.offsetY+(b.height*De.y-we*De.y):0,this.flip){case Eo:a.translate(Math.min(b.width,me),0),a.scale(-1,1);break;case ao:a.translate(0,Math.min(b.height,we)),a.scale(1,-1);break;case Qo:a.translate(Math.min(b.width,me),Math.min(b.height,we)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&qe!==void 0&&Ee!==null&&Ee.ratio!==1){a.save(),y=Ee.ratio;try{a.drawImage(Ee.source,z/y,te/y,Math.min(Ee.source.width,oe/y),Math.min(Ee.source.height,re/y),E,De,Math.min(b.width,me),Math.min(b.height,we)),a instanceof Uo&&(this.bt=[z/y,te/y,Math.min(Ee.source.width,oe/y),Math.min(Ee.source.height,re/y),E,De,Math.min(b.width,me),Math.min(b.height,we)])}catch(Lt){this.en=!1}a.restore()}else try{a.drawImage(x,z,te,oe,re,E,De,Math.min(b.width,me),Math.min(b.height,we)),a instanceof Uo&&(this.bt=[z,te,oe,re,E,De,Math.min(b.width,me),Math.min(b.height,we)])}catch(Lt){this.en=!1}switch(this.flip){case Eo:a.scale(-1,1),a.translate(-Math.min(b.width,me),0);break;case ao:a.scale(1,-1),a.translate(0,-Math.min(b.height,we));break;case Qo:a.scale(-1,-1),a.translate(-Math.min(b.width,me),-Math.min(b.height,we))}}}}},ru.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,z=Fl(this,!0),te=this.Eg,re=this.qn,oe=0,le=0;(re||!this.al&&te&&te.complete)&&(this.al=!0),te===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(oe=re?+te.width:te.naturalWidth,le=re?+te.height:te.naturalHeight),isFinite(E.width)||z===ci||z===lr?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:te!==null&&(a=oe)),x=0):te!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:oe),isFinite(E.height)||z===ci||z===wr?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:te!==null&&(y=le)),b=0):te!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:le),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),te===null||te.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Xi(this.dc,a,y),this.Ge(0,0,a,y)},ru.prototype.eh=function(a,y,x,b){Pl(this,a,y,x,b)},Ye.Object.defineProperties(ru.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||St("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&vg(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new _n),b!==null&&x&&oh(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()||(pt(this,!1),this.v())):x&&LS(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=hp;if(Ha){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<l0&&(fp(),x=hp),b=Jn("img"),b.hn=!0,LS(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,l0++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new NS),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}}}),ru.prototype.redraw=ru.prototype.redraw,ru.prototype.reloadSource=ru.prototype.hA;var l0=0,xx=4;ru.className="Picture",hp=new $i,ru.clearCache=fp;function NS(){this.gi=null}function FS(a,y,x,b,E){a.gi===null&&(a.gi=[]);var z=new al(null),te=z.context,re=1/y;z.width=x/y,z.height=b/y,z.width!==0&&z.height!==0&&(y=new AS(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),te.setTransform(re*x,0,0,re*x,0,0),te.yc(),te.drawImage(E,0,0),a.gi.push(y))}NS.className="PictureCacheArray";function AS(a,y){this.source=a,this.ratio=y}AS.className="PictureCacheInstance";function gp(){this.os=new xi,this.mc=null}gp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new xi,this.mc=null};function pp(a,y,x,b,E,z){a.mc=new ys,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()}gp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new To(_a);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},gp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new To(ra);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function Hh(a,y,x,b,E,z,te){var re;re===void 0&&(re=!1);var oe=new To(Hs);oe.point1X=y,oe.point1Y=x,oe.point2X=b,oe.point2Y=E,oe.endX=z,oe.endY=te,re&&oe.close(),a.mc.segments.add(oe)}function u0(a,y,x,b,E){var z;z===void 0&&(z=!1);var te=new To(Xl);te.point1X=y,te.point1Y=x,te.endX=b,te.endY=E,z&&te.close(),a.mc.segments.add(te)}gp.prototype.arcTo=function(a,y,x,b,E,z,te){z===void 0&&(z=0),te===void 0&&(te=!1);var re=new To(Ja);re.startAngle=a,re.sweepAngle=y,re.centerX=x,re.centerY=b,re.radiusX=E,re.radiusY=z!==0?z:E,te&&re.close(),this.mc.segments.add(re)};function wx(a,y,x,b,E,z,te,re){var oe;oe===void 0&&(oe=!1),y=new To(du,te,re,y,x,b,E,z),oe&&y.close(),a.mc.segments.add(y)}function DS(a){var y=c0;return y!==null?(c0=null,y.reset(a),y):(y=new gp,y.reset(a),y)}var c0=null;gp.className="StreamGeometryContext";function El(a,y){var x=a.toLowerCase(),b=en.Ze;b[a]=y,b[x]=a}El("Rectangle",function(a,y,x){a="r"+y+","+x;var b=en.Mf[a];return b!==void 0||(b=new xi(xi.u),b.endX=y,b.endY=x,en.Nf<en.vm&&(en.Mf[a]=b,en.Nf++)),b}),El("Square",function(a,y,x){a="s"+y+","+x;var b=en.Mf[a];return b!==void 0||(b=new xi(xi.u),b.endX=y,b.endY=x,b.defaultStretch=tr,en.Nf<en.vm&&(en.Mf[a]=b,en.Nf++)),b}),El("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=en.Mf[b];if(E!==void 0)return E;var z=a*en.wg;return E=new xi().add(new ys(a,0,!0).add(new To(ra,y-a,0)).add(new To(Hs,y,a,y-z,0,y,z)).add(new To(ra,y,x-a)).add(new To(Hs,y-a,x,y,x-z,y-z,x)).add(new To(ra,a,x)).add(new To(Hs,0,x-a,z,x,0,x-z)).add(new To(ra,0,a)).add(new To(Hs,a,0,0,z,z,0).close())),1<z&&(E.spot1=new Ui(0,0,z,z),E.spot2=new Ui(1,1,-z,-z)),en.Nf<en.vm&&(en.Mf[b]=E,en.Nf++),E}),El("Border","RoundedRectangle"),El("Ellipse",function(a,y,x){a="e"+y+","+x;var b=en.Mf[a];return b!==void 0||(b=new xi(xi.F),b.endX=y,b.endY=x,b.spot1=oc,b.spot2=_l,en.Nf<en.vm&&(en.Mf[a]=b,en.Nf++)),b}),El("Circle",function(a,y,x){a="c"+y+","+x;var b=en.Mf[a];return b!==void 0||(b=new xi(xi.F),b.endX=y,b.endY=x,b.spot1=oc,b.spot2=_l,b.defaultStretch=tr,en.Nf<en.vm&&(en.Mf[a]=b,en.Nf++)),b}),El("TriangleRight",function(a,y,x){return new xi().add(new ys(0,0).add(new To(ra,y,.5*x)).add(new To(ra,0,x).close())).pm(0,.25,.5,.75)}),El("TriangleDown",function(a,y,x){return new xi().add(new ys(0,0).add(new To(ra,y,0)).add(new To(ra,.5*y,x).close())).pm(.25,0,.75,.5)}),El("TriangleLeft",function(a,y,x){return new xi().add(new ys(y,x).add(new To(ra,0,.5*x)).add(new To(ra,y,0).close())).pm(.5,.25,1,.75)}),El("TriangleUp",function(a,y,x){return new xi().add(new ys(y,x).add(new To(ra,0,x)).add(new To(ra,.5*y,0).close())).pm(.25,.5,.75,1)}),El("Triangle","TriangleUp"),El("Diamond",function(a,y,x){return new xi().add(new ys(.5*y,0).add(new To(ra,0,.5*x)).add(new To(ra,.5*y,x)).add(new To(ra,y,.5*x).close())).pm(.25,.25,.75,.75)}),El("LineH",function(a,y,x){return a=new xi(xi.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),El("LineV",function(a,y,x){return a=new xi(xi.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),El("None","Rectangle"),El("BarH","Rectangle"),El("BarV","Rectangle"),El("MinusLine","LineH"),El("PlusLine",function(a,y,x){return new xi().add(new ys(0,x/2,!1).add(new To(ra,y,x/2)).add(new To(_a,y/2,0)).add(new To(ra,y/2,x)))}),El("XLine",function(a,y,x){return new xi().add(new ys(0,x,!1).add(new To(ra,y,0)).add(new To(_a,0,0)).add(new To(ra,y,x)))}),El("LineRight",function(a,y,x){return new xi().add(new ys(.25*y,0,!1).add(new To(ra,.75*y,.5*x)).add(new To(ra,.25*y,x)))}),El("LineDown",function(a,y,x){return new xi().add(new ys(0,.25*x,!1).add(new To(ra,.5*y,.75*x)).add(new To(ra,y,.25*x)))}),El("LineLeft",function(a,y,x){return new xi().add(new ys(.75*y,0,!1).add(new To(ra,.25*y,.5*x)).add(new To(ra,.75*y,x)))}),El("LineUp",function(a,y,x){return new xi().add(new ys(0,.75*x,!1).add(new To(ra,.5*y,.25*x)).add(new To(ra,y,.75*x)))}),en.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 $v(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=ta,this.ir=null,this.jr="",this.lr=Vo,this.Gq="",this.Hq=Ba,this.Pq=lo,this.Kq=jr,this.Up=null,this.Cq=127,this.zr=vo,this.yr="gray",this.Vg=4}$v.prototype.copy=function(){var a=new $v;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 mr(a,y){a===void 0||a instanceof Es||typeof a=="string"?hi.call(this,a):(hi.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 Qe(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new _t,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Kt(mr,hi),mr.prototype.cloneProtected=function(a){hi.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Le=mr.prototype,Le.Af=function(a){hi.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Le.toString=function(){var a=Zn(this.constructor)+"#"+br(this);return this.data!==null&&(a+="("+Qn(this.data)+")"),a};function ou(a){a.P===null?a.P=new $v:a.P.nc&&(a.P=a.P.copy())}Le.th=function(){hi.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Le.gk=function(a,y,x,b,E,z,te){var re=this.diagram;re!==null&&(a===Va&&y==="elements"?E instanceof hi?Yf(E,function(oe){vy(re.partManager,oe),kh(re,oe)}):oh(re,E):a===cs&&y==="elements"&&(E instanceof hi?Yf(E,function(oe){yy(re.partManager,oe,re)}):vg(re,E)),re.cb(a,y,x,b,E,z,te))},Le.La=function(a){if(hi.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 hi&&Yf(E,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},mr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},mr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},mr.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 Ii),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)))}}},mr.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)}},mr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Sn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Gn(y)}},mr.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}e:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof Yr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof jo))break e;hc(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=hi.Link),x.adornedObject=y)}if(x!==null){x.type===hi.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},mr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Kv(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 d0(a){if(mf(a)===!1){Uv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function BS(a){if(a.G|=2097152,mf(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||IS(a,y,x),x=a.Ib;var b=_t.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),_t.free(b),Uv(a,!1)}}mr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new ro);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),this.Lb=z,z.ws()||z.pp(E)},mr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=wo;this.locationSpot.sb()&&(z=this.locationSpot);var te=Qe.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,te.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(te),te.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(te),te.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else te.yi(y,x,b,E,z);a.rotate(this.Kb,te.x,te.y),Qe.free(te)}},mr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},mr.prototype.moveTo=function(a,y,x){a=Qe.allocAt(a,y),this.move(a,x),Qe.free(a)},mr.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())},mr.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())},mr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Ii),y.I(a)!==null)return y.I(a);var x=hi.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Zh(a,y,x,b){b===void 0&&(b=new Qe),x=x.Mc()?wo: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}mr.prototype.mi=function(a){return a===void 0&&(a=new _t),a.assign(this.actualBounds)},mr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function TS(a){var y=Qe.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof io?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 qf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=cS(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 te=a.shadowBlur;return a=a.shadowOffset,z+=te,y+=te,b-=te/2,E-=te/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}mr.prototype.arrange=function(){if(Bt(this)===!1)BS(this);else{Vt(this,!1);var a=this.Ib,y=_t.alloc();y.assign(a);var x=vf(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;IS(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()||en.B(y.width,a.width)&&en.B(y.height,a.height)||0<=this.vw&&this.C(16),_t.free(y),Uv(this,!1)}},Le=mr.prototype,Le.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=_t.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),_t.free(E)}!(this.G&65536)&&a.D(y)||jS(this,b,x),x.N(),!a.w()&&!y.w()||Zi(a,y)||(this instanceof Di&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Le.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&kS(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 Qe(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),mf(this)===!1&&Bt(this)===!1&&(d0(this),BS(this)),!0};function kS(a,y,x,b,E){y===null||a instanceof jo||(y=y.animationManager,y.zb&&uc(y,a,new Qe(b,E),x))}Le.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;mf(this)||Bt(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)}d0(this)},Le.Av=function(){this.G&=-2097153,d0(this)};function IS(a,y,x){var b=TS(a),E=a.diagram,z=x.w(),te=y.w();z&&te?a.G&2097152?OS(a,y,x,E,b):RS(a,y,x,E,b):z?OS(a,y,x,E,b):te&&RS(a,y,x,E,b),a.G|=2097152,Qe.free(b),a.Uk()}function OS(a,y,x,b,E){var z=y.x,te=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 jo||uc(x,a,new Qe(z,te),y),b||y.x===z&&y.y===te||a.g("position",new Qe(z,te),y.copy()))}function RS(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 jS(a,y,x){_v(a,!1),a instanceof Di&&sh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?vf(a)?(or(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Le.si=function(){return!0},Le.Zc=function(){return!0},Le.ph=function(){return!1},Le.Dd=function(){return!0};function Vv(a,y,x,b){y.constructor===a.constructor||ZS||(ZS=!0,Si('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Si(" Old class: "+Zn(a.constructor)+", new class: "+Zn(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var z=a.isSelected,te=a.isHighlighted,re=!0,oe=!0,le=!1;a instanceof Di&&(re=a.isTreeLeaf,oe=a.isTreeExpanded,le=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=te?a.G|524288:a.G&-524289,a instanceof Di&&(a.U=re?a.U|4:a.U&-5,a.U=oe?a.U|1:a.U&-2,a.U=le?a.U|2:a.U&-3),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)}mr.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},mr.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},mr.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},mr.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},mr.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},mr.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},mr.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},mr.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},mr.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 mf(a){return(a.G&32768)!==0}function Uv(a,y){a.G=y?a.G|32768:a.G&-32769}function _v(a,y){a.G=y?a.G|65536:a.G&-65537}function vf(a){return(a.G&131072)!==0}Le=mr.prototype,Le.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function h0(a,y){a.G=y?a.G|1048576:a.G&-1048577}Le.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Le.N=function(){var a=this.diagram;a!==null&&!Bt(this)&&!mf(this)&&this.isVisible()&&this.Ib.w()&&a.N(qf(this,this.Ib))},Le.v=function(){hi.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Di&&this.labeledLink!==null&&bl(this.labeledLink),a.$b(!0))},Le.Vo=function(a){a||(a=this.Ah,a!==null&&ey(a,this))},Le.Wo=function(a){a||(a=this.Ah,a!==null&&ty(a,this))},Le.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Le.oz=function(){return Xv(this,this)};function Xv(a,y){var x=y.containingGroup;return x!==null?1+Xv(a,x):y instanceof Di&&(y=y.labeledLink,y!==null)?Xv(a,y):0}Le.sz=function(){return zS(this,this)};function zS(a,y){var x=y.containingGroup;return x!==null||y instanceof Di&&(x=y.labeledLink,x!==null)?zS(a,x):y}Le.Td=function(a){return a instanceof Yr?Yv(this,this,a):!1};function Yv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Yv(a,b,x)?y instanceof Di&&(y=y.labeledLink,y!==null)?Yv(a,y,x):!1:!0}Le.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Yr&&h0(y,!0),y instanceof Di){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 Di&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Yr&&h0(y,!1),y instanceof Di&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},mr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Di&&this.isLinkLabel)},mr.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 Di&&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 HS(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function yf(a,y,x,b,E,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof jo)){if(a.add(y),y instanceof Di){if(x&&y instanceof Yr)for(var te=y.memberParts;te.next();)yf(a,te.value,x,b,E,z);if(E!==!1)for(te=y.linksConnected;te.next();){var re=te.value;if(!a.contains(re)){var oe=re.fromNode,le=re.toNode;oe=oe===null||a.contains(oe),le=le===null||a.contains(le),(E?oe&&le:oe||le)&&yf(a,re,x,b,E,z)}}if(1<b)for(y=y.Ou();y.next();)yf(a,y.value,x,b-1,E,z)}else if(y instanceof vi)for(y=y.labelNodes;y.next();)yf(a,y.value,x,b,E,z)}}Ye.Object.defineProperties(mr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?pr: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(cs,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(Va,"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&&(ou(this),this.P.zq=a,this.g("layerChanged",y,a))}},zOrder:{get:function(){return this.Ao},set:function(a){var y=this.Ao;if(y!==a){this.Ao=a;var x=this.layer;x!==null&&zu(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof jo?this.type!==hi.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:lo},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),ou(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:jr},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),ou(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&&(ou(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:Ba},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),ou(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,Bt(this)===!1&&(d0(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)),kS(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 jo)){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 jo?this instanceof jo&&(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&&(hc(x),x=x.copy(),x!==null&&Vv(this,x,y,a))):(z!==null&&z.jm(b,a),x=h1(x.partManager,b,a),x!==null&&(hc(x),x=x.copy(),x===null||x instanceof vi||(b=this.location.copy(),Vv(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){Vv(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&&(ou(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&&(ou(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&&(ou(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 vi?(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&&(ou(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&&(ou(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&&(ou(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:ta},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),ou(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&&(ou(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&&(ou(this),this.P.jr=a,this.g("rotateObjectName",y,a))}},rotateObject:{get:function(){var a=this.rotateObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},rotationSpot:{get:function(){return this.P!==null?this.P.lr:Vo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),ou(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&St("Cannot make a Group a member of itself: "+this.toString()),St("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?ty(y,this):this instanceof Yr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ey(a,this):this instanceof Yr&&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 Yr){for(x=new _n,yf(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Di)for(b=b.linksConnected;b.next();)mp(b.value)}if(this instanceof Di){for(x=this.linksConnected;x.next();)mp(x.value);x=this.labeledLink,x!==null&&mp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&zu(y,-1,a))}}else St("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(ou(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Di&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(ou(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&&(ou(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:vo},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),ou(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&&(ou(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&&(ou(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),mr.prototype.invalidateLayout=mr.prototype.C,mr.prototype.findCommonContainingGroup=mr.prototype.px,mr.prototype.isMemberOf=mr.prototype.Td,mr.prototype.findTopLevelPart=mr.prototype.sz,mr.prototype.findSubGraphLevel=mr.prototype.oz,mr.prototype.ensureBounds=mr.prototype.Va,mr.prototype.getDocumentBounds=mr.prototype.mi,mr.prototype.findObject=mr.prototype.fb,mr.prototype.moveTo=mr.prototype.moveTo,mr.prototype.invalidateAdornments=mr.prototype.Wb,mr.prototype.clearAdornments=mr.prototype.Ej,mr.prototype.removeAdornment=mr.prototype.Jf,mr.prototype.addAdornment=mr.prototype.bh,mr.prototype.findAdornment=mr.prototype.Pj,mr.prototype.updateTargetBindings=mr.prototype.La;var ZS=!1;mr.className="Part",mr.LayoutNone=0,mr.LayoutAdded=1,mr.LayoutRemoved=2,mr.LayoutShown=4,mr.LayoutHidden=8,mr.LayoutNodeSized=16,mr.LayoutGroupLayout=32,mr.LayoutNodeReplaced=64,mr.LayoutStandard=127,mr.LayoutAll=16777215;function jo(a,y){a===void 0||a instanceof Es||typeof a=="string"?mr.call(this,a):(mr.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)}Kt(jo,mr),jo.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},jo.prototype.updateRelationshipsFromData=function(){},jo.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof vi&&y instanceof io){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 io&&(E.ua=a)}}},jo.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Bt(a))},jo.prototype.Zc=function(){return!1},jo.prototype.gk=function(a,y,x,b,E,z,te){if(a===Va&&y==="elements"){if(E instanceof Hl)this.$a===null&&(this.$a=E);else if(E instanceof hi){var re=E.Nl(function(oe){return oe instanceof Hl});re instanceof Hl&&this.$a===null&&(this.$a=re)}}else a===cs&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof hi&&this.$a.rg(b)&&(this.$a=null));mr.prototype.gk.call(this,a,y,x,b,E,z,te)},jo.prototype.updateAdornments=function(){},jo.prototype.Lj=function(){},Ye.Object.defineProperties(jo.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}}}),jo.className="Adornment";function Jv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Ys,this.er=p0,this.Kr=this.ij=this.Nq=this.Mq=null}Jv.prototype.copy=function(){var a=new Jv;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 Di(a,y){a===void 0||a instanceof Es||typeof a=="string"?mr.call(this,a):(mr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Rn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Kt(Di,mr),Di.prototype.cloneProtected=function(a){mr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Le=Di.prototype,Le.Af=function(a){mr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Wh(a){a.Ba===null?a.Ba=new Jv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Le.th=function(){mr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function WS(a,y){y!==null&&(a.af===null&&(a.af=new _n),a.af.add(y))}function GS(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}Le.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=GS(this,a,y,x),a!==null&&a.Sl()},Le.gk=function(a,y,x,b,E,z,te){a===Va&&y==="elements"?this.wc=null:a===cs&&y==="elements"&&(this.wc=null),mr.prototype.gk.call(this,a,y,x,b,E,z,te)},Le.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Bu(x.fromPort),Bu(x.toPort),x.bb())}};function $S(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Bu(x.fromPort),Bu(x.toPort),x.bb())}}function Bu(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Bu(y.port)}}Le.si=function(){return!0},Di.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Di.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Di.prototype.isVisible=function(){if(!mr.prototype.isVisible.call(this))return!1;var a=!0,y=hd,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===hd){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===ts){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===ch&&(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},Di.prototype.Zb=function(a){mr.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)}},Di.prototype.qx=function(){var a=new _n,y=new _n;return KS(this,this,a,y),y.iterator};function KS(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(te){te.isTreeLink?(E?te.fromNode===y:te.toNode===y)&&KS(a,E?te.toNode:te.fromNode,x,b):b.add(te)})}}Di.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Vi(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},Le=Di.prototype,Le.Mo=function(a){a===void 0&&(a=null);var y=new Vi(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},Le.Sd=function(a){a===void 0&&(a=null);var y=new Vi(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},Le.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 _n,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 _n,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new hr(x):pr},Le.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 _n,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new hr(x):pr},Le.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 _n,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new hr(x):pr},Le.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Vi(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},Le.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Vi(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 f0(a,y,x){Bu(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,te=a.diagram;te!==null&&(z=te.aa,te.aa=!0),E(a,y,x),te!==null&&(te.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 g0(a,y,x){Bu(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 te=!0;E!==null&&(te=E.aa,E.aa=!0),z(a,y,x),E!==null&&(E.aa=te)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):Qp(y)))}function Qp(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}Di.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Le=Di.prototype,Le.Vo=function(a){mr.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&e1(a,this))},Le.Wo=function(a){mr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Le.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,mr.prototype.Lj.call(this)},Le.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;VS(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function VS(a){a.wc===null?a.wc=new Ii:a.wc.clear(),a.qm(a,function(y,x){US(y,x)}),a.wc.count===0&&a.wc.add("",a)}function US(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Qv(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=Sn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Gn(x)}}}Le.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var 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},Le.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var 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}},Le.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)h0(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;)h0(y,!1),y=y.pg();return x},Le.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},Le.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Di)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},Le.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new _n;return a(this,y),y},Le.uz=function(){return _S(this,this)};function _S(a,y){return y=y.pg(),y===null?0:1+_S(a,y)}Le.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Vi(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},Le.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 Rn,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 Rn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new hr(x):pr},Le.wz=function(a){a===void 0&&(a=1/0);var y=new _n;return yf(y,this,!1,a,!0),y},Di.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 _n;x.add(this),XS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===hd),y.Ue=!1}};function XS(a,y,x,b,E,z,te){if(1<b)for(var re=x?a.Mo():a.Sd();re.next();){var oe=re.value;oe.isTreeLink&&(oe=oe.To(a),oe===null||oe===a||y.contains(oe)||(y.add(oe),XS(oe,y,x,b-1,E,z,te)))}else YS(a,y,x,E,z,te)}function YS(a,y,x,b,E,z){for(var te=E===a?!0:a.isTreeExpanded,re=x?a.Mo():a.Sd(),oe={};re.next();){var le=re.value;if(le.isTreeLink&&(le=le.To(a),le!==null&&le!==a)){var ue=y.contains(le);if(ue||y.add(le),te){var me=x?le.Oo():le.Po();oe.uv=a,me.all(function(we){return function(Ee){return Ee===we.uv||!Ee.isTreeExpanded}}(oe))&&b.Aj(le,E),le.oh(),le.Zb(!1)}le.isTreeExpanded&&(le.wasTreeExpanded=le.isTreeExpanded,ue||YS(le,y,x,b,E,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}Di.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 _n;x.add(this),JS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===hd),y.Ue=!1}};function JS(a,y,x,b,E,z,te){for(var re=z===a?!1:a.isTreeExpanded,oe=x?a.Mo():a.Sd(),le={};oe.next();){var ue=oe.value;if(ue.isTreeLink&&(re||ue.fd||ue.bb(),ue=ue.To(a),ue!==null&&ue!==a&&!y.contains(ue))){if(y.add(ue),!re){ue.Zb(!0),ue.oh();var me=x?ue.Oo():ue.Po();le.vv=a,me.all(function(we){return function(Ee){return Ee===we.vv||!Ee.isTreeExpanded}}(le))&&E.Cj(ue,z)}(2<b||ue.wasTreeExpanded)&&(ue.wasTreeExpanded=!1,JS(ue,y,x,b-1,E,z,te))}le={vv:le.vv}}a.isTreeExpanded=!0}Ye.Object.defineProperties(Di.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:p0},set:function(a){var y=this.portSpreading;y!==a&&(Wh(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&&sh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Ys},set:function(a){typeof a=="number"&&(a=new Oi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Wh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&sh(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&&(Wh(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&&(Wh(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&&(Wh(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 te=z.wa(b);te!==void 0&&z.Qx(E,te)}}this.containingGroup=null}this.Yk=a,a!==null&&(e1(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),bl(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&VS(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&&(Wh(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))}}}),Di.prototype.expandTree=Di.prototype.expandTree,Di.prototype.collapseTree=Di.prototype.collapseTree,Di.prototype.findTreeParts=Di.prototype.wz,Di.prototype.findTreeChildrenNodes=Di.prototype.Ou,Di.prototype.findTreeChildrenLinks=Di.prototype.Qo,Di.prototype.findTreeLevel=Di.prototype.uz,Di.prototype.findTreeParentChain=Di.prototype.vz,Di.prototype.findTreeParentNode=Di.prototype.pg,Di.prototype.findTreeParentLink=Di.prototype.kh,Di.prototype.findCommonTreeParent=Di.prototype.gz,Di.prototype.findTreeRoot=Di.prototype.xz,Di.prototype.isInTreeOf=Di.prototype.Nz,Di.prototype.findPort=Di.prototype.ns,Di.prototype.findLinksTo=Di.prototype.kz,Di.prototype.findLinksBetween=Di.prototype.jz,Di.prototype.findNodesInto=Di.prototype.Oo,Di.prototype.findNodesOutOf=Di.prototype.Po,Di.prototype.findNodesConnected=Di.prototype.Mu,Di.prototype.findLinksInto=Di.prototype.Sd,Di.prototype.findLinksOutOf=Di.prototype.Mo,Di.prototype.findExternalTreeLinksConnected=Di.prototype.qx,Di.prototype.invalidateConnectedLinks=Di.prototype.Bd,Di.prototype.invalidateLinkBundle=Di.prototype.Lz;var bx=new gn(Di,"SpreadingNone",10),p0=new gn(Di,"SpreadingEvenly",11),qv=new gn(Di,"SpreadingPacked",12);Di.className="Node",Di.SpreadingNone=bx,Di.SpreadingEvenly=p0,Di.SpreadingPacked=qv;function Yr(a,y){a===void 0||a instanceof Es||typeof a=="string"?Di.call(this,a):(Di.call(this),a&&(y=a)),this.U|=4608,this.Gn=new _n,this.$a=null,this.Sc=new Ma,this.Sc.group=this,this.gl=new _n,this.tb=this.$p=null,y&&Object.assign(this,y)}Kt(Yr,Di),Yr.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Hl});y instanceof Hl?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},Le=Yr.prototype,Le.Af=function(a){Di.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 Di)x.Bd(y);else if(x instanceof vi)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Le.gk=function(a,y,x,b,E,z,te){if(a===Va&&y==="elements"){if(E instanceof Hl)this.$a===null?this.$a=E:this.$a!==E&&St("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof hi){var re=E.Nl(function(oe){return oe instanceof Hl});re instanceof Hl&&(this.$a===null?this.$a=re:this.$a!==re&&St("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===cs&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof hi&&this.$a.rg(b)&&(this.$a=null));Di.prototype.gk.call(this,a,y,x,b,E,z,te)},Le.Xl=function(a,y){Di.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==hi.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof hi&&(a=a.Pb()),this.tb===null&&(this.tb=new _t),a.mi(this.tb),a instanceof io&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Le.eh=function(a,y,x,b){this.nf=this.$a,Di.prototype.eh.call(this,a,y,x,b)},Le.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof vi||y.Va()}),Di.prototype.Va.call(this)},Le.si=function(){if(!Di.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Di){if(y.isVisible()&&Bt(y))return!1}else if(y instanceof vi&&y.isVisible()&&Bt(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ey(a,y){if(a.Gn.add(y)){y instanceof Yr&&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 vi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function ty(a,y){if(a.Gn.remove(y)){y instanceof Yr&&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 vi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Le.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}Di.prototype.Lj.call(this)},Yr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=zn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Yr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=zn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Yr.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},Le=Yr.prototype,Le.Bd=function(a){var y=(this.U&65536)!==0;if(Di.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()?(Bu(x.fromPort),Bu(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Bu(x.fromPort),Bu(x.toPort),x.bb()))}}},Le.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new _n,b=y.iterator;b.next();){var E=b.value;if(E instanceof Di)for(E=E.linksConnected;E.next();){var z=E.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Le.iz=function(){var a=this.Rj();a.add(this);for(var y=new _n,x=a.iterator;x.next();){var b=x.value;if(b instanceof Di)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},Le.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new _n;return a(this,y),y},Le.Rj=function(){var a=new _n;return yf(a,this,!0,0,!0),a.remove(this),a},Le.Zb=function(a){Di.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Yr.prototype.collapseSubGraph=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(!1),z instanceof Yr&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,QS(z,y,x,b)),z instanceof Di)z.Bd(y),x.Aj(z,b);else if(z instanceof vi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}Yr.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 Yr&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,qS(z,y,x,b)),z instanceof Di)z.Bd(y),x.Cj(z,b);else if(z instanceof vi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}Yr.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=Qe.alloc(),Di.prototype.move.call(this,a,y),a=new _n,y=this.Rj().iterator;y.next();)E=y.value,E instanceof vi&&(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 Di&&E.isLinkLabel)){var te=E.position,re=E.location;te.w()?(z.x=te.x+b,z.y=te.y+x,E.position=z):re.w()&&(z.x=re.x+b,z.y=re.y+x,E.location=z)}for(y.reset();y.next();)E=y.value,E instanceof vi&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(te=E.position,z.x=te.x+b,z.y=te.y+x,z.w()?E.move(z):E.bb(),iy(E)&&E.bb());Qe.free(z)}},Ye.Object.defineProperties(Yr.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&St("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(Wh(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&&(Wh(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&&(Wh(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&&(Wh(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)}}}),Yr.prototype.expandSubGraph=Yr.prototype.expandSubGraph,Yr.prototype.collapseSubGraph=Yr.prototype.collapseSubGraph,Yr.prototype.findSubGraphParts=Yr.prototype.Rj,Yr.prototype.findContainingGroupChain=Yr.prototype.hz,Yr.prototype.findExternalNodesConnected=Yr.prototype.iz,Yr.prototype.findExternalLinksConnected=Yr.prototype.Lu,Yr.prototype.ensureBounds=Yr.prototype.Va,Yr.className="Group";function Hl(a){Qt.call(this),this.yb=Ls,this.ko=new _t(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Kt(Hl,Qt),Hl.prototype.cloneProtected=function(a){Qt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Hl.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Pr(0,0,y.width,y.height,a.x,a.y)},Hl.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Yr||a instanceof jo)||St("Placeholder is not inside a Group or Adornment."),a instanceof Yr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Xi(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=Qe.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Qe.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 te=0;z instanceof io&&(te=z.strokeWidth);var re=z.Df(),oe=z.naturalBounds,le=(oe.width+te)*re;te=(oe.height+te)*re,a.type!==hi.Link&&(re=z.ga(a.category==="Selection"?Ba:a.locationSpot,Qe.alloc()),a.location=re,Qe.free(re)),isNaN(le)||isNaN(te)?(a=z.ga(Ba,Qe.alloc()),le=_t.allocAt(a.x,a.y,0,0),le.Ye(z.ga(vl,a)),le.Ye(z.ga(su,a)),le.Ye(z.ga(Ml,a)),Xi(y,le.width+b||0,le.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Qe.free(a),_t.free(le)):(Xi(y,le+b||0,te+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Hl.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Hl.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Yr&&!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=_t.alloc(),E=this.computeMemberBounds(x);var z=this.yb;return y instanceof Yr&&!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)),_t.free(x),b&&y instanceof Yr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Hl.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Yr))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,te=y.memberParts;te.next();){var re=te.value;if(re.isVisible()){if(re instanceof vi&&(!y.computesBoundsIncludingLinks||vt(re)||re.fromNode===y||re.toNode===y))continue;re=re.actualBounds,re.left<x&&(x=re.left),re.top<b&&(b=re.top),re.right>E&&(E=re.right),re.bottom>z&&(z=re.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},Ye.Object.defineProperties(Hl.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Oi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Hl.className="Placeholder";function vi(a){mr.call(this,hi.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Zl,this.Om=0,this.Qm=Zl,this.Rm=NaN,this.qj=ay,this.po=.5,this.wd=null,this.Nb=new Rn().freeze(),this.Tg=this.Mg=null,this.ml=new _t,this.ua=new xi,this.u=this.o=this.Sf=this.Wf=null,this.su=new Qe,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Kt(vi,mr),vi.prototype.cloneProtected=function(a){mr.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},Le=vi.prototype,Le.Af=function(a){mr.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&&Bu(y),a=a.toPort,a!==null&&Bu(a)},Le.qb=function(a){a.classType===vi?(a.value&2)===2?this.routing=a:a===$u||a===$h||a===yp?this.curve=a:a===tm||a===P0||a===w0?this.adjusting=a:a!==ay&&a!==Zl&&St("Unknown Link enum value for a Link property: "+a):mr.prototype.qb.call(this,a)},Le.Xc=function(){this.ba===null&&(this.ba=new to)},Le.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Bt(a)||mf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Bt(a)||mf(a)))},Le.zv=function(){return!1},Le.Av=function(){},Le.Zc=function(){return!1},vi.prototype.computeAngle=function(a,y,x){return vi.computeAngle(y,x)},vi.computeAngle=function(a,y){switch(a){default:case Zl:a=0;break;case nm:a=y;break;case im:a=y+90;break;case rm:a=y-90;break;case sy:a=y+180;break;case C0:a=en.bp(y),90<a&&270>a&&(a-=180);break;case om:a=en.bp(y+90),90<a&&270>a&&(a-=180);break;case am:a=en.bp(y-90),90<a&&270>a&&(a-=180);break;case b0:if(a=en.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return en.bp(a)};function mp(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&&ty(x,a),a.Ah=y,y!==null&&ey(y,a);var E=a.containingGroupChanged;if(E!==null){var z=!0,te=a.diagram;te!==null&&(z=te.aa,te.aa=!0),E(a,x,y),te!==null&&(te.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}Le=vi.prototype,Le.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&mr.prototype.oh.call(this)},Le.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Le.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function e1(a,y){a.wd===null&&(a.wd=new _n),a.wd.add(y),a.v()}Le.Vo=function(a){if(mr.prototype.Vo.call(this,a),eg(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,f0(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||f0(x,this,b)}qp(this)}},Le.Wo=function(a){if(mr.prototype.Wo.call(this,a),eg(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,g0(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||g0(x,this,b)}em(this)}},Le.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},vi.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},vi.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?mr.prototype.move.call(this,a,!1):(a=Qe.allocAt(x.x+b,x.y+E),mr.prototype.move.call(this,a,!1),Qe.free(a)),Gh(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},vi.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},vi.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},vi.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(po),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()===$u))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()===$u){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return en.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),en.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 te=this.flattenedLengths;for(x=this.flattenedTotalLength,E=z=b=0;b<x/2&&z<y&&(E=te[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},vi.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()===$u))return this.ua.wx(.5);if(this.computeCurve()===$u&&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),en.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)},Le=vi.prototype,Le.i=function(a){return this.Nb.s[a]},Le.dd=function(a,y){this.Nb.cd(a,y)},Le.L=function(a,y,x){this.Nb.cd(a,new Qe(y,x))},Le.Kz=function(a,y){this.Nb.Gb(a,y)},Le.m=function(a,y,x){this.Nb.Gb(a,new Qe(y,x))},Le.ne=function(a){this.Nb.add(a)},Le.yf=function(a,y){this.Nb.add(new Qe(a,y))},Le.pv=function(a){this.Nb.mb(a)},Le.Fj=function(){this.Nb.clear()};function Gh(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 Rn,z=a.Nb.iterator;z.next();){var te=z.value;E.add(new Qe(te.x+y,te.y+x).freeze())}E.freeze(),z=a.Nb,a.Nb=E,te=a.diagram,isNaN(y)||isNaN(x)||te!==null&&te.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),bl(a)),b?m0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),te!==null&&te.animationManager.zb&&da(te.animationManager,a,E),a.g("points",z,E)}}Le.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Le.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,z=E.length,te=0;te<z;te++){var re=E[te];x=Math.min(re.x,x),b=Math.min(re.y,b)}re=te=1/0;for(var oe=y.s,le=oe.length,ue=0;ue<le;ue++){var me=oe[ue];te=Math.min(me.x,te),re=Math.min(me.y,re),me.freeze()}if(y.freeze(),le===z){for(z=0;z<le;z++)if(ue=E[z],me=oe[z],ue.x-x!==me.x-te||ue.y-b!==me.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&da(x.animationManager,this,y),m0(this),this.g("points",a,y)}},Le.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function m0(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),x0(a,!1))}Le.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},Le.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},vi.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Ig||(Ig=new Di,Ig.desiredSize=Tr,Ig.Va()),this.defaultFromPoint&&(Ig.location=this.defaultFromPoint,Ig.Va(),y=a=Ig)):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?(Og||(Og=new Di,Og.desiredSize=Tr,Og.Va()),this.defaultToPoint&&(Og.location=this.defaultToPoint,Og.Va(),E=b=Og)):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,te=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var re=vp(te),oe=vp(x),le=y===E&&y!==null,ue=this.isOrthogonal,me=this.curve===$u;this.Wf=le&&!ue?me=!0:!1;var we=this.computeAdjusting()===Zl||le;if(!ue&&!le&&re&&oe){if(re=!1,!we&&3<=z&&(we=this.getLinkPoint(a,y,te,!0,!1,b,E),oe=this.getLinkPoint(b,E,x,!1,!1,a,y),re=this.adjustPoints(0,we,z-1,oe))&&(we=this.getLinkPoint(a,y,te,!0,!1,b,E),oe=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,we,z-1,oe)),!re)if(this.Fj(),me){z=this.getLinkPoint(a,y,te,!0,!1,b,E),we=this.getLinkPoint(b,E,x,!1,!1,a,y),re=we.x-z.x,oe=we.y-z.y,le=this.computeCurviness(),me=ue=0;var Ee=z.x+re/3,De=z.y+oe/3,je=Ee,ct=De;en.B(oe,0)?ct=0<re?ct-le:ct+le:(ue=-re/oe,me=Math.sqrt(le*le/(ue*ue+1)),0>le&&(me=-me),je=(0>oe?-1:1)*me+Ee,ct=ue*(je-Ee)+De),Ee=z.x+2*re/3,De=z.y+2*oe/3;var qe=Ee,Ct=De;en.B(oe,0)?Ct=0<re?Ct-le:Ct+le:(qe=(0>oe?-1:1)*me+Ee,Ct=ue*(qe-Ee)+De),this.Fj(),this.ne(z),this.yf(je,ct),this.yf(qe,Ct),this.ne(we),this.dd(0,this.getLinkPoint(a,y,te,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else z=b,we=E,b=this.getLinkPoint(a,y,te,!0,!1,z,we),E=this.getLinkPoint(z,we,x,!1,!1,a,y),this.hasCurviness()?(we=E.x-b.x,x=E.y-b.y,te=this.computeCurviness(),a=b.x+we/2,y=b.y+x/2,z=a,re=y,en.B(x,0)?re=0<we?re-te:re+te:(we=-we/x,z=Math.sqrt(te*te/(we*we+1)),0>te&&(z=-z),z=(0>x?-1:1)*z+a,re=we*(z-a)+y),this.ne(b),this.yf(z,re),this.ne(E)):(this.ne(b),this.ne(E),re=_t.alloc(),y.mi(re),oe=re.ca(E),we.mi(re),le=re.ca(b),(oe||le)&&(te=y.ga(y0(te),new Qe),this.dd(0,this.getLinkPointFromPoint(a,y,te,E,!0,te)),x=we.ga(y0(x),new Qe),this.dd(1,this.getLinkPointFromPoint(z,we,x,b,!1,x))),_t.free(re))}else{me=this.isAvoiding,we&&(ue&&me||le)&&this.Fj();var Lt=le?this.computeCurviness():0;me=this.getLinkPoint(a,y,te,!0,ue,b,E),Ee=je=De=0,(ue||!re||le)&&(ct=this.computeEndSegmentLength(a,y,te,!0),Ee=this.getLinkDirection(a,y,me,te,!0,ue,b,E),le&&(re||te.D(x)||!ue&&te.x+x.x===1&&te.y+x.y===1)&&(Ee-=ue?90:30,0>Lt&&(Ee-=180)),0>Ee?Ee+=360:360<=Ee&&(Ee-=360),le&&(ct+=Math.abs(Lt)*(ue?1:2)),Ee===0?De=ct:Ee===90?je=ct:Ee===180?De=-ct:Ee===270?je=-ct:(De=ct*Math.cos(Ee*Math.PI/180),je=ct*Math.sin(Ee*Math.PI/180)),te.Mc()&&le&&(ct=y.ga(wo,Qe.alloc()),qe=Qe.allocAt(ct.x+1e3*De,ct.y+1e3*je),this.getLinkPointFromPoint(a,y,ct,qe,!0,me),Qe.free(ct),Qe.free(qe))),ct=this.getLinkPoint(b,E,x,!1,ue,a,y);var Rt=Ct=qe=0;if(ue||!oe||le){var Jt=this.computeEndSegmentLength(b,E,x,!1);Rt=this.getLinkDirection(b,E,ct,x,!1,ue,a,y),le&&(oe||te.D(x)||!ue&&te.x+x.x===1&&te.y+x.y===1)&&(Rt+=ue?0:30,0>Lt&&(Rt+=180)),0>Rt?Rt+=360:360<=Rt&&(Rt-=360),le&&(Jt+=Math.abs(Lt)*(ue?1:2)),Rt===0?qe=Jt:Rt===90?Ct=Jt:Rt===180?qe=-Jt:Rt===270?Ct=-Jt:(qe=Jt*Math.cos(Rt*Math.PI/180),Ct=Jt*Math.sin(Rt*Math.PI/180)),x.Mc()&&le&&(x=E.ga(wo,Qe.alloc()),te=Qe.allocAt(x.x+1e3*qe,x.y+1e3*Ct),this.getLinkPointFromPoint(b,E,x,te,!1,ct),Qe.free(x),Qe.free(te))}x=me,(ue||!re||le)&&(x=new Qe(me.x+De,me.y+je)),te=ct,(ue||!oe||le)&&(te=new Qe(ct.x+qe,ct.y+Ct)),!we&&!ue&&re&&3<z&&this.adjustPoints(0,me,z-2,te)?this.dd(z-1,ct):!we&&!ue&&oe&&3<z&&this.adjustPoints(1,x,z-1,ct)?this.dd(0,me):!we&&(ue?6<=z:4<z)&&this.adjustPoints(1,x,z-2,te)?(this.dd(0,me),this.dd(z-1,ct)):(this.Fj(),this.ne(me),(ue||!re||le)&&this.ne(x),ue&&this.addOrthoPoints(x,Ee,te,Rt,a,b),(ue||!oe||le)&&this.ne(te),this.ne(ct))}return!0};function ny(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}vi.prototype.getLinkPointFromPoint=function(a,y,x,b,E,z){if(z===void 0&&(z=new Qe),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 te=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),te=a.m22*E;var re=-a.m12*E,oe=-a.m21*E,le=a.m11*E,ue=E*(a.m21*a.dy-a.m22*a.dx),me=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*te+b.y*oe+ue,b=b.x*re+b.y*le+me,te=x.x*te+x.y*oe+ue,x=x.x*re+x.y*le+me}return y.Sj(E,b,te,x,z),a!==null&&z.transform(a),z};function v0(a,y){var x=y.Zn;return x===null&&(x=new Rg,x.port=y,x.node=y.part,y.Zn=x),l1(x,a)}vi.prototype.getLinkPoint=function(a,y,x,b,E,z,te,re){if(re===void 0&&(re=new Qe),x.sb()&&!vp(x))return y.ga(x,re),re;if(x.$c()){var oe=v0(this,y);if(oe!==null){if(re.assign(oe.Zo),E&&this.routing===n1){var le=v0(this,te);if(le!==null&&oe.Gl<le.Gl){oe=Qe.alloc(),le=Qe.alloc();var ue=new _t(y.ga(Ba,oe),y.ga(vl,le)),me=this.computeSpot(!b,te);a=this.getLinkPoint(z,te,me,!b,E,a,y,le),(x.Hf(rc)||x.Hf(wl))&&a.y>=ue.y&&a.y<=ue.y+ue.height?re.y=a.y:(x.Hf(ju)||x.Hf(sl))&&a.x>=ue.x&&a.x<=ue.x+ue.width&&(re.x=a.x),Qe.free(oe),Qe.free(le)}}return re}}return x=y.ga(y0(x),Qe.alloc()),this.pointsCount>(E?6:2)?(te=b?this.i(1):this.i(this.pointsCount-2),E&&(te=ny(x,te.copy()))):(oe=this.computeSpot(!b,te),z=Qe.alloc(),te=te.ga(y0(oe),z),E&&(te=ny(x,te)),Qe.free(z)),this.getLinkPointFromPoint(a,y,x,te,b,re),Qe.free(x),re},vi.prototype.getLinkDirection=function(a,y,x,b,E,z,te,re){e:if(b.sb())var oe=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()&&(oe=v0(this,y),oe!==null))switch(oe.Nc){case 1:oe=270;break e;case 2:oe=180;break e;default:case 4:oe=0;break e;case 8:oe=90;break e}oe=y.ga(wo,Qe.alloc()),this.pointsCount>(z?6:2)?(re=E?this.i(1):this.i(this.pointsCount-2),re=z?ny(oe,re.copy()):x):(x=Qe.alloc(),re=re.ga(wo,x),Qe.free(x)),x=Math.abs(re.x-oe.x)>Math.abs(re.y-oe.y)?re.x>=oe.x?0:180:re.y>=oe.y?90:270,Qe.free(oe),oe=x}return b.Mc()&&te.Td(a)&&(oe+=180,360<=oe&&(oe-=360)),vp(b)||(a=y.li(),a===0)||(45<=a&&135>a?oe+=90:135<=a&&225>a?oe+=180:225<=a&&315>a&&(oe+=270),360<=oe&&(oe-=360)),oe},vi.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=v0(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)},vi.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=wo:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Vo?La:y)):(a=y||this.toPort,a===null?a=wo:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Vo?La:y)),a};function vp(a){return a===La||a.x===.5&&a.y===.5}function y0(a){return a.x===.5&&a.y===.5?a:wo}vi.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Zl&&4<this.pointsCount?this.computeMidPoint(new Qe):(a=y.Zn,a=a!==null?l1(a,this):null,a!==null?a.Zo:y.ga(wo))},vi.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},vi.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 te=z;if(z===void 0&&(te=ro.alloc(),te.reset()),te.multiply(this.transform),this.fh(a,te))return Mv(this,y,x,E),z===void 0&&ro.free(te),!0;if(this.Yc(a,te)){var re=!1;if(!this.isAtomic)for(var oe=this.O.s,le=oe.length;le--;){var ue=oe[le];if(ue.visible||ue===this.locationObject){var me=ue.actualBounds,we=this.naturalBounds;if(!(me.x>we.width||me.y>we.height||0>me.x+me.width||0>me.y+me.height)){if(me=ro.alloc(),me.set(te),ue instanceof hi)re=ue.Cf(a,y,x,b,E,me);else if(this.path===ue){if(ue instanceof io)if(re=a,we=b,ue.pickable===!1)re=!1;else if(me.multiply(ue.transform),we)e:{var Ee=re,De=me;if(ue.fh(Ee,De))re=!0;else{if(De===void 0&&(De=ue.transform,Ee.Re(ue.actualBounds))){re=!0;break e}re=Ee.left,we=Ee.right;var je=Ee.top;Ee=Ee.bottom;var ct=Qe.alloc(),qe=Qe.alloc(),Ct=Qe.alloc(),Lt=ro.alloc();Lt.set(De),Lt.bv(ue.transform),Lt.Vj(),qe.x=we,qe.y=je,qe.transform(Lt),ct.x=re,ct.y=je,ct.transform(Lt),De=!1,Qf(ue,ct,qe,Ct)?De=!0:(ct.x=we,ct.y=Ee,ct.transform(Lt),Qf(ue,ct,qe,Ct)?De=!0:(qe.x=re,qe.y=Ee,qe.transform(Lt),Qf(ue,ct,qe,Ct)?De=!0:(ct.x=re,ct.y=je,ct.transform(Lt),Qf(ue,ct,qe,Ct)&&(De=!0)))),ro.free(Lt),Qe.free(ct),Qe.free(qe),Qe.free(Ct),re=De}}else re=ue.fh(re,me)}else re=ws(ue,a,b,me);re&&(we=ue,y!==null&&(we=y(ue)),we&&(x===null||x(we))&&E.add(we)),ro.free(me)}}}return z===void 0&&ro.free(te),re||this.background!==null||this.areaBackground!==null}return z===void 0&&ro.free(te),!1},vi.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?$u:this.curve},vi.prototype.computeCorner=function(){if(this.curve===$u)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},vi.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},vi.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=r1;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,te=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===nm||b===C0||b===sy?a=Math.max(a,E):b===rm||b===am||b===im||b===om?a=Math.max(a,te):(y=y.ga(wo).ab(x.ga(wo))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*te)+Math.abs(Math.cos(y)*E)+1)),this.curve===$u&&(a*=1.333)}}return a},vi.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Zl&&x.bb()}},vi.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=i1;var y=this.Sf;if(y!==null){for(var x=Sn(),b=0,E=y.links,z=0;z<E.length;z++){var te=E[z].computeSpacing();x.push(te),b+=te}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),Gn(x)}}return a},vi.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},vi.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},vi.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===P0)return!1;E===w0&&(E=tm)}switch(E){case P0:var z=this.i(a),te=this.i(x);if(!z.Xa(y)||!te.Xa(b)){E=z.x,z=z.y;var re=te.x-E,oe=te.y-z,le=Math.sqrt(re*re+oe*oe);if(!en.$(le,0)){if(en.$(re,0))var ue=0>oe?-Math.PI/2:Math.PI/2;else ue=Math.atan(oe/Math.abs(re)),0>re&&(ue=Math.PI-ue);te=y.x;var me=y.y;re=b.x-te;var we=b.y-me;for(oe=Math.sqrt(re*re+we*we),en.$(re,0)?we=0>we?-Math.PI/2:Math.PI/2:(we=Math.atan(we/Math.abs(re)),0>re&&(we=Math.PI-we)),le=oe/le,ue=we-ue,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),re=y.x-E,oe=y.y-z,y=Math.sqrt(re*re+oe*oe),en.$(y,0)||(en.$(re,0)?oe=0>oe?-Math.PI/2:Math.PI/2:(oe=Math.atan(oe/Math.abs(re)),0>re&&(oe=Math.PI-oe)),re=oe+ue,y*=le,this.L(a,te+y*Math.cos(re),me+y*Math.sin(re)));this.dd(x,b)}}return!0;case w0:if(z=this.i(a),me=this.i(x),!z.Xa(y)||!me.Xa(b)){E=z.x,z=z.y,te=me.x,me=me.y,le=(te-E)*(te-E)+(me-z)*(me-z),re=y.x,ue=y.y,oe=b.x,we=b.y;var Ee=1;if(oe-re!==0){var De=(we-ue)/(oe-re);Ee=Math.sqrt(1+1/(De*De))}else De=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var je=y.x,ct=y.y,qe=.5;le!==0&&(qe=((E-je)*(E-te)+(z-ct)*(z-me))/le);var Ct=E+qe*(te-E),Lt=z+qe*(me-z);y=Math.sqrt((je-Ct)*(je-Ct)+(ct-Lt)*(ct-Lt)),ct<De*(je-Ct)+Lt&&(y=-y),0<De&&(y=-y),je=re+qe*(oe-re),qe=ue+qe*(we-ue),De!==0?(y=je+y/Ee,this.L(a,y,qe-(y-je)/De)):this.L(a,je,qe+y)}this.dd(x,b)}return!0;case tm:e:{if(this.isOrthogonal&&(E=this.i(a),z=this.i(a+1),te=this.i(a+2),re=z.x,ue=z.y,me=re,le=ue,en.B(E.y,z.y)?en.B(z.x,te.x)?ue=y.y:en.B(z.y,te.y)&&(re=y.x):en.B(E.x,z.x)&&(en.B(z.y,te.y)?re=y.x:en.B(z.x,te.x)&&(ue=y.y)),this.L(a+1,re,ue),E=this.i(x),z=this.i(x-1),te=this.i(x-2),re=z.x,ue=z.y,oe=re,we=ue,en.B(E.y,z.y)?en.B(z.x,te.x)?ue=b.y:en.B(z.y,te.y)&&(re=b.x):en.B(E.x,z.x)&&(en.B(z.y,te.y)?re=b.x:en.B(z.x,te.x)&&(ue=b.y)),this.L(x-1,re,ue),iy(this))){this.L(a+1,me,le),this.L(x-1,oe,we),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},vi.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 te=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 re=E.actualBounds.copy(),oe=z.actualBounds.copy();if(re.w()&&oe.w()){re.Bc(sm,sm),oe.Bc(sm,sm),re.Ye(a),oe.Ye(x);var le=Qe.alloc(),ue=Qe.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&oe.right>a.x||b===90&&x.y>a.y&&oe.right>a.x?(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),b===180?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ue.x=le.x,ue.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(le.x=a.x<oe.left?this.computeMidOrthoPosition(a.x,a.y,oe.left,x.y,!1):a.x<oe.right&&(b===270&&a.y<oe.top||b===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.right,ue.x=le.x,ue.y=x.y):b===0&&a.x<oe.left&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ue.y=le.y)):(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<re.top||b===270&&x.y>re.bottom)&&(b===180&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(b===180||b===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ue.x=x.x,ue.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x>=re.left&&x.x<=a.x||a.x<=oe.right&&a.x>=x.x?(b===90||b===270)&&(le.h(Math.max((a.x+x.x)/2,a.x),a.y),ue.h(le.x,x.y)):(le.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?re.top:Math.min(re.top,oe.top)):Math.max(x.y,b===0?re.bottom:Math.max(re.bottom,oe.bottom)),ue.x=x.x,ue.y=le.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&oe.left<a.x||b===90&&x.y>a.y&&oe.left<a.x?(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),b===0?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ue.x=le.x,ue.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(le.x=a.x>oe.right?this.computeMidOrthoPosition(a.x,a.y,oe.right,x.y,!1):a.x>oe.left&&(b===270&&a.y<oe.top||b===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.left,ue.x=le.x,ue.y=x.y):b===180&&a.x>oe.right&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ue.y=le.y)):(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<re.top||b===270&&x.y>re.bottom)&&(b===0&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(b===0||b===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ue.x=x.x,ue.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x<=re.right&&x.x>=a.x||a.x>=oe.left&&a.x<=x.x?(b===90||b===270)&&(le.h(Math.min((a.x+x.x)/2,a.x),a.y),ue.h(le.x,x.y)):(le.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?re.top:Math.min(re.top,oe.top)):Math.max(x.y,b===180?re.bottom:Math.max(re.bottom,oe.bottom)),ue.x=x.x,ue.y=le.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&oe.bottom>a.y||b===0&&x.x>a.x&&oe.bottom>a.y?(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),b===270?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ue.x=x.x,ue.y=le.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(le.y=a.y<oe.top?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.top,!0):a.y<oe.bottom&&(b===180&&a.x<oe.left||b===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.bottom,ue.x=x.x,ue.y=le.y):b===90&&a.y<oe.top&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,ue.x=le.x)):(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<re.left||b===180&&x.x>re.right)&&(b===270&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ue.x=le.x,ue.y=x.y),le.x>re.left&&le.x<re.right&&(x.y>=re.top&&x.y<=a.y||a.y<=oe.bottom&&a.y>=x.y?(b===0||b===180)&&(le.h(a.x,Math.max((a.y+x.y)/2,a.y)),ue.h(x.x,le.y)):(le.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?re.left:Math.min(re.left,oe.left)):Math.max(x.x,b===90?re.right:Math.max(re.right,oe.right)),ue.x=le.x,ue.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&oe.top<a.y||b===0&&x.x>a.x&&oe.top<a.y?(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),b===90?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ue.x=x.x,ue.y=le.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(le.y=a.y>oe.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.bottom,!0):a.y>oe.top&&(b===180&&a.x<oe.left||b===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.top,ue.x=x.x,ue.y=le.y):b===270&&a.y>oe.bottom&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,ue.x=le.x)):(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<re.left||b===180&&x.x>re.right)&&(b===90&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ue.x=le.x,ue.y=x.y),le.x>re.left&&le.x<re.right&&(x.y<=re.bottom&&x.y>=a.y||a.y>=oe.top&&a.y<=x.y?(b===0||b===180)&&(le.h(a.x,Math.min((a.y+x.y)/2,a.y)),ue.h(x.x,le.y)):(le.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?re.left:Math.min(re.left,oe.left)):Math.max(x.x,b===270?re.right:Math.max(re.right,oe.right)),ue.x=le.x,ue.y=x.y)));var me=x;if(this.isAvoiding){var we=this.diagram;if(we===null||E===z||this.layer.isTemporary||!Kf(we)||re.ca(me)&&!z.Td(E)||oe.ca(a)&&!E.Td(z))y=!1;else{var Ee=uf(we,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ee.Yj(Math.min(a.x,le.x),Math.min(a.y,le.y),Math.abs(a.x-le.x),Math.abs(a.y-le.y))&&Ee.Yj(Math.min(le.x,ue.x),Math.min(le.y,ue.y),Math.abs(le.x-ue.x),Math.abs(le.y-ue.y))&&Ee.Yj(Math.min(ue.x,me.x),Math.min(ue.y,me.y),Math.abs(ue.x-me.x),Math.abs(ue.y-me.y)))y=!1;else{E=a,z=me;var De=x=null;if(we.isVirtualized){we=Ee.bounds.copy(),we.Bc(-Ee.Ho,-Ee.Go);var je=Qe.alloc();Sp(Ee,a.x,a.y)||(en.Ff(we.x,we.y,we.x+we.width,we.y+we.height,a.x,a.y,le.x,le.y,je)?(x=a=je.copy(),y=je.ab(le)):en.Ff(we.x,we.y,we.x+we.width,we.y+we.height,le.x,le.y,ue.x,ue.y,je)?(x=a=je.copy(),y=je.ab(ue)):en.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,me.x,me.y,je)&&(x=a=je.copy(),y=je.ab(me))),Sp(Ee,me.x,me.y)||(en.Ff(we.x,we.y,we.x+we.width,we.y+we.height,me.x,me.y,ue.x,ue.y,je)?(De=me=je.copy(),b=ue.ab(je)):en.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,le.x,le.y,je)?(De=me=je.copy(),b=le.ab(je)):en.Ff(we.x,we.y,we.x+we.width,we.y+we.height,le.x,le.y,a.x,a.y,je)&&(De=me=je.copy(),b=a.ab(je))),Qe.free(je)}re=re.copy().ed(oe),re.Bc(Ee.Ho*Ee.Os,Ee.Go*Ee.Os),a1(Ee,a,y,me,b,re,!0),oe=zd(Ee,me.x,me.y),!Ee.abort&&oe>=xp&&(o1(Ee),re.Bc(Ee.Ho*Ee.Hx,Ee.Go*Ee.Ix),a1(Ee,a,y,me,b,re,!1),oe=zd(Ee,me.x,me.y)),!Ee.abort&&oe<xp&&zd(Ee,me.x,me.y)!==Kh?(ry(this,Ee,me.x,me.y,b,!0,te),re=this.i(2),4>this.pointsCount?(y===0||y===180?(re.x=a.x,re.y=me.y):(re.x=me.x,re.y=a.y),this.L(2,re.x,re.y),this.m(3,re.x,re.y)):(te=this.i(3),y===0||y===180?en.B(re.x,te.x)?(re=y===0?Math.max(re.x,a.x):Math.min(re.x,a.x),this.L(2,re,a.y),this.L(3,re,te.y)):en.B(re.y,te.y)?(Math.abs(a.y-re.y)<=Ee.Go/2&&(this.L(2,re.x,a.y),this.L(3,te.x,a.y)),this.m(2,re.x,a.y)):this.L(2,a.x,re.y):(y===90||y===270)&&(en.B(re.y,te.y)?(re=y===90?Math.max(re.y,a.y):Math.min(re.y,a.y),this.L(2,a.x,re),this.L(3,te.x,re)):en.B(re.x,te.x)?(Math.abs(a.x-re.x)<=Ee.Ho/2&&(this.L(2,a.x,re.y),this.L(3,a.x,te.y)),this.m(2,a.x,re.y)):this.L(2,re.x,a.y))),x!==null&&(a=this.i(1),te=this.i(2),a.x!==te.x&&a.y!==te.y?y===0||y===180?this.m(2,a.x,te.y):this.m(2,te.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),De!==null&&(b===0||b===180?this.yf(z.x,De.y):this.yf(De.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(le.copy()),this.ne(ue.copy())),Qe.free(le),Qe.free(ue)}},vi.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 iy(a){if(a.diagram===null||!a.isAvoiding||!Kf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=uf(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 ry(a,y,x,b,E,z,te){var re=y.Ho,oe=y.Go,le=zd(y,x,b),ue=x,me=b;for(E===0?ue+=re:E===90?me+=oe:E===180?ue-=re:me-=oe,E!==te&&le>tg&&zd(y,ue,me)!==le-1&&(zd(y,x-re,b)===le-1?(E=180,ue=x-re,me=b):zd(y,x+re,b)===le-1?(E=0,ue=x+re,me=b):zd(y,x,b-oe)===le-1?(E=270,ue=x,me=b-oe):zd(y,x,b+oe)===le-1&&(E=90,ue=x,me=b+oe));le>tg&&zd(y,ue,me)===le-1;)x=ue,b=me,E===0?ue+=re:E===90?me+=oe:E===180?ue-=re:me-=oe,--le;z?le>tg&&(E===180||E===0?x=Math.floor(x/re)*re+re/2:(E===90||E===270)&&(b=Math.floor(b/oe)*oe+oe/2)):(x=Math.floor(x/re)*re+re/2,b=Math.floor(b/oe)*oe+oe/2),le>tg&&(z=E,te=x,ue=b,E===0?(z=90,ue+=oe):E===90?(z=180,te-=re):E===180?(z=270,ue-=oe):E===270&&(z=0,te+=re),zd(y,te,ue)===le-1?ry(a,y,te,ue,z,!1,z):(te=x,ue=b,E===0?(z=270,ue-=oe):E===90?(z=0,te+=re):E===180?(z=90,ue+=oe):E===270&&(z=180,te-=re),zd(y,te,ue)===le-1&&ry(a,y,te,ue,z,!1,z))),a.yf(x,b)}vi.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=zo(y,a,x.x,x.y,b.x,b.y),z=0,te=1;te<this.pointsCount-1;te++){x=this.i(te+1);var re=zo(y,a,b.x,b.y,x.x,x.y);b=x,re<E&&(z=te,E=re)}return z},vi.prototype.qc=function(){this.lk=!1,this.v()},vi.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 io&&(E.ua=this.ua)}}},vi.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&eg(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 te=this.computeCurve();if(te===$u&&3<=y&&!en.$(this.smoothness,0))if(y===3){var re=this.i(1);b=Math.min(E.x,re.x);var oe=Math.min(E.y,re.y);re=this.i(2),b=Math.min(b,re.x),oe=Math.min(oe,re.y)}else{if(this.isOrthogonal)for(oe=0;oe<y;oe++)re=b[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),oe=this.i(b),z.x=Math.min(oe.x,z.x),z.y=Math.min(oe.y,z.y);b=z.x,oe=z.y}else{for(oe=0;oe<y;oe++)re=b[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);b=z.x,oe=z.y}if(b-=this.su.x,oe-=this.su.y,E.x-=b,E.y-=oe,y!==2||eg(this)){if(a.type=xi.o,re=DS(a),this.computeShortLength(!0)!==0&&(E=Tg(this,E,!0,z)),pp(re,E.x,E.y,!1),te===$u&&3<=y&&!en.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-oe,E=this.i(2).copy(),E.x-=b,E.y-=oe,this.computeShortLength(!1)!==0&&(E=Tg(this,E,!1,z)),Hh(re,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=Qe.allocAt(b,oe),x=Qe.alloc(),x.assign(this.i(1)),z=Qe.allocAt(b,oe),E=Qe.allocAt(b,oe),te=this.i(0);for(var le,ue=this.smoothness/3,me=1;me<this.pointsCount-1;me++){le=this.i(me);var we=te,Ee=le,De=this.i(oy(this,le,me,!1));if((!en.$(we.x,Ee.x)||!en.$(Ee.x,De.x))&&(!en.$(we.y,Ee.y)||!en.$(Ee.y,De.y))){var je=ue;isNaN(je)&&(je=this.smoothness/3);var ct=we.x;we=we.y;var qe=Ee.x;Ee=Ee.y;var Ct=De.x;De=De.y;var Lt=je*S0(ct,we,qe,Ee);je*=S0(qe,Ee,Ct,De),en.$(we,Ee)&&en.$(qe,Ct)&&(qe>ct?De>Ee?(z.x=qe-Lt,z.y=Ee-Lt,E.x=qe+je,E.y=Ee+je):(z.x=qe-Lt,z.y=Ee+Lt,E.x=qe+je,E.y=Ee-je):De>Ee?(z.x=qe+Lt,z.y=Ee-Lt,E.x=qe-je,E.y=Ee+je):(z.x=qe+Lt,z.y=Ee+Lt,E.x=qe-je,E.y=Ee-je)),en.$(ct,qe)&&en.$(Ee,De)&&(Ee>we?(Ct>qe?(z.x=qe-Lt,z.y=Ee-Lt,E.x=qe+je):(z.x=qe+Lt,z.y=Ee-Lt,E.x=qe-je),E.y=Ee+je):(Ct>qe?(z.x=qe-Lt,z.y=Ee+Lt,E.x=qe+je):(z.x=qe+Lt,z.y=Ee+Lt,E.x=qe-je),E.y=Ee-je)),(en.$(ct,qe)&&en.$(qe,Ct)||en.$(we,Ee)&&en.$(Ee,De))&&(ct=.5*(ct+Ct),we=.5*(we+De),z.x=ct,z.y=we,E.x=ct,E.y=we),(me===1||me===2&&en.$(te.x,this.i(0).x)&&en.$(te.y,this.i(0).y))&&(x.x=.5*(te.x+le.x),x.y=.5*(te.y+le.y)),Hh(re,x.x-b,x.y-oe,z.x-b,z.y-oe,le.x-b,le.y-oe),y.set(z),x.set(E),te=le}}le=te.x,te=te.y,ue=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ue=Tg(this,ue.copy(),!1,Qr)),le=.5*(le+ue.x),te=.5*(te+ue.y),Hh(re,E.x-b,E.y-oe,le-b,te-oe,ue.x-b,ue.y-oe),Qe.free(y),Qe.free(x),Qe.free(z),Qe.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),te=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(te=Tg(this,te.copy(),!1,Qr)),Hh(re,z.x-b,z.y-oe,E.x-b,E.y-oe,te.x-b,te.y-oe);else{for(z=Qe.alloc(),z.assign(this.i(0)),E=Qe.alloc(),E.assign(z),te=this.computeCorner(),me=1,le=0;me<y;){if(me=oy(this,z,me,1<me),ue=this.i(me),me>=y-1){if(!z.D(ue))this.computeShortLength(!1)!==0&&(ue=Tg(this,ue.copy(),!1,Qr)),kg(this,re,-b,-oe,z,ue,x);else if(le===0)for(me=1;me<y;)E.assign(z),ue=this.i(me++),kg(this,re,-b,-oe,z,ue,x),z.assign(ue);break}if(le=oy(this,ue,me+1,me<y-3),me=-b,ct=-oe,we=ue,qe=this.i(le),je=x,en.B(z.y,we.y)&&en.B(we.x,qe.x))if(De=Math.min(te,Math.abs(we.x-E.x)/2),De=Lt=Math.min(De,Math.abs(qe.y-we.y)/2),en.B(De,0))kg(this,re,me,ct,z,we,je),z.assign(we);else{var Rt=we.x,Jt=we.y;Ee=Rt,Ct=Jt,we.x>z.x?Rt=we.x-De:Rt=we.x+De,qe.y>we.y?Ct=we.y+Lt:Ct=we.y-Lt,qe=Qe.allocAt(Rt,Jt),kg(this,re,me,ct,z,qe,je),Qe.free(qe),u0(re,we.x+me,we.y+ct,Ee+me,Ct+ct),z.h(Ee,Ct)}else en.B(z.x,we.x)&&en.B(we.y,qe.y)?(De=Math.min(te,Math.abs(we.y-E.y)/2),De=Lt=Math.min(De,Math.abs(qe.x-we.x)/2),en.B(Lt,0)?(kg(this,re,me,ct,z,we,je),z.assign(we)):(Rt=we.x,Jt=we.y,Ee=Rt,Ct=Jt,we.y>z.y?Jt=we.y-De:Jt=we.y+De,qe.x>we.x?Ee=we.x+Lt:Ee=we.x-Lt,qe=Qe.allocAt(Rt,Jt),kg(this,re,me,ct,z,qe,je),Qe.free(qe),u0(re,we.x+me,we.y+ct,Ee+me,Ct+ct),z.h(Ee,Ct))):(kg(this,re,me,ct,z,we,je),z.assign(we));E.assign(ue),me=le}Qe.free(z)}c0=re}else re=this.i(1).copy(),re.x-=b,re.y-=oe,this.computeShortLength(!0)!==0&&(E=Tg(this,E,!0,z)),this.computeShortLength(!1)!==0&&(re=Tg(this,re,!1,z)),a.type=xi.j,a.startX=E.x,a.startY=E.y,a.endX=re.x,a.endY=re.y;return this.lk=!0,a};function S0(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),en.$(a,0)?y:en.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Tg(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=S0(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=S0(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 oy(a,y,x,b){for(var E=a.pointsCount,z=y;en.$(y.x,z.x)&&en.$(y.y,z.y);){if(x>=E)return E-1;z=a.i(x++)}if(!en.$(y.x,z.x)&&!en.$(y.y,z.y))return x-1;for(var te=z;en.$(y.x,z.x)&&en.$(z.x,te.x)&&(!b||(y.y>=z.y?z.y>=te.y:z.y<=te.y))||en.$(y.y,z.y)&&en.$(z.y,te.y)&&(!b||(y.x>=z.x?z.x>=te.x:z.x<=te.x));){if(x>=E)return E-1;te=a.i(x++)}return x-2}vi.prototype.computeJumpLength=function(){return 10};function kg(a,y,x,b,E,z,te){if(!te&&eg(a)){te=a.computeJumpLength();var re=te/2,oe=[],le=0;if(a.isVisible()&&(le=Ex(a,E,z,oe)),0<le){if(en.B(E.y,z.y))if(E.x<z.x)for(var ue=0;ue<le;){var me=Math.max(E.x,Math.min(oe[ue++]-re,z.x-te));y.lineTo(me+x,z.y+b);for(var we=me+x,Ee=Math.min(me+te,z.x);ue<le&&(me=oe[ue],me<Ee+te);)ue++,Ee=Math.min(me+re,z.x);me=z.y-te+b,Ee+=x;var De=z.y+b;a.curve===$h?pp(y,Ee,De,!1):Hh(y,we,me,Ee,me,Ee,De)}else for(--le;0<=le;){for(ue=Math.min(E.x,Math.max(oe[le--]+re,z.x+te)),y.lineTo(ue+x,z.y+b),we=ue+x,me=Math.max(ue-te,z.x);0<=le&&(ue=oe[le],ue>me-te);)le--,me=Math.max(ue-re,z.x);ue=z.y-te+b,me+=x,Ee=z.y+b,a.curve===$h?pp(y,me,Ee,!1):Hh(y,we,ue,me,ue,me,Ee)}else if(en.B(E.x,z.x))if(E.y<z.y)for(ue=0;ue<le;){for(me=Math.max(E.y,Math.min(oe[ue++]-re,z.y-te)),y.lineTo(z.x+x,me+b),we=me+b,me=Math.min(me+te,z.y);ue<le&&(Ee=oe[ue],Ee<me+te);)ue++,me=Math.min(Ee+re,z.y);Ee=z.x-te+x,De=z.x+x,me+=b,a.curve===$h?pp(y,De,me,!1):Hh(y,Ee,we,Ee,me,De,me)}else for(--le;0<=le;){for(ue=Math.min(E.y,Math.max(oe[le--]+re,z.y+te)),y.lineTo(z.x+x,ue+b),we=ue+b,ue=Math.max(ue-te,z.y);0<=le&&(me=oe[le],me>ue-te);)le--,ue=Math.max(me-re,z.y);me=z.x-te+x,Ee=z.x+x,ue+=b,a.curve===$h?pp(y,Ee,ue,!1):Hh(y,me,we,me,ue,Ee,ue)}}}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 te=z.length,re=0;re<te;re++){var oe=z[re];if(oe instanceof vi){if(oe===a)return 0<b.length&&b.sort(function(ue,me){return ue-me}),b.length;if(oe.isVisible()&&eg(oe)){var le=oe.routeBounds;le.w()&&a.routeBounds.Yc(le)&&!a.usesSamePort(oe)&&(le=oe.path,le!==null&&le.Ed()&&Mx(y,x,b,oe))}}}}}return 0<b.length&&b.sort(function(ue,me){return ue-me}),b.length}function Mx(a,y,x,b){for(var E=en.B(a.y,y.y),z=b.pointsCount,te=b.i(0),re=Qe.alloc(),oe=1;oe<z;oe++){var le=b.i(oe);if(oe<z-1){var ue=b.i(oe+1);if(te.y===le.y&&le.y===ue.y){if(le.x>te.x&&ue.x>=le.x||le.x<te.x&&ue.x<=le.x)continue}else if(te.x===le.x&&le.x===ue.x&&(le.y>te.y&&ue.y>=le.y||le.y<te.y&&ue.y<=le.y))continue}e:{ue=a.x;var me=a.y,we=y.x,Ee=y.y,De=te.x;te=te.y;var je=le.x,ct=le.y;if(en.B(ue,we)){if(!en.B(me,Ee)&&en.B(te,ct)&&Math.min(me,Ee)<te&&Math.max(me,Ee)>te&&Math.min(De,je)<ue&&Math.max(De,je)>ue&&!en.B(De,je)){re.x=ue,re.y=te,ue=!0;break e}}else if(en.B(me,Ee)&&en.B(De,je)&&Math.min(ue,we)<De&&Math.max(ue,we)>De&&Math.min(te,ct)<me&&Math.max(te,ct)>me&&!en.B(te,ct)){re.x=De,re.y=me,ue=!0;break e}re.x=0,re.y=0,ue=!1}ue&&(E?x.push(re.x):x.push(re.y)),te=le}Qe.free(re)}function eg(a){return a=a.curve,a===yp||a===$h}function x0(a,y){(y||eg(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()))}vi.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 te=E.length,re=0;re<te;re++){var oe=E[re];oe instanceof vi&&(oe===this?z=!0:z&&t1(this,oe,a))}}else if(b)for(z=E.Pa.s,E=z.length,te=0;te<E;te++)re=z[te],re instanceof vi&&t1(this,re,a)}}}}};function t1(a,y,x){if(y!==null&&y.lk&&y.fd&&eg(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}vi.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},vi.prototype.isVisible=function(){if(!mr.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},vi.prototype.Zb=function(a){if(mr.prototype.Zb.call(this,a),a&&x0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},vi.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?tm:this.qk};function qp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,z=a=null,te=y.jb.s,re=te.length,oe=0;oe<re;oe++){var le=te[oe];(le.ef===y&&le.ff===b&&le.uf===x&&le.vf===E||le.ef===x&&le.ff===E&&le.uf===y&&le.vf===b)&&(z===null?z=le:(a===null&&(a=[],a.push(z)),a.push(le)))}if(a!==null){for(z=GS(y,x,b,E),z===null&&(z=new E0(y,b,x,E),WS(y,z),WS(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function em(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(yn(y.links,a),y.Sl()))}vi.prototype.ph=function(){return!0},Ye.Object.defineProperties(vi.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&&g0(y,this,x),em(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 te=!0;b!==null&&(te=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=te)}a!==null&&(this.uf!==a&&f0(a,this,E),qp(this),this.C(1)),this.g("fromNode",y,a),mp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Bu(x),em(this),this.ff=a;var b=this.fromPort;b!==null&&Bu(b);var E=this.diagram;if(E!==null){var z=this.data,te=E.model;z!==null&&te.ri()&&te.xv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(te=!0,E!==null&&(te=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=te))),qp(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&g0(y,this,x),em(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 te=!0;b!==null&&(te=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=te)}a!==null&&(this.ef!==a&&f0(a,this,E),qp(this),this.C(1)),this.g("toNode",y,a),mp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Bu(x),em(this),this.vf=a;var b=this.toPort;b!==null&&Bu(b);var E=this.diagram;if(E!==null){var z=this.data,te=E.model;z!==null&&te.ri()&&te.Cv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(te=!0,E!==null&&(te=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=te))),qp(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Vo},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&Bu(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&&qn(a,">= 0",vi,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Vo},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),(y.$c()||a.$c())&&this.toNode!==null&&Bu(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&&qn(a,">= 0",vi,"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?pr:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&Qp(this.fromNode),this.toNode!==null&&Qp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof io?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()===$u&&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),en.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 te=this.i(z-2);z+3>=b&&(z=b-1);var re=this.i(z-1),oe=this.i(z);en.Dl(E.x,E.y,te.x,te.y,re.x,re.y,oe.x,oe.y,.5,a),y=Math.min(oe.x,y),x=Math.min(oe.y,x),E=oe}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 Qe)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||m0(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);en.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):en.$(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 Rn,b=0;b<a.length/2;b++)E=new Qe(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(!rn(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){b=!1;break}}if(b)for(x=new Rn,b=0;b<a.length;b++)E=a[b],x.add(new Qe(E.x,E.y).freeze())}}else if(a instanceof Rn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else St("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),m0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&da(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||!vp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!vp(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(),x0(this,y===$h||y===yp||a===$h||a===yp),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(),x0(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)}}}),vi.prototype.invalidateOtherJumpOvers=vi.prototype.Xo,vi.prototype.findClosestSegment=vi.prototype.ez,vi.prototype.updateRoute=vi.prototype.vg,vi.prototype.invalidateRoute=vi.prototype.bb,vi.prototype.rollbackRoute=vi.prototype.rv,vi.prototype.commitRoute=vi.prototype.zf,vi.prototype.startRoute=vi.prototype.uh,vi.prototype.clearPoints=vi.prototype.Fj,vi.prototype.removePoint=vi.prototype.pv,vi.prototype.addPointAt=vi.prototype.yf,vi.prototype.addPoint=vi.prototype.ne,vi.prototype.insertPointAt=vi.prototype.m,vi.prototype.insertPoint=vi.prototype.Kz,vi.prototype.setPointAt=vi.prototype.L,vi.prototype.setPoint=vi.prototype.dd,vi.prototype.getPoint=vi.prototype.i,vi.prototype.getOtherPort=vi.prototype.Cz,vi.prototype.getOtherNode=vi.prototype.To;var Ig=null,Og=null,ay=new gn(vi,"Normal",1),Lx=new gn(vi,"Orthogonal",2),Nx=new gn(vi,"AvoidsNodes",6),n1=new gn(vi,"AvoidsNodesStraight",7),Zl=new gn(vi,"None",0),$u=new gn(vi,"Bezier",9),$h=new gn(vi,"JumpGap",10),yp=new gn(vi,"JumpOver",11),tm=new gn(vi,"End",17),P0=new gn(vi,"Scale",18),w0=new gn(vi,"Stretch",19),nm=new gn(vi,"OrientAlong",21),im=new gn(vi,"OrientPlus90",22),rm=new gn(vi,"OrientMinus90",23),sy=new gn(vi,"OrientOpposite",24),C0=new gn(vi,"OrientUpright",25),om=new gn(vi,"OrientPlus90Upright",26),am=new gn(vi,"OrientMinus90Upright",27),b0=new gn(vi,"OrientUpright45",28),i1=16,r1=14,sm=8;vi.className="Link",vi.Normal=ay,vi.Orthogonal=Lx,vi.AvoidsNodes=Nx,vi.AvoidsNodesStraight=n1,vi.None=Zl,vi.Bezier=$u,vi.JumpGap=$h,vi.JumpOver=yp,vi.End=tm,vi.Scale=P0,vi.Stretch=w0,vi.OrientAlong=nm,vi.OrientPlus90=im,vi.OrientMinus90=rm,vi.OrientOpposite=sy,vi.OrientUpright=C0,vi.OrientPlus90Upright=om,vi.OrientMinus90Upright=am,vi.OrientUpright45=b0,vi.EndSegmentStep=8,vi.CurvinessStart=i1,vi.SpacingMin=r1,vi.OrthoShortCut=sm;function E0(a,y,x,b){Or(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}E0.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},E0.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))}},E0.className="LinkBundle";function lm(a){Or(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}lm.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=ly,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 Sp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function zd(a,y,x){return Sp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):ly}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]>=tg&&(x[b]=ly)}lm.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]===Kh)return!1}return!0};function Hd(a,y,x,b,E,z,te,re,oe){if(!(y<z||y>te||x<re||x>oe)){var le=y|0,ue=x|0,me=a.ac[le][ue];if(me>=tg&&me<xp)for(E?ue+=b:le+=b,me+=1;z<=le&&le<=te&&re<=ue&&ue<=oe&&!(me>=a.ac[le][ue]);)a.ac[le][ue]=me,me+=1,E?ue+=b:le+=b;if(le=E?ue:le,E)if(0<b)for(x+=b;x<le;x+=b)Hd(a,y,x,1,!E,z,te,re,oe),Hd(a,y,x,-1,!E,z,te,re,oe);else for(x+=b;x>le;x+=b)Hd(a,y,x,1,!E,z,te,re,oe),Hd(a,y,x,-1,!E,z,te,re,oe);else if(0<b)for(y+=b;y<le;y+=b)Hd(a,y,x,1,!E,z,te,re,oe),Hd(a,y,x,-1,!E,z,te,re,oe);else for(y+=b;y>le;y+=b)Hd(a,y,x,1,!E,z,te,re,oe),Hd(a,y,x,-1,!E,z,te,re,oe)}}function M0(a,y,x,b,E,z,te,re,oe){y|=0,x|=0;var le=Kh,ue=tg;for(a.ac[y][x]=ue;le===Kh&&y>z&&y<te&&x>re&&x<oe;)ue+=1,a.ac[y][x]=ue,E?x+=b:y+=b,le=a.ac[y][x]}function L0(a,y,x,b,E,z,te,re,oe){y|=0,x|=0;var le=Kh,ue=xp;for(a.ac[y][x]=ue;le===Kh&&y>z&&y<te&&x>re&&x<oe;)a.ac[y][x]=ue,E?x+=b:y+=b,le=a.ac[y][x]}function a1(a,y,x,b,E,z,te){if(a.ac!==null){a.abort=!1;var re=y.x,oe=y.y;if(Sp(a,re,oe)){re-=a.Nd,re/=a.rc,oe-=a.Od,oe/=a.sc;var le=b.x,ue=b.y;if(Sp(a,le,ue))if(le-=a.Nd,le/=a.rc,ue-=a.Od,ue/=a.sc,1>=Math.abs(re-le)&&1>=Math.abs(oe-ue))a.abort=!0;else{var me=z.x;b=z.y,y=z.x+z.width;var we=z.y+z.height;me-=a.Nd,me/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,we-=a.Od,we/=a.sc,z=Math.max(0,Math.min(a.di,me|0)),y=Math.min(a.di,Math.max(0,y|0)),me=Math.max(0,Math.min(a.ei,b|0)),we=Math.min(a.ei,Math.max(0,we|0)),b=a.ac,re|=0,oe|=0,le|=0,ue|=0;var Ee=x===0||x===90?1:-1;if(x=x===90||x===270,b[re][oe]===Kh?(M0(a,re,oe,Ee,x,z,y,me,we),M0(a,re,oe,1,!x,z,y,me,we),M0(a,re,oe,-1,!x,z,y,me,we)):M0(a,re,oe,Ee,x,re,oe,re,oe),b[le][ue]===Kh?(L0(a,le,ue,E===0||E===90?1:-1,E===90||E===270,z,y,me,we),L0(a,le,ue,1,!(E===90||E===270),z,y,me,we),L0(a,le,ue,-1,!(E===90||E===270),z,y,me,we)):L0(a,le,ue,Ee,x,le,ue,le,ue),x=Sn(),te&&s1(a,le,ue,E,re,oe,x))for((x[0]!==le||x[1]!==ue)&&(x.unshift(ue),x.unshift(le)),(x[x.length-2]!==re||x[x.length-1]!==oe)&&(x.push(re),x.push(oe)),a=tg,E=x[x.length-2],te=x[x.length-1],b[E][te]=a++,z=x.length-4;0<=z;z-=2)for(E=x[z+2],te=x[z+3],y=x[z],le=x[z+1];y>E?E++:y<E?E--:le>te?te++:le<te&&te--,b[E][te]=a++,E!==y||te!==le;);else Hd(a,re,oe,1,!1,z,y,me,we),Hd(a,re,oe,-1,!1,z,y,me,we),Hd(a,re,oe,1,!0,z,y,me,we),Hd(a,re,oe,-1,!0,z,y,me,we);Gn(x)}}}}function s1(a,y,x,b,E,z,te){for(var re=a.ac,oe=y,le=x;;){if(oe===E&&le===z)return!0;var ue=oe,me=le;if(b===0)if(ue<E)ue++;else break;else if(b===90)if(me<z)me++;else break;else if(b===180)if(ue>E)ue--;else break;else if(me>z)me--;else break;var we=re[ue][me];if(we===0||we===uy)break;oe=ue,le=me}for(;;){if(ue=b,me=oe,we=le,b===0?we<z?(ue=90,we++):we>z&&(ue=270,we--):b===90?me<E?(ue=0,me++):me>E&&(ue=180,me--):b===180?we<z?(ue=90,we++):we>z&&(ue=270,we--):me<E?(ue=0,me++):me>E&&(ue=180,me--),me=re[me][we],ue!==b&&me!==0&&me!==uy){if(te.push(oe),te.push(le),s1(a,oe,le,ue,E,z,te))return!0;te.pop(),te.pop()}if(re[oe][le]=uy,b===0){if(oe===y)return!1;oe--}else if(b===90){if(le===x)return!1;le--}else if(b===180){if(oe===y)return!1;oe++}else{if(le===x)return!1;le++}}}Ye.Object.defineProperties(lm.prototype,{bounds:{get:function(){return new _t(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var Kh=0,tg=1,xp=999999,ly=xp+1,uy=xp+2;lm.className="PositionArray";function Rg(){Or(this),this.port=this.node=null,this.pe=[],this.ap=!1}Rg.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 Fx(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}Rg.prototype.Sl=function(){this.pe.length=0};function l1(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,z=E instanceof Yr?E:null;if(z===null||z.isSubGraphExpanded)var te=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!z.actualBounds.w()){a.ap=x;break e}b=z,te=b.Lu()}z=a.pe.length=0;var re=a.port.ga(Ba,Qe.alloc()),oe=a.port.ga(vl,Qe.alloc());for(E=_t.allocAt(re.x,re.y,0,0),E.Ye(oe),Qe.free(re),Qe.free(oe),re=Qe.allocAt(E.x+E.width/2,E.y+E.height/2),oe=a.port.li(),te=te.iterator;te.next();){var le=te.value;if(le.isVisible()&&le.fromPort!==le.toPort){var ue=le.fromPort===a.port||le.fromNode!==null&&le.fromNode.Td(b),me=le.computeSpot(ue,a.port);if(me.$c()&&(ue=ue?le.toPort:le.fromPort,ue!==null)){var we=ue.part;if(we!==null){var Ee=we.findVisibleNode();Ee!==null&&Ee!==we&&(we=Ee,ue=we.port),ue=le.computeOtherPoint(we,ue),we=re.ab(ue),we-=oe,0>we?we+=360:360<=we&&(we-=360),me=Fx(E,me,we,le.isOrthogonal),me===0?(me=4,180<we&&(we-=360)):me===90?(me=8,270<we&&(we-=360)):me===180?me=2:(me=1,90>we&&(we+=360)),Ee=a.pe[z],Ee===void 0?(Ee=new cy(le,we,me),a.pe[z]=Ee):(Ee.link=le,Ee.angle=we,Ee.Nc=me),Ee.hv.set(ue),z++}}}}for(Qe.free(re),a.pe.sort(Rg.prototype.j),oe=a.pe.length,b=-1,z=re=0;z<oe;z++)te=a.pe[z],te!==void 0&&(te.Nc!==b&&(b=te.Nc,re=0),te.Uo=re,re++);for(b=-1,re=0,z=oe-1;0<=z;z--)oe=a.pe[z],oe!==void 0&&(oe.Nc!==b&&(b=oe.Nc,re=oe.Uo+1),oe.Gl=re);if(z=a.pe,me=a.port,b=a.node.portSpreading,re=Qe.alloc(),oe=Qe.alloc(),te=Qe.alloc(),le=Qe.alloc(),me.ga(Ba,re),me.ga(su,oe),me.ga(vl,te),me.ga(Ml,le),Ee=we=ue=me=0,b===qv)for(var De=0;De<z.length;De++){var je=z[De];if(je!==null){var ct=je.link.computeThickness();switch(je.Nc){case 8:we+=ct;break;case 2:Ee+=ct;break;case 1:me+=ct;break;default:case 4:ue+=ct}}}var qe=De=0,Ct=1,Lt=je=0;for(ct=0;ct<z.length;ct++){var Rt=z[ct];if(Rt!==null){if(De!==Rt.Nc){switch(De=Rt.Nc,De){case 8:var Jt=te;qe=le;break;case 2:Jt=le,qe=re;break;case 1:Jt=re,qe=oe;break;default:case 4:Jt=oe,qe=te}switch(je=qe.x-Jt.x,Lt=qe.y-Jt.y,De){case 8:we>Math.abs(je)?(Ct=Math.abs(je)/we,we=Math.abs(je)):Ct=1;break;case 2:Ee>Math.abs(Lt)?(Ct=Math.abs(Lt)/Ee,Ee=Math.abs(Lt)):Ct=1;break;case 1:me>Math.abs(je)?(Ct=Math.abs(je)/me,me=Math.abs(je)):Ct=1;break;default:case 4:ue>Math.abs(Lt)?(Ct=Math.abs(Lt)/ue,ue=Math.abs(Lt)):Ct=1}qe=0}var vn=Rt.Zo;if(b===qv){switch(Rt=Rt.link.computeThickness(),Rt*=Ct,vn.set(Jt),De){case 8:vn.x=Jt.x+je/2+we/2-qe-Rt/2;break;case 2:vn.y=Jt.y+Lt/2+Ee/2-qe-Rt/2;break;case 1:vn.x=Jt.x+je/2-me/2+qe+Rt/2;break;default:case 4:vn.y=Jt.y+Lt/2-ue/2+qe+Rt/2}qe+=Rt}else{var Fi=.5;b===p0&&(Fi=(Rt.Uo+1)/(Rt.Gl+1)),vn.x=Jt.x+je*Fi,vn.y=Jt.y+Lt*Fi}}}for(Qe.free(re),Qe.free(oe),Qe.free(te),Qe.free(le),Jt=a.pe,z=0;z<Jt.length;z++)b=Jt[z],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,_t.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}Rg.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},Rg.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,La,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)},Rg.className="Knot";function cy(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Qe,this.Gl=this.Uo=0,this.Zo=new Qe,this.Ju=0}cy.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()},cy.className="LinkInfo";function Ma(a){Or(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Qe(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Ma.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},Ma.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Ma.prototype.qb=function(){},Ma.prototype.toString=function(){var a=Zn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Ma.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())}}},Ma.prototype.createNetwork=function(){return new ca(this)},Ma.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof mn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Yr?y.lg(a.memberParts):y.lg(a.iterator),y},Ma.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")}},Ma.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()}},Ma.prototype.doLayout=function(a){var y=new _n;a instanceof mn?(Sf(this,y,a.nodes,!0,this.rh,!0,!1,!0),Sf(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Yr?Sf(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},Ma.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,te=0;for(a=a.iterator;a.next();){var re=a.value;um(re);var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(b,E),re instanceof Yr&&(re.rh=!1),b+=Math.max(le,50)+20,te=Math.max(te,Math.max(oe,50)),z>=y-1?(z=0,b=x,E+=te+20,te=0):z++}},Ma.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,te=this.network.vertexes.iterator;te.next();){var re=te.value.node;if(!(re===null||re instanceof vi)&&(um(re),this.rh(re))){var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(x,b),re instanceof Yr&&(re.rh=!1),x+=Math.max(le,50)+20,z=Math.max(z,Math.max(oe,50)),E>=a-1?(E=0,x=y,b+=z+20,z=0):E++}}},Ma.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Yr&&a.rh)};function Sf(a,y,x,b,E,z,te,re){for(x=x.iterator;x.next();){var oe=x.value;b&&!oe.isTopLevel||E!==null&&!E(oe)||!oe.canLayout()||(z&&oe instanceof Di?oe.isLinkLabel||(oe instanceof Yr&&oe.layout===null?Sf(a,y,oe.memberParts,!1,E,z,te,re):(um(oe),y.add(oe))):te&&oe instanceof vi?y.add(oe):!re||!oe.Zc()||oe instanceof Di||(um(oe),y.add(oe)))}}function um(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Ma.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new _t),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Ma.prototype.ex=function(a){var y=new _n;return a instanceof mn?(Sf(this,y,a.nodes,!0,null,!0,!0,!0),Sf(this,y,a.links,!0,null,!0,!0,!0),Sf(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Yr?Sf(this,y,a.memberParts,!1,null,!0,!0,!0):Sf(this,y,a.iterator,!1,null,!0,!0,!0),y},Ma.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(Ba),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ye.Object.defineProperties(Ma.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())}}}),Ma.prototype.collectParts=Ma.prototype.ex,Ma.prototype.getLayoutBounds=Ma.prototype.ni,Ma.prototype.invalidateLayout=Ma.prototype.C,Ma.className="Layout";function ca(a){Or(this),this.Sc=a,this.wf=new _n,this.ye=new _n,this.Es=new Ii,this.zs=new Ii}ca.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 _n,this.ye=new _n,this.Es=new Ii,this.zs=new Ii},ca.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},ca.prototype.createVertex=function(){return new Ms(this)},ca.prototype.createEdge=function(){return new Tu(this)},ca.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(te){if(te instanceof Di)return!te.isLinkLabel;if(te instanceof vi){var re=te.fromNode;return re===null||re.isLinkLabel?!1:(te=te.toNode,!(te===null||te.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof Di&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Yr&&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 vi&&(!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))}}},ca.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},Le=ca.prototype,Le.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Le.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},Le.Iu=function(a){if(a!==null&&u1(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 u1(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}Le.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Le.ki=function(a){return a===null?null:this.Es.I(a)},Le.Bo=function(a){if(a!==null){dy(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function dy(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}Le.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,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},Le.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),hy(this,a)}};function hy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Le.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Le.Lo=function(a){return a===null?null:this.zs.I(a)},Le.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},Le.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},Le.Ko=function(){for(var a=Sn(),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]);Gn(a)},ca.prototype.deleteArtificialVertexes=function(){for(var a=Sn(),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=Sn(),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]);Gn(a),Gn(y)};function Ax(a){for(var y=Sn(),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]);Gn(y)}ca.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new Rn;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),fy(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 fy(a,y,x){if(x!==null&&x.network!==y){u1(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(hy(a,E),dy(y,E),fy(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(hy(a,x),dy(y,x),fy(a,y,x.toVertex))}}ca.prototype.dz=function(){for(var a=new _n,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},Ye.Object.defineProperties(ca.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}}}),ca.prototype.findAllParts=ca.prototype.dz,ca.prototype.splitIntoSubNetworks=ca.prototype.Zx,ca.prototype.deleteSelfEdges=ca.prototype.Ko,ca.prototype.reverseEdge=ca.prototype.gm,ca.prototype.linkVertexes=ca.prototype.Zj,ca.prototype.findEdge=ca.prototype.Lo,ca.prototype.deleteLink=ca.prototype.Yy,ca.prototype.deleteEdge=ca.prototype.Mj,ca.prototype.addLink=ca.prototype.Dy,ca.prototype.addEdge=ca.prototype.Bo,ca.prototype.findVertex=ca.prototype.ki,ca.prototype.deleteNode=ca.prototype.Zy,ca.prototype.deleteVertex=ca.prototype.Iu,ca.prototype.addNode=ca.prototype.Bl,ca.prototype.addVertex=ca.prototype.dh,ca.prototype.addParts=ca.prototype.lg,ca.className="LayoutNetwork";function Ms(a){Or(this),this.ob=a,this.j=new _t(0,0,10,10).freeze(),this.o=new Qe(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Rn,this.mg=new Rn}Ms.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Rn,this.mg=new Rn},Ms.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+br(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},Ms.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;rn(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 Yr)){x=_t.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(wo);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),_t.free(x);return}_t.free(x)}a.moveTo(y.x,y.y)}},Ms.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Ms.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Ms.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Ms.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function gy(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}Ye.Object.defineProperties(Ms.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=_t.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),_t.free(x),!(a instanceof Yr)&&(a=a.locationObject.ga(wo),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 _n,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new _n,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new _n,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 Rn,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}}}),Ms.prototype.deleteDestinationEdge=Ms.prototype.Jl,Ms.prototype.addDestinationEdge=Ms.prototype.zl,Ms.prototype.deleteSourceEdge=Ms.prototype.Kl,Ms.prototype.addSourceEdge=Ms.prototype.Cl,Ms.className="LayoutVertex",Ms.standardComparer=gy,Ms.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 Tu(a){Or(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Tu.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Tu.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+br(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},Tu.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Tu.prototype.commit=function(){},Tu.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ye.Object.defineProperties(Tu.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)}}}),Tu.prototype.getOtherVertex=Tu.prototype.Ax,Tu.className="LayoutEdge";function qs(a){Ma.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new pi(NaN,NaN).freeze(),this.tf=new pi(10,10).freeze(),this.Jb=cm,this.Rb=F0,this.nd=dm,this.hd=c1,a&&Object.assign(this,a)}Kt(qs,Ma),qs.prototype.cloneProtected=function(a){Ma.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},qs.prototype.qb=function(a){a.classType===qs?a===dm||a===D0||a===py||a===A0?this.sorting=a:a===F0||a===Vc?this.arrangement=a:a===cm||a===N0?this.alignment=a:St("Unknown enum value: "+a):Ma.prototype.qb.call(this,a)},qs.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 Yr)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 A0:E.reverse();break;case dm:E.sort(this.comparer);break;case D0:E.sort(this.comparer),E.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var te=this.wrappingWidth;switch(isNaN(te)&&a!==null?(y=a.padding,te=Math.max(a.viewportBounds.width-y.left-y.right,0)):te=Math.max(this.wrappingWidth,0),0>=z&&0>=te&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case N0:var re=y,oe=x,le=_t.alloc(),ue=Math.max(this.cellSize.width,1);if(!isFinite(ue))for(var me=ue=0;me<E.length;me++){var we=this.ni(E[me],le);ue=Math.max(ue,we.width)}if(ue=Math.max(ue+re,1),me=Math.max(this.cellSize.height,1),!isFinite(me))for(we=me=0;we<E.length;we++){var Ee=this.ni(E[we],le);me=Math.max(me,Ee.height)}me=Math.max(me+oe,1),we=this.arrangement;for(var De=Ee=this.arrangementOrigin.x,je=this.arrangementOrigin.y,ct=0,qe=0,Ct=0;Ct<E.length;Ct++){var Lt=E[Ct],Rt=this.ni(Lt,le),Jt=Math.ceil((Rt.width+re)/ue)*ue,vn=Math.ceil((Rt.height+oe)/me)*me;switch(we){case Vc:var Fi=Math.abs(De-Rt.width);break;default:Fi=De+Rt.width}switch((0<z&&ct>z-1||0<te&&0<ct&&Fi-Ee>te)&&(b.push(new _t(0,je,te+re,qe)),ct=0,De=Ee,je+=qe,qe=0),qe=Math.max(qe,vn),we){case Vc:Rt=-Rt.width;break;default:Rt=0}switch(Lt.moveTo(De+Rt,je),we){case Vc:De-=Jt;break;default:De+=Jt}ct++}b.push(new _t(0,je,te+re,qe)),_t.free(le);break;case cm:for(oe=te,ue=z,me=y,we=x,te=_t.alloc(),Ee=Math.max(this.cellSize.width,1),z=je=le=0,re=Qe.alloc(),De=0;De<E.length;De++)qe=E[De],ct=this.ni(qe,te),qe=Zh(qe,qe.locationObject,qe.locationSpot,re),le=Math.max(le,qe.x),je=Math.max(je,ct.width-qe.x),z=Math.max(z,qe.y);switch(De=this.arrangement,De){case Vc:le+=me;break;default:je+=me}Ee=isFinite(Ee)?Math.max(Ee+me,1):Math.max(le+je,1);var Yi=qe=this.arrangementOrigin.x;for(Ct=this.arrangementOrigin.y,je=0,oe>=le&&(oe-=le),le=Lt=0,Jt=Math.max(this.cellSize.height,1),Rt=z=0,vn=!0,ct=Qe.alloc(),Fi=0;Fi<E.length;Fi++){var Hi=E[Fi],mi=this.ni(Hi,te),ni=Zh(Hi,Hi.locationObject,Hi.locationSpot,re);if(0<je)switch(De){case Vc:Yi=(Yi-qe-(mi.width-ni.x))/Ee,Yi=en.$(Math.round(Yi),Yi)?Math.round(Yi):Math.floor(Yi),Yi=Yi*Ee+qe;break;default:Yi=(Yi-qe+ni.x)/Ee,Yi=en.$(Math.round(Yi),Yi)?Math.round(Yi):Math.ceil(Yi),Yi=Yi*Ee+qe}else switch(De){case Vc:Lt=Yi+ni.x+mi.width;break;default:Lt=Yi-ni.x}switch(De){case Vc:var Ur=-(Yi+ni.x)+Lt;break;default:Ur=Yi+mi.width-ni.x-Lt}if(0<ue&&je>ue-1||0<oe&&0<je&&Ur>oe){for(b.push(new _t(0,vn?Ct-z:Ct,oe+me,Rt+z+we)),Yi=0;Yi<je&&Fi!==je;Yi++){Ur=E[Fi-je+Yi];var Dr=Zh(Ur,Ur.locationObject,Ur.locationSpot,ct);Ur.moveTo(Ur.position.x,Ur.position.y+z-Dr.y)}Rt+=we,Ct=vn?Ct+Rt:Ct+(Rt+z),je=Rt=z=0,Yi=qe,vn=!1}switch(Yi===qe&&(le=De===Vc?Math.max(le,mi.width-ni.x):Math.min(le,-ni.x)),z=Math.max(z,ni.y),Rt=Math.max(Rt,mi.height-ni.y),isFinite(Jt)&&(Rt=Math.max(Rt,Math.max(mi.height,Jt)-ni.y)),vn?Hi.moveTo(Yi-ni.x,Ct-ni.y):Hi.moveTo(Yi-ni.x,Ct),De){case Vc:Yi-=ni.x+me;break;default:Yi+=mi.width-ni.x+me}je++}if(b.push(new _t(0,Ct,oe+me,(vn?Rt:Rt+z)+we)),E.length!==je)for(oe=0;oe<je;oe++)ue=E[E.length-je+oe],me=Zh(ue,ue.locationObject,ue.locationSpot,re),ue.moveTo(ue.position.x,ue.position.y+z-me.y);if(Qe.free(re),Qe.free(ct),De===Vc)for(E=0;E<b.length;E++)z=b[E],z.width+=le,z.x-=le;else for(E=0;E<b.length;E++)z=b[E],z.x>le&&(z.width+=z.x-le,z.x=le);_t.free(te)}for(re=z=te=E=0;re<b.length;re++)oe=b[re],E=Math.min(E,oe.x),te=Math.min(te,oe.y),z=Math.max(z,oe.x+oe.width);this.arrangement===Vc?this.commitLayers(b,new Qe(E+y/2-(z+E),te-x/2)):this.commitLayers(b,new Qe(E-y/2,te-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},qs.prototype.commitLayers=function(){};function c1(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Ye.Object.defineProperties(qs.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!==cm&&a!==N0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==F0&&a!==Vc||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==py&&a!==A0&&a!==dm&&a!==D0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var N0=new gn(qs,"Position",0),cm=new gn(qs,"Location",1),F0=new gn(qs,"LeftToRight",2),Vc=new gn(qs,"RightToLeft",3),py=new gn(qs,"Forward",4),A0=new gn(qs,"Reverse",5),dm=new gn(qs,"Ascending",6),D0=new gn(qs,"Descending",7);qs.className="GridLayout",qs.standardComparer=c1,qs.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},qs.Position=N0,qs.Location=cm,qs.LeftToRight=F0,qs.RightToLeft=Vc,qs.Forward=py,qs.Reverse=A0,qs.Ascending=dm,qs.Descending=D0;function qo(){this.On=new _n,this.Dn=new _n,this.Pa=new _n,this.cf=new Ii,this.bf=new Ii,this.aj=new Ii,this.H=null,this.tp=!1}Le=qo.prototype,Le.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Le.Xe=function(a){this.H=a},Le.oi=function(a){if(a instanceof Di){if(this.On.add(a),a instanceof Yr){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 vi?this.Dn.add(a):a instanceof jo||this.Pa.add(a);y=a.data,y===null||a instanceof jo||(a instanceof vi?this.bf.add(y,a):this.cf.add(y,a))},Le.pc=function(a){if(a.Ej(),a instanceof Di){if(this.On.remove(a),a instanceof Yr){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 vi?this.Dn.remove(a):a instanceof jo||this.Pa.remove(a);y=a.data,y===null||a instanceof jo||(a instanceof vi?this.bf.remove(y):this.cf.remove(y))},Le.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof Yr)&&St('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 Yr||St('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 vi||St('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Sn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Sn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Sn(),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]);Gn(y),Gn(x),Gn(a)}},qo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},qo.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&d1(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&ah(this.diagram,!1)};function d1(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=h1(a,y,b);if(E!==null&&(hc(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 e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}qo.prototype.insertLink=function(){return null},qo.prototype.resolveReferencesForData=function(){},qo.prototype.Ro=function(a){return this.H.model.Ro(a)};function h1(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&&(p1||(p1=!0,Si('No Group template found for category "'+x+'"'),Si(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(g1||(g1=!0,Si('No Node template found for category "'+x+'"'),Si(" Using default node template")),y=a.ny))),y}qo.prototype.getLinkCategoryForData=function(){return""},qo.prototype.setLinkCategoryForData=function(){},qo.prototype.setFromNodeForLink=function(){},qo.prototype.setToNodeForLink=function(){},qo.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(m1||(m1=!0,Si('No Link template found for category "'+a+'"'),Si(" Using default link template")),x=y.my)),x},qo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},qo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},qo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(rh(this.diagram,a,!1),this.unresolveReferencesForPart(a))},qo.prototype.unresolveReferencesForPart=function(){},qo.prototype.removeDataForLink=function(){},qo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},qo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Di?a:null)},qo.prototype.findLinkForKey=function(){return null},Le=qo.prototype,Le.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Le.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Di?a:null)},Le.Kc=function(a){return a===null?null:this.bf.I(a)},Le.ms=function(a){for(var y=0;y<arguments.length;++y);y=new _n;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 te=arguments[z];if(rn(te)&&my(this,E,te)){y.add(b);break}}}return y.iterator},Le.ls=function(a){for(var y=0;y<arguments.length;++y);y=new _n;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 te=arguments[z];if(rn(te)&&my(this,E,te)){y.add(b);break}}}return y.iterator};function my(a,y,x){for(var b in x){var E=y[b],z=x[b];if(bn(z)){if(!bn(E)||E.length<z.length)return!1;for(var te=0;te<E.length;te++){var re=z[te];if(re!==void 0&&!f1(a,E[te],re))return!1}}else if(!f1(a,E,z))return!1}return!0}function f1(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(rn(y)&&rn(x)){if(!my(a,y,x))return!1}else if(y!==x)return!1;return!0}qo.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===wa){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===Va){var te=a.newValue;b==="nodeDataArray"&&rn(te)&&d1(this,te),y.isModified=!0}else if(x===cs){var re=a.oldValue;b==="nodeDataArray"&&rn(re)&&this.ip(re),y.isModified=!0}else x===Ll&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===wa){var oe=a.propertyName,le=a.object;le===y.model?(oe==="nodeKeyProperty"||oe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(le,oe),y.isModified=!0}else if(x===Va||x===cs){var ue=a.change===Va,me=ue?a.newParam:a.oldParam,we=ue?a.newValue:a.oldValue,Ee=this.aj.I(a.object);if(Array.isArray(Ee))for(a=0;a<Ee.length;a++){var De=Ee[a];if(ue)Ym(De,we,me,!0);else if(!(0>me)){var je=me+Vp(De);De.pc(je,!0),Av(De,je,me)}}y.isModified=!0}}finally{y.aa=!0}}}}},qo.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)},qo.prototype.rp=function(){for(var a=this.H.model,y=new _n,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(te){te.data===null||y.contains(te.data)||E.push(te.data)}),this.parts.each(function(te){te.data===null||y.contains(te.data)||E.push(te.data)}),E.forEach(function(te){E1(a,te,!1)}),b=0;b<x.length;b++){var z=x[b];this.Lc(z)===null&&b1(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()},qo.prototype.refreshDataBoundLinks=function(){},qo.prototype.updateRelationshipsFromData=function(){},qo.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 te=E[z].sx(a);te!==null&&(x===null&&(x=Sn()),x.push(te))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Gn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function vy(a,y){var x=y.Hh;if(bn(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 yy(a,y,x){Yf(y,function(te){te=te.O.s;for(var re=te.length,oe=0;oe<re;oe++)vg(x,te[oe])});var b=y.Hh;if(bn(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}}}}qo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Ii;if(bn(a))for(var E=0;E<a.length;E++)B0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)B0(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 _n;for(var z=new Ii,te=b.iterator;te.next();){var re=te.value;if(re instanceof vi)a||re.fromNode!==null&&re.toNode!==null||E.add(re);else if(re instanceof Di&&re.data!==null&&x.Tl()){var oe=re;re=te.key;var le=re.pg();le!==null&&(le=b.I(le),le!==null?(x.qe(oe.data,x.wa(le.data)),oe=y.Kc(oe.data),re=re.kh(),re!==null&&oe!==null&&z.add(re,oe)):x.qe(oe.data,void 0))}}if(0<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 ue=new Ii;b.each(function(me){me.key.data!==null&&ue.add(me.key.data,me.value.data)}),x(ue,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function B0(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 mr))return null;if(z.isSelected=!1,z.isHighlighted=!1,b.add(y,z),y instanceof Di){for(var te=y.linksConnected;te.next();){var re=te.value;if(re.fromNode===y){var oe=b.I(re);oe!==null&&(oe.fromNode=z)}re.toNode===y&&(re=b.I(re),re!==null&&(re.toNode=z))}if(y instanceof Yr&&z instanceof Yr)for(y=y.memberParts;y.next();)te=B0(a,y.value,x,b,E),te instanceof vi||te===null||(te.containingGroup=z)}else if(y instanceof vi&&z instanceof vi)for(te=y.fromNode,te!==null&&(te=b.I(te),te!==null&&(z.fromNode=te)),te=y.toNode,te!==null&&(te=b.I(te),te!==null&&(z.toNode=te)),y=y.labelNodes;y.next();)te=B0(a,y.value,x,b,E),te!==null&&te instanceof Di&&(te.labeledLink=z);return z}qo.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof vi||(b=E.copyNodeData(b),rn(b)&&(E.xf(b),x=y.Lc(b)))}else hc(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 vi||(E=y.copyNodeData(b)),rn(E)&&(x.data=E)));return x},Ye.Object.defineProperties(qo.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}}}),qo.prototype.updateAllRelationshipsFromData=qo.prototype.rp,qo.prototype.findLinksByExample=qo.prototype.ls,qo.prototype.findNodesByExample=qo.prototype.ms,qo.prototype.findLinkForData=qo.prototype.Kc,qo.prototype.findNodeForData=qo.prototype.ii,qo.prototype.findPartForData=qo.prototype.Lc,qo.prototype.findNodeForKey=qo.prototype.Vb,qo.prototype.removeModeledPart=qo.prototype.ip,qo.prototype.removeModeledParts=qo.prototype.Gs,qo.prototype.rebuildParts=qo.prototype.Wd;var g1=!1,p1=!1,m1=!1;qo.className="PartManager";function Ks(a){qo.apply(this,arguments)}Kt(Ks,qo),Ks.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),v1(this,a.linkDataArray)},Ks.prototype.addModeledParts=function(a){for(qo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)mp(a.value);ah(this.diagram,!1)};function v1(a,y){y.forEach(function(x){y1(a,x)}),ah(a.diagram,!1)}function y1(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){hc(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=O0(x,y,!0);z!==""&&(E.fromPortId=z),z=Ku(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Di&&(E.fromNode=z)),z=O0(x,y,!1),z!==""&&(E.toPortId=z),z=Ku(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Di&&(E.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(te){te=a.Vb(te),te!==null&&(te.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}Ks.prototype.removeAllModeledParts=function(){var a=this.diagram.model;S1(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function S1(a,y){y.forEach(function(x){a.ip(x)})}Ks.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Ks.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Ks.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Ks.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Ks.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Ks.prototype.findPartForKey=function(a){var y=qo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Ks.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Ks.prototype.doModelChanged=function(a){var y=this;if(qo.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===wa){if(E==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var te=this.Vb(a.newValue);z.fromNode=te}}else if(E==="linkToKey"){var re=this.Kc(a.object);if(re!==null){var oe=this.Vb(a.newValue);re.toNode=oe}}else if(E==="linkFromPortId"){var le=this.Kc(a.object);if(le!==null){var ue=a.newValue;typeof ue=="string"&&(le.fromPortId=ue)}}else if(E==="linkToPortId"){var me=this.Kc(a.object);if(me!==null){var we=a.newValue;typeof we=="string"&&(me.toPortId=we)}}else if(E==="nodeGroupKey"){var Ee=this.Lc(a.object);if(Ee!==null){var De=a.newValue;if(De!==void 0){var je=this.Vb(De);je instanceof Yr?Ee.containingGroup=je:Ee.containingGroup=null}else Ee.containingGroup=null}}else if(E==="linkLabelKeys"){var ct=this.Kc(a.object);if(ct!==null){var qe=a.oldValue,Ct=a.newValue;Array.isArray(qe)&&qe.forEach(function(ni){0<=Ct.indexOf(ni)||(ni=y.Vb(ni),ni!==null&&(ni.labeledLink=null))}),Array.isArray(Ct)&&Ct.forEach(function(ni){ni=y.Vb(ni),ni!==null&&(ni.labeledLink=ct)})}}else if(E==="linkCategory"){var Lt=this.Kc(a.object),Rt=a.newValue;Lt!==null&&typeof Rt=="string"&&(Lt.category=Rt)}else E==="linkDataArray"&&(S1(this,a.oldValue),v1(this,a.newValue));x.isModified=!0}else if(b===Va){var Jt=a.newValue;if(E==="linkDataArray"&&typeof Jt=="object"&&Jt!==null)y1(this,Jt);else if(E==="linkLabelKeys"&&Pf(Jt)){var vn=this.Kc(a.object),Fi=this.Vb(Jt);vn!==null&&Fi!==null&&(Fi.labeledLink=vn)}x.isModified=!0}else if(b===cs){var Yi=a.oldValue;if(E==="linkDataArray"&&typeof Yi=="object"&&Yi!==null)this.ip(Yi);else if(E==="linkLabelKeys"&&Pf(Yi)){var Hi=this.Vb(Yi);Hi!==null&&(Hi.labeledLink=null)}x.isModified=!0}}else if(b===wa){var mi=a.propertyName;a.object!==x.model||mi!=="linkFromKeyProperty"&&mi!=="linkToKeyProperty"&&mi!=="linkFromPortIdProperty"&&mi!=="linkToPortIdProperty"&&mi!=="linkLabelKeysProperty"&&mi!=="nodeIsGroupProperty"&&mi!=="nodeGroupKeyProperty"&&mi!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Ks.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new _n,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){D1(y,z,!1)}),b.forEach(function(z){a.Kc(z)===null&&A1(y,z,!1)})},Ks.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 vi){var E=Ku(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Ku(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 _n().addAll(y);var te=new _n;a.labelNodes.each(function(re){re.data!==null&&(re=b.wa(re.data),re!==void 0&&te.add(re))}),y=te.copy(),y.hp(E),E=E.copy(),E.hp(te),(0<y.count||0<E.count)&&(y.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink===a&&(re.labeledLink=null)}),E.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink!==a&&(re.labeledLink=a)}))}}else!(a instanceof jo)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Yr)&&(a.containingGroup=y)}}},Ks.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=hm(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var z={};b.next();){var te=b.value;y.lb(te)?E instanceof Yr&&y.lh(te)===x&&(te=this.Lc(te),te!==null&&(te.containingGroup=E)):(z.link=this.Kc(te),z.link!==null&&E instanceof Di&&(Ku(y,te,!0)===x&&(z.link.fromNode=E),Ku(y,te,!1)===x&&(z.link.toNode=E),te=y.Ef(te),Array.isArray(te)&&te.some(function(re){return function(oe){return oe===x?(E.labeledLink=re.link,!0):!1}}(z)))),z={link:z.link}}_c(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Yr&&(E.containingGroup=a))}},Ks.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Di){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Uc(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Uc(y,x,b.data)),a instanceof Yr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Uc(y,x,b)}}},Ks.prototype.copyPartData=function(a,y){var x=qo.prototype.copyPartData.call(this,a,y);if(a instanceof vi)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},Ks.prototype.insertLink=function(a,y,x,b){var E=this.diagram,z=E.model,te=E.toolManager.findTool("Linking"),re="";if(a!==null&&(y===null&&(y=a),re=y.portId,re===null&&(re="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=te.archetypeLinkData,b instanceof vi){if(hc(b),z=b.copy(),z!==null)return z.fromNode=a,z.fromPortId=re,z.toNode=x,z.toPortId=y,E.add(z),a=te.archetypeLabelNodeData,a instanceof Di&&(hc(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&&wp(z,b,z.wa(a.data),!0),Cp(z,b,re,!0),x!==null&&wp(z,b,z.wa(x.data),!1),Cp(z,b,y,!1),z.fi(b),a=te.archetypeLabelNodeData,a===null||a instanceof Di||(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},Ks.prototype.findLinkForKey=Ks.prototype.findLinkForKey,Ks.prototype.findPartForKey=Ks.prototype.findPartForKey,Ks.prototype.removeAllModeledParts=Ks.prototype.removeAllModeledParts,Ks.prototype.addModeledParts=Ks.prototype.addModeledParts,Ks.prototype.addAllModeledParts=Ks.prototype.addAllModeledParts,Ks.className="GraphLinksPartManager";function ec(){qo.apply(this,arguments),this.Sg=null}Kt(ec,qo);function T0(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||!li(b,E,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(hc(b),b=b.copy(),b!==null))){var te=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=te}}}ec.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},ec.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},ec.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}},ec.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))},ec.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},ec.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},ec.prototype.doModelChanged=function(a){if(qo.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===wa){if(b==="nodeParentKey"){var E=a.object,z=this.Vb(a.newValue),te=this.ii(E);if(this.Sg!==null)z!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(te!==null){var re=te.kh();re!==null?z===null?y.remove(re):y.isTreePathToChildren?re.fromNode=z:re.toNode=z:T0(this,z,te)}}else if(b==="parentLinkCategory"){var oe=this.ii(a.object),le=a.newValue;if(oe!==null&&typeof le=="string"){var ue=oe.kh();ue!==null&&(ue.category=le)}}y.isModified=!0}}else if(x===wa){var me=a.propertyName;a.object===y.model&&me==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},ec.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Di&&(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:T0(this,y,a):b!==null&&rh(x,b,!1)))}}},ec.prototype.updateDataBindings=function(a,y){qo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},ec.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=hm(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 Di&&y.mh(z)===x&&T0(this,E,this.ii(z))}_c(y,x)}a=y.mh(a),a!==void 0&&E instanceof Di&&(a=this.Vb(a),T0(this,a,E))}},ec.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Di){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(cs,"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)&&Uc(y,x,E)}},ec.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},ec.prototype.findLinkForKey=ec.prototype.findLinkForKey,ec.className="TreePartManager";function ar(a,y){this.kl=new _n,this.il=new _n,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,Or(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Ii,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 Ii,this.Lt=new Rn,this.Wg=!1,this.o=null,this.undoManager=new Na,a!==void 0&&(bn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ar.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},ar.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ar.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},ar.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},ar.prototype.xA=function(a){a.change!==Ll&&St("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Ps?(P1(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},ar.prototype.Qv=function(a,y){var x=this,b=!1,E=new _n,z=new _n,te=new _n,re=this.vh;a.changes.each(function(me){me.model===x&&(me.modelChange==="nodeDataArray"?me.change===Va?E.add(me.newValue):me.change===cs&&te.add(me.oldValue):x.lb(me.object)?z.add(me.object):me.change!==wa||x.modelData!==me.object&&me.propertyName!=="modelData"?me.object!==null&&(re&&re.contains(me.object)?re.get(me.object).each(function(we){x.lb(we)&&z.add(we)}):me.object instanceof ar||x.ri()&&x.Jc(me.object)||w1(x,me.object).each(function(we){z.add(we)})):b=!0)});var oe=this.il;oe.clear(),E.each(function(me){oe.add(x.wa(me)),y||z.add(me)});var le=this.kl;le.clear(),te.each(function(me){le.add(x.wa(me)),y&&z.add(me)}),a=x.cloneDeep(z.Fa());var ue=null;return b&&(ue===null&&(ue={}),ue.modelData=this.cloneDeep(this.modelData)),0<oe.count&&(ue===null&&(ue={}),y?ue.removedNodeKeys=oe.Fa():ue.insertedNodeKeys=oe.Fa()),0<a.length&&(ue===null&&(ue={}),ue.modifiedNodeData=a),0<le.count&&(ue===null&&(ue={}),y?ue.insertedNodeKeys=le.Fa():ue.removedNodeKeys=le.Fa()),le.clear(),oe.clear(),ue},ar.prototype.cloneDeep=function(a){return Pp(this,a,!0)};function Pp(a,y,x,b,E,z){function te(me,we){re?(me.__gohashid===void 0&&z.push(me),b.set(me,we)):(me=mo++,b.set(me,we),E.set(me,y))}if(!rn(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(b||(b=new Ii),re){var oe=b.get(y);if(oe)return oe}else for(E||(E=new Ii),oe=E.iterator;oe.next();){var le=oe.key;if(oe.value===y&&(le=b.get(le)))return le}if(Array.isArray(y)){oe=[],te(y,oe);for(var ue=0;ue<y.length;ue++)oe.push(Pp(a,y[ue],!1,b,E,z))}else if(y instanceof Qe||y instanceof pi||y instanceof _t||y instanceof Oi||y instanceof Ui)oe=y.copy(),te(y,oe);else{if(y instanceof Oo||y instanceof xi||y instanceof gn)return y;if(y instanceof Rn)oe=new Rn().addAll(Pp(a,y.Fa(),!1,b,E,z)),te(y,oe);else if(y instanceof _n)oe=new _n().addAll(Pp(a,y.Fa(),!1,b,E,z)),te(y,oe);else if(y instanceof Ii)oe=new Ii().addAll(Pp(a,y.Fa(),!1,b,E,z)),te(y,oe);else if(y instanceof Date)oe=new Date(y.getTime()),te(y,oe);else if(y instanceof RegExp)oe=new RegExp(y),te(y,oe),oe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")oe=y.copy(),te(y,oe);else for(ue in oe={},te(y,oe),y)ue!=="__gohashid"&&(oe[ue]=Pp(a,y[ue],!1,b,E,z))}return x&&z.forEach(function(me){delete me.__gohashid}),oe}Le=ar.prototype,Le.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Le.rm=function(){var a="";return this.name!==""&&(a+=`,
|
|
|
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
|
|
|
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
|
|
|
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
|
|
|
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
|
|
|
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
|
|
|
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
|
|
|
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
|
|
|
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},Le.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function x1(a,y){y=y.modelData,rn(y)&&(a.dm(y),a.modelData=y)}Le.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!C1(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+Sy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+xf(this,this.nodeDataArray,!0)},Le.kv=function(a){x1(this,a),a=a.nodeDataArray,bn(a)&&(this.dm(a),this.nodeDataArray=a)};function P1(a,y){function x(E,z){if((z=z.part)&&(z=z.data,E!==z)){var te=b.get(E);te===null?(te=new _n,te.add(z),b.add(E,te)):te.add(z)}}var b=a.vh;b===null&&(b=new Ii,y.changes.each(function(E){if(E.diagram!==null){var z=E.change;z===wa?(E=E.object.panel)&&(z=E.data)&&x(z,E):(z===Va||z===cs)&&(E=E.object,(z=E.itemArray)&&x(z,E))}}),a.vh=b)}function w1(a,y){for(var x=new _n,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];k0(a,y,E,E,x)}return x}function k0(a,y,x,b,E){if(Array.isArray(x))for(var z=0;z<x.length;z++){var te=x[z];if(te===y)return E.add(b),!0;if(k0(a,y,te,b,E))return!0}else if(rn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(te=x[z],te===y)return E.add(b),!0;if(k0(a,y,te,b,E))return!0}return!1}Le.Pv=function(a,y){var x=this,b=!1,E=new _n,z=new _n,te=new _n,re=this.vh;a.changes.each(function(ue){ue.model===x&&(ue.modelChange==="nodeDataArray"?ue.change===Va?E.add(ue.newValue):ue.change===cs&&te.add(ue.oldValue):x.lb(ue.object)?z.add(ue.object):ue.change!==wa||x.modelData!==ue.object&&ue.propertyName!=="modelData"?ue.object!==null&&(re&&re.contains(ue.object)?re.get(ue.object).each(function(me){x.lb(me)&&z.add(me)}):ue.object instanceof ar||x.ri()&&x.Jc(ue.object)||w1(x,ue.object).each(function(me){z.add(me)})):b=!0)});var oe=this.il;oe.clear(),E.each(function(ue){oe.add(x.wa(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),te.each(function(ue){le.add(x.wa(ue)),y&&z.add(ue)}),a="",b&&(a+=`,
|
|
|
"modelData": `+Sy(this,this.modelData)),0<oe.count&&(a+=(y?this.Yv:this.Wv)+xf(this,oe.Fa(),!0)),0<z.count&&(a+=this.jy+xf(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Wv:this.Yv)+xf(this,le.Fa(),!0)),le.clear(),oe.clear(),a},Le.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&St("applyIncrementalJson cannot change Model properties"),x1(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Ii;if(Array.isArray(x))for(var E=0;E<x.length;E++){var z=x[E],te=this.wa(z);te!=null&&b.set(te,z)}if(Array.isArray(y))for(E=y.length,z=0;z<E;z++){te=y[z];var re=this.hc(te);re===null&&(re=(re=b.get(te))?re:this.copyNodeData({}),this.km(re,te),this.xf(re))}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 oe in E)oe==="__gohashid"||oe===this.nodeKeyProperty||this.Wj()&&oe===this.nodeIsGroupProperty||this.setDataProperty(z,oe,E[oe]);this.lm(E,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,oe=0;oe<x;oe++)y=this.hc(a[oe]),y!==null&&this.cm(y)},Le.$x=function(a,y){a.change!==Ll&&St("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Ps?(y===void 0&&(y=fm(this,this)),P1(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},Le.yA=function(a,y){return this.$x(a,y)},Le.np=function(a){return a===void 0&&(a=fm(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Le.toJSON=function(a){return this.np(a)},Le.Zw=function(a){var y=null;if(typeof a=="string")try{y=at.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:St("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&St("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Le.Ky=function(a){return this.Zw(a)},ar.constructGraphLinksModel=function(){return new ar},Le=ar.prototype,Le.dm=function(a){if(bn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(rn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:St("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(rn(a)){for(y in a)if(x=a[y],rn(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 Rn,b=0;b<x.length/2;b++)E.add(new Qe(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Dx(a)}return a},Le.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):bn(a)?xf(this,a):rn(a)?Sy(this,a):typeof a=="function"?"null":a.toString()};function xf(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new Bi;E.add("["),x&&1<b&&E.add(`
|
|
|
`);for(var z=0;z<b;z++){var te=y[z];te!==void 0&&(0<z&&(E.add(","),x&&E.add(`
|
|
|
`)),E.add(a.sm(te)))}return x&&1<b&&E.add(`
|
|
|
`),E.add("]"),E.toString()}function C1(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function Wl(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Sy(a,y){var x=y;if(x instanceof Qe)y={class:"go.Point",x:Wl(x.x),y:Wl(x.y)};else if(x instanceof pi)y={class:"go.Size",width:Wl(x.width),height:Wl(x.height)};else if(x instanceof _t)y={class:"go.Rect",x:Wl(x.x),y:Wl(x.y),width:Wl(x.width),height:Wl(x.height)};else if(x instanceof Oi)y={class:"go.Margin",top:Wl(x.top),right:Wl(x.right),bottom:Wl(x.bottom),left:Wl(x.left)};else if(x instanceof Ui)x.sb()?y={class:"go.Spot",x:Wl(x.x),y:Wl(x.y),offsetX:Wl(x.offsetX),offsetY:Wl(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Oo){if(y={class:"go.Brush",type:x.type.name},x.type===jh?y.color=x.color:(x.type===gh||x.type===Qu)&&(y.start=x.start,y.end=x.end,x.type===Qu&&(x.startRadius!==0&&(y.startRadius=Wl(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Wl(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 xi?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Wl(x.startX)),x.startY!==0&&(y.startY=Wl(x.startY)),x.endX!==0&&(y.endX=Wl(x.endX)),x.endY!==0&&(y.endY=Wl(x.endY)),x.spot1.D(Ba)||(y.spot1=x.spot1),x.spot2.D(vl)||(y.spot2=x.spot2),x.type===xi.o&&(y.path=xi.ia(x))):x instanceof gn&&(y={class:"go.EnumValue",classType:fm(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var z=us(y,E);if(!C1(E,z))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&z instanceof Rn){var te="[";for(z=z.iterator;z.next();){var re=z.value;1<te.length&&(te+=","),te+=a.sm(re.x),te+=",",te+=a.sm(re.y)}te+="]",b+=te}else b+=a.sm(z)}return b+"}"}function Gl(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Dx(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 Qe(Gl(a.x),Gl(a.y));else if(y==="Size")x=new pi(Gl(a.width),Gl(a.height));else if(y==="Rect")x=new _t(Gl(a.x),Gl(a.y),Gl(a.width),Gl(a.height));else if(y==="Margin")x=new Oi(Gl(a.top),Gl(a.right),Gl(a.bottom),Gl(a.left));else if(y==="Spot")typeof a.enum=="string"?x=bh(a.enum):x=new Ui(Gl(a.x),Gl(a.y),Gl(a.offsetX),Gl(a.offsetY));else if(y==="Brush"){if(x=new Oo,x.type=oi(Oo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Ui&&(x.start=a.start),a.end instanceof Ui&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Gl(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Gl(a.endRadius)),a=a.colorStops,rn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=xi.parse(a.path):x=new xi,x.type=oi(xi,a.type),typeof a.startX=="number"&&(x.startX=Gl(a.startX)),typeof a.startY=="number"&&(x.startY=Gl(a.startY)),typeof a.endX=="number"&&(x.endX=Gl(a.endX)),typeof a.endY=="number"&&(x.endY=Gl(a.endY)),a.spot1 instanceof Ui&&(x.spot1=a.spot1),a.spot2 instanceof Ui&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=Py(b),typeof b=="function"&&(x=oi(b,a.name)));return x}Le.Pe=function(a){return this.Lt.add(a),this},Le.ik=function(a){this.Lt.remove(a)},Le.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},Le.cb=function(a,y,x,b,E,z,te){bs(this,"",a,y,x,b,E,z,te)},Le.g=function(a,y,x,b,E){bs(this,"",wa,a,this,y,x,b,E)},Le.Fs=function(a,y,x,b,E,z){bs(this,"",wa,y,a,x,b,E,z)};function bs(a,y,x,b,E,z,te,re,oe){re===void 0&&(re=null),oe===void 0&&(oe=null);var le=new Pa;le.model=a,le.change=x,le.modelChange=y,le.propertyName=b,le.object=E,le.oldValue=z,le.oldParam=re,le.newValue=te,le.newParam=oe,a.ds(le)}ar.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===wa){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)),ba(x,b,E)}else a.change===Va?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,rn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&yn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&Pn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!bn(b)&&a.propertyName&&(b=us(a.object,a.propertyName)),bn(b)&&typeof x=="number"&&(a=a.newValue,y?yn(b,x):Pn(b,x,a))):St("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===cs?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,rn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&Pn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&yn(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!bn(b)&&a.propertyName&&(b=us(a.object,a.propertyName)),bn(b)&&typeof x=="number"&&(a=a.oldValue,y?Pn(b,x,a):yn(b,x))):St("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ll&&St("unknown ChangedEvent: "+a.toString())},ar.prototype.Ea=function(a){return this.undoManager.Ea(a)},ar.prototype.eb=function(a){return this.undoManager.eb(a)},ar.prototype.Kf=function(){return this.undoManager.Kf()},ar.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}},Le=ar.prototype,Le.La=function(a,y){y===void 0&&(y=""),bs(this,"SourceChanged",Ll,y,a,null,null)},Le.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;St("Key value for node data "+a+" is not a number or a string: "+y)}}},Le.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=us(a,x);b!==y&&this.hc(y)===null&&(ba(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),bs(this,"nodeKey",wa,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else ba(a,x,y)}};function Pf(a){return typeof a=="number"||typeof a=="string"}Le.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Le.hc=function(a){return a===null&&St("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Pf(a)?this.kb.I(a):null},Le.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){ba(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;ba(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;ba(a,y,x)}}}}},Le.xf=function(a){a!==null&&(no(a),this.lb(a)||b1(this,a,!0))};function b1(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&&St("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,Pn(a.Tc,b,y)),bs(a,"nodeDataArray",Va,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}Le.Fy=function(a){if(bn(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},Le.cm=function(a){a!==null&&E1(this,a,!0)};function E1(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){e:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break e}b=-1}if(0>b)return;yn(a.Tc,b)}bs(a,"nodeDataArray",cs,"nodeDataArray",a,y,null,b,null),a.qp(y)}Le.nA=function(a){if(bn(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},Le.$z=function(a){if(a!==this.nodeDataArray&&bn(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],te=this.wa(z);if(te!==void 0){x.add(te);var re=this.hc(te);re!==z&&(re!==null?(this.Do(re,z),this.lm(z,re)):(z=this.cloneDeep(z),this.km(z,te),this.xf(z)))}else te=this.cloneDeep(z),this.xf(te),x.add(this.wa(te))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},Le.jp=function(a,y){y!==void 0&&(a=hm(this,a),a instanceof _n&&this.Vf.add(y,a))},Le.Lv=function(){},Le.fm=function(){},Le.em=function(){},Le.qp=function(){};function Uc(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new _n,a.Vf.add(y,b)),b.add(x)}}function _c(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof _n&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function hm(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof _n?a:null)}Le.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ar.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):I0(this,a,!0),rn(a)&&Or(a),a};function I0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=I0(a,y[x],a.copiesArrayObjects);b.push(E)}return Or(b),b}if(x&&rn(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=us(y,b),te=fm(a,z);te==="GraphObject"||te==="Diagram"||te==="Layer"||te==="RowColumnDefinition"||te==="AnimationManager"||te==="Tool"||te==="CommandHandler"||te==="Layout"||te==="InputEvent"||te==="DiagramEvent"||z instanceof ar||z instanceof Na||z instanceof Ps||z instanceof Pa||(z=I0(a,z,!1)),ba(x,b,z)}return Or(x),x}return y instanceof Qe||y instanceof pi||y instanceof _t||y instanceof Ui||y instanceof Oi?y.copy():y}ar.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!M1&&a instanceof Qt&&(M1=!0,Si('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Si(" Is that really your intent?"));var b=us(a,y);b!==x&&(ba(a,y,x),this.Fs(a,y,b,x))},Le=ar.prototype,Le.set=function(a,y,x){this.setDataProperty(a,y,x)},Le.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])}},Le.Ay=function(a,y){this.ts(a,-1,y)},Le.ts=function(a,y,x){0>y&&(y=a.length),Pn(a,y,x),bs(this,"",Va,"",a,null,x,null,y)},Le.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&St("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];yn(a,y),bs(this,"",cs,"",a,x,null,y,null)},Le.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=us(a,y),y===void 0))return"";if(typeof y=="string")return y;St("getCategoryForNodeData found a non-string category for "+a+": "+y)},Le.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=us(a,x);b===void 0&&(b=""),b!==y&&(ba(a,x,y),bs(this,"nodeCategory",wa,x,a,b,y))}else ba(a,x,y)}},Le.lm=function(a,y){this.jm(y,this.Ro(a))},Le.Tl=function(){return!1},Le.Wj=function(){return!1},Le.ri=function(){return!1},Le.xs=function(){return!1},Le.Xj=function(){return!1};function xy(){return new ar}function fm(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 fm(a,y.constructor);return typeof y}function Py(a){return Nc[a]?Nc[a]:at.go!==void 0&&at.go[a]?at.go[a]:null}function us(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 ba(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){}}Ye.Object.defineProperties(ar.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&St("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&St("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,b=0;b<x;b++){var E=a[b];rn(E)||St("Model.nodeDataArray must only contain Objects, not: "+E),no(E)}for(this.Tc=a,b=new Rn,E=0;E<x;E++){var z=a[E],te=this.wa(z);te===void 0||this.kb.I(te)!==null?b.add(z):this.kb.add(te,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(bs(this,"nodeDataArray",wa,"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"}}}),ar.prototype.setCategoryForNodeData=ar.prototype.jm,ar.prototype.getCategoryForNodeData=ar.prototype.Ro,ar.prototype.removeArrayItem=ar.prototype.ov,ar.prototype.insertArrayItem=ar.prototype.ts,ar.prototype.addArrayItem=ar.prototype.Ay,ar.prototype.assignAllDataProperties=ar.prototype.Do,ar.prototype.set=ar.prototype.set,ar.prototype.clearUnresolvedReferences=ar.prototype.Qy,ar.prototype.mergeNodeDataArray=ar.prototype.$z,ar.prototype.removeNodeDataCollection=ar.prototype.nA,ar.prototype.removeNodeData=ar.prototype.cm,ar.prototype.addNodeDataCollection=ar.prototype.Fy,ar.prototype.addNodeData=ar.prototype.xf,ar.prototype.makeNodeDataKeyUnique=ar.prototype.$u,ar.prototype.findNodeDataForKey=ar.prototype.hc,ar.prototype.containsNodeData=ar.prototype.lb,ar.prototype.setKeyForNodeData=ar.prototype.km,ar.prototype.getKeyForNodeData=ar.prototype.wa,ar.prototype.updateTargetBindings=ar.prototype.La,ar.prototype.commit=ar.prototype.commit,ar.prototype.rollbackTransaction=ar.prototype.Kf,ar.prototype.commitTransaction=ar.prototype.eb,ar.prototype.startTransaction=ar.prototype.Ea,ar.prototype.raiseDataChanged=ar.prototype.Fs,ar.prototype.raiseChanged=ar.prototype.g,ar.prototype.raiseChangedEvent=ar.prototype.cb,ar.prototype.removeChangedListener=ar.prototype.ik,ar.prototype.addChangedListener=ar.prototype.Pe,ar.prototype.writeJsonValue=ar.prototype.sm,ar.prototype.replaceJsonObjects=ar.prototype.dm,ar.prototype.applyIncrementalJSON=ar.prototype.Ky,ar.prototype.applyIncrementalJson=ar.prototype.Zw,ar.prototype.toJSON=ar.prototype.toJSON,ar.prototype.toJson=ar.prototype.np,ar.prototype.toIncrementalJSON=ar.prototype.yA,ar.prototype.toIncrementalJson=ar.prototype.$x,ar.prototype.toIncrementalData=ar.prototype.xA,ar.prototype.clear=ar.prototype.clear;var M1=!1,Nc={};ar.className="Model",ar.fromJSON=ar.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=at.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:St("Unable to construct a Model from: "+a);if(y===null){a=null;var b=x.class;if(typeof b=="string")try{var E=null;b.indexOf("go.")===0?(b=b.substr(3),E=Py(b)):(E=Py(b),E===null&&(E=at[b])),typeof E=="function"&&(a=new E)}catch(z){}a===null||a instanceof ar?y=a:St("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=ar.constructGraphLinksModel()),y.gp(x),y.kv(x),y},ar.safePropertyValue=us,ar.safePropertySet=ba,Nc.Brush=Oo,Nc.ChangedEvent=Pa,Nc.Geometry=xi,Nc.Margin=Oi,Nc.Panel=hi,Nc.Point=Qe,Nc.Rect=_t,Nc.Size=pi,Nc.Spot=Ui,Nc.Transaction=Ps,Nc.UndoManager=Na;function fs(a,y,x,b){Or(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=N1,this.wk=null):(this.el=gm,this.wk=b),this.st=new _n}fs.prototype.copy=function(){var a=new fs;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},Le=fs.prototype,Le.qb=function(a){a.classType===fs&&(this.mode=a)},Le.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.Kx=function(a){return a===void 0&&(a=null),this.mode=gm,this.backConverter=a,this},Le.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Le.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function L1(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Le.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")Si("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(b!==""&&(z=us(y,b)),z!==void 0)if(E===null)x!==""&&ba(a,x,z);else try{if(x!==""){var te=E(z,a);ba(a,x,te)}else E(z,a)}catch(re){}}}},Le.sp=function(a,y,x,b){if(this.el===gm){var E=this.xl;if(x===void 0||E===x){x=this.sl;var z=this.wk,te=a;if(E!==""&&(te=us(a,E)),te!==void 0&&!this.st.contains(a))try{this.st.add(a);var re=b!==null?b.diagram:null,oe=re!==null?re.model:null;if(z===null){if(x!=="")oe!==null?oe.setDataProperty(y,x,te):ba(y,x,te);else if(oe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var le=b.itemIndex,ue=b.panel.itemArray;oe.ov(ue,le),oe.ts(ue,le,te)}}else try{if(x!==""){var me=z(te,y,oe);oe!==null?oe.setDataProperty(y,x,me):ba(y,x,me)}else{var we=z(te,y,oe);if(we!==void 0&&oe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Ee=b.itemIndex,De=b.panel.itemArray;oe.ov(De,Ee),oe.ts(De,Ee,we)}}}catch(je){}}finally{this.st.remove(a)}}}},Ye.Object.defineProperties(fs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&An(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&An(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&An(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&An(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&An(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&An(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&An(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&An(this),this.el=a}}}),fs.prototype.updateSource=fs.prototype.sp,fs.prototype.updateTarget=fs.prototype.Mv,fs.prototype.ofModel=fs.prototype.dA,fs.prototype.ofObject=fs.prototype.cp,fs.prototype.makeTwoWay=fs.prototype.Kx;var Bx="Binding",N1=new gn(fs,"OneWay",1),gm=new gn(fs,"TwoWay",2);fs.className="Binding",fs.parseEnum=function(a,y){return function(x){return x=oi(a,x),x===null?y:x}},fs.toString=Qn,fs.OneWay=N1,fs.TwoWay=gm;function No(a,y,x){ar.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new _n,this.wb=new Ii,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&&(bn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Kt(No,ar),No.constructGraphLinksModel=ar.constructGraphLinksModel,No.prototype.cloneProtected=function(a){ar.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},Le=No.prototype,Le.clear=function(){ar.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Le.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;var x=a.length,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+=" "+Ku(this,E,!0)+"-->"+Ku(this,E,!1)}return y},Le.Qv=function(a,y){this.linkKeyProperty===""&&St("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ar.prototype.Qv.call(this,a,y),b=this,E=new _n,z=new _n,te=new _n,re=this.vh;a.changes.each(function(ue){ue.model===b&&(ue.modelChange==="linkDataArray"?ue.change===Va?E.add(ue.newValue):ue.change===cs&&te.add(ue.oldValue):b.Jc(ue.object)?z.add(ue.object):ue.object!==null&&(ue.object!==null&&re&&re.contains(ue.object)?re.get(ue.object).each(function(me){b.Jc(me)&&z.add(me)}):ue.object instanceof ar||b.lb(ue.object)||F1(b,ue.object).each(function(me){z.add(me)})))});var oe=this.il;oe.clear(),E.each(function(ue){oe.add(b.Ac(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),te.each(function(ue){le.add(b.Ac(ue)),y&&z.add(ue)}),a=b.cloneDeep(z.Fa()),0<oe.count&&(x===null&&(x={}),y?x.removedLinkKeys=oe.Fa():x.insertedLinkKeys=oe.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<le.count&&(x===null&&(x={}),y?x.insertedLinkKeys=le.Fa():x.removedLinkKeys=le.Fa()),le.clear(),oe.clear(),x},Le.rm=function(){var a=ar.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
|
|
|
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
|
|
|
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
|
|
|
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
|
|
|
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
|
|
|
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
|
|
|
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
|
|
|
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
|
|
|
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
|
|
|
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},Le.gp=function(a){ar.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},Le.Rv=function(){var a=ar.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+xf(this,this.linkDataArray,!0);return a+y},Le.kv=function(a){ar.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function F1(a,y){for(var x=new _n,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];k0(a,y,E,E,x)}return x}Le.Pv=function(a,y){this.linkKeyProperty===""&&St("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ar.prototype.Pv.call(this,a,y),b=this,E=new _n,z=new _n,te=new _n,re=this.vh;a.changes.each(function(ue){ue.model===b&&(ue.modelChange==="linkDataArray"?ue.change===Va?E.add(ue.newValue):ue.change===cs&&te.add(ue.oldValue):b.Jc(ue.object)?z.add(ue.object):ue.object!==null&&(ue.object!==null&&re&&re.contains(ue.object)?re.get(ue.object).each(function(me){b.Jc(me)&&z.add(me)}):ue.object instanceof ar||b.lb(ue.object)||F1(b,ue.object).each(function(me){z.add(me)})))});var oe=this.il;oe.clear(),E.each(function(ue){oe.add(b.Ac(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),te.each(function(ue){le.add(b.Ac(ue)),y&&z.add(ue)}),a=x,0<oe.count&&(a+=(y?this.Xv:this.Vv)+xf(this,oe.Fa(),!0)),0<z.count&&(a+=this.iy+xf(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Vv:this.Xv)+xf(this,le.Fa(),!0)),le.clear(),oe.clear(),a},Le.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&St("applyIncrementalJson cannot change Model properties"),ar.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 te in E)te!=="__gohashid"&&te!==this.linkKeyProperty&&this.setDataProperty(z,te,E[te]);B1(this,E,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(te=a.length,y=0;y<te;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},No.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===wa){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),ba(x,b,E);return}}else if(a.change===Va){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,rn(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===cs){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,rn(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}}ar.prototype.changeState.call(this,a,y)}},Le=No.prototype,Le.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),ba(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Le.yx=function(a){return Ku(this,a,!0)},Le.wv=function(a,y){wp(this,a,y,!0)},Le.Bx=function(a){return Ku(this,a,!1)},Le.Bv=function(a,y){wp(this,a,y,!1)};function Ku(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=us(y,a),a!==void 0))){if(Pf(a))return a;St((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function wp(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=us(y,E);z!==x&&(_c(a,z,y),ba(y,E,x),a.hc(x)===null&&Uc(a,x,y),bs(a,b?"linkFromKey":"linkToKey",wa,E,y,z,x),typeof E=="string"&&a.La(y,E))}else ba(y,E,x)}}Le.zx=function(a){return O0(this,a,!0)},Le.xv=function(a,y){Cp(this,a,y,!0)},Le.Cx=function(a){return O0(this,a,!1)},Le.Cv=function(a,y){Cp(this,a,y,!1)};function O0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=us(y,a),y===void 0?"":y)}function Cp(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var z=us(y,E);z===void 0&&(z=""),z!==x&&(ba(y,E,x),bs(a,b?"linkFromPortId":"linkToPortId",wa,E,y,z,x),typeof E=="string"&&a.La(y,E))}else ba(y,E,x)}}Le.Ef=function(a){if(a===null)return R0;var y=this.je;return y===""?R0:(a=us(a,y),a===void 0?R0:a)},Le.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=us(a,x);if(b===void 0&&(b=R0),b!==y){if(Array.isArray(b))for(var E=b.length,z=0;z<E;z++)_c(this,b[z],a);for(ba(a,x,y),E=y.length,z=0;z<E;z++){var te=y[z];this.hc(te)===null&&Uc(this,te,a)}bs(this,"linkLabelKeys",wa,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else ba(a,x,y)}},Le.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=us(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&&Uc(this,y,a),bs(this,"linkLabelKeys",Va,x,a,null,y,null,E)))}else St(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Le.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=us(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(_c(this,y,a),bs(this,"linkLabelKeys",cs,x,a,y,null,E,null)))}else b!==void 0&&St(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Le.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;St("Key value for link data "+a+" is not a number or a string: "+y)}}},Le.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=us(a,x);b!==y&&this.jh(y)===null&&(ba(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),bs(this,"linkKey",wa,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ba(a,x,y)}},Le.jh=function(a){return a===null&&St("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Pf(a)?this.wb.I(a):null},Le.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){ba(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;ba(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;ba(a,y,x)}}}}},Le.Jc=function(a){return a===null?!1:this.$f.contains(a)},Le.fi=function(a){a!==null&&(no(a),this.Jc(a)||A1(this,a,!0))};function A1(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&&St("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)),bs(a,"linkDataArray",Va,"linkDataArray",a,null,y,null,b),wy(a,y)}Le.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},Le.bm=function(a){a!==null&&D1(this,a,!0)};function D1(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(bs(a,"linkDataArray",cs,"linkDataArray",a,y,null,b,null),x=Ku(a,y,!0),_c(a,x,y),x=Ku(a,y,!1),_c(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,z=0;z<E;z++)x=b[z],_c(a,x,y)}Le.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},Le.Zz=function(a){if(this.linkKeyProperty===""&&St("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&bn(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],te=this.Ac(z);if(te!==void 0){x.add(te);var re=this.jh(te);re!==z&&(re!==null?(this.Do(re,z),B1(this,z,re)):(z=this.cloneDeep(z),this.Ks(z,te),this.fi(z)))}else te=this.cloneDeep(z),this.fi(te),x.add(this.Ac(te))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function wy(a,y){var x=Ku(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Uc(a,x,y),x=Ku(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Uc(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&&Uc(a,x,y)}Le.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):I0(this,a,!0),rn(a)&&(Or(a),this.lf!==""&&ba(a,this.lf,void 0),this.mf!==""&&ba(a,this.mf,void 0),this.je!==""&&ba(a,this.je,[])),a},Le.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!us(a,y)},Le.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;St("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Le.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=us(a,x);b!==y&&(_c(this,b,a),ba(a,x,y),this.hc(y)===null&&Uc(this,y,a),bs(this,"nodeGroupKey",wa,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ba(a,x,y)}},No.prototype.copyNodeData=function(a){return a===null?null:(a=ar.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||us(a,this.Je)===void 0||ba(a,this.Je,void 0),a)},No.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){wp(this,a,x,!0);return}if(y===this.linkToKeyProperty){wp(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Cp(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Cp(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=us(a,y);b!==x&&(ba(a,y,x),this.Fs(a,y,b,x))},Le=No.prototype,Le.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&&us(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},Le.jp=function(a,y){ar.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(Ku(this,b,!0)===E){var te=this.lf;ba(b,te,z),bs(this,"linkFromKey",wa,te,b,E,z),typeof te=="string"&&this.La(b,te)}if(Ku(this,b,!1)===E&&(te=this.mf,ba(b,te,z),bs(this,"linkToKey",wa,te,b,E,z),typeof te=="string"&&this.La(b,te)),te=this.Ef(b),Array.isArray(te))for(var re=te.length,oe=this.je,le=0;le<re;le++)te[le]===E&&(te[le]=z,bs(this,"linkLabelKeys",Va,oe,b,E,z,le,le))}},Le.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;ba(a,b,x),bs(this,"nodeGroupKey",wa,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Le.Lv=function(){ar.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)wy(this,a[x])},Le.fm=function(a){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=Sn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;bs(this,"nodeGroupKey",wa,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Ku(this,b,!0)===a&&(E=this.lf,bs(this,"linkFromKey",wa,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Ku(this,b,!1)===a&&(E=this.mf,bs(this,"linkToKey",wa,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,te=this.je,re=0;re<z;re++)E[re]===a&&(bs(this,"linkLabelKeys",Va,te,b,a,a,re,re),x.push(b))}for(y=0;y<x.length;y++)_c(this,a,x[y]);Gn(x)}},Le.em=function(a){ar.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Uc(this,y,a)},Le.qp=function(a){ar.prototype.qp.call(this,a);var y=this.lh(a);_c(this,y,a)},Le.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=us(a,y),y===void 0))return"";if(typeof y=="string")return y;St("getCategoryForLinkData found a non-string category for "+a+": "+y)},No.prototype.getLinkCategoryForData=function(a){return this.ps(a)},No.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=us(a,x);b===void 0&&(b=""),b!==y&&(ba(a,x,y),bs(this,"linkCategory",wa,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ba(a,x,y)}},No.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Le=No.prototype,Le.lm=function(a,y){ar.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function B1(a,y,x){a.lp(x,a.ps(y)),a.wv(x,a.yx(y)),a.Bv(x,a.Bx(y)),a.Ls(x,a.Ef(y)),a.xv(x,a.zx(y)),a.Cv(x,a.Cx(y))}Le.Wj=function(){return!0},Le.ri=function(){return!0},Le.xs=function(){return!0},Le.Xj=function(){return!0},Ye.Object.defineProperties(No.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];rn(E)||St("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),no(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new Rn,E=0;E<x;E++){var z=a[E],te=this.Ac(z);te===void 0||this.wb.I(te)!==null?b.add(z):this.wb.add(te,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 _n,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,bs(this,"linkDataArray",wa,"linkDataArray",this,y,a),y=0;y<x;y++)wy(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"}}}),No.prototype.setCategoryForLinkData=No.prototype.lp,No.prototype.getCategoryForLinkData=No.prototype.ps,No.prototype.assignAllDataProperties=No.prototype.Do,No.prototype.setGroupKeyForNodeData=No.prototype.mp,No.prototype.getGroupKeyForNodeData=No.prototype.lh,No.prototype.isGroupForNodeData=No.prototype.Yu,No.prototype.copyLinkData=No.prototype.Jo,No.prototype.mergeLinkDataArray=No.prototype.Zz,No.prototype.removeLinkDataCollection=No.prototype.lA,No.prototype.removeLinkData=No.prototype.bm,No.prototype.addLinkDataCollection=No.prototype.Ey,No.prototype.addLinkData=No.prototype.fi,No.prototype.containsLinkData=No.prototype.Jc,No.prototype.makeLinkDataKeyUnique=No.prototype.Bs,No.prototype.findLinkDataForKey=No.prototype.jh,No.prototype.setKeyForLinkData=No.prototype.Ks,No.prototype.getKeyForLinkData=No.prototype.Ac,No.prototype.removeLabelKeyForLinkData=No.prototype.Qx,No.prototype.addLabelKeyForLinkData=No.prototype.Bu,No.prototype.setLabelKeysForLinkData=No.prototype.Ls,No.prototype.getLabelKeysForLinkData=No.prototype.Ef,No.prototype.setToPortIdForLinkData=No.prototype.Cv,No.prototype.getToPortIdForLinkData=No.prototype.Cx,No.prototype.setFromPortIdForLinkData=No.prototype.xv,No.prototype.getFromPortIdForLinkData=No.prototype.zx,No.prototype.setToKeyForLinkData=No.prototype.Bv,No.prototype.getToKeyForLinkData=No.prototype.Bx,No.prototype.setFromKeyForLinkData=No.prototype.wv,No.prototype.getFromKeyForLinkData=No.prototype.yx,No.prototype.clear=No.prototype.clear;var R0=Object.freeze([]);No.className="GraphLinksModel",Nc.GraphLinksModel=No,ar.constructGraphLinksModel=ar.constructGraphLinksModel=function(){return new No},ar.initDiagramModel=xy=function(){return new No};function $l(a,y){ar.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(bn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Kt($l,ar),$l.constructGraphLinksModel=ar.constructGraphLinksModel,$l.prototype.cloneProtected=function(a){ar.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Le=$l.prototype,Le.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Qn(E)}}return y},Le.rm=function(){var a=ar.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Le.gp=function(a){ar.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Le.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&St("applyIncrementalJson cannot change Model properties"),ar.prototype.fp.call(this,a)},Le.Vl=function(a){return a},Le.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;St("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Le.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var b=us(a,x);b!==y&&(_c(this,b,a),ba(a,x,y),this.hc(y)===null&&Uc(this,y,a),bs(this,"nodeParentKey",wa,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ba(a,x,y)}},Le.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=us(a,y),y===void 0)?"":typeof y=="string"?y:(St("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},$l.prototype.getLinkCategoryForData=function(a){return this.ss(a)},$l.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=us(a,x);b===void 0&&(b=""),b!==y&&(ba(a,x,y),bs(this,"parentLinkCategory",wa,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ba(a,x,y)}},$l.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},$l.prototype.copyNodeData=function(a){return a===null?null:(a=ar.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||us(a,this.Ke)===void 0||ba(a,this.Ke,void 0),a)},$l.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=us(a,y);b!==x&&(ba(a,y,x),this.Fs(a,y,b,x))},Le=$l.prototype,Le.jp=function(a,y){ar.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Le.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;ba(a,b,x),bs(this,"nodeParentKey",wa,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Le.fm=function(a){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=Sn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;bs(this,"nodeParentKey",wa,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)_c(this,a,x[y]);Gn(x)}},Le.em=function(a){ar.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Uc(this,y,a)},Le.qp=function(a){ar.prototype.qp.call(this,a);var y=this.mh(a);_c(this,y,a)},Le.lm=function(a,y){ar.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Le.Tl=function(){return!0},Le.xs=function(){return!0},Ye.Object.defineProperties($l.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"}}}),$l.prototype.setParentLinkCategoryForNodeData=$l.prototype.Ms,$l.prototype.getParentLinkCategoryForNodeData=$l.prototype.ss,$l.prototype.setParentKeyForNodeData=$l.prototype.qe,$l.prototype.getParentKeyForNodeData=$l.prototype.mh,$l.className="TreeModel",Nc.TreeModel=$l;function Ga(a){Ma.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Fc,this.Ti=0,this.Zv=new Qe,this.Jp=this.me=0,this.Xr=new ym,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Fc,this.K=Kl,this.nd=Ep,this.hd=gy,this.tf=6,this.Nn=$0,a&&Object.assign(this,a)}Kt(Ga,Ma),Ga.prototype.cloneProtected=function(a){Ma.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},Ga.prototype.qb=function(a){a.classType===Ga?a===W0||a===G0||a===H0||a===Z0||a===Ep?this.sorting=a:a===ng||a===bp||a===Kl||a===Cf?this.direction=a:a===Vh||a===wf||a===Fc||a===Ac?this.arrangement=a:(a===jg||a===$0)&&(this.nodeDiameterFormula=a):Ma.prototype.qb.call(this,a)},Ga.prototype.createNetwork=function(){return new Mp(this)},Ga.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 Rn;y.addAll(a.iterator),a=new Rn;var x=new Rn,b=this.sort(y),E,z,te=this.Jp,re=this.arrangement,oe=this.nodeDiameterFormula,le=this.radius;(!isFinite(le)||0>=le)&&(le=NaN);var ue=this.aspectRatio;(!isFinite(ue)||0>=ue)&&(ue=1);var me=this.startAngle;isFinite(me)||(me=0);var we=this.sweepAngle;if((!isFinite(we)||360<we||1>we)&&(we=360),y=this.spacing,isFinite(y)||(y=NaN),re===Ac&&oe===jg?re=Fc:re===Ac&&oe!==jg&&(re=this.arrangement),(this.direction===ng||this.direction===bp)&&this.sorting!==Ep){for(oe=0;!(oe>=b.length)&&(a.add(b.M(oe)),!(oe+1>=b.length));oe+=2)x.add(b.M(oe+1));this.direction===ng?(this.arrangement===Ac&&a.reverse(),b=new Rn,b.addAll(a),b.addAll(x)):(this.arrangement===Ac&&x.reverse(),b=new Rn,b.addAll(x),b.addAll(a))}oe=b.length;for(var Ee=z=E=0;Ee<b.length;Ee++){var De=me+we*z*(this.direction===Kl?1:-1)/oe,je=b.M(Ee).diameter;isNaN(je)&&(je=bf(b.M(Ee),De)),360>we&&(Ee===0||Ee===b.length-1)&&(je/=2),E+=je,z++}if(isNaN(le)||re===Ac){if(isNaN(y)&&(y=6),re!==Fc&&re!==Ac){for(z=-1/0,te=0;te<oe;te++)Ee=b.M(te),E=b.M(te===oe-1?0:te+1),isNaN(Ee.diameter)&&bf(Ee,0),isNaN(E.diameter)&&bf(E,0),z=Math.max(z,(Ee.diameter+E.diameter)/2);te=z+y,re===Vh?le=(z+y)/(2*Math.PI/oe):le=j0(this,te*(360<=we?oe:oe-1),ue,me*Math.PI/180,we*Math.PI/180)}else le=j0(this,E+(360<=we?oe:oe-1)*(re!==Ac?y:1.6*y),ue,me*Math.PI/180,we*Math.PI/180);z=le*ue}else if(z=le*ue,Ee=Cy(this,le,z,me*Math.PI/180,we*Math.PI/180),isNaN(y))(re===Fc||re===Ac)&&(y=(Ee-E)/(360<=we?oe:oe-1));else if(re===Fc||re===Ac)Ee=(Ee-E)/(360<=we?oe:oe-1),Ee<y?(le=j0(this,E+y*(360<=we?oe:oe-1),ue,me*Math.PI/180,we*Math.PI/180),z=le*ue):y=Ee;else{for(te=-1/0,E=0;E<oe;E++)De=b.M(E),je=b.M(E===oe-1?0:E+1),isNaN(De.diameter)&&bf(De,0),isNaN(je.diameter)&&bf(je,0),te=Math.max(te,(De.diameter+je.diameter)/2);te+=y,E=j0(this,te*(360<=we?oe:oe-1),ue,me*Math.PI/180,we*Math.PI/180),E>le?(le=E,z=le*ue):te=Ee/(360<=we?oe:oe-1)}if(this.kw=re,this.lc=le,this.Zm=ue,this.lw=me,this.Wp=we,this.Ti=y,this.me=z,this.Jp=te,y=b,b=this.kw,re=this.lc,le=this.lw,ue=this.Wp,me=this.Ti,we=this.me,oe=this.Jp,this.direction!==ng&&this.direction!==bp||b!==Ac)if(this.direction===ng||this.direction===bp){switch(te=0,b){case wf:te=180*z0(this,re,we,le,oe)/Math.PI;break;case Fc:oe=y=0,te=a.first(),te!==null&&(y=bf(te,Math.PI/2)),te=x.first(),te!==null&&(oe=bf(te,Math.PI/2)),te=180*z0(this,re,we,le,me+(y+oe)/2)/Math.PI;break;case Vh:te=ue/y.length}if(this.direction===ng){switch(b){case wf:vm(this,a,le,Cf);break;case Fc:mm(this,a,le,Cf);break;case Vh:pm(this,a,ue/2,le,Cf)}switch(b){case wf:vm(this,x,le+te,Kl);break;case Fc:mm(this,x,le+te,Kl);break;case Vh:pm(this,x,ue/2,le+te,Kl)}}else{switch(b){case wf:vm(this,x,le,Cf);break;case Fc:mm(this,x,le,Cf);break;case Vh:pm(this,x,ue/2,le,Cf)}switch(b){case wf:vm(this,a,le+te,Kl);break;case Fc:mm(this,a,le+te,Kl);break;case Vh:pm(this,a,ue/2,le+te,Kl)}}}else switch(b){case wf:vm(this,y,le,this.direction);break;case Fc:mm(this,y,le,this.direction);break;case Vh:pm(this,y,ue,le,this.direction);break;case Ac:T1(this,y,ue,le,this.direction)}else T1(this,y,ue,le-ue/2,Kl)}this.updateParts(),this.network=null,this.isValidLayout=!0};function pm(a,y,x,b,E){var z=a.Wp,te=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=b+(E===Kl?oe*x/(360<=z?re:re-1):-(oe*x)/re),ue=y.M(oe),me=te*Math.tan(le)/a;me=Math.sqrt((te*te+a*a*me*me)/(1+me*me)),ue.centerX=me*Math.cos(le),ue.centerY=me*Math.sin(le),ue.actualAngle=180*le/Math.PI}}function mm(a,y,x,b){var E=a.lc,z=a.me,te=a.Ti;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe),ue=y.M(oe===re-1?0:oe+1),me=z*Math.sin(x);le.centerX=E*Math.cos(x),le.centerY=me,le.actualAngle=180*x/Math.PI,isNaN(le.diameter)&&bf(le,0),isNaN(ue.diameter)&&bf(ue,0),le=z0(a,E,z,b===Kl?x:-x,(le.diameter+ue.diameter)/2+te),x+=b===Kl?le:-le}}function vm(a,y,x,b){var E=a.lc,z=a.me,te=a.Jp;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe);le.centerX=E*Math.cos(x),le.centerY=z*Math.sin(x),le.actualAngle=180*x/Math.PI,le=z0(a,E,z,b===Kl?x:-x,te),x+=b===Kl?le:-le}}function T1(a,y,x,b,E){var z=a.Wp;if(a.mj=0,a.Xr=new ym,360>x){for(z=b+(E===Kl?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,I1(a,y,x,b,E)}else k1(a,y,x,b,E);a.Xr.commit(y)}function k1(a,y,x,b,E){var z=a.lc,te=a.Ti,re=a.Zm,oe=z*Math.cos(b*Math.PI/180),le=a.me*Math.sin(b*Math.PI/180),ue=y.Fa();if(ue.length===3)ue[0].centerX=z,ue[0].centerY=0,ue[1].centerX=ue[0].centerX-ue[0].width/2-ue[1].width/2-te,ue[1].y=ue[0].y,ue[2].centerX=(ue[0].centerX+ue[1].centerX)/2,ue[2].y=ue[0].y-ue[2].height-te;else if(ue.length===4)ue[0].centerX=z,ue[0].centerY=0,ue[2].centerX=-ue[0].centerX,ue[2].centerY=ue[0].centerY,ue[1].centerX=0,ue[1].y=Math.min(ue[0].y,ue[2].y)-ue[1].height-te,ue[3].centerX=0,ue[3].y=Math.max(ue[0].y+ue[0].height+te,ue[2].y+ue[2].height+te);else{z=Qe.alloc();for(var me=0;me<ue.length&&(ue[me].centerX=oe,ue[me].centerY=le,!(me>=ue.length-1));me++)O1(a,oe,le,ue,me,E,z)||R1(a,oe,le,ue,me,E,z),oe=z.x,le=z.y;if(Qe.free(z),a.mj++,!(23<a.mj)){oe=ue[0].centerX,le=ue[0].centerY,z=ue[ue.length-1].centerX,me=ue[ue.length-1].centerY;var we=Math.abs(oe-z)-((ue[0].width+ue[ue.length-1].width)/2+te),Ee=Math.abs(le-me)-((ue[0].height+ue[ue.length-1].height)/2+te);te=0,1>Math.abs(Ee)?Math.abs(oe-z)<(ue[0].width+ue[ue.length-1].width)/2&&(te=0):te=0<Ee?Ee:1>Math.abs(we)?0:we,oe=Math.abs(z)>Math.abs(me)?0<z!=le>me:0<me!=oe<z,(oe=E===Kl?oe:!oe)&&(te=-Math.abs(te),te=Math.min(te,-ue[ue.length-1].width),te=Math.min(te,-ue[ue.length-1].height)),a.Xr.compare(te,ue),1<Math.abs(te)&&(a.lc=8>a.mj?a.lc-te/(2*Math.PI):5>ue.length&&10<te?a.lc/2:a.lc-(0<te?1.7:-2.3),a.me=a.lc*re,k1(a,y,x,b,E))}}}function I1(a,y,x,b,E){for(var z=a.lc,te=a.me,re=a.Zm,oe=z*Math.cos(b*Math.PI/180),le=te*Math.sin(b*Math.PI/180),ue=Qe.alloc(),me=y.Fa(),we=0;we<me.length&&(me[we].centerX=oe,me[we].centerY=le,!(we>=me.length-1));we++)O1(a,oe,le,me,we,E,ue)||R1(a,oe,le,me,we,E,ue),oe=ue.x,le=ue.y;if(Qe.free(ue),a.mj++,!(23<a.mj)){if(oe=Math.atan2(le,oe),oe=E===Kl?a.gt-oe:oe-a.gt,oe=Math.abs(oe)<Math.abs(oe-2*Math.PI)?oe:oe-2*Math.PI,z=oe*(z+te)/2,te=a.Xr,Math.abs(z)<Math.abs(te.Pl))for(te.Pl=z,te.mk=[],te.tm=[],oe=0;oe<me.length;oe++)te.mk[oe]=me[oe].bounds.x,te.tm[oe]=me[oe].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*re,I1(a,y,x,b,E))}}function O1(a,y,x,b,E,z,te){var re=a.lc,oe=a.me,le=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ue=!1;if(0<=x!=(z===Kl)){if(z=y+a,z>re){if(z=y-a,z<-re)return te.x=z,te.y=le,!1;ue=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return te.x=z,te.y=le,!1;ue=!0}return le=Math.sqrt(1-Math.min(1,z*z/(re*re)))*oe,0>x!==ue&&(le=-le),Math.abs(x-le)>(b[E].height+b[E+1].height)/2?(te.x=z,te.y=le,!1):(te.x=z,te.y=le,!0)}function R1(a,y,x,b,E,z,te){var re=a.lc,oe=a.me,le=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(z===Kl)){if(z=x-a,z<-oe){if(z=x+a,z>oe){te.x=le,te.y=z;return}b=!0}}else if(z=x+a,z>oe){if(z=x-a,z<-oe){te.x=le,te.y=z;return}b=!0}le=Math.sqrt(1-Math.min(1,z*z/(oe*oe)))*re,0>y!==b&&(le=-le),te.x=le,te.y=z}Ga.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Ga.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 Qe(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))},Ga.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function Cy(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 te=0,re=b!==void 0&&E!==void 0?E/(z+1):Math.PI/(2*(z+1)),oe=0,le=0;le<=z;le++){b!==void 0&&E!==void 0?oe=b+le*E/z:oe=le*Math.PI/(2*z);var ue=Math.sin(oe);te+=Math.sqrt(1-a*a*ue*ue)*re}return b!==void 0&&E!==void 0?(y>x?y:x)*te:4*(y>x?y:x)*te}function j0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?Cy(a,1,x,b,E):Cy(a,1,x))}function z0(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,te=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var re=0;;re++){var oe=Math.sin(b+re*a);if(te+=(y>x?y:x)*Math.sqrt(1-z*z*oe*oe)*a,te>=E)return re*a}}Ga.prototype.sort=function(a){switch(this.sorting){case H0:break;case Z0:a.reverse();break;case W0:a.sort(this.comparer);break;case G0:a.sort(this.comparer),a.reverse();break;case Ep:return this.ak(Tx(a));default:St("Invalid sorting type.")}return a};function Tx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Rn;for(var b=0;b<a.length;b++){var E=-1,z=-1;if(b===0)for(var te=0;te<a.length;te++){var re=a.M(te).edgesCount;re>E&&(E=re,z=te)}else for(te=0;te<a.length;te++)re=y[te],re>E&&(E=re,z=te);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),te=z.sourceEdges;te.next();)E=a.indexOf(te.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}Ga.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 te=[],re=[];b=[],E=new Rn;for(var oe=0,le=0;le<y.length;le++){var ue=y[le].length;if(ue===1)b.push(le);else if(ue===0)E.add(a.M(le));else{if(oe===0)x.push(le);else{for(var me=ue=1/0,we=-1,Ee=[],De=0;De<x.length;De++)0>y[x[De]].indexOf(x[De===x.length-1?0:De+1])&&Ee.push(De===x.length-1?0:De+1);if(Ee.length===0)for(De=0;De<x.length;De++)Ee.push(De);for(De=0;De<Ee.length;De++){for(var je=Ee[De],ct=y[le],qe=0,Ct=0;Ct<te.length;Ct++){var Lt=z[te[Ct]],Rt=z[re[Ct]];if(Lt<Rt){var Jt=Lt;Lt=Rt}else Jt=Rt;if(Jt<je&&je<=Lt)for(Rt=0;Rt<ct.length;Rt++){var vn=ct[Rt];0>x.indexOf(vn)||Jt<z[vn]&&z[vn]<Lt||Jt===z[vn]||Lt===z[vn]||qe++}else for(Rt=0;Rt<ct.length;Rt++)vn=ct[Rt],0>x.indexOf(vn)||Jt<z[vn]&&z[vn]<Lt&&Jt!==z[vn]&&Lt!==z[vn]&&qe++}for(ct=qe,Ct=qe=0;Ct<y[le].length;Ct++)Jt=x.indexOf(y[le][Ct]),0<=Jt&&(Jt=Math.abs(je-(Jt>=je?Jt+1:Jt)),qe+=Jt<x.length+1-Jt?Jt:x.length+1-Jt);for(Ct=0;Ct<te.length;Ct++)Jt=z[te[Ct]],Lt=z[re[Ct]],Jt>=je&&Jt++,Lt>=je&&Lt++,Jt>Lt&&(Rt=Lt,Lt=Jt,Jt=Rt),Lt-Jt<(x.length+2)/2==(Jt<je&&je<=Lt)&&qe++;(ct<ue||ct===ue&&qe<me)&&(ue=ct,me=qe,we=je)}for(x.splice(we,0,le),ue=0;ue<x.length;ue++)z[x[ue]]=ue;for(ue=0;ue<y[le].length;ue++)me=y[le][ue],0<=x.indexOf(me)&&(te.push(le),re.push(me))}oe++}}for(te=x.length;;){for(z=!0,re=0;re<b.length;re++)if(oe=b[re],le=y[oe][0],ue=x.indexOf(le),0<=ue){for(we=me=0;we<y[le].length;we++)Ee=x.indexOf(y[le][we]),0>Ee||Ee===ue||(De=Ee>ue?Ee-ue:ue-Ee,me+=Ee<ue!=De>te-De?1:-1);x.splice(0>me?ue:ue+1,0,oe),b.splice(re,1),re--}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},Ye.Object.defineProperties(Ga.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!==Ac&&a!==Fc&&a!==wf&&a!==Vh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Kl&&a!==Cf&&a!==ng&&a!==bp||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==H0&&a!==Z0&&a!==W0&&!G0&&a!==Ep||(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!==$0&&a!==jg||(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 Fc=new gn(Ga,"ConstantSpacing",0),wf=new gn(Ga,"ConstantDistance",1),Vh=new gn(Ga,"ConstantAngle",2),Ac=new gn(Ga,"Packed",3),Kl=new gn(Ga,"Clockwise",4),Cf=new gn(Ga,"Counterclockwise",5),ng=new gn(Ga,"BidirectionalLeft",6),bp=new gn(Ga,"BidirectionalRight",7),H0=new gn(Ga,"Forwards",8),Z0=new gn(Ga,"Reverse",9),W0=new gn(Ga,"Ascending",10),G0=new gn(Ga,"Descending",11),Ep=new gn(Ga,"Optimized",12),$0=new gn(Ga,"Pythagorean",13),jg=new gn(Ga,"Circular",14);Ga.className="CircularLayout",Ga.ConstantSpacing=Fc,Ga.ConstantDistance=wf,Ga.ConstantAngle=Vh,Ga.Packed=Ac,Ga.Clockwise=Kl,Ga.Counterclockwise=Cf,Ga.BidirectionalLeft=ng,Ga.BidirectionalRight=bp,Ga.Forwards=H0,Ga.Reverse=Z0,Ga.Ascending=W0,Ga.Descending=G0,Ga.Optimized=Ep,Ga.Pythagorean=$0,Ga.Circular=jg;function ym(){this.Pl=-1/0,this.tm=this.mk=null}ym.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},ym.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]}},ym.className="VertexArrangement";function Mp(a){ca.call(this,a)}Kt(Mp,ca),Mp.prototype.createVertex=function(){return new Sm(this)},Mp.prototype.createEdge=function(){return new K0(this)},Mp.className="CircularNetwork";function Sm(a){Ms.call(this,a),this.u=this.Si=NaN}Kt(Sm,Ms);function bf(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Ac)if(x.nodeDiameterFormula===jg)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===jg?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Ye.Object.defineProperties(Sm.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)}}}),Sm.className="CircularVertex";function K0(a){Tu.call(this,a)}Kt(K0,Tu),K0.className="CircularEdge";function ml(a){Ma.call(this),this.ah=null,this.An=0,this.$d=new pi(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)}Kt(ml,Ma),ml.prototype.cloneProtected=function(a){Ma.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},ml.prototype.createNetwork=function(){return new zg(this)},ml.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}j1(this,0,a)}this.network=y;var te=b=x.iterator;b=this.arrangementSpacing;var re=te.count,oe=!0;z=E=0;for(var le=Sn(),ue=0;ue<re+y.vertexes.count+2;ue++)le[ue]=null;re=0,te.reset();for(var me=_t.alloc();te.next();)if(ue=te.value,this.computeBounds(ue,me),oe)oe=!1,E=me.x+me.width/2,z=me.y+me.height/2,le[0]=new Qe(me.x+me.width+b.width,me.y),le[1]=new Qe(me.x,me.y+me.height+b.height),re=2;else{var we=z1(le,re,E,z,me.width,me.height,b),Ee=le[we],De=new Qe(Ee.x+me.width+b.width,Ee.y),je=new Qe(Ee.x,Ee.y+me.height+b.height);for(we+1<re&&le.splice(we+1,0,null),le[we]=De,le[we+1]=je,re++,we=Ee.x-me.x,Ee=Ee.y-me.y,ue=ue.vertexes.iterator;ue.next();)De=ue.value,De.centerX+=we,De.centerY+=Ee}for(_t.free(me),ue=y.vertexes.iterator;ue.next();)te=ue.value,we=te.bounds,2>re?(E=we.x+we.width/2,z=we.y+we.height/2,le[0]=new Qe(we.x+we.width+b.width,we.y),le[1]=new Qe(we.x,we.y+we.height+b.height),re=2):(oe=z1(le,re,E,z,we.width,we.height,b),me=le[oe],Ee=new Qe(me.x+we.width+b.width,me.y),we=new Qe(me.x,me.y+we.height+b.height),oe+1<re&&le.splice(oe+1,0,null),le[oe]=Ee,le[oe+1]=we,re++,te.centerX=me.x+te.width/2,te.centerY=me.y+te.height/2);for(Gn(le),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)}}Z1(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},ml.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},ml.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 j1(a,y,x){if(kx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Ix(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,j1(a,y+1,x),Z1(a,z),Ox(a,E),y=E.vertexes.Fa(),y.sort(function(te,re){return te===null||re===null||te===re?0:re.Vd-te.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=b}}function kx(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 Ix(a,y){for(var x=a.network,b=new zg(a),E=0;E<a.ah.length;E++){var z=a.ah[E];if(1<z.Vd){b.dh(z);var te=new W1;te.Rs=z.Vd,te.Ss=z.width,te.Qs=z.height,te.Sv=z.focus.x,te.Tv=z.focus.y,z.We===null&&(z.We=new Rn),z.We.add(te),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var re=z.value;E=re.fromVertex,te=re.toVertex,E.network===b&&te.network===b?b.Bo(re):E.network===b?(re=E.Hj,re===null&&(re=new Rn,E.Hj=re),re.add(te),E.Vd--,E.sh+=te.sh):te.network===b&&(re=te.Hj,re===null&&(re=new Rn,te.Hj=re),re.add(E),te.Vd--,te.sh+=E.sh)}for(E=b.edges.iterator;E.next();)z=E.value,z.length*=Math.max(1,en.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var oe=E.Hj;if(oe!==null&&0<oe.count&&(te=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=te))){for(var le=re=0,ue=oe.count-te;ue<oe.count;ue++){var me=oe.M(ue),we=null;for(z=me.edges.iterator;z.next();){var Ee=z.value;if(Ee.Ax(me)===E){we=Ee;break}}we!==null&&(le+=we.length,re+=me.width*me.height)}z=E.centerX,oe=E.centerY,ue=E.width,me=E.height,we=E.focus,Ee=ue*me,1>Ee&&(Ee=1),re=en.sqrt((re+Ee+le*le*4/(te*te))/Ee),te=(re-1)*ue/2,re=(re-1)*me/2,E.bounds=new _t(z-we.x-te,oe-we.y-re,ue+2*te,me+2*re),E.focus=new Qe(we.x+te,we.y+re)}}return a.network=b,x}function Ox(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,te=E.Tv;b.bounds=new _t(b.centerX-z,b.centerY-te,E.Ss,E.Qs),b.focus=new Qe(z,te),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,te=y.height;y.We!==null&&0<y.We.count&&(te=y.We.M(0),z=te.Ss,te=te.Qs),z=en.sqrt(z*z+te*te)/2;for(var re=!1,oe=te=0,le=0,ue=y.vertexes.iterator;ue.next();){var me=ue.value;1>=me.Vd?oe++:(re=!0,le++,te+=Math.atan2(y.centerY-me.centerY,y.centerX-me.centerX))}if(oe!==0){for(0<le&&(te/=le),le=y=0,y=re?2*Math.PI/(oe+1):2*Math.PI/oe,oe%2===0&&(le=y/2),1<x.count&&x.sort(function(Ee,De){return Ee===null||De===null||Ee===De?0:De.width*De.height-Ee.width*Ee.height}),re=oe%2===0?0:1,x=x.iterator;x.next();)if(oe=x.value,!(1<oe.Vd||a.isFixed(oe))){for(ue=null,me=oe.edges.iterator;me.next();){ue=me.value;break}me=oe.width;var we=oe.height;me=en.sqrt(me*me+we*we)/2,ue=z+ue.length+me,me=te+(y*(re/2>>1)+le)*(re%2===0?1:-1),oe.centerX=b+ue*Math.cos(me),oe.centerY=E+ue*Math.sin(me),re++}}}}function z1(a,y,x,b,E,z,te){var re=9e19,oe=-1,le=0;e:for(;le<y;le++){var ue=a[le],me=ue.x-x,we=ue.y-b;if(me=me*me+we*we,me<re){for(we=le-1;0<=we;we--)if(a[we].y>ue.y&&a[we].x-ue.x<E+te.width)continue e;for(we=le+1;we<y;we++)if(a[we].x>ue.x&&a[we].y-ue.y<z+te.height)continue e;oe=le,re=me}}return oe}ml.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},ml.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 H1(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var z=y.bounds,te=z.x;y=z.y;var re=z.width;return z=z.height,b+E<te?a>y+z?(x=b+E-te,a=a-y-z,en.sqrt(x*x+a*a)):a+x<y?(b=b+E-te,a=a+x-y,en.sqrt(b*b+a*a)):te-(b+E):b>te+re?a>y+z?(x=b-te-re,a=a-y-z,en.sqrt(x*x+a*a)):a+x<y?(b=b-te-re,a=a+x-y,en.sqrt(b*b+a*a)):b-(te+re):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function Z1(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jx(a)););a.ah=null}function jx(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var b=x.centerX,E=b,z=x=x.centerY,te=1;te<y.length;te++){var re=y[te];re.forceX=0,re.forceY=0;var oe=re.centerX;re=re.centerY,b=Math.min(b,oe),E=Math.max(E,oe),x=Math.min(x,re),z=Math.max(z,re)}(E=E-b>z-x)?y.sort(function(je,ct){return je===null||ct===null||je===ct?0:je.centerX-ct.centerX}):y.sort(function(je,ct){return je===null||ct===null||je===ct?0:je.centerY-ct.centerY}),x=a.Zf;var le=b=re=0;for(z=0;z<y.length;z++){te=y[z],b=te.bounds,re=te.focus,oe=b.x+re.x;var ue=b.y+re.y;b=te.charge*a.electricalFieldX(oe,ue),le=te.charge*a.electricalFieldY(oe,ue),b+=te.mass*a.gravitationalFieldX(oe,ue),le+=te.mass*a.gravitationalFieldY(oe,ue),te.forceX+=b,te.forceY+=le;for(var me=z+1;me<y.length;me++){var we=y[me];if(we!==te){b=we.bounds,re=we.focus,le=b.x+re.x;var Ee=b.y+re.y;if(oe-le>x||le-oe>x){if(E)break}else if(ue-Ee>x||Ee-ue>x){if(!E)break}else{var De=H1(te,we);1>De?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new V0),De=b.random(),re=b.random(),oe>le?(b=Math.abs(we.bounds.right-te.bounds.x),b=(1+b)*De):oe<le?(b=Math.abs(we.bounds.x-te.bounds.right),b=-(1+b)*De):(b=Math.max(we.width,te.width),b=(1+b)*De-b/2),ue>Ee?(le=Math.abs(we.bounds.bottom-te.bounds.y),le=(1+le)*re):oe<le?(le=Math.abs(we.bounds.y-te.bounds.bottom),le=-(1+le)*re):(le=Math.max(we.height,te.height),le=(1+le)*re-le/2)):(re=-(te.charge*we.charge)/(De*De),b=(le-oe)/De*re,le=(Ee-ue)/De*re),te.forceX+=b,te.forceY+=le,we.forceX-=b,we.forceY-=le}}}}for(E=a.network.edges.iterator;E.next();)re=E.value,x=re.fromVertex,z=re.toVertex,te=x.bounds,oe=x.focus,b=te.x+oe.x,te=te.y+oe.y,ue=z.bounds,me=z.focus,oe=ue.x+me.x,ue=ue.y+me.y,me=H1(x,z),1>me?(me=a.randomNumberGenerator,me===null&&(a.randomNumberGenerator=me=new V0),re=me.random(),me=me.random(),b=(b>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,le=(te>ue?1:-1)*(1+(z.height>x.height?z.height:x.height))*me):(re=re.stiffness*(me-re.length),b=(oe-b)/me*re,le=(ue-te)/me*re),x.forceX+=b,x.forceY+=le,z.forceX-=b,z.forceY-=le;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}ml.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},ml.prototype.moveFixedVertex=function(){},ml.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},ml.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Vo,y.toSpot=Vo)}},ml.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=_t.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,_t.free(x)}x=_t.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()}_t.free(x)},ml.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},ml.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},ml.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},ml.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},ml.prototype.electricalFieldX=function(){return 0},ml.prototype.electricalFieldY=function(){return 0},ml.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},ml.prototype.gravitationalFieldX=function(){return 0},ml.prototype.gravitationalFieldY=function(){return 0},ml.prototype.isFixed=function(a){return a.isFixed},Ye.Object.defineProperties(ml.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&St('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),ml.className="ForceDirectedLayout";function W1(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}W1.className="ForceDirectedSubnet";function zg(a){ca.call(this,a)}Kt(zg,ca),zg.prototype.createVertex=function(){return new xm(this)},zg.prototype.createEdge=function(){return new Pm(this)},zg.className="ForceDirectedNetwork";function xm(a){Ms.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}Kt(xm,Ms),Ye.Object.defineProperties(xm.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)}}}),xm.className="ForceDirectedVertex";function Pm(a){Tu.call(this,a),this.j=this.o=NaN}Kt(Pm,Tu),Ye.Object.defineProperties(Pm.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)}}}),Pm.className="ForceDirectedEdge";function V0(){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()}V0.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},V0.className="RandomNumberGenerator";function ea(a){Ma.call(this),this.kc=this.ie=25,this.K=0,this.Dk=J0,this.Zk=Q0,this.Qk=q0,this.bj=4,this.rk=ev,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 Qe,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Kt(ea,Ma),ea.prototype.cloneProtected=function(a){Ma.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},ea.prototype.qb=function(a){a.classType===ea?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:St("Unknown enum value: "+a):Ma.prototype.qb.call(this,a)},ea.prototype.createNetwork=function(){return new Np(this)},ea.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!==Cm&&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===Cm&&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 te=0,re=0,oe=0,le=0;if(b.link!==null){if(re=b.link,re===null)continue;var ue=E.node;if(te=z.node,ue===null||te===null)continue;var me=re.fromNode;oe=re.toNode;for(var we=re.fromPort;we!==null&&!we.Ed();)we=we.panel;for(re=re.toPort;re!==null&&!re.Ed();)re=re.panel;if(b.rev){le=me;var Ee=we;me=oe,we=re,oe=le,re=Ee}var De=E.focus;le=z.focus;var je=b.rev?z.bounds:E.bounds;Ee=Qe.alloc(),ue!==me?je.w()&&me.isVisible()?me.actualBounds.w()?(Zh(me,we,wo,Ee),Ee.x+=me.actualBounds.x-je.x,Ee.y+=me.actualBounds.y-je.y):(Zh(me,we,wo,Ee),Ee.w()||Ee.assign(De)):Ee.assign(De):je.w()?(Zh(me,we,wo,Ee),Ee.w()||Ee.assign(De)):Ee.assign(De),me=b.rev?E.bounds:z.bounds,ue=Qe.alloc(),te!==oe?me.w()&&oe.isVisible()?oe.actualBounds.w()?(Zh(oe,re,wo,ue),ue.x+=oe.actualBounds.x-me.x,ue.y+=oe.actualBounds.y-me.y):(Zh(oe,re,wo,ue),ue.w()||ue.assign(le)):ue.assign(le):me.w()?(Zh(oe,re,wo,ue),ue.w()||ue.assign(le)):ue.assign(le),this.K===90||this.K===270?(te=Math.round((Ee.x-De.x)/this.kc),oe=Ee.x,re=Math.round((ue.x-le.x)/this.kc),le=ue.x):(te=Math.round((Ee.y-De.y)/this.kc),oe=Ee.y,re=Math.round((ue.y-le.y)/this.kc),le=ue.y),Qe.free(Ee),Qe.free(ue),b.portFromColOffset=te,b.portFromPos=oe,b.portToColOffset=re,b.portToPos=le}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Ee=E.layer,ue=z.layer,me=0,je=b.link,je!==null){var ct=je.fromPort,qe=je.toPort;if(ct!==null&&qe!==null){var Ct=je.fromNode;if(we=je.toNode,Ct!==null&&we!==null){var Lt=Y0(this,!0),Rt=Y0(this,!1),Jt=this.setsPortSpots?Lt:je.computeSpot(!0,ct);De=this.setsPortSpots?Rt:je.computeSpot(!1,qe);var vn=je.isOrthogonal;Jt.$c()&&Jt.Hf(Rt)&&De.$c()&&De.Hf(Lt)?me=0:(Lt=je.getLinkPoint(Ct,ct,Jt,!0,vn,we,qe,Qe.alloc()),Rt=je.getLinkDirection(Ct,ct,Lt,Jt,!0,vn,we,qe),Qe.free(Lt),Jt.ys()||Rt!==J1(this,b,!0)?this.setsPortSpots&&Ct!==null&&Ct.ports.count===1&&b.rev&&(me+=1):me+=1,Jt=je.getLinkPoint(we,qe,De,!1,vn,Ct,ct,Qe.alloc()),je=je.getLinkDirection(we,qe,Jt,De,!1,vn,Ct,ct),Qe.free(Jt),De.ys()||je!==J1(this,b,!1)?this.setsPortSpots&&we!==null&&we.ports.count===1&&b.rev&&(me+=2):me+=2)}}}if(we=me,me=we===1||we===3,(we=we===2||we===3)&&(De=a.createVertex(),De.node=null,De.Dj=1,De.layer=Ee,De.near=E,a.dh(De),E=a.Zj(E,De,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=te,E.portToColOffset=0,E.portFromPos=oe,E.portToPos=0,E=De),je=1,me&&je--,Ee-ue>je&&0<Ee){for(b.valid=!1,De=a.createVertex(),De.node=null,De.Dj=2,De.layer=Ee-1,a.dh(De),E=a.Zj(E,De,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=we?0:te,E.portToColOffset=0,E.portFromPos=we?0:oe,E.portToPos=0,E=De,Ee--;Ee-ue>je&&0<Ee;)De=a.createVertex(),De.node=null,De.Dj=3,De.layer=Ee-1,a.dh(De),E=a.Zj(E,De,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=De,Ee--;E=a.Zj(De,z,b.link),E.valid=!me,me&&(De.near=z),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=re,E.portFromPos=0,E.portToPos=le}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=Ef(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),Mf(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},ea.prototype.linkMinLength=function(){return 1};function by(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}ea.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},ea.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 au(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 tc(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 G1(a,y,x){var b=Ef(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var z=a.Jn,te=0;te<E;te++){var re=0,oe=b[te],le=oe.near;if(le!==null&&le.layer===oe.layer)if(oe=le.index,oe>te)for(var ue=te+1;ue<oe;ue++){var me=b[ue];me.near===le&&me.Dj===le.Dj||re++}else for(ue=te-1;ue>oe;ue--)me=b[ue],me.near===le&&me.Dj===le.Dj||re++;var we;if(0<=x)for(oe=b[te].sourceEdgesArrayAccess,le=0;le<oe.length;le++){var Ee=oe[le];if(Ee.valid&&Ee.fromVertex.layer!==y)for(me=Ee.fromVertex.index,ue=Ee.portToPos,Ee=Ee.portFromPos,we=le+1;we<oe.length;we++){var De=oe[we];if(De.valid&&De.fromVertex.layer!==y){var je=De.fromVertex.index,ct=De.portToPos;De=De.portFromPos,ue<ct&&(me>je||me===je&&Ee>De)&&re++,ct<ue&&(je>me||je===me&&De>Ee)&&re++}}}if(0>=x){for(oe=b[te].destinationEdgesArrayAccess,le=0;le<oe.length;le++)if(Ee=oe[le],Ee.valid&&Ee.toVertex.layer!==y)for(me=Ee.toVertex.index,ue=Ee.portToPos,Ee=Ee.portFromPos,we=le+1;we<oe.length;we++)De=oe[we],De.valid&&De.toVertex.layer!==y&&(je=De.toVertex.index,ct=De.portToPos,De=De.portFromPos,Ee<De&&(me>je||me===je&&ue>ct)&&re++,De<Ee&&(je>me||je===me&&ct>ue)&&re++)}for(z[te*E+te]=re,oe=te+1;oe<E;oe++){var qe=0,Ct=0;if(0<=x){re=b[te].sourceEdgesArrayAccess;var Lt=b[oe].sourceEdgesArrayAccess;for(le=0;le<re.length;le++)if(Ee=re[le],Ee.valid&&Ee.fromVertex.layer!==y)for(me=Ee.fromVertex.index,Ee=Ee.portFromPos,we=0;we<Lt.length;we++)De=Lt[we],De.valid&&De.fromVertex.layer!==y&&(je=De.fromVertex.index,De=De.portFromPos,(me<je||me===je&&Ee<De)&&Ct++,(je<me||je===me&&De<Ee)&&qe++)}if(0>=x){for(re=b[te].destinationEdgesArrayAccess,Lt=b[oe].destinationEdgesArrayAccess,le=0;le<re.length;le++)if(Ee=re[le],Ee.valid&&Ee.toVertex.layer!==y)for(me=Ee.toVertex.index,ue=Ee.portToPos,we=0;we<Lt.length;we++)De=Lt[we],De.valid&&De.toVertex.layer!==y&&(je=De.toVertex.index,ct=De.portToPos,(me<je||me===je&&ue<ct)&&Ct++,(je<me||je===me&&ct<ue)&&qe++)}z[te*E+oe]=qe,z[oe*E+te]=Ct}}return Mf(a,y,b),z}ea.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=G1(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 U0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,z=Ef(b,E),te=b.tc[E],re=0,oe=0;oe<te;oe++){var le=z[oe].destinationEdgesArrayAccess;if(le!==null)for(var ue=0;ue<le.length;ue++){var me=le[ue];if(me.valid&&me.toVertex.layer!==E){var we=me.fromVertex.column+me.portFromColOffset,Ee=me.toVertex.column+me.portToColOffset;re+=(Math.abs(we-Ee)+1)*by(me)}}}Mf(b,E,z),y+=re}return y}ea.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 Ey(a,y,x){for(var b=Ef(a,y),E=a.tc[y],z=[],te=0;te<E;te++){var re=b[te],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ue=0,me=0,we=re.near;if(we!==null&&we.layer===re.layer&&(ue+=we.column-1,me++),oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Ee=re.fromVertex;re.valid&&!re.rev&&Ee.layer!==y&&(ue+=Ee.column,me++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(ue+=we.column,me++);z[te]=me===0?-1:ue/me}return Mf(a,y,b),z}function $1(a,y,x){for(var b=Ef(a,y),E=a.tc[y],z=[],te=0;te<E;te++){var re=b[te],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ue=0,me=[],we=re.near;if(we!==null&&we.layer===re.layer&&(me[ue]=we.column-1,ue++),re=void 0,oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Ee=re.fromVertex;re.valid&&!re.rev&&Ee.layer!==y&&(me[ue]=Ee.column+re.portFromColOffset,ue++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(me[ue]=we.column+re.portToColOffset,ue++);ue===0?z[te]=-1:(me.sort(function(De,je){return De-je}),le=ue>>1,z[te]=ue&1?me[le]:me[le-1]+me[le]>>1)}return Mf(a,y,b),z}function wm(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var te=y.destinationEdges;te.next();){var re=te.value,oe=re.toVertex,le=y.layer-oe.layer;re=a.linkMinLength(re),le===re&&wm(a,oe,x,b,E,z)}if(z)for(te=y.sourceEdges;te.next();)re=te.value,oe=re.fromVertex,le=oe.layer-y.layer,re=a.linkMinLength(re),le===re&&wm(a,oe,x,b,E,z)}}function My(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var te=y.destinationEdges;te.next();)My(a,te.value.toVertex,x,b,E,z);if(z)for(y=y.sourceEdges;y.next();)My(a,y.value.fromVertex,x,b,E,z)}}ea.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Fy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;zx(a)!==null;){for(E=K1(a);E!==null;)b[x]=E,x--,E.valid=!1,E=K1(a);for(E=V1(a);E!==null;)b[y]=E,y++,E.valid=!1,E=V1(a);E=null;for(var z=0,te=this.network.vertexes.iterator;te.next();){var re=te.value;if(re.valid){for(var oe=0,le=re.destinationEdges;le.next();)le.value.toVertex.valid&&oe++;le=0;for(var ue=re.sourceEdges;ue.next();)ue.value.fromVertex.valid&&le++;(E===null||z<oe-le)&&(E=re,z=oe-le)}}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 J0: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&&Ly(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&Ly(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 Cm: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 zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)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.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function V1(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 Ly(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,Ly(a,E))}y.finish=a.Kn,a.Kn++}ea.prototype.assignLayers=function(){switch(this.Zk){case Ay:U1(this);break;case Dy:for(var a,y=this.network.vertexes.iterator;y.next();)a=X1(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 Q0:for(U1(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 U1(a){for(var y=a.network.vertexes.iterator;y.next();){var x=_1(a,y.value);a.Ia=Math.max(x,a.Ia)}}function _1(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,_1(a,z)+E)}y.layer=x}else x=y.layer;return x}function X1(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,X1(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 te=b[z],re=te.fromVertex,oe=te.toVertex;te=a.linkMinLength(te),re.layer-oe.layer>te&&wm(a,re,0,-1,!0,!1)}for(wm(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,b=1/0,re=0,oe=null,te=a.network.vertexes.iterator;te.next();){var le=te.value;if(le.component===1){var ue=0,me=!1,we=le.sourceEdgesArrayAccess;E=we.length;for(var Ee=0;Ee<E;Ee++){var De=we[Ee],je=De.fromVertex;ue+=1,je.component!==1&&(z+=1,je=je.layer-le.layer,De=a.linkMinLength(De),b=Math.min(b,je-De))}for(we=le.destinationEdgesArrayAccess,E=we.length,Ee=0;Ee<E;Ee++)De=we[Ee].toVertex,--ue,De.component!==1?--z:me=!0;(oe===null||ue<re)&&!me&&(oe=le,re=ue)}}if(0<z){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else oe.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(wm(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,z=0,re=null,oe=a.network.vertexes.iterator;oe.next();)if(te=oe.value,te.component===1){for(le=0,ue=!1,we=te.sourceEdgesArrayAccess,me=we.length,Ee=0;Ee<me;Ee++)De=we[Ee].fromVertex,le+=1,De.component!==1?b+=1:ue=!0;for(we=te.destinationEdgesArrayAccess,me=we.length,Ee=0;Ee<me;Ee++)De=we[Ee],je=De.toVertex,--le,je.component!==1&&(--b,je=te.layer-je.layer,De=a.linkMinLength(De),E=Math.min(E,je-De));(re===null||le>z)&&!ue&&(re=te,z=le)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else re.component=0}}}function J1(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}ea.prototype.initializeIndices=function(){switch(this.Qk){default:case Ty: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 q0: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&&Q1(this,x);break;case By:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&q1(this,x)}};function Q1(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&&Q1(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))}ea.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=au(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)_0(this,b,1),fc(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=au(this)),b=this.Ia;0<=b;b--)_0(this,b,-1),fc(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=au(this))}for(tc(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)_0(this,b,0),fc(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=au(this)),b=this.Ia;0<=b;b--)_0(this,b,0),fc(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=au(this))}tc(this,y);var z,te,re;switch(this.rk){case ky:break;case Iy:for(re=a+1;(b=this.countCrossings())<re;)for(re=b,x=this.Ia;0<=x;x--)for(te=0;te<=x;te++){for(z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,-1)||z;for(E=this.countCrossings(),E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,1)||z;for(E=this.countCrossings(),E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,1)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,-1)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,0)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,0)||z;E>=a?tc(this,y):(a=E,y=au(this))}break;default:case ev:for(x=this.Ia,te=0,re=a+1;(b=this.countCrossings())<re;){for(re=b,z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,-1)||z;for(E=this.countCrossings(),E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,1)||z;for(E=this.countCrossings(),E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,1)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,-1)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,0)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,0)||z;E>=a?tc(this,y):(a=E,y=au(this))}}tc(this,y)};function _0(a,y,x){var b=Ef(a,y),E=a.tc[y],z=$1(a,y,x),te=Ey(a,y,x);for(x=0;x<E;x++)te[x]===-1&&(te[x]=b[x].column),z[x]===-1&&(z[x]=b[x].column);for(var re=!0,oe;re;)for(re=!1,x=0;x<E-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&te[x+1]<te[x])&&(re=!0,oe=z[x],z[x]=z[x+1],z[x+1]=oe,oe=te[x],te[x]=te[x+1],te[x+1]=oe,oe=b[x],b[x]=b[x+1],b[x+1]=oe);for(x=z=0;x<E;x++)oe=b[x],oe.index=x,z+=a.nodeMinColumnSpace(oe,!0),oe.column=z,z+=1,z+=a.nodeMinColumnSpace(oe,!1);Mf(a,y,b)}function fc(a,y,x){var b=Ef(a,y),E=a.tc[y];x=G1(a,y,x);var z,te=[];for(z=0;z<E;z++)te[z]=-1;var re=[];for(z=0;z<E;z++)re[z]=-1;for(var oe=!1,le=!0;le;)for(le=!1,z=0;z<E-1;z++){var ue=x[b[z].index*E+b[z+1].index],me=x[b[z+1].index*E+b[z].index],we=0,Ee=0,De=b[z].column,je=b[z+1].column,ct=a.nodeMinColumnSpace(b[z],!0),qe=a.nodeMinColumnSpace(b[z],!1),Ct=a.nodeMinColumnSpace(b[z+1],!0),Lt=a.nodeMinColumnSpace(b[z+1],!1);ct=De-ct+Ct,qe=je-qe+Lt;var Rt=b[z].sourceEdges.iterator;for(Rt.reset();Rt.next();)if(Ct=Rt.value,Lt=Ct.fromVertex,Ct.valid&&Lt.layer===y){for(Ct=0;b[Ct]!==Lt;)Ct++;Ct<z&&(we+=2*(z-Ct),Ee+=2*(z+1-Ct)),Ct===z+1&&(we+=1),Ct>z+1&&(we+=4*(Ct-z),Ee+=4*(Ct-(z+1)))}for(Rt=b[z].destinationEdges.iterator,Rt.reset();Rt.next();)if(Ct=Rt.value,Lt=Ct.toVertex,Ct.valid&&Lt.layer===y){for(Ct=0;b[Ct]!==Lt;)Ct++;Ct===z+1&&(Ee+=1)}for(Rt=b[z+1].sourceEdges.iterator,Rt.reset();Rt.next();)if(Ct=Rt.value,Lt=Ct.fromVertex,Ct.valid&&Lt.layer===y){for(Ct=0;b[Ct]!==Lt;)Ct++;Ct<z&&(we+=2*(z+1-Ct),Ee+=2*(z-Ct)),Ct===z&&(Ee+=1),Ct>z+1&&(we+=4*(Ct-(z+1)),Ee+=4*(Ct-z))}for(Rt=b[z+1].destinationEdges.iterator,Rt.reset();Rt.next();)if(Ct=Rt.value,Lt=Ct.toVertex,Ct.valid&&Lt.layer===y){for(Ct=0;b[Ct]!==Lt;)Ct++;Ct===z&&(we+=1)}Ct=Lt=0,Rt=te[b[z].index];var Jt=re[b[z].index],vn=te[b[z+1].index],Fi=re[b[z+1].index];Rt!==-1&&(Lt+=Math.abs(Rt-De),Ct+=Math.abs(Rt-qe)),Jt!==-1&&(Lt+=Math.abs(Jt-De),Ct+=Math.abs(Jt-qe)),vn!==-1&&(Lt+=Math.abs(vn-je),Ct+=Math.abs(vn-ct)),Fi!==-1&&(Lt+=Math.abs(Fi-je),Ct+=Math.abs(Fi-ct)),(Ee<we-.5||Ee===we&&me<ue-.5||Ee===we&&me===ue&&Ct<Lt-.5)&&(le=oe=!0,b[z].column=qe,b[z+1].column=ct,ue=b[z],b[z]=b[z+1],b[z+1]=ue)}for(z=0;z<E;z++)b[z].index=z;return Mf(a,y,b),oe}ea.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Ux)!==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=Lp(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Lp(this,y,-1)||x;x=Lp(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Ny(this,y,1);for(y=this.Md-1;0<=y;y--)Ny(this,y,-1);Ny(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Lp(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Lp(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Lp(this,y,0)||x}}else Gx(this)};function Lp(a,y,x){for(var b=!1;Hx(a,y,x);)b=!0;return b}function Hx(a,y,x){var b,E=Ef(a,y),z=a.tc[y],te=Ey(a,y,-1);if(0<x)for(b=0;b<z;b++)te[b]=-1;var re=Ey(a,y,1);if(0>x)for(b=0;b<z;b++)re[b]=-1;for(var oe=!1,le=!0;le;)for(le=!1,b=0;b<z;b++){var ue=E[b].column,me=a.nodeMinColumnSpace(E[b],!0),we=a.nodeMinColumnSpace(E[b],!1),Ee=0;0>b-1||ue-E[b-1].column-1>me+a.nodeMinColumnSpace(E[b-1],!1)?Ee=ue-1:Ee=ue,me=b+1>=z||E[b+1].column-ue-1>we+a.nodeMinColumnSpace(E[b+1],!0)?ue+1:ue;var De=we=0,je=0;if(0>=x)for(var ct=E[b].sourceEdges.iterator;ct.next();){var qe=ct.value,Ct=qe.fromVertex;if(qe.valid&&Ct.layer!==y){var Lt=by(qe),Rt=qe.portFromColOffset;qe=qe.portToColOffset,Ct=Ct.column,we+=(Math.abs(ue+qe-(Ct+Rt))+1)*Lt,De+=(Math.abs(Ee+qe-(Ct+Rt))+1)*Lt,je+=(Math.abs(me+qe-(Ct+Rt))+1)*Lt}}if(0<=x)for(ct=E[b].destinationEdges.iterator;ct.next();)qe=ct.value,Ct=qe.toVertex,qe.valid&&Ct.layer!==y&&(Lt=by(qe),Rt=qe.portFromColOffset,qe=qe.portToColOffset,Ct=Ct.column,we+=(Math.abs(ue+Rt-(Ct+qe))+1)*Lt,De+=(Math.abs(Ee+Rt-(Ct+qe))+1)*Lt,je+=(Math.abs(me+Rt-(Ct+qe))+1)*Lt);qe=Rt=Lt=0,ct=te[E[b].index],Ct=re[E[b].index],ct!==-1&&(Lt+=Math.abs(ct-ue),Rt+=Math.abs(ct-Ee),qe+=Math.abs(ct-me)),Ct!==-1&&(Lt+=Math.abs(Ct-ue),Rt+=Math.abs(Ct-Ee),qe+=Math.abs(Ct-me)),De<we||De===we&&Rt<Lt?(le=oe=!0,E[b].column=Ee):(je<we||je===we&&qe<Lt)&&(le=oe=!0,E[b].column=me)}return Mf(a,y,E),a.normalize(),oe}function Ny(a,y,x){var b=Ef(a,y),E=a.tc[y],z=$1(a,y,x),te=[];for(x=0;x<E;x++)te[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<E;x++){var re=b[x].column,oe=a.nodeMinColumnSpace(b[x],!0),le=a.nodeMinColumnSpace(b[x],!1),ue=0;if(te[x]===-1)if(x===0&&x===E-1)ue=re;else if(x===0){var me=b[x+1].column;me-re===le+a.nodeMinColumnSpace(b[x+1],!0)?ue=re-1:ue=re}else x===E-1?(me=b[x-1].column,ue=re-me===oe+a.nodeMinColumnSpace(b[x-1],!1)?re+1:re):(me=b[x-1].column,oe=me+a.nodeMinColumnSpace(b[x-1],!1)+oe+1,me=b[x+1].column,le=me-a.nodeMinColumnSpace(b[x+1],!0)-le-1,ue=(oe+le)/2|0);else x===0&&x===E-1?ue=te[x]:x===0?(me=b[x+1].column,le=me-a.nodeMinColumnSpace(b[x+1],!0)-le-1,ue=Math.min(te[x],le)):x===E-1?(me=b[x-1].column,oe=me+a.nodeMinColumnSpace(b[x-1],!1)+oe+1,ue=Math.max(te[x],oe)):(me=b[x-1].column,oe=me+a.nodeMinColumnSpace(b[x-1],!1)+oe+1,me=b[x+1].column,le=me-a.nodeMinColumnSpace(b[x+1],!0)-le-1,oe<te[x]&&te[x]<le?ue=te[x]:oe>=te[x]?ue=oe:le<=te[x]&&(ue=le));ue!==re&&(z=!0,b[x].column=ue)}Mf(a,y,b),a.normalize()}function Zx(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,z=a.nodeMinColumnSpace(E,!0),te=a.nodeMinColumnSpace(E,!1);if(E.column-z<=y&&E.column+te>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Wx(a,y){var x=y+1,b,E=[],z=[];for(b=0;b<=a.Ia;b++)E[b]=!1,z[b]=!1;for(var te=a.network.vertexes.iterator;te.next();){b=te.value;var re=b.column-a.nodeMinColumnSpace(b,!0),oe=b.column+a.nodeMinColumnSpace(b,!1);re<=y&&oe>=y&&(E[b.layer]=!0),re<=x&&oe>=x&&(z[b.layer]=!0)}for(re=!0,x=!1,b=0;b<=a.Ia;b++)re=re&&!(E[b]&&z[b]);if(re)for(te.reset();te.next();)a=te.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Zx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Wx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=au(a),z=U0(a);for(b=z+1;z<b;){b=z,tx(a,x,1);var te=U0(a);te>z?tc(a,E):te<z&&(z=te,E=au(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=au(a),z=U0(a),b=z+1;z<b;)b=z,tx(a,x,-1),te=U0(a),te>z?tc(a,E):te<z&&(z=te,E=au(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 te=z.layer,re=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),oe=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));re<=oe;re++)E[te*(a.Ra+1)+re]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(te=0;te<a.Ra;te++)E[z*(a.Ra+1)+te]!==-1&&E[z*(a.Ra+1)+te+1]!==-1&&E[z*(a.Ra+1)+te]!==E[z*(a.Ra+1)+te+1]&&(y[E[z*(a.Ra+1)+te]*a.le+E[z*(a.Ra+1)+te+1]]=!0);if(0>x)for(te=a.Ra;0<te;te--)E[z*(a.Ra+1)+te]!==-1&&E[z*(a.Ra+1)+te-1]!==-1&&E[z*(a.Ra+1)+te]!==E[z*(a.Ra+1)+te-1]&&(y[E[z*(a.Ra+1)+te]*a.le+E[z*(a.Ra+1)+te-1]]=!0)}for(E=[],z=0;z<a.le;z++)E[z]=!0;for(te=[],te.push(0);te.length!==0;)if(oe=te[te.length-1],te.pop(),E[oe])for(E[oe]=!1,z=0;z<a.le;z++)y[oe*a.le+z]&&te.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 Gx(a){for(var y=Sn(),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 _n,$x(y,x);var z=null,te=null,re=null,oe=null,le=(a.ve&1)!==0,ue=(a.ve&2)!==0,me=(a.ve&4)!==0,we=(a.ve&8)!==0;for(le&&(a.verticalAlignment(y,x,!0),z=X0(a,y,!0,!1)),y.reverse(),me&&(a.verticalAlignment(y,x,!1),re=X0(a,y,!1,!1)),b=Ri(y),E=b.next();!E.done;E=b.next())E.value.reverse();we&&(a.verticalAlignment(y,x,!1),oe=X0(a,y,!1,!0)),y.reverse(),ue&&(a.verticalAlignment(y,x,!0),te=X0(a,y,!0,!0)),Gn(y),a.u(z,te,re,oe),a.network.vertexes.each(function(Ee){var De=Sn();le&&De.push(z.get(Ee)),ue&&De.push(te.get(Ee)),me&&De.push(re.get(Ee)),we&&De.push(oe.get(Ee)),De.sort(function(ct,qe){return ct-qe});var je=De.length;je=(De[Math.floor((je-1)/2)]+De[Math.ceil((je-1)/2)])/2,Gn(De),Ee.zc=je})}function $x(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,z=0,te=a[b],re=a[b+1],oe=0;z<re.length;oe++){var le=re[oe];e:{if(le.node===null){var ue=Oy(le);if(0<ue.length){ue=ue[0].node===null;break e}}ue=!1}var me=ue;if(oe===re.length-1||me){for(ue=te.length-1,me&&(ue=Oy(le)[0].index);z<=oe;){if(le=re[z],!le.bo){me=[];for(var we=Ri(le.sourceEdgesArrayAccess),Ee=we.next();!Ee.done;Ee=we.next())Ee=Ee.value,Ee.valid&&me.push(Ee);le.bo=me}for(le=Ri(le.bo),me=le.next();!me.done;me=le.next())me=me.value,we=me.fromVertex.index,(we<E||we>ue)&&y.add(me);z++}E=ue}}}ea.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Ri(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Ri(b.value);for(var z=b.next();!z.done;z=b.next()){z=z.value;var te=x?Oy(z):_x(z),re=te.length;if(0<re){te.sort(function(me,we){return me.vi-we.vi});var oe=(re-1)/2;for(re=Math.floor(oe),oe=Math.ceil(oe);re<=oe;re++)if(z.align===z){var le=te[re],ue=void 0;ue=x?tv(le,z):tv(z,le),!y.contains(ue)&&E<le.vi&&(le.align=z,z.root=le.root,z.align=le.root,E=le.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 X0(a,y,x,b){for(var E=a.K===90||a.K===270,z=Ri(y),te=z.next();!te.done;te=z.next()){var re=Ri(te.value);for(te=re.next();!te.done;te=re.next())te=te.value,te.sd=te,te.shift=1/0,te.zc=NaN,te.qg=0}for(te=a.K===90||a.K===270,z=Ri(y),re=z.next();!re.done;re=z.next()){re=Ri(re.value);for(var oe=re.next();!oe.done;oe=re.next())if(oe=oe.value,oe.root===oe){for(var le=0,ue=oe;ue.align!==oe;){var me=ue.align,we=te?ue.width:ue.height,Ee=te?me.width:me.height;if(x){var De=tv(ue,me),je=De.portFromPos,ct=De.portToPos;De.link!==null&&(ue.node&&ue.node!==De.link.fromNode&&(je=te?ue.focusX:ue.focusY),me.node&&me.node!==De.link.toNode&&(ct=te?me.focusX:me.focusY))}else De=tv(me,ue),je=De.portToPos,ct=De.portFromPos,De.link!==null&&(ue.node&&ue.node!==De.link.toNode&&(je=te?ue.focusX:ue.focusY),me.node&&me.node!==De.link.fromNode&&(ct=te?me.focusX:me.focusY));we=b?ue.qg+(we-je)-(Ee-ct):ue.qg+je-ct,me.qg=we,le=Math.min(le,we),ue=ue.align}ue=oe;do ue.qg=ue.qg-le,ue=ue.align;while(ue!==oe)}}for(x=Ri(y),te=x.next();!te.done;te=x.next())for(z=Ri(te.value),te=z.next();!te.done;te=z.next())te=te.value,te.root===te&&nx(a,te,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(te=y[x][0],te.sd===te)){te.sd.shift===1/0&&(te.sd.shift=0),te=x,re=0;do{for(z=y[te][re];z.align!==z.root;)z=z.align,te++,0<z.vi&&(re=ix(z,y),re.sd.shift=Math.min(re.sd.shift,z.sd.shift+z.zc+z.qg-(re.zc+re.qg+(E?re.width:re.height)+a.columnSpacing)));re=z.vi+1}while(te<y.length&&re<y[te].length&&z.sd===y[te][re].sd)}for(a=new Ii,y=Ri(y),te=y.next();!te.done;te=y.next())for(x=Ri(te.value),te=x.next();!te.done;te=x.next())te=te.value,te.zc=te.zc+te.sd.shift+te.qg,z=E?te.width:te.height,a.add(te,b?-te.zc-z:te.zc);return a}function nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=ix(b,x),z=E.root;nx(a,z,x),y.sd===y&&(y.sd=z.sd);var te=a.K===90||a.K===270?E.width:E.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+E.qg+te-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 ix(a,y){var x=a.Tz;return a=a.vi,1>a&&St("Could not determine previous vertex in layer"),y[x][a-1]}ea.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Sn(),E=Sn(),z=1/0,te=0;4>te;te++)if(y[te]){var re=Vx(this,y[te],b,E,te);re<z&&(x=te,z=re)}for(z={},te=0;4>te;z={delta:z.delta},te++)y[te]&&(z.delta=te===0||te===2?b[x]-b[te]:E[x]-E[te],z.delta!==0&&y[te].each(function(oe){return function(le){le.value+=oe.delta}}(z)));Gn(b),Gn(E)};function Vx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var z=1/0,te=-1/0;return y.each(function(re){var oe=re.key;re=re.value,oe=a.K===90||a.K===270?oe.width:oe.height,re<z&&(z=re),re+oe>te&&(te=re+oe)}),x[E]=z,b[E]=te,te-z}ea.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Y0(this,!0),y=Y0(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 Y0(a,y){return a.K===270?y?Ua:vs:a.K===90?y?vs:Ua:a.K===180?y?ss:xs:y?xs:ss}ea.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,te=E=1/0,re=-1/0;a.next();){var oe=a.value,le=oe.layer,ue=oe.column|0;b?(te=y.x+this.kc*ue,le=this.Kd[le]):(te=this.Kd[le],le=y.y+this.kc*ue),oe.centerX=te,oe.centerY=le,x&&isFinite(oe.zc)&&(b?oe.node?oe.x=y.x+oe.zc:oe.centerX=y.x+oe.zc:oe.node?oe.y=y.y+oe.zc:oe.centerY=y.y+oe.zc),z=Math.min(oe.x,z),E=Math.min(oe.y,E),b?(te=z,re=Math.max(re,oe.bounds.right)):(te=E,re=Math.max(re,oe.bounds.bottom))}for(this.xw=re-te,z=y.x-z,y=y.y-E,this.Rf=new Qe(x&&b?0:z,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},ea.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 _t(0,0,x,Math.abs(this.Ta[0]))):y.push(new _t(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new _t(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new _t(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new _t(0,0,Math.abs(this.Ta[0]),x)):y.push(new _t(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new _t(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new _t(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},ea.prototype.commitLayers=function(){},ea.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,te=b.fromPort,re=b.toPort;if(E!==null){var oe=E.findVisibleNode();oe!==null&&oe!==E&&(E=oe,te=oe.port)}z!==null&&(oe=z.findVisibleNode(),oe!==null&&oe!==z&&(z=oe,re=oe.port));var le=y.computeSpot(!0,te);oe=y.computeSpot(!1,re);var ue=x.fromVertex,me=x.toVertex;if(x.valid)y.curve===$u&&y.pointsCount===4&&(ue.column===me.column&&this.alignOption===0?(x=y.getLinkPoint(E,te,le,!0,!1,z,re),re=y.getLinkPoint(z,re,oe,!1,!1,E,te),x.w()||x.set(E.actualBounds.center),re.w()||re.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+re.x)/3,(2*x.y+re.y)/3),y.yf((x.x+2*re.x)/3,(x.y+2*re.y)/3),y.yf(re.x,re.y)):(x=b=!1,te!==null&&le===La&&(b=!0),re!==null&&oe===La&&(x=!0),(b||x)&&(oe=null,b&&(oe=y.getLinkPointFromPoint(E,te,te.ga(wo),y.i(3),!0),oe.w()||oe.set(E.actualBounds.center),y.L(0,oe.x,oe.y)),E=null,x&&(E=y.getLinkPointFromPoint(z,re,re.ga(wo),y.i(0),!1),E.w()||E.set(z.actualBounds.center),y.L(3,E.x,E.y)),oe&&(z=y.i(2),y.L(1,(2*oe.x+z.x)/3,(2*oe.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(ue.layer===me.layer)y.zf();else{var we=!1,Ee=!1,De=this.ie,je=y.firstPickIndex+1;if(y.isOrthogonal){Ee=!0;var ct=y.pointsCount;4<ct&&y.points.removeRange(2,ct-3)}else if(y.curve===$u)we=!0,ct=y.pointsCount,4<ct&&y.points.removeRange(2,ct-3),ct===4&&(je=2);else{ct=y.pointsCount;var qe=le===La,Ct=oe===La;2<ct&&qe&&Ct?y.points.removeRange(1,ct-2):3<ct&&qe&&!Ct?y.points.removeRange(1,ct-3):3<ct&&!qe&&Ct?y.points.removeRange(2,ct-2):4<ct&&!qe&&!Ct&&y.points.removeRange(2,ct-3)}if(x.rev){for(;me!==null&&ue!==me;){var Lt=ct=null;for(qe=me.sourceEdges.iterator;qe.next()&&(Ct=qe.value,Ct.link!==x.link||(ct=Ct.fromVertex,Lt=Ct.toVertex,ct.node!==null)););if(ct===null)break;if(ct!==ue){qe=y.i(je-1).x,Ct=y.i(je-1).y;var Rt=ct.centerX,Jt=ct.centerY;if(Ee)this.K===180||this.K===0?je===y.firstPickIndex+1?(y.m(je++,qe,Ct),y.m(je++,qe,Jt)):(Lt!==null?Lt.centerY:Ct)!==Jt&&(Lt=this.Ta[ct.layer-1]+this.Rf.x,y.m(je++,Lt,Ct),y.m(je++,Lt,Jt)):je===y.firstPickIndex+1?(y.m(je++,qe,Ct),y.m(je++,Rt,Ct)):(Lt!==null?Lt.centerX:qe)!==Rt&&(Lt=this.Ta[ct.layer-1]+this.Rf.y,y.m(je++,qe,Lt),y.m(je++,Rt,Lt));else if(je===y.firstPickIndex+1){Lt=Math.max(10,this.he[me.layer]);var vn=Math.max(10,this.Ld[me.layer]);if(we)this.K===180?Rt<=me.bounds.x?(me=me.bounds.x,y.m(je++,me-Lt,Jt),y.m(je++,me,Jt),y.m(je++,me+vn,Jt)):(y.m(je++,Rt-Lt,Jt),y.m(je++,Rt,Jt),y.m(je++,Rt+vn,Jt)):this.K===90?Jt>=me.bounds.bottom?(me=me.bounds.y+me.bounds.height,y.m(je++,Rt,me+vn),y.m(je++,Rt,me),y.m(je++,Rt,me-Lt)):(y.m(je++,Rt,Jt+vn),y.m(je++,Rt,Jt),y.m(je++,Rt,Jt-Lt)):this.K===270?Jt<=me.bounds.y?(me=me.bounds.y,y.m(je++,Rt,me-Lt),y.m(je++,Rt,me),y.m(je++,Rt,me+vn)):(y.m(je++,Rt,Jt-Lt),y.m(je++,Rt,Jt),y.m(je++,Rt,Jt+vn)):this.K===0&&(Rt>=me.bounds.right?(me=me.bounds.x+me.bounds.width,y.m(je++,me+vn,Jt),y.m(je++,me,Jt),y.m(je++,me-Lt,Jt)):(y.m(je++,Rt+vn,Jt),y.m(je++,Rt,Jt),y.m(je++,Rt-Lt,Jt)));else{y.m(je++,qe,Ct);var Fi=0;this.K===180||this.K===0?((this.K===180?Rt>=me.bounds.right:Rt<=me.bounds.x)&&(Fi=(this.K===0?-Lt:vn)/2),y.m(je++,qe+Fi,Jt)):((this.K===270?Jt>=me.bounds.bottom:Jt<=me.bounds.y)&&(Fi=(this.K===90?-Lt:vn)/2),y.m(je++,Rt,Ct+Fi)),y.m(je++,Rt,Jt)}}else Lt=Math.max(10,this.he[ct.layer]),vn=Math.max(10,this.Ld[ct.layer]),we?this.K===180?(y.m(je++,Rt-Lt-De,Jt),y.m(je++,Math.min(Rt-Lt+De/2,Rt),Jt),y.m(je++,Rt,Jt),y.m(je++,Rt,Jt),y.m(je++,Math.max(Rt+vn-De/2,Rt),Jt),y.m(je++,Rt+vn+De,Jt)):this.K===90?(y.m(je++,Rt,Jt+vn+De),y.m(je++,Rt,Math.max(Jt+vn-De/2,Jt)),y.m(je++,Rt,Jt),y.m(je++,Rt,Jt),y.m(je++,Rt,Math.min(Jt-Lt+De/2,Jt)),y.m(je++,Rt,Jt-Lt-De)):this.K===270?(y.m(je++,Rt,Jt-Lt-De),y.m(je++,Rt,Math.min(Jt-Lt+De/2,Jt)),y.m(je++,Rt,Jt),y.m(je++,Rt,Jt),y.m(je++,Rt,Math.max(Jt+vn-De/2,Jt)),y.m(je++,Rt,Jt+vn+De)):(y.m(je++,Rt+vn+De,Jt),y.m(je++,Math.max(Rt+vn-De/2,Rt),Jt),y.m(je++,Rt,Jt),y.m(je++,Rt,Jt),y.m(je++,Math.min(Rt-Lt+De/2,Rt),Jt),y.m(je++,Rt-Lt-De,Jt)):y.m(je++,Rt,Jt)}me=ct}(re===null||le!==La||Ee)&&(qe=y.i(je-1).x,Ct=y.i(je-1).y,Rt=y.i(je).x,Jt=y.i(je).y,Ee?(De=this.Ld[ue.layer],this.K===180||this.K===0?(Ee=Ct,Ee>=ue.bounds.y&&Ee<=ue.bounds.bottom&&(this.K===180?Rt>=ue.bounds.x:Rt<=ue.bounds.right)&&(me=ue.centerX+(this.K===180?-De:De),Ee<ue.bounds.y+ue.bounds.height/2?Ee=ue.bounds.y-this.kc/2:Ee=ue.bounds.bottom+this.kc/2,y.m(je++,me,Ct),y.m(je++,me,Ee)),y.m(je++,Rt,Ee)):(Ee=qe,Ee>=ue.bounds.x&&Ee<=ue.bounds.right&&(this.K===270?Jt>=ue.bounds.y:Jt<=ue.bounds.bottom)&&(me=ue.centerY+(this.K===270?-De:De),Ee<ue.bounds.x+ue.bounds.width/2?Ee=ue.bounds.x-this.kc/2:Ee=ue.bounds.right+this.kc/2,y.m(je++,qe,me),y.m(je++,Ee,me)),y.m(je++,Ee,Jt)),y.m(je++,Rt,Jt)):we?(Lt=Math.max(10,this.he[ue.layer]),vn=Math.max(10,this.Ld[ue.layer]),this.K===180&&Rt>=ue.bounds.x?(me=ue.bounds.x+ue.bounds.width,y.L(je-2,me,Ct),y.L(je-1,me+vn,Ct)):this.K===90&&Jt<=ue.bounds.bottom?(me=ue.bounds.y,y.L(je-2,qe,me),y.L(je-1,qe,me-Lt)):this.K===270&&Jt>=ue.bounds.y?(me=ue.bounds.y+ue.bounds.height,y.L(je-2,qe,me),y.L(je-1,qe,me+vn)):this.K===0&&Rt<=ue.bounds.right&&(me=ue.bounds.x,y.L(je-2,me,Ct),y.L(je-1,me-Lt,Ct))):(Lt=Math.max(10,this.he[ue.layer]),vn=Math.max(10,this.Ld[ue.layer]),Ee=0,this.K===180||this.K===0?((this.K===180?Rt<=ue.bounds.x:Rt>=ue.bounds.right)&&(Ee=(this.K===0?vn:-Lt)/2),y.m(je++,Rt+Ee,Ct)):((this.K===270?Jt<=ue.bounds.y:Jt>=ue.bounds.bottom)&&(Ee=(this.K===90?vn:-Lt)/2),y.m(je++,qe,Jt+Ee)),y.m(je++,Rt,Jt)))}else{for(;ue!==null&&ue!==me;){for(Lt=ct=null,ue=ue.destinationEdges.iterator;ue.next()&&(qe=ue.value,qe.link!==x.link||(ct=qe.toVertex,Lt=qe.fromVertex,Lt.node!==null&&(Lt=null),ct.node!==null)););if(ct===null)break;ct!==me&&(qe=y.i(je-1).x,Ct=y.i(je-1).y,Rt=ct.centerX,Jt=ct.centerY,Ee?this.K===180||this.K===0?(Lt!==null?Lt.centerY:Ct)!==Jt&&(Lt=this.Ta[ct.layer]+this.Rf.x,je===y.firstPickIndex+1&&(Lt=this.K===0?Math.max(Lt,qe):Math.min(Lt,qe)),y.m(je++,Lt,Ct),y.m(je++,Lt,Jt)):(Lt!==null?Lt.centerX:qe)!==Rt&&(Lt=this.Ta[ct.layer]+this.Rf.y,je===y.firstPickIndex+1&&(Lt=this.K===90?Math.max(Lt,Ct):Math.min(Lt,Ct)),y.m(je++,qe,Lt),y.m(je++,Rt,Lt)):(Lt=Math.max(10,this.he[ct.layer]),vn=Math.max(10,this.Ld[ct.layer]),we?this.K===180?(y.m(je++,Rt+vn+De,Jt),y.m(je++,Math.max(Rt+vn-De/2,Rt),Jt),y.m(je++,Rt,Jt),y.m(je++,Rt,Jt),y.m(je++,Math.min(Rt-Lt+De/2,Rt),Jt),y.m(je++,Rt-Lt-De,Jt)):this.K===90?(y.m(je++,Rt,Jt-Lt-De),y.m(je++,Rt,Math.min(Jt-Lt+De/2,Jt)),y.m(je++,Rt,Jt),y.m(je++,Rt,Jt),y.m(je++,Rt,Math.max(Jt+vn-De/2,Jt)),y.m(je++,Rt,Jt+vn+De)):this.K===270?(y.m(je++,Rt,Jt+vn+De),y.m(je++,Rt,Math.max(Jt+vn-De/2,Jt)),y.m(je++,Rt,Jt),y.m(je++,Rt,Jt),y.m(je++,Rt,Math.min(Jt-Lt+De/2,Jt)),y.m(je++,Rt,Jt-Lt-De)):(y.m(je++,Rt-Lt-De,Jt),y.m(je++,Math.min(Rt-Lt+De/2,Rt),Jt),y.m(je++,Rt,Jt),y.m(je++,Rt,Jt),y.m(je++,Math.max(Rt+vn-De/2,Rt),Jt),y.m(je++,Rt+vn+De,Jt)):this.K===180?(y.m(je++,Rt+vn,Jt),y.m(je++,Rt-Lt,Jt)):this.K===90?(y.m(je++,Rt,Jt-Lt),y.m(je++,Rt,Jt+vn)):this.K===270?(y.m(je++,Rt,Jt+vn),y.m(je++,Rt,Jt-Lt)):(y.m(je++,Rt-Lt,Jt),y.m(je++,Rt+vn,Jt)))),ue=ct}Ee&&(qe=y.i(je-1).x,Ct=y.i(je-1).y,Rt=y.i(je).x,Jt=y.i(je).y,this.K===180||this.K===0?Ct!==Jt&&(Lt=this.K===0?Math.min(Math.max((Rt+qe)/2,this.Ta[me.layer]+this.Rf.x),Rt):Math.max(Math.min((Rt+qe)/2,this.Ta[me.layer]+this.Rf.x),Rt),y.m(je++,Lt,Ct),y.m(je++,Lt,Jt)):qe!==Rt&&(Lt=this.K===90?Math.min(Math.max((Jt+Ct)/2,this.Ta[me.layer]+this.Rf.y),Jt):Math.max(Math.min((Jt+Ct)/2,this.Ta[me.layer]+this.Rf.y),Jt),y.m(je++,qe,Lt),y.m(je++,Rt,Lt)))}b!==null&&we&&4<=y.pointsCount&&(te!==null&&(te=le===La?y.getLinkPointFromPoint(E,te,te.ga(wo),y.i(3),!0):y.i(0),le===La&&(le=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(te.x+le.x)/2,le.y),y.L(2,b.x,(le.y+b.y)/2)):(y.L(1,le.x,(te.y+le.y)/2),y.L(2,(le.x+b.x)/2,b.y))),te.w()||te.set(E.actualBounds.center),y.L(0,te.x,te.y)),re!==null&&(E=oe===La?y.getLinkPointFromPoint(z,re,re.ga(wo),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===La&&(re=y.i(y.pointsCount-3),oe=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+re.x)/2,re.y),y.L(y.pointsCount-2,oe.x,(re.y+oe.y)/2)):(y.L(y.pointsCount-2,re.x,(E.y+re.y)/2),y.L(y.pointsCount-3,(re.x+oe.x)/2,oe.y))),E.w()||E.set(z.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},ea.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Rn,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),te=b.i(E+1);if(this.B(z.y,te.y)&&!this.B(z.x,te.x)){var re=new Lf;re.layer=Math.floor(z.y/2);var oe=b.i(0),le=b.i(b.pointsCount-1);if(re.first=oe.x*oe.x+oe.y,re.jc=le.x*le.x+le.y,re.rd=Math.min(z.x,te.x),re.Ic=Math.max(z.x,te.x),re.index=E,re.link=b,E+2<b.pointsCount){oe=b.i(E-1),le=b.i(E+2);var ue=0;oe.y<z.y?ue=le.y<z.y?3:z.x<te.x?2:1:oe.y>z.y&&(ue=le.y>z.y?0:te.x<z.x?2:1),re.j=ue}x.push(re)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(te=x[z].Ic,E=a+1;E<b&&x[E].rd<te;)te=Math.max(te,x[E].Ic),E++;if(te=E-z,1<te){for(this.zi(x,this.Js,z,z+te),ue=1,re=x[z].jc,oe=z;oe<E;oe++)le=x[oe],le.jc!==re&&(ue++,re=le.jc);this.zi(x,this.Ux,z,z+te);var me=1;for(re=x[z].first,oe=z;oe<E;oe++)le=x[oe],le.first!==re&&(me++,re=le.first);for(oe=!0,le=me,ue<me?(oe=!1,le=ue,re=x[z].jc,this.zi(x,this.Js,z,z+te)):re=x[z].first,ue=0,me=z;me<E;me++){var we=x[me];(oe?we.first:we.jc)!==re&&(ue++,re=oe?we.first:we.jc);var Ee=we.link;z=Ee.i(we.index),te=Ee.i(we.index+1);var De=this.linkSpacing*(ue-(le-1)/2);y++,Ee.uh(),Ee.L(we.index,z.x,z.y+De),Ee.L(we.index+1,te.x,te.y+De),Ee.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),te=b.i(E+1),this.B(z.x,te.x)&&!this.B(z.y,te.y)&&(re=new Lf,re.layer=Math.floor(z.x/2),oe=b.i(0),le=b.i(b.pointsCount-1),re.first=oe.x+oe.y*oe.y,re.jc=le.x+le.y*le.y,re.rd=Math.min(z.y,te.y),re.Ic=Math.max(z.y,te.y),re.index=E,re.link=b,E+2<b.pointsCount&&(oe=b.i(E-1),le=b.i(E+2),ue=0,oe.x<z.x?ue=le.x<z.x?3:z.y<te.y?2:1:oe.x>z.x&&(ue=le.x>z.x?0:te.y<z.y?2:1),re.j=ue),x.push(re));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(te=x[z].Ic,E=a+1;E<b&&x[E].rd<te;)te=Math.max(te,x[E].Ic),E++;if(te=E-z,1<te){for(this.zi(x,this.Js,z,z+te),ue=1,re=x[z].jc,oe=z;oe<E;oe++)le=x[oe],le.jc!==re&&(ue++,re=le.jc);for(this.zi(x,this.Ux,z,z+te),me=1,re=x[z].first,oe=z;oe<E;oe++)le=x[oe],le.first!==re&&(me++,re=le.first);for(oe=!0,le=me,ue<me?(oe=!1,le=ue,re=x[z].jc,this.zi(x,this.Js,z,z+te)):re=x[z].first,ue=0,me=z;me<E;me++)we=x[me],(oe?we.first:we.jc)!==re&&(ue++,re=oe?we.first:we.jc),Ee=we.link,z=Ee.i(we.index),te=Ee.i(we.index+1),De=this.linkSpacing*(ue-(le-1)/2),y++,Ee.uh(),Ee.L(we.index,z.x+De,z.y),Ee.L(we.index+1,te.x+De,te.y),Ee.zf()}z=E}a=b}}}},Le=ea.prototype,Le.Vx=function(a,y){return a instanceof Lf&&y instanceof Lf&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Le.Ux=function(a,y){return a instanceof Lf&&y instanceof Lf&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Le.Js=function(a,y){return a instanceof Lf&&y instanceof Lf&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Le.B=function(a,y){return a-=y,-1<a&&1>a},Le.zi=function(a,y,x,b){var E=a.length,z=b-x;if(!(1>=z))if((0>x||x>=E-1)&&St("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 Ef(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 Mf(a,y,x){a.He[a.tc[y]]=x}Ye.Object.defineProperties(ea.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):St("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Fy&&a!==J0&&a!==Cm||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==Q0&&a!==Ay&&a!==Dy||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==q0&&a!==By&&a!==Ty||(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!==ky&&a!==ev&&a!==Iy||(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 J0=new gn(ea,"CycleDepthFirst",0),Fy=new gn(ea,"CycleGreedy",1),Cm=new gn(ea,"CycleFromLayers",2),Q0=new gn(ea,"LayerOptimalLinkLength",0),Ay=new gn(ea,"LayerLongestPathSink",1),Dy=new gn(ea,"LayerLongestPathSource",2),q0=new gn(ea,"InitDepthFirstOut",0),By=new gn(ea,"InitDepthFirstIn",1),Ty=new gn(ea,"InitNaive",2),ky=new gn(ea,"AggressiveNone",0),ev=new gn(ea,"AggressiveLess",1),Iy=new gn(ea,"AggressiveMore",2),Ux=8;ea.className="LayeredDigraphLayout",ea.CycleDepthFirst=J0,ea.CycleGreedy=Fy,ea.CycleFromLayers=Cm,ea.LayerOptimalLinkLength=Q0,ea.LayerLongestPathSink=Ay,ea.LayerLongestPathSource=Dy,ea.InitDepthFirstOut=q0,ea.InitDepthFirstIn=By,ea.InitNaive=Ty,ea.AggressiveNone=ky,ea.AggressiveLess=ev,ea.AggressiveMore=Iy,ea.PackNone=0,ea.PackExpand=1,ea.PackStraighten=2,ea.PackMedian=4,ea.PackAll=15,ea.AlignNone=0,ea.AlignUpperLeft=1,ea.AlignUpperRight=2,ea.AlignLowerLeft=4,ea.AlignLowerRight=8,ea.AlignAll=15;function Lf(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Lf.className="SegInfo";function Np(a){ca.call(this,a)}Kt(Np,ca),Np.prototype.createVertex=function(){return new nc(this)},Np.prototype.createEdge=function(){return new bm(this)},Np.className="LayeredDigraphNetwork";function nc(a){Ms.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}Kt(nc,Ms);function rx(a,y){return a.index-y.index}function tv(a,y){if(!a.$n){for(var x=[],b=Ri(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Ri(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;St("Unable to find destination edge to given vertex")}function Oy(a){if(!a.co){for(var y=[],x=Ri(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(rx),a.co=y}return a.co}function _x(a){if(!a.ao){for(var y=[],x=Ri(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(rx),a.ao=y}return a.ao}nc.prototype.Cl=function(a){Ms.prototype.Cl.call(this,a),this.bo=this.co=null},nc.prototype.Kl=function(a){Ms.prototype.Kl.call(this,a),this.bo=this.co=null},nc.prototype.zl=function(a){Ms.prototype.zl.call(this,a),this.$n=this.ao=null},nc.prototype.Jl=function(a){Ms.prototype.Jl.call(this,a),this.$n=this.ao=null},Ye.Object.defineProperties(nc.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)}}}),nc.prototype.deleteDestinationEdge=nc.prototype.Jl,nc.prototype.addDestinationEdge=nc.prototype.zl,nc.prototype.deleteSourceEdge=nc.prototype.Kl,nc.prototype.addSourceEdge=nc.prototype.Cl,nc.className="LayeredDigraphVertex";function bm(a){Tu.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Kt(bm,Tu),Ye.Object.defineProperties(bm.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)}}}),bm.className="LayeredDigraphEdge";function fo(a){Ma.call(this),this.Ub=new _n,this.Wn=ov,this.ud=Zd,this.vo=sv,this.Bq=Uy,this.$v=[],this.td=!0,this.Rb=lv,this.$d=new pi(10,10).freeze();var y=new Gg(this);this.W=new gc(y),this.Y=new gc(y),this.ru=[],a&&Object.assign(this,a)}Kt(fo,Ma),fo.prototype.cloneProtected=function(a){Ma.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)},fo.prototype.qb=function(a){a.classType===fo?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:St("Unknown enum value: "+a):Ma.prototype.qb.call(this,a)},fo.prototype.createNetwork=function(){return new Gg(this)},fo.prototype.makeNetwork=function(a){function y(b){if(b instanceof Di)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof vi){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 mn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Yr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},fo.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==uv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof mn&&(y=a),this.path===ov&&y!==null?this.ud=y.isTreePathToChildren?Zd:Zg:this.ud=this.path===ov?Zd: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 _n,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Di?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof gc&&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,Ry(this,y));for(y=this.network.vertexes,a=null;a=Xx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ry(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gc&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gc&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gc&&ux(this,y);if(this.Cu(),this.layerStyle===cv){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===_y)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,b=-1,E=0;E<y.children.length;E++){var 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 gc&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new _n,this.isValidLayout=!0};function Xx(a){var y=new _n;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}fo.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Zd:x.sourceEdges.count===0&&this.Ub.add(x);break;case Zg:x.destinationEdges.count===0&&this.Ub.add(x);break;default:St("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 Zd:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Zg:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:St("Unhandled path value "+a.ud.toString())}}return b}function Ry(a,y){if(y!==null){switch(a.ud){case Zd:if(0<y.destinationEdges.count){for(var x=new Rn,b=y.destinationVertexes;b.next();){var E=b.value;ax(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case Zg:if(0<y.sourceEdges.count){for(x=new Rn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:St("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++)Ry(a,x[y])}}function ax(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}fo.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 sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===$d&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,z=y.children,te=z.length,re=0;re<te;re++){var oe=z[re];sx(a,oe),x+=oe.descendantCount+1,b=Math.max(b,oe.maxChildrenCount),E=Math.max(E,oe.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function Yx(a,y){switch(a.vo){default:case sv:return y.parent!==null?y.parent:a.W;case Ky:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case $y:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Gy: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}}fo.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Yx(this,a)),a.parent!==null&&a.parent.alignment===$d){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function lx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lx(a,y[b])}}fo.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==$d&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}fo.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Fp:break;case Mm:a.children.reverse();break;case Lm:a.children.sort(a.comparer);break;case Nm:a.children.sort(a.comparer),a.children.reverse();break;default:St("Unhandled sorting value "+a.sorting.toString())}},fo.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},fo.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=Nf(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var z=0,te=0,re=0,oe=a.commentSpacing;if(a.node!==null)for(var le=a.node.Mu();le.next();){var ue=le.value;ue.category==="Comment"&&ue.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ue),ue.Va(),ue=ue.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(z=Math.max(z,ue.width),te+=ue.height+Math.abs(re)):(z+=ue.width+Math.abs(re),te=Math.max(te,ue.height)),re=oe)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(z+=Math.abs(a.commentMargin),te=Math.max(0,te-a.height)):(te+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),E=_t.allocAt(0,0,a.bounds.width+z,a.bounds.height+te),a.bounds=E,_t.free(E))};function Nf(a){return a===Uh||a===$d||a===_h||a===vh}function Em(a){return a===Uh||a===$d}function jy(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Nf(x)){if(Em(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===_h)return!0}}return!1}fo.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=Nf(z)),b=b===90||b===270,x=E===90||E===270;for(var te=a.childrenCount===0,re=jy(a),oe=0,le=a.comments,ue=le.length,me=Qe.alloc(),we=0;we<ue;we++){var Ee=le[we],De=Ee.measuredBounds;if(b&&!te||!z&&!x&&te||z&&x&&te){if(135<E&&!z||x&&re)if(0<=a.commentMargin)for(me.h(a.bounds.x-a.commentMargin-De.width,a.bounds.y+oe),Ee.move(me),Ee=Ee.Sd();Ee.next();){var je=Ee.value;je.fromSpot=ss,je.toSpot=xs}else for(me.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),Ee.move(me),Ee=Ee.Sd();Ee.next();)je=Ee.value,je.fromSpot=xs,je.toSpot=ss;else if(0<=a.commentMargin)for(me.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),Ee.move(me),Ee=Ee.Sd();Ee.next();)je=Ee.value,je.fromSpot=xs,je.toSpot=ss;else for(me.h(a.bounds.x+a.commentMargin-De.width,a.bounds.y+oe),Ee.move(me),Ee=Ee.Sd();Ee.next();)je=Ee.value,je.fromSpot=ss,je.toSpot=xs;oe=0<=a.commentSpacing?oe+(De.height+a.commentSpacing):oe+(a.commentSpacing-De.height)}else{if(135<E&&!z||!x&&re)if(0<=a.commentMargin)for(me.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-De.height),Ee.move(me),Ee=Ee.Sd();Ee.next();)je=Ee.value,je.fromSpot=Ua,je.toSpot=vs;else for(me.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),Ee.move(me),Ee=Ee.Sd();Ee.next();)je=Ee.value,je.fromSpot=vs,je.toSpot=Ua;else if(0<=a.commentMargin)for(me.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),Ee.move(me),Ee=Ee.Sd();Ee.next();)je=Ee.value,je.fromSpot=vs,je.toSpot=Ua;else for(me.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-De.height),Ee.move(me),Ee=Ee.Sd();Ee.next();)je=Ee.value,je.fromSpot=Ua,je.toSpot=vs;oe=0<=a.commentSpacing?oe+(De.width+a.commentSpacing):oe+(a.commentSpacing-De.width)}}if(Qe.free(me),y=oe-a.commentSpacing-(b?y.height:y.width),this.ud===Zd)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)}},fo.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 av:cx(this,a);break;case Fm:if(a.alignment===$d)cx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=Nf(x)),b=jy(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=Dc(a);y=E===90||E===270;var z=0,te=a.children,re=te.length;for(x=0;x<re;x++)b=te[x],z=Math.max(z,y?b.Da.width:b.Da.height);var oe=a.alignment;b=oe===Wd;var le=oe===Gd,ue=Nf(oe),me=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var we=a.nodeSpacing,Ee=this.computeNodeIndent(a),De=a.rowSpacing,je=0;(b||le||a.hm||a.im&&a.maxGenerationCount===1)&&(je=Math.max(0,a.rowIndent)),b=a.width;var ct=a.height,qe=0,Ct=0,Lt=0,Rt=null,Jt=null,vn=0,Fi=0,Yi=0,Hi=0,mi=0,ni=0,Ur=0,Dr=0;if(ue&&!Em(oe)&&135<E&&te.reverse(),Em(oe))if(1<re)for(var Ko=0;Ko<re;Ko++)Ko%2===0&&Ko!==re-1&&(Dr=Math.max(Dr,y?te[Ko].Da.width:te[Ko].Da.height));else re===1&&(Dr=y?te[0].Da.width:te[0].Da.height);if(ue){switch(oe){case Uh:Ct=135>E?dx(this,a,te,Dr,qe,Ct):hx(this,a,te,Dr,qe,Ct),Dr=Ct.x,qe=Ct.width,Ct=Ct.height;break;case _h:for(Rt=0;Rt<re;Rt++)Jt=te[Rt],me=Jt.Da,Lt=ni===0?0:De,y?(Jt.S.h(z-me.width,Hi+Lt),qe=Math.max(qe,me.width),Ct=Math.max(Ct,Hi+Lt+me.height),Hi+=Lt+me.height):(Jt.S.h(Yi+Lt,z-me.height),qe=Math.max(qe,Yi+Lt+me.width),Ct=Math.max(Ct,me.height),Yi+=Lt+me.width),ni++;break;case vh:for(Rt=0;Rt<re;Rt++)Jt=te[Rt],z=Jt.Da,me=ni===0?0:De,y?(Jt.S.h(we/2+a.focus.x,Hi+me),qe=Math.max(qe,z.width),Ct=Math.max(Ct,Hi+me+z.height),Hi+=me+z.height):(Jt.S.h(Yi+me,we/2+a.focus.y),qe=Math.max(qe,Yi+me+z.width),Ct=Math.max(Ct,z.height),Yi+=me+z.width),ni++}Rt=xu(this,2),Jt=xu(this,2),y?(Rt[0].h(0,0),Rt[1].h(0,Ct),Jt[0].h(qe,0)):(Rt[0].h(0,0),Rt[1].h(qe,0),Jt[0].h(0,Ct)),Jt[1].h(qe,Ct)}else for(Ko=0;Ko<re;Ko++){var la=te[Ko],Rs=la.Da;if(y){0<me&&0<ni&&Yi+we+Rs.width>me&&(Yi<z&&ig(a,oe,z-Yi,0,Ur,Ko-1),mi++,ni=0,Ur=Ko,Lt=Ct,Yi=0,Hi=135<E?-Ct-De:Ct+De),iv(this,la,0,Hi);var Vs=0;if(ni===0)Rt=la.Yo,Jt=la.kp,vn=Rs.width,Fi=Rs.height,(Rt===null||Jt===null||E!==Dc(la))&&(Rt=xu(this,2),Jt=xu(this,2),Rt[0].h(0,0),Rt[1].h(0,Fi),Jt[0].h(vn,0),Jt[1].h(vn,Fi));else{var Dl=Sn();Fi=fx(this,a,la,Rt,Jt,vn,Fi,Dl),Vs=Fi.x,Rt=Dl[0],Jt=Dl[1],vn=Fi.width,Fi=Fi.height,Gn(Dl),Yi<Rs.width&&0>Vs&&(Hg(a,-Vs,0,Ur,Ko-1),rv(Rt,-Vs,0),rv(Jt,-Vs,0),Vs=0)}la.S.h(Vs,Hi),qe=Math.max(qe,vn),Ct=Math.max(Ct,Lt+(mi===0?0:De)+Rs.height),Yi=vn}else 0<me&&0<ni&&Hi+we+Rs.height>me&&(Hi<z&&ig(a,oe,0,z-Hi,Ur,Ko-1),mi++,ni=0,Ur=Ko,Lt=qe,Hi=0,Yi=135<E?-qe-De:qe+De),iv(this,la,Yi,0),Vs=0,ni===0?(Rt=la.Yo,Jt=la.kp,vn=Rs.width,Fi=Rs.height,(Rt===null||Jt===null||E!==Dc(la))&&(Rt=xu(this,2),Jt=xu(this,2),Rt[0].h(0,0),Rt[1].h(vn,0),Jt[0].h(0,Fi),Jt[1].h(vn,Fi))):(Dl=Sn(),Fi=fx(this,a,la,Rt,Jt,vn,Fi,Dl),Vs=Fi.x,Rt=Dl[0],Jt=Dl[1],vn=Fi.width,Fi=Fi.height,Gn(Dl),Hi<Rs.height&&0>Vs&&(Hg(a,0,-Vs,Ur,Ko-1),rv(Rt,0,-Vs),rv(Jt,0,-Vs),Vs=0)),la.S.h(Yi,Vs),Ct=Math.max(Ct,Fi),qe=Math.max(qe,Lt+(mi===0?0:De)+Rs.width),Hi=Fi;ni++}switch(0<mi&&(y?(Ct+=Math.max(0,x),Yi<qe&&ig(a,oe,qe-Yi,0,Ur,re-1),0<je&&(le||Hg(a,je,0,0,re-1),qe+=je)):(qe+=Math.max(0,x),Hi<Ct&&ig(a,oe,0,Ct-Hi,Ur,re-1),0<je&&(le||Hg(a,0,je,0,re-1),Ct+=je))),je=le=0,oe){case Ap:y?le+=qe/2-a.focus.x-Ee/2:je+=Ct/2-a.focus.y-Ee/2;break;case Wg:0<mi?y?le+=qe/2-a.focus.x-Ee/2:je+=Ct/2-a.focus.y-Ee/2:y?(Dr=te[0].S.x+te[0].la.x,le+=Dr+(te[re-1].S.x+te[re-1].la.x+2*te[re-1].focus.x-Dr)/2-a.focus.x-Ee/2):(Dr=te[0].S.y+te[0].la.y,je+=Dr+(te[re-1].S.y+te[re-1].la.y+2*te[re-1].focus.y-Dr)/2-a.focus.y-Ee/2);break;case Wd:y?(le-=Ee,qe+=Ee):(je-=Ee,Ct+=Ee);break;case Gd:y?(le+=qe-a.width+Ee,qe+=Ee):(je+=Ct-a.height+Ee,Ct+=Ee);break;case Uh:y?1<re?le+=Dr+we/2-a.focus.x:le+=te[0].focus.x-a.focus.x+te[0].la.x:1<re?je+=Dr+we/2-a.focus.y:je+=te[0].focus.y-a.focus.y+te[0].la.y;break;case _h:y?le+=qe+we/2-a.focus.x:je+=Ct+we/2-a.focus.y;break;case vh:break;default:Ct=this.customAlignment(a,le,je,qe,Ct),le=Ct[0],je=Ct[1],qe=Ct[2],Ct=Ct[3]}for(Ee=0;Ee<re;Ee++)Dr=te[Ee],y?Dr.S.h(Dr.S.x+Dr.la.x-le,Dr.S.y+(135<E?(ue?-Ct:-Dr.Da.height)+Dr.la.y-x:ct+x+Dr.la.y)):Dr.S.h(Dr.S.x+(135<E?(ue?-qe:-Dr.Da.width)+Dr.la.x-x:b+x+Dr.la.x),Dr.S.y+Dr.la.y-je);if(re=te=0,ue?y?(qe=zy(a,qe,le),0>le&&(le=0),135<E&&(je+=Ct+x),Ct+=ct+x,oe===vh&&(te+=we/2+a.focus.x),re+=ct+x):(135<E&&(le+=qe+x),qe+=b+x,Ct=Hy(a,Ct,je),0>je&&(je=0),oe===vh&&(re+=we/2+a.focus.y),te+=b+x):y?(a.comments===null?b>qe&&(qe=Zy(oe,b-qe,0),te=qe.x,re=qe.y,qe=b,le=0):qe=zy(a,qe,le),0>le&&(te-=le,le=0),135<E&&(je+=Ct+x),Ct=Math.max(Math.max(Ct,ct),Ct+ct+x),re+=ct+x):(135<E&&(le+=qe+x),qe=Math.max(Math.max(qe,b),qe+b+x),a.comments===null?ct>Ct&&(Ct=Zy(oe,0,ct-Ct),te=Ct.x,re=Ct.y,Ct=ct,je=0):Ct=Hy(a,Ct,je),0>je&&(re-=je,je=0),te+=b+x),0<mi)E=xu(this,4),mi=xu(this,4),y?(E[2].h(0,ct+x),E[3].h(E[2].x,Ct),mi[2].h(qe,E[2].y),mi[3].h(mi[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(qe,E[2].y),mi[2].h(E[2].x,Ct),mi[3].h(E[3].x,mi[2].y));else{for(E=xu(this,Rt.length+2),mi=xu(this,Jt.length+2),oe=0;oe<Rt.length;oe++)ue=Rt[oe],E[oe+2].h(ue.x+te,ue.y+re);for(oe=0;oe<Jt.length;oe++)ue=Jt[oe],mi[oe+2].h(ue.x+te,ue.y+re)}y?(E[0].h(le,0),E[1].h(E[0].x,ct),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])),mi[0].h(le+b,0),mi[1].h(mi[0].x,ct),mi[2].y<mi[1].y&&(mi[2].x<mi[0].x?mi[2].assign(mi[1]):mi[1].assign(mi[2])),mi[3].y<mi[2].y&&(mi[3].x<mi[0].x?mi[3].assign(mi[2]):mi[2].assign(mi[3])),E[2].y-=x/2,mi[2].y-=x/2):(E[0].h(0,je),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])),mi[0].h(0,je+ct),mi[1].h(b,mi[0].y),mi[2].x<mi[1].x&&(mi[2].y<mi[0].y?mi[2].assign(mi[1]):mi[1].assign(mi[2])),mi[3].x<mi[2].x&&(mi[3].y<mi[0].y?mi[3].assign(mi[2]):mi[2].assign(mi[3])),E[2].x-=x/2,mi[2].x-=x/2),Xc(this,Rt),Xc(this,Jt),a.Yo=E,a.kp=mi,a.la.h(le,je),a.Da.h(qe,Ct)}break;default:St("Unhandled compaction value "+a.compaction.toString())}}};function cx(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=Nf(x));var E=jy(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=Dc(y),x=b===90||b===270;var z=0;E=y.children;for(var te=E.length,re=0;re<te;re++){var oe=E[re];z=Math.max(z,x?oe.Da.width:oe.Da.height)}var le=y.alignment,ue=le===Wd,me=le===Gd;re=Nf(le);var we=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var Ee=y.nodeSpacing,De=a.computeNodeIndent(y),je=ue||me?0:De/2,ct=y.rowSpacing,qe=0;(ue||me||y.hm||y.im&&y.maxGenerationCount===1)&&(qe=Math.max(0,y.rowIndent)),ue=y.width;var Ct=y.height,Lt=0,Rt=0,Jt=0,vn=0,Fi=0,Yi=0,Hi=0,mi=0,ni=0,Ur=0;if(re&&!Em(le)&&135<b&&E.reverse(),Em(le))if(1<te)for(var Dr=0;Dr<te;Dr++){var Ko=E[Dr],la=Ko.Da;Dr%2===0&&Dr!==te-1?ni=Math.max(ni,(x?la.width:la.height)+a.computeBusNodeSpacing(Ko)-Ee):Dr%2!==0&&(Ur=Math.max(Ur,(x?la.width:la.height)+a.computeBusNodeSpacing(Ko)-Ee))}else te===1&&(ni=x?E[0].Da.width:E[0].Da.height);if(re)switch(le){case Uh:case $d:Rt=135>b?dx(a,y,E,ni,Lt,Rt):hx(a,y,E,ni,Lt,Rt),ni=Rt.x,Lt=Rt.width,Rt=Rt.height;break;case _h:for(we=0;we<te;we++)je=E[we],Jt=je.Da,Ur=Hi===0?0:ct,x?(je.S.h(z-Jt.width,Fi+Ur),Lt=Math.max(Lt,Jt.width),Rt=Math.max(Rt,Fi+Ur+Jt.height),Fi+=Ur+Jt.height):(je.S.h(vn+Ur,z-Jt.height),Lt=Math.max(Lt,vn+Ur+Jt.width),Rt=Math.max(Rt,Jt.height),vn+=Ur+Jt.width),Hi++;break;case vh:for(z=0;z<te;z++)we=E[z],je=we.Da,Jt=Hi===0?0:ct,x?(we.S.h(Ee/2+y.focus.x,Fi+Jt),Lt=Math.max(Lt,je.width),Rt=Math.max(Rt,Fi+Jt+je.height),Fi+=Jt+je.height):(we.S.h(vn+Jt,Ee/2+y.focus.y),Lt=Math.max(Lt,vn+Jt+je.width),Rt=Math.max(Rt,je.height),vn+=Jt+je.width),Hi++}else for(Ur=0;Ur<te;Ur++)Dr=E[Ur],Ko=Dr.Da,x?(0<we&&0<Hi&&vn+Ee+Ko.width>we&&(vn<z&&ig(y,le,z-vn,0,mi,Ur-1),Yi++,Hi=0,mi=Ur,Jt=Rt,vn=0,Fi=135<b?-Rt-ct:Rt+ct),la=Hi===0?je:Ee,iv(a,Dr,0,Fi),Dr.S.h(vn+la,Fi),Lt=Math.max(Lt,vn+la+Ko.width),Rt=Math.max(Rt,Jt+(Yi===0?0:ct)+Ko.height),vn+=la+Ko.width):(0<we&&0<Hi&&Fi+Ee+Ko.height>we&&(Fi<z&&ig(y,le,0,z-Fi,mi,Ur-1),Yi++,Hi=0,mi=Ur,Jt=Lt,Fi=0,vn=135<b?-Lt-ct:Lt+ct),la=Hi===0?je:Ee,iv(a,Dr,vn,0),Dr.S.h(vn,Fi+la),Rt=Math.max(Rt,Fi+la+Ko.height),Lt=Math.max(Lt,Jt+(Yi===0?0:ct)+Ko.width),Fi+=la+Ko.height),Hi++;switch(0<Yi&&(x?(Rt+=Math.max(0,oe),vn<Lt&&ig(y,le,Lt-vn,0,mi,te-1),0<qe&&(me||Hg(y,qe,0,0,te-1),Lt+=qe)):(Lt+=Math.max(0,oe),Fi<Rt&&ig(y,le,0,Rt-Fi,mi,te-1),0<qe&&(me||Hg(y,0,qe,0,te-1),Rt+=qe))),qe=me=0,le){case Ap:x?me+=Lt/2-y.focus.x-De/2:qe+=Rt/2-y.focus.y-De/2;break;case Wg:0<Yi?x?me+=Lt/2-y.focus.x-De/2:qe+=Rt/2-y.focus.y-De/2:x?(a=E[0].S.x+E[0].la.x,me+=a+(E[te-1].S.x+E[te-1].la.x+2*E[te-1].focus.x-a)/2-y.focus.x-De/2):(a=E[0].S.y+E[0].la.y,qe+=a+(E[te-1].S.y+E[te-1].la.y+2*E[te-1].focus.y-a)/2-y.focus.y-De/2);break;case Wd:x?(me-=De,Lt+=De):(qe-=De,Rt+=De);break;case Gd:x?(me+=Lt-y.width+De,Lt+=De):(qe+=Rt-y.height+De,Rt+=De);break;case Uh:case $d:x?1<te?me+=ni+Ee/2-y.focus.x:me+=E[0].focus.x-y.focus.x+E[0].la.x:1<te?qe+=ni+Ee/2-y.focus.y:qe+=E[0].focus.y-y.focus.y+E[0].la.y;break;case _h:x?me+=Lt+Ee/2-y.focus.x:qe+=Rt+Ee/2-y.focus.y;break;case vh:break;default:a=a.customAlignment(y,me,qe,Lt,Rt),me=a[0],qe=a[1],Lt=a[2],Rt=a[3]}for(a=0;a<te;a++)De=E[a],x?De.S.h(De.S.x+De.la.x-me,De.S.y+(135<b?(re?-Rt:-De.Da.height)+De.la.y-oe:Ct+oe+De.la.y)):De.S.h(De.S.x+(135<b?(re?-Lt:-De.Da.width)+De.la.x-oe:ue+oe+De.la.x),De.S.y+De.la.y-qe);x?(Lt=zy(y,Lt,me),0>me&&(me=0),135<b&&(qe+=Rt+oe),Rt=Math.max(Math.max(Rt,Ct),Rt+Ct+oe)):(135<b&&(me+=Lt+oe),Lt=Math.max(Math.max(Lt,ue),Lt+ue+oe),Rt=Hy(y,Rt,qe),0>qe&&(qe=0)),y.la.h(me,qe),y.Da.h(Lt,Rt)}}fo.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function dx(a,y,x,b,E,z){var te=x.length;if(te===0)return new _t(b,0,E,z);if(te===1)return y=x[0],E=y.Da.width,z=y.Da.height,new _t(b,0,E,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=Dc(y)===90,ue=0,me=0,we=0,Ee=0;Ee<te;Ee++)if(!(Ee%2!==0||1<te&&Ee===te-1)){var De=x[Ee],je=De.Da,ct=ue===0?0:oe;if(le){var qe=a.computeBusNodeSpacing(De)-re;De.S.h(b-(je.width+qe),we+ct),E=Math.max(E,je.width+qe),z=Math.max(z,we+ct+je.height),we+=ct+je.height}else qe=a.computeBusNodeSpacing(De)-re,De.S.h(me+ct,b-(je.height+qe)),z=Math.max(z,je.height+qe),E=Math.max(E,me+ct+je.width),me+=ct+je.width;ue++}for(ue=0,De=me,Ee=we,le?(me=b+re,we=0):(me=0,we=b+re),je=0;je<te;je++)if(je%2!==0){ct=x[je],qe=ct.Da;var Ct=ue===0?0:oe;if(le){var Lt=a.computeBusNodeSpacing(ct)-re;ct.S.h(me+Lt,we+Ct),E=Math.max(E,me+qe.width+Lt),z=Math.max(z,we+Ct+qe.height),we+=Ct+qe.height}else Lt=a.computeBusNodeSpacing(ct)-re,ct.S.h(me+Ct,we+Lt),E=Math.max(E,me+Ct+qe.width),z=Math.max(z,we+qe.height+Lt),me+=Ct+qe.width;ue++}return 1<te&&te%2===1&&(x=x[te-1],te=x.Da,a=a.computeBusLastRowSpacing(x,le?Math.max(Math.abs(Ee),Math.abs(we)):Math.max(Math.abs(De),Math.abs(me))),le?(x.S.h(b+re/2-x.focus.x-x.la.x,z+a),le=b+re/2-x.focus.x-x.la.x,E=Math.max(E,le+te.width),0>le&&(E-=le),z=Math.max(z,Math.max(Ee,we)+a+te.height),0>x.S.x&&(b=nv(y,x.S.x,!1,b,re))):(x.S.h(E+a,b+re/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(De,me)+a+te.width),we=b+re/2-x.focus.y-x.la.y,z=Math.max(z,we+te.height),0>we&&(z-=we),0>x.S.y&&(b=nv(y,x.S.y,!0,b,re)))),new _t(b,0,E,z)}function hx(a,y,x,b,E,z){var te=x.length;if(te===0)return new _t(b,0,E,z);if(te===1)return x=x[0],E=x.Da.width,z=x.Da.height,new _t(b,0,E,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=Dc(y)===270,ue=0,me=0,we=0,Ee=0;Ee<te;Ee++)if(!(Ee%2!==0||1<te&&Ee===te-1)){var De=x[Ee],je=De.Da,ct=ue===0?0:oe;if(le){var qe=a.computeBusNodeSpacing(De)-re;we-=ct+je.height,De.S.h(b-(je.width+qe),we),E=Math.max(E,je.width+qe),z=Math.max(z,Math.abs(we))}else qe=a.computeBusNodeSpacing(De)-re,me-=ct+je.width,De.S.h(me,b-(je.height+qe)),z=Math.max(z,je.height+qe),E=Math.max(E,Math.abs(me));ue++}for(ue=0,De=me,Ee=we,le?(me=b+re,we=0):(me=0,we=b+re),je=0;je<te;je++)if(je%2!==0){ct=x[je],qe=ct.Da;var Ct=ue===0?0:oe;if(le){var Lt=a.computeBusNodeSpacing(ct)-re;we-=Ct+qe.height,ct.S.h(me+Lt,we),E=Math.max(E,me+qe.width+Lt),z=Math.max(z,Math.abs(we))}else Lt=a.computeBusNodeSpacing(ct)-re,me-=Ct+qe.width,ct.S.h(me,we+Lt),z=Math.max(z,we+qe.height+Lt),E=Math.max(E,Math.abs(me));ue++}for(1<te&&te%2===1&&(oe=x[te-1],ue=oe.Da,a=a.computeBusLastRowSpacing(oe,le?Math.max(Math.abs(Ee),Math.abs(we)):Math.max(Math.abs(De),Math.abs(me))),le?(oe.S.h(b+re/2-oe.focus.x-oe.la.x,-z-ue.height-a),me=b+re/2-oe.focus.x-oe.la.x,E=Math.max(E,me+ue.width),0>me&&(E-=me),z=Math.max(z,Math.abs(Math.min(Ee,we))+a+ue.height),0>oe.S.x&&(b=nv(y,oe.S.x,!1,b,re))):(oe.S.h(-E-ue.width-a,b+re/2-oe.focus.y-oe.la.y),E=Math.max(E,Math.abs(Math.min(De,me))+a+ue.width),we=b+re/2-oe.focus.y-oe.la.y,z=Math.max(z,we+ue.height),0>we&&(z-=we),0>oe.S.y&&(b=nv(y,oe.S.y,!0,b,re)))),y=0;y<te;y++)re=x[y],le?re.S.h(re.S.x,re.S.y+z):re.S.h(re.S.x+E,re.S.y);return new _t(b,0,E,z)}fo.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},fo.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function nv(a,y,x,b,E){a=a.children;for(var z=a.length,te=0;te<z;te++)x?a[te].S.h(a[te].S.x,a[te].S.y-y):a[te].S.h(a[te].S.x-y,a[te].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 zy(a,y,x){switch(a.alignment){case Wg:case Ap:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Wd:return a.width>y?a.width:y;case Gd:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Uh:case $d:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case _h:return a.width-a.focus.x+a.nodeSpacing/2+y;case vh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Hy(a,y,x){switch(a.alignment){case Wg:case Ap:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Wd:return a.height>y?a.height:y;case Gd:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Uh:case $d:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case _h:return a.height-a.focus.y+a.nodeSpacing/2+y;case vh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Zy(a,y,x){switch(a){case Ap:y/=2,x/=2;break;case Wg:y/=2,x/=2;break;case Wd:x=y=0;break;case Gd:break;default:St("Unhandled alignment value "+a.toString())}return new Qe(y,x)}function ig(a,y,x,b,E,z){y=Zy(y,x,b),Hg(a,y.x,y.y,E,z)}function Hg(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 iv(a,y,x,b){var E=y.parent;switch(a.ud){case Zd:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Zg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:St("Unhandled path value "+a.ud.toString())}}function rv(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function fx(a,y,x,b,E,z,te,re){var oe=Dc(y),le=oe===90||oe===270,ue=y.nodeSpacing;y=b;var me=E;b=z;var we=te,Ee=x.Yo,De=x.kp;te=x.Da;var je=le?Math.max(we,te.height):Math.max(b,te.width);if((Ee===null||oe!==Dc(x))&&(Ee=xu(a,2),De=xu(a,2),le?(Ee[0].h(0,0),Ee[1].h(0,te.height),De[0].h(te.width,0),De[1].h(De[0].x,Ee[1].y)):(Ee[0].h(0,0),Ee[1].h(te.width,0),De[0].h(0,te.height),De[1].h(Ee[1].x,De[0].y))),le){if(we=9999999,!(me===null||2>me.length||Ee===null||2>Ee.length))for(E=x=0;x<me.length&&E<Ee.length;){z=me[x];var ct=Ee[E];oe=ct.x,le=ct.y,oe+=b;var qe=z;x+1<me.length&&(qe=me[x+1]);var Ct=ct;ct=Ct.x,Ct=Ct.y,E+1<Ee.length&&(Ct=Ee[E+1],ct=Ct.x,Ct=Ct.y,ct+=b);var Lt=we;z.y===le?Lt=oe-z.x:z.y>le&&z.y<Ct?Lt=oe+(z.y-le)/(Ct-le)*(ct-oe)-z.x:le>z.y&&le<qe.y&&(Lt=oe-(z.x+(le-z.y)/(qe.y-z.y)*(qe.x-z.x))),Lt<we&&(we=Lt),qe.y<=z.y?x++:Ct<=le?E++:(qe.y<=Ct&&x++,Ct<=qe.y&&E++)}if(we=b-we,we+=ue,x=Ee,E=we,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ue=xu(a,y.length+x.length),b=z=oe=0;z<x.length&&x[z].y<y[0].y;)le=x[z++],ue[b++].h(le.x+E,le.y);for(;oe<y.length;)le=y[oe++],ue[b++].h(le.x,le.y);for(oe=y[y.length-1].y;z<x.length&&x[z].y<=oe;)z++;for(;z<x.length&&x[z].y>oe;)le=x[z++],ue[b++].h(le.x+E,le.y);for(x=xu(a,b),oe=0;oe<b;oe++)x[oe].assign(ue[oe]);Xc(a,ue),b=x}if(z=De,oe=we,me===null||2>me.length||z===null||2>z.length)E=null;else{for(ue=xu(a,me.length+z.length),E=le=x=0;x<me.length&&me[x].y<z[0].y;)qe=me[x++],ue[E++].h(qe.x,qe.y);for(;le<z.length;)qe=z[le++],ue[E++].h(qe.x+oe,qe.y);for(z=z[z.length-1].y;x<me.length&&me[x].y<=z;)x++;for(;x<me.length&&me[x].y>z;)oe=me[x++],ue[E++].h(oe.x,oe.y);for(z=xu(a,E),x=0;x<E;x++)z[x].assign(ue[x]);Xc(a,ue),E=z}return z=Math.max(0,we)+te.width,te=je,Xc(a,y),Xc(a,Ee),Xc(a,me),Xc(a,De),re[0]=b,re[1]=E,new _t(we,0,z,te)}if(b=9999999,!(me===null||2>me.length||Ee===null||2>Ee.length))for(E=x=0;x<me.length&&E<Ee.length;)z=me[x],ct=Ee[E],oe=ct.x,le=ct.y,le+=we,qe=z,x+1<me.length&&(qe=me[x+1]),Ct=ct,ct=Ct.x,Ct=Ct.y,E+1<Ee.length&&(Ct=Ee[E+1],ct=Ct.x,Ct=Ct.y,Ct+=we),Lt=b,z.x===oe?Lt=le-z.y:z.x>oe&&z.x<ct?Lt=le+(z.x-oe)/(ct-oe)*(Ct-le)-z.y:oe>z.x&&oe<qe.x&&(Lt=le-(z.y+(oe-z.x)/(qe.x-z.x)*(qe.y-z.y))),Lt<b&&(b=Lt),qe.x<=z.x?x++:ct<=oe?E++:(qe.x<=ct&&x++,ct<=qe.x&&E++);if(we-=b,we+=ue,x=Ee,E=we,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ue=xu(a,y.length+x.length),b=z=oe=0;z<x.length&&x[z].x<y[0].x;)le=x[z++],ue[b++].h(le.x,le.y+E);for(;oe<y.length;)le=y[oe++],ue[b++].h(le.x,le.y);for(oe=y[y.length-1].x;z<x.length&&x[z].x<=oe;)z++;for(;z<x.length&&x[z].x>oe;)le=x[z++],ue[b++].h(le.x,le.y+E);for(x=xu(a,b),oe=0;oe<b;oe++)x[oe].assign(ue[oe]);Xc(a,ue),b=x}if(z=De,oe=we,me===null||2>me.length||z===null||2>z.length)E=null;else{for(ue=xu(a,me.length+z.length),E=le=x=0;x<me.length&&me[x].x<z[0].x;)qe=me[x++],ue[E++].h(qe.x,qe.y);for(;le<z.length;)qe=z[le++],ue[E++].h(qe.x,qe.y+oe);for(z=z[z.length-1].x;x<me.length&&me[x].x<=z;)x++;for(;x<me.length&&me[x].x>z;)oe=me[x++],ue[E++].h(oe.x,oe.y);for(z=xu(a,E),x=0;x<E;x++)z[x].assign(ue[x]);Xc(a,ue),E=z}return z=je,te=Math.max(0,we)+te.height,Xc(a,y),Xc(a,Ee),Xc(a,me),Xc(a,De),re[0]=b,re[1]=E,new _t(we,0,z,te)}function xu(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 Qe;return a}function Xc(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}fo.prototype.arrangeTrees=function(){if(this.Rb===uv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof gc){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),Wy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof gc&&a.push(x);switch(this.sorting){case Fp:break;case Mm:a.reverse();break;case Lm:a.sort(this.comparer);break;case Nm:a.sort(this.comparer),a.reverse();break;default:St("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(Wy(this,E,y+E.la.x,x+E.la.y),this.Rb){case lv:x+=E.Da.height+this.$d.height;break;case Vy:y+=E.Da.width+this.$d.width;break;default:St("Unhandled arrangement value "+this.Rb.toString())}}}};function Wy(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 te=y[z];Wy(a,te,x+te.S.x,b+te.S.y)}}}fo.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},fo.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},fo.prototype.Gu=function(){if(this.layerStyle===cv){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 Qe(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new Qe(-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 te=0;te<a.length;te++)z+=a[te]+y[te];for(te=0;te<a.length;te++){var re=a[te]+y[te];this.angle===270?(z-=re,E.push(new _t(0,z,x,re))):this.angle===90?(E.push(new _t(0,z,x,re)),z+=re):this.angle===180?(z-=re,E.push(new _t(z,0,re,x))):(E.push(new _t(z,0,re,x)),z+=re)}this.commitLayers(E,b)}},fo.prototype.commitLayers=function(){},fo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},fo.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof gc&&gx(this,y)}};function gx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)gx(a,y[b])}}fo.prototype.setPortSpots=function(a){var y=a.alignment;if(Nf(y)){var x=this.ud===Zd,b=Dc(a);switch(b){case 0:var E=xs;break;case 90:E=vs;break;case 180:E=ss;break;default:E=Ua}var z=a.children,te=z.length;switch(y){case Uh:case $d:for(y=0;y<te;y++){var re=z[y];if(re=(x?re.sourceEdges:re.destinationEdges).first(),re!==null&&(re=re.link,re!==null)){var oe=b===90||b===270?ss:Ua;if(te===1||y===te-1&&te%2===1)switch(b){case 0:oe=ss;break;case 90:oe=Ua;break;case 180:oe=xs;break;default:oe=vs}else y%2===0&&(oe=b===90||b===270?xs:vs);x?(a.setsPortSpot&&(re.fromSpot=E),a.setsChildPortSpot&&(re.toSpot=oe)):(a.setsPortSpot&&(re.fromSpot=oe),a.setsChildPortSpot&&(re.toSpot=E))}}break;case _h:for(b=b===90||b===270?xs:vs,z=x?a.destinationEdges:a.sourceEdges;z.next();)te=z.value.link,te!==null&&(x?(a.setsPortSpot&&(te.fromSpot=E),a.setsChildPortSpot&&(te.toSpot=b)):(a.setsPortSpot&&(te.fromSpot=b),a.setsChildPortSpot&&(te.toSpot=E)));break;case vh:for(b=b===90||b===270?ss:Ua,z=x?a.destinationEdges:a.sourceEdges;z.next();)te=z.value.link,te!==null&&(x?(a.setsPortSpot&&(te.fromSpot=E),a.setsChildPortSpot&&(te.toSpot=b)):(a.setsPortSpot&&(te.fromSpot=b),a.setsChildPortSpot&&(te.toSpot=E)))}}else if(x=Dc(a),this.ud===Zd){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=xs;break;case 90:b.fromSpot=vs;break;case 180:b.fromSpot=ss;break;default:b.fromSpot=Ua}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=ss;break;case 90:b.toSpot=Ua;break;case 180:b.toSpot=xs;break;default:b.toSpot=vs}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=xs;break;case 90:b.toSpot=vs;break;case 180:b.toSpot=ss;break;default:b.toSpot=Ua}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=ss;break;case 90:b.fromSpot=Ua;break;case 180:b.fromSpot=xs;break;default:b.fromSpot=vs}else b.fromSpot=a.childPortSpot}};function Dc(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}fo.prototype.computeLayerSpacing=function(a){var y=Dc(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},fo.prototype.computeNodeIndent=function(a){var y=Dc(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)},Ye.Object.defineProperties(fo.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!==sv&&a!==$y&&a!==Gy&&a!==Ky||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Uy&&a!==_y&&a!==cv||(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!==lv&&a!==Vy&&a!==uv||(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!==Fp&&a!==Mm&&a!==Lm&&!Nm||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):St("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==av&&a!==Fm||(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!==Fp&&a!==Mm&&a!==Lm&&!Nm||(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!==av&&a!==Fm||(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 ov=new gn(fo,"PathDefault",-1),Zd=new gn(fo,"PathDestination",0),Zg=new gn(fo,"PathSource",1),Fp=new gn(fo,"SortingForwards",10),Mm=new gn(fo,"SortingReverse",11),Lm=new gn(fo,"SortingAscending",12),Nm=new gn(fo,"SortingDescending",13),Ap=new gn(fo,"AlignmentCenterSubtrees",20),Wg=new gn(fo,"AlignmentCenterChildren",21),Wd=new gn(fo,"AlignmentStart",22),Gd=new gn(fo,"AlignmentEnd",23),Uh=new gn(fo,"AlignmentBus",24),$d=new gn(fo,"AlignmentBusBranching",25),_h=new gn(fo,"AlignmentTopLeftBus",26),vh=new gn(fo,"AlignmentBottomRightBus",27),av=new gn(fo,"CompactionNone",30),Fm=new gn(fo,"CompactionBlock",31),sv=new gn(fo,"StyleLayered",40),Gy=new gn(fo,"StyleLastParents",41),$y=new gn(fo,"StyleAlternating",42),Ky=new gn(fo,"StyleRootOnly",43),lv=new gn(fo,"ArrangementVertical",50),Vy=new gn(fo,"ArrangementHorizontal",51),uv=new gn(fo,"ArrangementFixedRoots",52),Uy=new gn(fo,"LayerIndividual",60),_y=new gn(fo,"LayerSiblings",61),cv=new gn(fo,"LayerUniform",62);fo.className="TreeLayout",fo.PathDefault=ov,fo.PathDestination=Zd,fo.PathSource=Zg,fo.SortingForwards=Fp,fo.SortingReverse=Mm,fo.SortingAscending=Lm,fo.SortingDescending=Nm,fo.AlignmentCenterSubtrees=Ap,fo.AlignmentCenterChildren=Wg,fo.AlignmentStart=Wd,fo.AlignmentEnd=Gd,fo.AlignmentBus=Uh,fo.AlignmentBusBranching=$d,fo.AlignmentTopLeftBus=_h,fo.AlignmentBottomRightBus=vh,fo.CompactionNone=av,fo.CompactionBlock=Fm,fo.StyleLayered=sv,fo.StyleLastParents=Gy,fo.StyleAlternating=$y,fo.StyleRootOnly=Ky,fo.ArrangementVertical=lv,fo.ArrangementHorizontal=Vy,fo.ArrangementFixedRoots=uv,fo.LayerIndividual=Uy,fo.LayerSiblings=_y,fo.LayerUniform=cv;function Gg(a){ca.call(this,a)}Kt(Gg,ca),Gg.prototype.createVertex=function(){return new gc(this)},Gg.prototype.createEdge=function(){return new Dp(this)},Gg.className="TreeNetwork";function gc(a){Ms.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 Qe(0,0),this.Da=new pi(0,0),this.la=new Qe(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Fp,this.hd=gy,this.Kb=0,this.Jb=Wg,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Fm,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Vo,this.wr=!0,this.Dp=Vo}Kt(gc,Ms),gc.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)},Ye.Object.defineProperties(gc.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)}}}),gc.className="TreeVertex";function Dp(a){Tu.call(this,a),this.$t=new Qe(0,0)}Kt(Dp,Tu),Dp.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 Zd:x=this.fromVertex,b=this.toVertex;break;case Zg:x=this.toVertex,b=this.fromVertex;break;default:St("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=Dc(x),te=y.computeLayerSpacing(x),re=x.rowSpacing;a.vg();var oe=a.curve===$u,le=a.isOrthogonal,ue;if(a.uh(),le||oe){for(ue=2;4<a.pointsCount;)a.pv(2);var me=a.i(1),we=a.i(2)}else{for(ue=1;3<a.pointsCount;)a.pv(1);me=a.i(0),we=a.i(a.pointsCount-1)}var Ee=a.i(a.pointsCount-1);z===0?(x.alignment===Gd?(z=b.bottom+E.y,E.y===0&&me.y>Ee.y+x.rowIndent&&(z=Math.min(z,Math.max(me.y,z-y.computeNodeIndent(x))))):x.alignment===Wd?(z=b.top+E.y,E.y===0&&me.y<Ee.y-x.rowIndent&&(z=Math.max(z,Math.min(me.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,oe?(a.m(ue,me.x,z),ue++,a.m(ue,b.right+te,z),ue++,a.m(ue,b.right+te+(E.x-re)/3,z),ue++,a.m(ue,b.right+te+2*(E.x-re)/3,z),ue++,a.m(ue,b.right+te+(E.x-re),z),ue++,a.m(ue,we.x,z)):(le&&(a.m(ue,b.right+te/2,me.y),ue++),a.m(ue,b.right+te/2,z),ue++,a.m(ue,b.right+te+E.x-(le?re/2:re),z),ue++,le&&a.m(ue,a.i(ue-1).x,we.y))):z===90?(x.alignment===Gd?(z=b.right+E.x,E.x===0&&me.x>Ee.x+x.rowIndent&&(z=Math.min(z,Math.max(me.x,z-y.computeNodeIndent(x))))):x.alignment===Wd?(z=b.left+E.x,E.x===0&&me.x<Ee.x-x.rowIndent&&(z=Math.max(z,Math.min(me.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,oe?(a.m(ue,z,me.y),ue++,a.m(ue,z,b.bottom+te),ue++,a.m(ue,z,b.bottom+te+(E.y-re)/3),ue++,a.m(ue,z,b.bottom+te+2*(E.y-re)/3),ue++,a.m(ue,z,b.bottom+te+(E.y-re)),ue++,a.m(ue,z,we.y)):(le&&(a.m(ue,me.x,b.bottom+te/2),ue++),a.m(ue,z,b.bottom+te/2),ue++,a.m(ue,z,b.bottom+te+E.y-(le?re/2:re)),ue++,le&&a.m(ue,we.x,a.i(ue-1).y))):z===180?(x.alignment===Gd?(z=b.bottom+E.y,E.y===0&&me.y>Ee.y+x.rowIndent&&(z=Math.min(z,Math.max(me.y,z-y.computeNodeIndent(x))))):x.alignment===Wd?(z=b.top+E.y,E.y===0&&me.y<Ee.y-x.rowIndent&&(z=Math.max(z,Math.min(me.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,oe?(a.m(ue,me.x,z),ue++,a.m(ue,b.left-te,z),ue++,a.m(ue,b.left-te+(E.x+re)/3,z),ue++,a.m(ue,b.left-te+2*(E.x+re)/3,z),ue++,a.m(ue,b.left-te+(E.x+re),z),ue++,a.m(ue,we.x,z)):(le&&(a.m(ue,b.left-te/2,me.y),ue++),a.m(ue,b.left-te/2,z),ue++,a.m(ue,b.left-te+E.x+(le?re/2:re),z),ue++,le&&a.m(ue,a.i(ue-1).x,we.y))):z===270?(x.alignment===Gd?(z=b.right+E.x,E.x===0&&me.x>Ee.x+x.rowIndent&&(z=Math.min(z,Math.max(me.x,z-y.computeNodeIndent(x))))):x.alignment===Wd?(z=b.left+E.x,E.x===0&&me.x<Ee.x-x.rowIndent&&(z=Math.max(z,Math.min(me.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,oe?(a.m(ue,z,me.y),ue++,a.m(ue,z,b.top-te),ue++,a.m(ue,z,b.top-te+(E.y+re)/3),ue++,a.m(ue,z,b.top-te+2*(E.y+re)/3),ue++,a.m(ue,z,b.top-te+(E.y+re)),ue++,a.m(ue,z,we.y)):(le&&(a.m(ue,me.x,b.top-te/2),ue++),a.m(ue,z,b.top-te/2),ue++,a.m(ue,z,b.top-te+E.y+(le?re/2:re)),ue++,le&&a.m(ue,we.x,a.i(ue-1).y))):St("Invalid angle "+z),a.zf()}else E=b,a=this.link,b=this.network.layout,y=Dc(x),y!==Dc(E)&&(te=b.computeLayerSpacing(x),re=x.bounds,x=E.bounds,y===0&&x.left-re.right<te+1||y===90&&x.top-re.bottom<te+1||y===180&&re.left-x.right<te+1||y===270&&re.top-x.bottom<te+1||(a.vg(),x=a.curve===$u,E=a.isOrthogonal,b=Nf(this.fromVertex.alignment),a.uh(),y===0?(y=re.right+te/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=re.bottom+te/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=re.left-te/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=re.top-te/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()))}}},Ye.Object.defineProperties(Dp.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)}}}),Dp.className="TreeEdge",fa.prototype.initializeStandardTools=function(){this.gb("Action",new _r,this.mouseDownTools),this.gb("Relinking",new ir,this.mouseDownTools),this.gb("LinkReshaping",new sr,this.mouseDownTools),this.gb("Rotating",new So,this.mouseDownTools),this.gb("Resizing",new $r,this.mouseDownTools),this.gb("Linking",new Ai,this.mouseMoveTools),this.gb("Dragging",new Fa,this.mouseMoveTools),this.gb("DragSelecting",new Xr,this.mouseMoveTools),this.gb("Panning",new Cr,this.mouseMoveTools),this.gb("ContextMenu",new Zo,this.mouseUpTools),this.gb("TextEditing",new Fo,this.mouseUpTools),this.gb("ClickCreating",new co,this.mouseUpTools),this.gb("ClickSelecting",new Xo,this.mouseUpTools)},gd("Horizontal",new zm),gd("Spot",new Zm),gd("Table",new Gm),gd("Viewbox",new Vm),gd("TableRow",new $m),gd("TableColumn",new Km),gd("Graduated",new Kp),gd("Grid",new $p),Uf.add("GraphLinksModel",Ks),Uf.add("TreeModel",ec);var dv=at.go,Xy={get licenseKey(){return mn.licenseKey},set licenseKey(a){mn.licenseKey=a},get version(){return mn.version},Group:Yr,EnumValue:gn,List:Rn,Set:_n,Map:Ii,Point:Qe,Size:pi,Rect:_t,Margin:Oi,Spot:Ui,Geometry:xi,PathFigure:ys,PathSegment:To,InputEvent:nl,DiagramEvent:od,ChangedEvent:Pa,Model:ar,GraphLinksModel:No,TreeModel:$l,Binding:fs,Transaction:Ps,UndoManager:Na,CommandHandler:ut,Tool:Do,DraggingTool:Fa,DraggingInfo:Zc,DraggingOptions:ae,LinkingBaseTool:En,LinkingTool:Ai,RelinkingTool:ir,LinkReshapingTool:sr,ResizingTool:$r,RotatingTool:So,ClickSelectingTool:Xo,ActionTool:_r,ClickCreatingTool:co,HTMLInfo:oo,ContextMenuTool:Zo,DragSelectingTool:Xr,PanningTool:Cr,TextEditingTool:Fo,ToolManager:fa,Animation:za,AnimationManager:ka,AnimationTrigger:ql,Layer:Ca,Diagram:mn,Palette:he,Overview:Se,Brush:Oo,GraphObject:Qt,Panel:hi,RowColumnDefinition:Cs,Shape:io,TextBlock:ua,Picture:ru,Part:mr,Adornment:jo,Node:Di,Link:vi,Placeholder:Hl,Layout:Ma,LayoutNetwork:ca,LayoutVertex:Ms,LayoutEdge:Tu,GridLayout:qs,PanelLayout:Es,CircularLayout:Ga,CircularNetwork:Mp,CircularVertex:Sm,CircularEdge:K0,ForceDirectedLayout:ml,ForceDirectedNetwork:zg,ForceDirectedVertex:xm,ForceDirectedEdge:Pm,LayeredDigraphLayout:ea,LayeredDigraphNetwork:Np,LayeredDigraphVertex:nc,LayeredDigraphEdge:bm,TreeLayout:fo,TreeNetwork:Gg,TreeVertex:gc,TreeEdge:Dp};typeof dv=="object"&&dv.version&&Si("WARNING: a `go` object on the root object is already defined. "+("Debug"in dv?"debug ":"")+"version: "+dv.version+", replaced with version: "+Xy.version),mn.prototype.go=Xy,at.go=Xy,typeof Vn.exports=="object"&&(Vn.exports=typeof pe.g!="undefined"?pe.g.go:self.go)}();var ge=typeof pe.g!="undefined"?pe.g.go:self.go;const Re=typeof pe.g!="undefined"?pe.g.go:self.go,Ve=Re.Group,dt=Re.EnumValue,Ke=Re.List,st=Re.Set,Me=Re.Map,kt=Re.Point,bt=Re.Size,Ue=Re.Rect,lt=Re.Margin,yt=Re.Spot,jt=Re.Geometry,Ae=Re.PathFigure,ne=Re.PathSegment,ee=Re.InputEvent,ce=Re.DiagramEvent,se=Re.ChangedEvent,fe=Re.Model,ye=Re.GraphLinksModel,be=Re.TreeModel,Te=Re.Binding,Be=Re.Transaction,ze=Re.UndoManager,Ge=Re.CommandHandler,nt=Re.Tool,Je=Re.DraggingTool,xt=Re.DraggingInfo,He=Re.LinkingBaseTool,Et=Re.LinkingTool,tt=Re.RelinkingTool,Ot=Re.LinkReshapingTool,gt=Re.ResizingTool,Ht=Re.RotatingTool,Xt=Re.ClickSelectingTool,Ut=Re.ActionTool,it=Re.ClickCreatingTool,_e=Re.HTMLInfo,Wt=Re.ContextMenuTool,Dn=Re.DragSelectingTool,Bn=Re.PanningTool,$t=Re.TextEditingTool,ln=Re.ToolManager,Tn=Re.Animation,ei=Re.AnimationManager,Ln=Re.AnimationTrigger,Yn=Re.Layer,zt=Re.Diagram,wn=Re.Palette,$n=Re.Overview,Yt=Re.Brush,tn=Re.GraphObject,Gt=Re.Panel,Tt=Re.RowColumnDefinition,ot=Re.Shape,Ze=Re.TextBlock,At=Re.TextBlockMetrics,Dt=Re.Picture,rt=Re.Part,et=Re.Adornment,Oe=Re.Node,Pe=Re.Link,ve=Re.Placeholder,Fe=Re.Layout,We=Re.LayoutNetwork,Ne=Re.LayoutVertex,ft=Re.LayoutEdge,sn=Re.GridLayout,un=Re.PanelLayout,Pt=Re.CircularLayout,qt=Re.CircularNetwork,Mn=Re.CircularVertex,hn=Re.CircularEdge,fn=Re.ForceDirectedLayout,ui=Re.ForceDirectedNetwork,gi=Re.ForceDirectedVertex,fi=Re.ForceDirectedEdge,bi=Re.LayeredDigraphLayout,_i=Re.LayeredDigraphNetwork,rr=Re.LayeredDigraphVertex,Wi=Re.LayeredDigraphEdge,vr=Re.TreeLayout,fr=Re.TreeNetwork,zi=Re.TreeVertex,Er=Re.TreeEdge,Kn=Re.version},24334:function(Vn,Cn,pe){var ge,Re;(function(Ve,dt){Vn.exports=dt(Ve)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof pe.g!="undefined"?pe.g:this,function(Ve){"use strict";Ve=Ve||{};var dt=Ve.Base64,Ke="2.6.4",st="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Me=function(tt){for(var Ot={},gt=0,Ht=tt.length;gt<Ht;gt++)Ot[tt.charAt(gt)]=gt;return Ot}(st),kt=String.fromCharCode,bt=function(tt){if(tt.length<2){var Ot=tt.charCodeAt(0);return Ot<128?tt:Ot<2048?kt(192|Ot>>>6)+kt(128|Ot&63):kt(224|Ot>>>12&15)+kt(128|Ot>>>6&63)+kt(128|Ot&63)}else{var Ot=65536+(tt.charCodeAt(0)-55296)*1024+(tt.charCodeAt(1)-56320);return kt(240|Ot>>>18&7)+kt(128|Ot>>>12&63)+kt(128|Ot>>>6&63)+kt(128|Ot&63)}},Ue=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,lt=function(tt){return tt.replace(Ue,bt)},yt=function(tt){var Ot=[0,2,1][tt.length%3],gt=tt.charCodeAt(0)<<16|(tt.length>1?tt.charCodeAt(1):0)<<8|(tt.length>2?tt.charCodeAt(2):0),Ht=[st.charAt(gt>>>18),st.charAt(gt>>>12&63),Ot>=2?"=":st.charAt(gt>>>6&63),Ot>=1?"=":st.charAt(gt&63)];return Ht.join("")},jt=Ve.btoa&&typeof Ve.btoa=="function"?function(tt){return Ve.btoa(tt)}:function(tt){if(tt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return tt.replace(/[\s\S]{1,3}/g,yt)},Ae=function(tt){return jt(lt(String(tt)))},ne=function(tt){return tt.replace(/[+\/]/g,function(Ot){return Ot=="+"?"-":"_"}).replace(/=/g,"")},ee=function(tt,Ot){return Ot?ne(Ae(tt)):Ae(tt)},ce=function(tt){return ee(tt,!0)},se;Ve.Uint8Array&&(se=function(tt,Ot){for(var gt="",Ht=0,Xt=tt.length;Ht<Xt;Ht+=3){var Ut=tt[Ht],it=tt[Ht+1],_e=tt[Ht+2],Wt=Ut<<16|it<<8|_e;gt+=st.charAt(Wt>>>18)+st.charAt(Wt>>>12&63)+(typeof it!="undefined"?st.charAt(Wt>>>6&63):"=")+(typeof _e!="undefined"?st.charAt(Wt&63):"=")}return Ot?ne(gt):gt});var fe=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ye=function(tt){switch(tt.length){case 4:var Ot=(7&tt.charCodeAt(0))<<18|(63&tt.charCodeAt(1))<<12|(63&tt.charCodeAt(2))<<6|63&tt.charCodeAt(3),gt=Ot-65536;return kt((gt>>>10)+55296)+kt((gt&1023)+56320);case 3:return kt((15&tt.charCodeAt(0))<<12|(63&tt.charCodeAt(1))<<6|63&tt.charCodeAt(2));default:return kt((31&tt.charCodeAt(0))<<6|63&tt.charCodeAt(1))}},be=function(tt){return tt.replace(fe,ye)},Te=function(tt){var Ot=tt.length,gt=Ot%4,Ht=(Ot>0?Me[tt.charAt(0)]<<18:0)|(Ot>1?Me[tt.charAt(1)]<<12:0)|(Ot>2?Me[tt.charAt(2)]<<6:0)|(Ot>3?Me[tt.charAt(3)]:0),Xt=[kt(Ht>>>16),kt(Ht>>>8&255),kt(Ht&255)];return Xt.length-=[0,0,2,1][gt],Xt.join("")},Be=Ve.atob&&typeof Ve.atob=="function"?function(tt){return Ve.atob(tt)}:function(tt){return tt.replace(/\S{1,4}/g,Te)},ze=function(tt){return Be(String(tt).replace(/[^A-Za-z0-9\+\/]/g,""))},Ge=function(tt){return be(Be(tt))},nt=function(tt){return String(tt).replace(/[-_]/g,function(Ot){return Ot=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Je=function(tt){return Ge(nt(tt))},xt;Ve.Uint8Array&&(xt=function(tt){return Uint8Array.from(ze(nt(tt)),function(Ot){return Ot.charCodeAt(0)})});var He=function(){var tt=Ve.Base64;return Ve.Base64=dt,tt};if(Ve.Base64={VERSION:Ke,atob:ze,btoa:jt,fromBase64:Je,toBase64:ee,utob:lt,encode:ee,encodeURI:ce,btou:be,decode:Je,noConflict:He,fromUint8Array:se,toUint8Array:xt},typeof Object.defineProperty=="function"){var Et=function(tt){return{value:tt,enumerable:!1,writable:!0,configurable:!0}};Ve.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Et(function(){return Je(this)})),Object.defineProperty(String.prototype,"toBase64",Et(function(tt){return ee(this,tt)})),Object.defineProperty(String.prototype,"toBase64URI",Et(function(){return ee(this,!0)}))}}return Ve.Meteor&&(Base64=Ve.Base64),Vn.exports?Vn.exports.Base64=Ve.Base64:(ge=[],Re=function(){return Ve.Base64}.apply(Cn,ge),Re!==void 0&&(Vn.exports=Re)),{Base64:Ve.Base64}})},17115:function(Vn,Cn,pe){"use strict";pe.d(Cn,{ZP:function(){return Me}});var ge=pe(72071),Re=pe(59301),Ve=pe(47273),dt=0,Ke=(0,Ve.Z)();function st(){var kt;return Ke?(kt=dt,dt+=1):kt="TEST_OR_SSR",kt}function Me(kt){var bt=Re.useState(),Ue=(0,ge.Z)(bt,2),lt=Ue[0],yt=Ue[1];return Re.useEffect(function(){yt("rc_select_".concat(st()))},[]),kt||lt}},77861:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Ac:function(){return Fe},Xo:function(){return fi},Wx:function(){return _i},ZP:function(){return xn},lk:function(){return be}});var ge=pe(96663),Re=pe(19127),Ve=pe(90493),dt=pe(44127),Ke=pe(72071),st=pe(6620),Me=pe(20135),kt=pe(18929),bt=pe(48736),Ue=pe(59301),lt=pe(92310),yt=pe.n(lt),jt=pe(34280),Ae=pe(49658),ne=pe(10228),ee=pe(8654),ce=function(at){var cn=at.className,Nn=at.customizeIcon,kn=at.customizeIconProps,Jn=at.onMouseDown,St=at.onClick,An=at.children,qn;return typeof Nn=="function"?qn=Nn(kn):qn=Nn,Ue.createElement("span",{className:cn,onMouseDown:function(rn){rn.preventDefault(),Jn&&Jn(rn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:St,"aria-hidden":!0},qn!==void 0?qn:Ue.createElement("span",{className:yt()(cn.split(/\s+/).map(function(Si){return"".concat(Si,"-icon")}))},An))},se=ce;function fe(Nt,at,cn,Nn,kn){var Jn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,St=arguments.length>6?arguments[6]:void 0,An=arguments.length>7?arguments[7]:void 0,qn=Ue.useMemo(function(){if((0,Me.Z)(Nn)==="object")return Nn.clearIcon;if(kn)return kn},[Nn,kn]),Si=Ue.useMemo(function(){return!!(!Jn&&Nn&&(cn.length||St)&&!(An==="combobox"&&St===""))},[Nn,Jn,cn.length,St,An]);return{allowClear:Si,clearIcon:Ue.createElement(se,{className:"".concat(Nt,"-clear"),onMouseDown:at,customizeIcon:qn},"\xD7")}}var ye=Ue.createContext(null);function be(){return Ue.useContext(ye)}function Te(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,at=Ue.useState(!1),cn=(0,Ke.Z)(at,2),Nn=cn[0],kn=cn[1],Jn=Ue.useRef(null),St=function(){window.clearTimeout(Jn.current)};Ue.useEffect(function(){return St},[]);var An=function(Si,rn){St(),Jn.current=window.setTimeout(function(){kn(Si),rn&&rn()},Nt)};return[Nn,An,St]}function Be(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,at=Ue.useRef(null),cn=Ue.useRef(null);Ue.useEffect(function(){return function(){window.clearTimeout(cn.current)}},[]);function Nn(kn){(kn||at.current===null)&&(at.current=kn),window.clearTimeout(cn.current),cn.current=window.setTimeout(function(){at.current=null},Nt)}return[function(){return at.current},Nn]}function ze(Nt,at,cn,Nn){var kn=Ue.useRef(null);kn.current={open:at,triggerOpen:cn,customizedTrigger:Nn},Ue.useEffect(function(){function Jn(St){var An;if(!((An=kn.current)!==null&&An!==void 0&&An.customizedTrigger)){var qn=St.target;qn.shadowRoot&&St.composed&&(qn=St.composedPath()[0]||qn),kn.current.open&&Nt().filter(function(Si){return Si}).every(function(Si){return!Si.contains(qn)&&Si!==qn})&&kn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Jn),function(){return window.removeEventListener("mousedown",Jn)}},[])}var Ge=pe(26112),nt=pe(11780),Je=function(at,cn){var Nn,kn,Jn=at.prefixCls,St=at.id,An=at.inputElement,qn=at.disabled,Si=at.tabIndex,rn=at.autoFocus,bn=at.autoComplete,Ft=at.editable,Pn=at.activeDescendantId,yn=at.value,Sn=at.maxLength,Gn=at.onKeyDown,Zn=at.onMouseDown,Qn=at.onChange,ii=at.onPaste,ji=at.onCompositionStart,pn=at.onCompositionEnd,Ji=at.open,Ki=at.attrs,Gi=An||Ue.createElement("input",null),gn=Gi,oi=gn.ref,Bi=gn.props,$i=Bi.onKeyDown,Ti=Bi.onChange,Qi=Bi.onMouseDown,pr=Bi.onCompositionStart,hr=Bi.onCompositionEnd,Vi=Bi.style;return(0,bt.Kp)(!("maxLength"in Gi.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Gi=Ue.cloneElement(Gi,(0,dt.Z)((0,dt.Z)((0,dt.Z)({type:"search"},Bi),{},{id:St,ref:(0,ee.sQ)(cn,oi),disabled:qn,tabIndex:Si,autoComplete:bn||"off",autoFocus:rn,className:yt()("".concat(Jn,"-selection-search-input"),(Nn=Gi)===null||Nn===void 0||(kn=Nn.props)===null||kn===void 0?void 0:kn.className),role:"combobox","aria-label":"Search","aria-expanded":Ji||!1,"aria-haspopup":"listbox","aria-owns":"".concat(St,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(St,"_list"),"aria-activedescendant":Ji?Pn:void 0},Ki),{},{value:Ft?yn:"",maxLength:Sn,readOnly:!Ft,unselectable:Ft?null:"on",style:(0,dt.Z)((0,dt.Z)({},Vi),{},{opacity:Ft?null:0}),onKeyDown:function(Rn){Gn(Rn),$i&&$i(Rn)},onMouseDown:function(Rn){Zn(Rn),Qi&&Qi(Rn)},onChange:function(Rn){Qn(Rn),Ti&&Ti(Rn)},onCompositionStart:function(Rn){ji(Rn),pr&&pr(Rn)},onCompositionEnd:function(Rn){pn(Rn),hr&&hr(Rn)},onPaste:ii})),Gi},xt=Ue.forwardRef(Je);xt.displayName="Input";var He=xt;function Et(Nt){return Array.isArray(Nt)?Nt:Nt!==void 0?[Nt]:[]}var tt=typeof window!="undefined"&&window.document&&window.document.documentElement,Ot=tt;function gt(Nt){return Nt!=null}function Ht(Nt){return!Nt&&Nt!==0}function Xt(Nt){return["string","number"].includes((0,Me.Z)(Nt))}function Ut(Nt){var at=void 0;return Nt&&(Xt(Nt.title)?at=Nt.title.toString():Xt(Nt.label)&&(at=Nt.label.toString())),at}function it(Nt,at){Ot?Ue.useLayoutEffect(Nt,at):Ue.useEffect(Nt,at)}function _e(Nt){var at;return(at=Nt.key)!==null&&at!==void 0?at:Nt.value}var Wt=function(at){at.preventDefault(),at.stopPropagation()},Dn=function(at){var cn=at.id,Nn=at.prefixCls,kn=at.values,Jn=at.open,St=at.searchValue,An=at.autoClearSearchValue,qn=at.inputRef,Si=at.placeholder,rn=at.disabled,bn=at.mode,Ft=at.showSearch,Pn=at.autoFocus,yn=at.autoComplete,Sn=at.activeDescendantId,Gn=at.tabIndex,Zn=at.removeIcon,Qn=at.maxTagCount,ii=at.maxTagTextLength,ji=at.maxTagPlaceholder,pn=ji===void 0?function(Qr){return"+ ".concat(Qr.length," ...")}:ji,Ji=at.tagRender,Ki=at.onToggleOpen,Gi=at.onRemove,gn=at.onInputChange,oi=at.onInputPaste,Bi=at.onInputKeyDown,$i=at.onInputMouseDown,Ti=at.onInputCompositionStart,Qi=at.onInputCompositionEnd,pr=Ue.useRef(null),hr=(0,Ue.useState)(0),Vi=(0,Ke.Z)(hr,2),xr=Vi[0],Rn=Vi[1],Br=(0,Ue.useState)(!1),_n=(0,Ke.Z)(Br,2),Or=_n[0],no=_n[1],br="".concat(Nn,"-selection"),mo=Jn||bn==="multiple"&&An===!1||bn==="tags"?St:"",Jr=bn==="tags"||bn==="multiple"&&An===!1||Ft&&(Jn||Or);it(function(){Rn(pr.current.scrollWidth)},[mo]);function ur(Qr,lo,jr,vo,po){return Ue.createElement("span",{className:yt()("".concat(br,"-item"),(0,Ve.Z)({},"".concat(br,"-item-disabled"),jr)),title:Ut(Qr)},Ue.createElement("span",{className:"".concat(br,"-item-content")},lo),vo&&Ue.createElement(se,{className:"".concat(br,"-item-remove"),onMouseDown:Wt,onClick:po,customizeIcon:Zn},"\xD7"))}function er(Qr,lo,jr,vo,po){var Lr=function(uo){Wt(uo),Ki(!Jn)};return Ue.createElement("span",{onMouseDown:Lr},Ji({label:lo,value:Qr,disabled:jr,closable:vo,onClose:po}))}function qi(Qr){var lo=Qr.disabled,jr=Qr.label,vo=Qr.value,po=!rn&&!lo,Lr=jr;if(typeof ii=="number"&&(typeof jr=="string"||typeof jr=="number")){var Fr=String(Lr);Fr.length>ii&&(Lr="".concat(Fr.slice(0,ii),"..."))}var uo=function(zo){zo&&zo.stopPropagation(),Gi(Qr)};return typeof Ji=="function"?er(vo,Lr,lo,po,uo):ur(Qr,Lr,lo,po,uo)}function Rr(Qr){var lo=typeof pn=="function"?pn(Qr):pn;return ur({title:lo},lo,!1)}var Ii=Ue.createElement("div",{className:"".concat(br,"-search"),style:{width:xr},onFocus:function(){no(!0)},onBlur:function(){no(!1)}},Ue.createElement(He,{ref:qn,open:Jn,prefixCls:Nn,id:cn,inputElement:null,disabled:rn,autoFocus:Pn,autoComplete:yn,editable:Jr,activeDescendantId:Sn,value:mo,onKeyDown:Bi,onMouseDown:$i,onChange:gn,onPaste:oi,onCompositionStart:Ti,onCompositionEnd:Qi,tabIndex:Gn,attrs:(0,Ge.Z)(at,!0)}),Ue.createElement("span",{ref:pr,className:"".concat(br,"-search-mirror"),"aria-hidden":!0},mo,"\xA0")),Qe=Ue.createElement(nt.Z,{prefixCls:"".concat(br,"-overflow"),data:kn,renderItem:qi,renderRest:Rr,suffix:Ii,itemKey:_e,maxCount:Qn});return Ue.createElement(Ue.Fragment,null,Qe,!kn.length&&!mo&&Ue.createElement("span",{className:"".concat(br,"-placeholder")},Si))},Bn=Dn,$t=function(at){var cn=at.inputElement,Nn=at.prefixCls,kn=at.id,Jn=at.inputRef,St=at.disabled,An=at.autoFocus,qn=at.autoComplete,Si=at.activeDescendantId,rn=at.mode,bn=at.open,Ft=at.values,Pn=at.placeholder,yn=at.tabIndex,Sn=at.showSearch,Gn=at.searchValue,Zn=at.activeValue,Qn=at.maxLength,ii=at.onInputKeyDown,ji=at.onInputMouseDown,pn=at.onInputChange,Ji=at.onInputPaste,Ki=at.onInputCompositionStart,Gi=at.onInputCompositionEnd,gn=at.title,oi=Ue.useState(!1),Bi=(0,Ke.Z)(oi,2),$i=Bi[0],Ti=Bi[1],Qi=rn==="combobox",pr=Qi||Sn,hr=Ft[0],Vi=Gn||"";Qi&&Zn&&!$i&&(Vi=Zn),Ue.useEffect(function(){Qi&&Ti(!1)},[Qi,Zn]);var xr=rn!=="combobox"&&!bn&&!Sn?!1:!!Vi,Rn=gn===void 0?Ut(hr):gn,Br=function(){if(hr)return null;var Or=xr?{visibility:"hidden"}:void 0;return Ue.createElement("span",{className:"".concat(Nn,"-selection-placeholder"),style:Or},Pn)};return Ue.createElement(Ue.Fragment,null,Ue.createElement("span",{className:"".concat(Nn,"-selection-search")},Ue.createElement(He,{ref:Jn,prefixCls:Nn,id:kn,open:bn,inputElement:cn,disabled:St,autoFocus:An,autoComplete:qn,editable:pr,activeDescendantId:Si,value:Vi,onKeyDown:ii,onMouseDown:ji,onChange:function(Or){Ti(!0),pn(Or)},onPaste:Ji,onCompositionStart:Ki,onCompositionEnd:Gi,tabIndex:yn,attrs:(0,Ge.Z)(at,!0),maxLength:Qi?Qn:void 0})),!Qi&&hr?Ue.createElement("span",{className:"".concat(Nn,"-selection-item"),title:Rn,style:xr?{visibility:"hidden"}:void 0},hr.label):null,Br())},ln=$t;function Tn(Nt){return![ne.Z.ESC,ne.Z.SHIFT,ne.Z.BACKSPACE,ne.Z.TAB,ne.Z.WIN_KEY,ne.Z.ALT,ne.Z.META,ne.Z.WIN_KEY_RIGHT,ne.Z.CTRL,ne.Z.SEMICOLON,ne.Z.EQUALS,ne.Z.CAPS_LOCK,ne.Z.CONTEXT_MENU,ne.Z.F1,ne.Z.F2,ne.Z.F3,ne.Z.F4,ne.Z.F5,ne.Z.F6,ne.Z.F7,ne.Z.F8,ne.Z.F9,ne.Z.F10,ne.Z.F11,ne.Z.F12].includes(Nt)}var ei=function(at,cn){var Nn=(0,Ue.useRef)(null),kn=(0,Ue.useRef)(!1),Jn=at.prefixCls,St=at.open,An=at.mode,qn=at.showSearch,Si=at.tokenWithEnter,rn=at.autoClearSearchValue,bn=at.onSearch,Ft=at.onSearchSubmit,Pn=at.onToggleOpen,yn=at.onInputKeyDown,Sn=at.domRef;Ue.useImperativeHandle(cn,function(){return{focus:function(){Nn.current.focus()},blur:function(){Nn.current.blur()}}});var Gn=Be(0),Zn=(0,Ke.Z)(Gn,2),Qn=Zn[0],ii=Zn[1],ji=function(Vi){var xr=Vi.which;(xr===ne.Z.UP||xr===ne.Z.DOWN)&&Vi.preventDefault(),yn&&yn(Vi),xr===ne.Z.ENTER&&An==="tags"&&!kn.current&&!St&&(Ft==null||Ft(Vi.target.value)),Tn(xr)&&Pn(!0)},pn=function(){ii(!0)},Ji=(0,Ue.useRef)(null),Ki=function(Vi){bn(Vi,!0,kn.current)!==!1&&Pn(!0)},Gi=function(){kn.current=!0},gn=function(Vi){kn.current=!1,An!=="combobox"&&Ki(Vi.target.value)},oi=function(Vi){var xr=Vi.target.value;if(Si&&Ji.current&&/[\r\n]/.test(Ji.current)){var Rn=Ji.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");xr=xr.replace(Rn,Ji.current)}Ji.current=null,Ki(xr)},Bi=function(Vi){var xr=Vi.clipboardData,Rn=xr.getData("text");Ji.current=Rn},$i=function(Vi){var xr=Vi.target;if(xr!==Nn.current){var Rn=document.body.style.msTouchAction!==void 0;Rn?setTimeout(function(){Nn.current.focus()}):Nn.current.focus()}},Ti=function(Vi){var xr=Qn();Vi.target!==Nn.current&&!xr&&An!=="combobox"&&Vi.preventDefault(),(An!=="combobox"&&(!qn||!xr)||!St)&&(St&&rn!==!1&&bn("",!0,!1),Pn())},Qi={inputRef:Nn,onInputKeyDown:ji,onInputMouseDown:pn,onInputChange:oi,onInputPaste:Bi,onInputCompositionStart:Gi,onInputCompositionEnd:gn},pr=An==="multiple"||An==="tags"?Ue.createElement(Bn,(0,ge.Z)({},at,Qi)):Ue.createElement(ln,(0,ge.Z)({},at,Qi));return Ue.createElement("div",{ref:Sn,className:"".concat(Jn,"-selector"),onClick:$i,onMouseDown:Ti},pr)},Ln=Ue.forwardRef(ei);Ln.displayName="Selector";var Yn=Ln,zt=pe(35593),wn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],$n=function(at){var cn=at===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"}}},Yt=function(at,cn){var Nn=at.prefixCls,kn=at.disabled,Jn=at.visible,St=at.children,An=at.popupElement,qn=at.animation,Si=at.transitionName,rn=at.dropdownStyle,bn=at.dropdownClassName,Ft=at.direction,Pn=Ft===void 0?"ltr":Ft,yn=at.placement,Sn=at.builtinPlacements,Gn=at.dropdownMatchSelectWidth,Zn=at.dropdownRender,Qn=at.dropdownAlign,ii=at.getPopupContainer,ji=at.empty,pn=at.getTriggerDOMNode,Ji=at.onPopupVisibleChange,Ki=at.onPopupMouseEnter,Gi=(0,st.Z)(at,wn),gn="".concat(Nn,"-dropdown"),oi=An;Zn&&(oi=Zn(An));var Bi=Ue.useMemo(function(){return Sn||$n(Gn)},[Sn,Gn]),$i=qn?"".concat(gn,"-").concat(qn):Si,Ti=typeof Gn=="number",Qi=Ue.useMemo(function(){return Ti?null:Gn===!1?"minWidth":"width"},[Gn,Ti]),pr=rn;Ti&&(pr=(0,dt.Z)((0,dt.Z)({},pr),{},{width:Gn}));var hr=Ue.useRef(null);return Ue.useImperativeHandle(cn,function(){return{getPopupElement:function(){return hr.current}}}),Ue.createElement(zt.Z,(0,ge.Z)({},Gi,{showAction:Ji?["click"]:[],hideAction:Ji?["click"]:[],popupPlacement:yn||(Pn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Bi,prefixCls:gn,popupTransitionName:$i,popup:Ue.createElement("div",{ref:hr,onMouseEnter:Ki},oi),stretch:Qi,popupAlign:Qn,popupVisible:Jn,getPopupContainer:ii,popupClassName:yt()(bn,(0,Ve.Z)({},"".concat(gn,"-empty"),ji)),popupStyle:pr,getTriggerDOMNode:pn,onPopupVisibleChange:Ji}),St)},tn=Ue.forwardRef(Yt);tn.displayName="SelectTrigger";var Gt=tn,Tt=pe(4537);function ot(Nt,at){var cn=Nt.key,Nn;return"value"in Nt&&(Nn=Nt.value),cn!=null?cn:Nn!==void 0?Nn:"rc-index-key-".concat(at)}function Ze(Nt,at){var cn=Nt||{},Nn=cn.label,kn=cn.value,Jn=cn.options,St=cn.groupLabel,An=Nn||(at?"children":"label");return{label:An,value:kn||"value",options:Jn||"options",groupLabel:St||An}}function At(Nt){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},cn=at.fieldNames,Nn=at.childrenAsData,kn=[],Jn=Ze(cn,!1),St=Jn.label,An=Jn.value,qn=Jn.options,Si=Jn.groupLabel;function rn(bn,Ft){bn.forEach(function(Pn){if(Ft||!(qn in Pn)){var yn=Pn[An];kn.push({key:ot(Pn,kn.length),groupOption:Ft,data:Pn,label:Pn[St],value:yn})}else{var Sn=Pn[Si];Sn===void 0&&Nn&&(Sn=Pn.label),kn.push({key:ot(Pn,kn.length),group:!0,data:Pn,label:Sn}),rn(Pn[qn],!0)}})}return rn(Nt,!1),kn}function Dt(Nt){var at=(0,dt.Z)({},Nt);return"props"in at||Object.defineProperty(at,"props",{get:function(){return(0,bt.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),at}}),at}function rt(Nt,at){if(!at||!at.length)return null;var cn=!1;function Nn(Jn,St){var An=(0,Tt.Z)(St),qn=An[0],Si=An.slice(1);if(!qn)return[Jn];var rn=Jn.split(qn);return cn=cn||rn.length>1,rn.reduce(function(bn,Ft){return[].concat((0,Re.Z)(bn),(0,Re.Z)(Nn(Ft,Si)))},[]).filter(function(bn){return bn})}var kn=Nn(Nt,at);return cn?kn:null}var et=["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"],Oe=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Pe(Nt){return Nt==="tags"||Nt==="multiple"}var ve=Ue.forwardRef(function(Nt,at){var cn,Nn,kn=Nt.id,Jn=Nt.prefixCls,St=Nt.className,An=Nt.showSearch,qn=Nt.tagRender,Si=Nt.direction,rn=Nt.omitDomProps,bn=Nt.displayValues,Ft=Nt.onDisplayValuesChange,Pn=Nt.emptyOptions,yn=Nt.notFoundContent,Sn=yn===void 0?"Not Found":yn,Gn=Nt.onClear,Zn=Nt.mode,Qn=Nt.disabled,ii=Nt.loading,ji=Nt.getInputElement,pn=Nt.getRawInputElement,Ji=Nt.open,Ki=Nt.defaultOpen,Gi=Nt.onDropdownVisibleChange,gn=Nt.activeValue,oi=Nt.onActiveValueChange,Bi=Nt.activeDescendantId,$i=Nt.searchValue,Ti=Nt.autoClearSearchValue,Qi=Nt.onSearch,pr=Nt.onSearchSplit,hr=Nt.tokenSeparators,Vi=Nt.allowClear,xr=Nt.suffixIcon,Rn=Nt.clearIcon,Br=Nt.OptionList,_n=Nt.animation,Or=Nt.transitionName,no=Nt.dropdownStyle,br=Nt.dropdownClassName,mo=Nt.dropdownMatchSelectWidth,Jr=Nt.dropdownRender,ur=Nt.dropdownAlign,er=Nt.placement,qi=Nt.builtinPlacements,Rr=Nt.getPopupContainer,Ii=Nt.showAction,Qe=Ii===void 0?[]:Ii,Qr=Nt.onFocus,lo=Nt.onBlur,jr=Nt.onKeyUp,vo=Nt.onKeyDown,po=Nt.onMouseDown,Lr=(0,st.Z)(Nt,et),Fr=Pe(Zn),uo=(An!==void 0?An:Fr)||Zn==="combobox",qr=(0,dt.Z)({},Lr);Oe.forEach(function(Vo){delete qr[Vo]}),rn==null||rn.forEach(function(Vo){delete qr[Vo]});var zo=Ue.useState(!1),Ro=(0,Ke.Z)(zo,2),Mr=Ro[0],Nr=Ro[1];Ue.useEffect(function(){Nr((0,Ae.Z)())},[]);var pi=Ue.useRef(null),Tr=Ue.useRef(null),Bo=Ue.useRef(null),aa=Ue.useRef(null),Ho=Ue.useRef(null),Ao=Te(),_o=(0,Ke.Z)(Ao,3),ta=_o[0],Ea=_o[1],Mt=_o[2];Ue.useImperativeHandle(at,function(){var Vo,ya;return{focus:(Vo=aa.current)===null||Vo===void 0?void 0:Vo.focus,blur:(ya=aa.current)===null||ya===void 0?void 0:ya.blur,scrollTo:function(Ss){var ms;return(ms=Ho.current)===null||ms===void 0?void 0:ms.scrollTo(Ss)}}});var Pi=Ue.useMemo(function(){var Vo;if(Zn!=="combobox")return $i;var ya=(Vo=bn[0])===null||Vo===void 0?void 0:Vo.value;return typeof ya=="string"||typeof ya=="number"?String(ya):""},[$i,Zn,bn]),_t=Zn==="combobox"&&typeof ji=="function"&&ji()||null,Xi=typeof pn=="function"&&pn(),wi=(0,ee.x1)(Tr,Xi==null||(cn=Xi.props)===null||cn===void 0?void 0:cn.ref),Sr=Ue.useState(!1),Zi=(0,Ke.Z)(Sr,2),Ci=Zi[0],nr=Zi[1];(0,jt.Z)(function(){nr(!0)},[]);var or=(0,kt.Z)(!1,{defaultValue:Ki,value:Ji}),cr=(0,Ke.Z)(or,2),Pr=cr[0],Gr=cr[1],yr=Ci?Pr:!1,kr=!Sn&&Pn;(Qn||kr&&yr&&Zn==="combobox")&&(yr=!1);var Zr=kr?!1:yr,Oi=Ue.useCallback(function(Vo){var ya=Vo!==void 0?Vo:!yr;Qn||(Gr(ya),yr!==ya&&(Gi==null||Gi(ya)))},[Qn,yr,Gr,Gi]),sa=Ue.useMemo(function(){return(hr||[]).some(function(Vo){return[`
|
|
|
`,`\r
|
|
|
`].includes(Vo)})},[hr]),Ra=function(ya,ll,Ss){var ms=!0,Ua=ya;oi==null||oi(null);var ss=Ss?null:rt(ya,hr);return Zn!=="combobox"&&ss&&(Ua="",pr==null||pr(ss),Oi(!1),ms=!1),Qi&&Pi!==Ua&&Qi(Ua,{source:ll?"typing":"effect"}),ms},Ls=function(ya){!ya||!ya.trim()||Qi(ya,{source:"submit"})};Ue.useEffect(function(){!yr&&!Fr&&Zn!=="combobox"&&Ra("",!1,!1)},[yr]),Ue.useEffect(function(){Pr&&Qn&&Gr(!1),Qn&&Ea(!1)},[Qn]);var Ys=Be(),tl=(0,Ke.Z)(Ys,2),Ui=tl[0],La=tl[1],Ba=function(ya){var ll=Ui(),Ss=ya.which;if(Ss===ne.Z.ENTER&&(Zn!=="combobox"&&ya.preventDefault(),yr||Oi(!0)),La(!!Pi),Ss===ne.Z.BACKSPACE&&!ll&&Fr&&!Pi&&bn.length){for(var ms=(0,Re.Z)(bn),Ua=null,ss=ms.length-1;ss>=0;ss-=1){var xs=ms[ss];if(!xs.disabled){ms.splice(ss,1),Ua=xs;break}}Ua&&Ft(ms,{type:"remove",values:[Ua]})}for(var vs=arguments.length,oc=new Array(vs>1?vs-1:0),_l=1;_l<vs;_l++)oc[_l-1]=arguments[_l];if(yr&&Ho.current){var is;(is=Ho.current).onKeyDown.apply(is,[ya].concat(oc))}vo==null||vo.apply(void 0,[ya].concat(oc))},zs=function(ya){for(var ll=arguments.length,Ss=new Array(ll>1?ll-1:0),ms=1;ms<ll;ms++)Ss[ms-1]=arguments[ms];if(yr&&Ho.current){var Ua;(Ua=Ho.current).onKeyUp.apply(Ua,[ya].concat(Ss))}jr==null||jr.apply(void 0,[ya].concat(Ss))},su=function(ya){var ll=bn.filter(function(Ss){return Ss!==ya});Ft(ll,{type:"remove",values:[ya]})},lu=Ue.useRef(!1),wo=function(){Ea(!0),Qn||(Qr&&!lu.current&&Qr.apply(void 0,arguments),Qe.includes("focus")&&Oi(!0)),lu.current=!0},yc=function(){Ea(!1,function(){lu.current=!1,Oi(!1)}),!Qn&&(Pi&&(Zn==="tags"?Qi(Pi,{source:"submit"}):Zn==="multiple"&&Qi("",{source:"blur"})),lo&&lo.apply(void 0,arguments))},Ml=[];Ue.useEffect(function(){return function(){Ml.forEach(function(Vo){return clearTimeout(Vo)}),Ml.splice(0,Ml.length)}},[]);var as=function(ya){var ll,Ss=ya.target,ms=(ll=Bo.current)===null||ll===void 0?void 0:ll.getPopupElement();if(ms&&ms.contains(Ss)){var Ua=setTimeout(function(){var oc=Ml.indexOf(Ua);if(oc!==-1&&Ml.splice(oc,1),Mt(),!Mr&&!ms.contains(document.activeElement)){var _l;(_l=aa.current)===null||_l===void 0||_l.focus()}});Ml.push(Ua)}for(var ss=arguments.length,xs=new Array(ss>1?ss-1:0),vs=1;vs<ss;vs++)xs[vs-1]=arguments[vs];po==null||po.apply(void 0,[ya].concat(xs))},vl=Ue.useState({}),ju=(0,Ke.Z)(vl,2),rc=ju[1];function wl(){rc({})}var sl;Xi&&(sl=function(ya){Oi(ya)}),ze(function(){var Vo;return[pi.current,(Vo=Bo.current)===null||Vo===void 0?void 0:Vo.getPopupElement()]},Zr,Oi,!!Xi);var td=Ue.useMemo(function(){return(0,dt.Z)((0,dt.Z)({},Nt),{},{notFoundContent:Sn,open:yr,triggerOpen:Zr,id:kn,showSearch:uo,multiple:Fr,toggleOpen:Oi})},[Nt,Sn,Zr,yr,kn,uo,Fr,Oi]),nd=!!xr||ii,kc;nd&&(kc=Ue.createElement(se,{className:yt()("".concat(Jn,"-arrow"),(0,Ve.Z)({},"".concat(Jn,"-arrow-loading"),ii)),customizeIcon:xr,customizeIconProps:{loading:ii,searchValue:Pi,open:yr,focused:ta,showSearch:uo}}));var _d=function(){var ya;Gn==null||Gn(),(ya=aa.current)===null||ya===void 0||ya.focus(),Ft([],{type:"clear",values:bn}),Ra("",!1,!1)},id=fe(Jn,_d,bn,Vi,Rn,Qn,Pi,Zn),Ic=id.allowClear,Js=id.clearIcon,uu=Ue.createElement(Br,{ref:Ho}),xd=yt()(Jn,St,(Nn={},(0,Ve.Z)(Nn,"".concat(Jn,"-focused"),ta),(0,Ve.Z)(Nn,"".concat(Jn,"-multiple"),Fr),(0,Ve.Z)(Nn,"".concat(Jn,"-single"),!Fr),(0,Ve.Z)(Nn,"".concat(Jn,"-allow-clear"),Vi),(0,Ve.Z)(Nn,"".concat(Jn,"-show-arrow"),nd),(0,Ve.Z)(Nn,"".concat(Jn,"-disabled"),Qn),(0,Ve.Z)(Nn,"".concat(Jn,"-loading"),ii),(0,Ve.Z)(Nn,"".concat(Jn,"-open"),yr),(0,Ve.Z)(Nn,"".concat(Jn,"-customize-input"),_t),(0,Ve.Z)(Nn,"".concat(Jn,"-show-search"),uo),Nn)),Eu=Ue.createElement(Gt,{ref:Bo,disabled:Qn,prefixCls:Jn,visible:Zr,popupElement:uu,animation:_n,transitionName:Or,dropdownStyle:no,dropdownClassName:br,direction:Si,dropdownMatchSelectWidth:mo,dropdownRender:Jr,dropdownAlign:ur,placement:er,builtinPlacements:qi,getPopupContainer:Rr,empty:Pn,getTriggerDOMNode:function(){return Tr.current},onPopupVisibleChange:sl,onPopupMouseEnter:wl},Xi?Ue.cloneElement(Xi,{ref:wi}):Ue.createElement(Yn,(0,ge.Z)({},Nt,{domRef:Tr,prefixCls:Jn,inputElement:_t,ref:aa,id:kn,showSearch:uo,autoClearSearchValue:Ti,mode:Zn,activeDescendantId:Bi,tagRender:qn,values:bn,open:yr,onToggleOpen:Oi,activeValue:gn,searchValue:Pi,onSearch:Ra,onSearchSubmit:Ls,onRemove:su,tokenWithEnter:sa}))),Sc;return Xi?Sc=Eu:Sc=Ue.createElement("div",(0,ge.Z)({className:xd},qr,{ref:pi,onMouseDown:as,onKeyDown:Ba,onKeyUp:zs,onFocus:wo,onBlur:yc}),ta&&!yr&&Ue.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(bn.map(function(Vo){var ya=Vo.label,ll=Vo.value;return["number","string"].includes((0,Me.Z)(ya))?ya:ll}).join(", "))),Eu,kc,Ic&&Js),Ue.createElement(ye.Provider,{value:td},Sc)}),Fe=ve,We=function(Nt,at){var cn=Ue.useRef({values:new Map,options:new Map}),Nn=Ue.useMemo(function(){var Jn=cn.current,St=Jn.values,An=Jn.options,qn=Nt.map(function(bn){if(bn.label===void 0){var Ft;return(0,dt.Z)((0,dt.Z)({},bn),{},{label:(Ft=St.get(bn.value))===null||Ft===void 0?void 0:Ft.label})}return bn}),Si=new Map,rn=new Map;return qn.forEach(function(bn){Si.set(bn.value,bn),rn.set(bn.value,at.get(bn.value)||An.get(bn.value))}),cn.current.values=Si,cn.current.options=rn,qn},[Nt,at]),kn=Ue.useCallback(function(Jn){return at.get(Jn)||cn.current.options.get(Jn)},[at]);return[Nn,kn]};function Ne(Nt,at){return Et(Nt).join("").toUpperCase().includes(at)}var ft=function(Nt,at,cn,Nn,kn){return Ue.useMemo(function(){if(!cn||Nn===!1)return Nt;var Jn=at.options,St=at.label,An=at.value,qn=[],Si=typeof Nn=="function",rn=cn.toUpperCase(),bn=Si?Nn:function(Pn,yn){return kn?Ne(yn[kn],rn):yn[Jn]?Ne(yn[St!=="children"?St:"label"],rn):Ne(yn[An],rn)},Ft=Si?function(Pn){return Dt(Pn)}:function(Pn){return Pn};return Nt.forEach(function(Pn){if(Pn[Jn]){var yn=bn(cn,Ft(Pn));if(yn)qn.push(Pn);else{var Sn=Pn[Jn].filter(function(Gn){return bn(cn,Ft(Gn))});Sn.length&&qn.push((0,dt.Z)((0,dt.Z)({},Pn),{},(0,Ve.Z)({},Jn,Sn)))}return}bn(cn,Ft(Pn))&&qn.push(Pn)}),qn},[Nt,Nn,kn,cn,at])},sn=pe(17115),un=pe(11592),Pt=["children","value"],qt=["children"];function Mn(Nt){var at=Nt,cn=at.key,Nn=at.props,kn=Nn.children,Jn=Nn.value,St=(0,st.Z)(Nn,Pt);return(0,dt.Z)({key:cn,value:Jn!==void 0?Jn:cn,children:kn},St)}function hn(Nt){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,un.Z)(Nt).map(function(cn,Nn){if(!Ue.isValidElement(cn)||!cn.type)return null;var kn=cn,Jn=kn.type.isSelectOptGroup,St=kn.key,An=kn.props,qn=An.children,Si=(0,st.Z)(An,qt);return at||!Jn?Mn(cn):(0,dt.Z)((0,dt.Z)({key:"__RC_SELECT_GRP__".concat(St===null?Nn:St,"__"),label:St},Si),{},{options:hn(qn)})}).filter(function(cn){return cn})}function fn(Nt,at,cn,Nn,kn){return Ue.useMemo(function(){var Jn=Nt,St=!Nt;St&&(Jn=hn(at));var An=new Map,qn=new Map,Si=function(Ft,Pn,yn){yn&&typeof yn=="string"&&Ft.set(Pn[yn],Pn)};function rn(bn){for(var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pn=0;Pn<bn.length;Pn+=1){var yn=bn[Pn];!yn[cn.options]||Ft?(An.set(yn[cn.value],yn),Si(qn,yn,cn.label),Si(qn,yn,Nn),Si(qn,yn,kn)):rn(yn[cn.options],!0)}}return rn(Jn),{options:Jn,valueOptions:An,labelOptions:qn}},[Nt,at,cn,Nn,kn])}function ui(Nt){var at=Ue.useRef();at.current=Nt;var cn=Ue.useCallback(function(){return at.current.apply(at,arguments)},[]);return cn}var gi=function(){return null};gi.isSelectOptGroup=!0;var fi=gi,bi=function(){return null};bi.isSelectOption=!0;var _i=bi,rr=pe(80547),Wi=pe(2738),vr=pe(45680),fr=Ue.createContext(null),zi=fr;function Er(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Kn=["disabled","title","children","style","className"];function Le(Nt){return typeof Nt=="string"||typeof Nt=="number"}var Ei=function(at,cn){var Nn=be(),kn=Nn.prefixCls,Jn=Nn.id,St=Nn.open,An=Nn.multiple,qn=Nn.mode,Si=Nn.searchValue,rn=Nn.toggleOpen,bn=Nn.notFoundContent,Ft=Nn.onPopupScroll,Pn=Ue.useContext(zi),yn=Pn.flattenOptions,Sn=Pn.onActiveValue,Gn=Pn.defaultActiveFirstOption,Zn=Pn.onSelect,Qn=Pn.menuItemSelectedIcon,ii=Pn.rawValues,ji=Pn.fieldNames,pn=Pn.virtual,Ji=Pn.direction,Ki=Pn.listHeight,Gi=Pn.listItemHeight,gn="".concat(kn,"-item"),oi=(0,rr.Z)(function(){return yn},[St,yn],function(ur,er){return er[0]&&ur[1]!==er[1]}),Bi=Ue.useRef(null),$i=function(er){er.preventDefault()},Ti=function(er){Bi.current&&Bi.current.scrollTo(typeof er=="number"?{index:er}:er)},Qi=function(er){for(var qi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Rr=oi.length,Ii=0;Ii<Rr;Ii+=1){var Qe=(er+Ii*qi+Rr)%Rr,Qr=oi[Qe],lo=Qr.group,jr=Qr.data;if(!lo&&!jr.disabled)return Qe}return-1},pr=Ue.useState(function(){return Qi(0)}),hr=(0,Ke.Z)(pr,2),Vi=hr[0],xr=hr[1],Rn=function(er){var qi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;xr(er);var Rr={source:qi?"keyboard":"mouse"},Ii=oi[er];if(!Ii){Sn(null,-1,Rr);return}Sn(Ii.value,er,Rr)};(0,Ue.useEffect)(function(){Rn(Gn!==!1?Qi(0):-1)},[oi.length,Si]);var Br=Ue.useCallback(function(ur){return ii.has(ur)&&qn!=="combobox"},[qn,(0,Re.Z)(ii).toString(),ii.size]);(0,Ue.useEffect)(function(){var ur=setTimeout(function(){if(!An&&St&&ii.size===1){var qi=Array.from(ii)[0],Rr=oi.findIndex(function(Ii){var Qe=Ii.data;return Qe.value===qi});Rr!==-1&&(Rn(Rr),Ti(Rr))}});if(St){var er;(er=Bi.current)===null||er===void 0||er.scrollTo(void 0)}return function(){return clearTimeout(ur)}},[St,Si,yn.length]);var _n=function(er){er!==void 0&&Zn(er,{selected:!ii.has(er)}),An||rn(!1)};if(Ue.useImperativeHandle(cn,function(){return{onKeyDown:function(er){var qi=er.which,Rr=er.ctrlKey;switch(qi){case ne.Z.N:case ne.Z.P:case ne.Z.UP:case ne.Z.DOWN:{var Ii=0;if(qi===ne.Z.UP?Ii=-1:qi===ne.Z.DOWN?Ii=1:Er()&&Rr&&(qi===ne.Z.N?Ii=1:qi===ne.Z.P&&(Ii=-1)),Ii!==0){var Qe=Qi(Vi+Ii,Ii);Ti(Qe),Rn(Qe,!0)}break}case ne.Z.ENTER:{var Qr=oi[Vi];Qr&&!Qr.data.disabled?_n(Qr.value):_n(void 0),St&&er.preventDefault();break}case ne.Z.ESC:rn(!1),St&&er.stopPropagation()}},onKeyUp:function(){},scrollTo:function(er){Ti(er)}}}),oi.length===0)return Ue.createElement("div",{role:"listbox",id:"".concat(Jn,"_list"),className:"".concat(gn,"-empty"),onMouseDown:$i},bn);var Or=Object.keys(ji).map(function(ur){return ji[ur]}),no=function(er){return er.label};function br(ur,er){var qi=ur.group;return{role:qi?"presentation":"option",id:"".concat(Jn,"_list_").concat(er)}}var mo=function(er){var qi=oi[er];if(!qi)return null;var Rr=qi.data||{},Ii=Rr.value,Qe=qi.group,Qr=(0,Ge.Z)(Rr,!0),lo=no(qi);return qi?Ue.createElement("div",(0,ge.Z)({"aria-label":typeof lo=="string"&&!Qe?lo:null},Qr,{key:er},br(qi,er),{"aria-selected":Br(Ii)}),Ii):null},Jr={role:"listbox",id:"".concat(Jn,"_list")};return Ue.createElement(Ue.Fragment,null,pn&&Ue.createElement("div",(0,ge.Z)({},Jr,{style:{height:0,width:0,overflow:"hidden"}}),mo(Vi-1),mo(Vi),mo(Vi+1)),Ue.createElement(vr.Z,{itemKey:"key",ref:Bi,data:oi,height:Ki,itemHeight:Gi,fullHeight:!1,onMouseDown:$i,onScroll:Ft,virtual:pn,direction:Ji,innerProps:pn?null:Jr},function(ur,er){var qi,Rr=ur.group,Ii=ur.groupOption,Qe=ur.data,Qr=ur.label,lo=ur.value,jr=Qe.key;if(Rr){var vo,po=(vo=Qe.title)!==null&&vo!==void 0?vo:Le(Qr)?Qr.toString():void 0;return Ue.createElement("div",{className:yt()(gn,"".concat(gn,"-group")),title:po},Qr!==void 0?Qr:jr)}var Lr=Qe.disabled,Fr=Qe.title,uo=Qe.children,qr=Qe.style,zo=Qe.className,Ro=(0,st.Z)(Qe,Kn),Mr=(0,Wi.Z)(Ro,Or),Nr=Br(lo),pi="".concat(gn,"-option"),Tr=yt()(gn,pi,zo,(qi={},(0,Ve.Z)(qi,"".concat(pi,"-grouped"),Ii),(0,Ve.Z)(qi,"".concat(pi,"-active"),Vi===er&&!Lr),(0,Ve.Z)(qi,"".concat(pi,"-disabled"),Lr),(0,Ve.Z)(qi,"".concat(pi,"-selected"),Nr),qi)),Bo=no(ur),aa=!Qn||typeof Qn=="function"||Nr,Ho=typeof Bo=="number"?Bo:Bo||lo,Ao=Le(Ho)?Ho.toString():void 0;return Fr!==void 0&&(Ao=Fr),Ue.createElement("div",(0,ge.Z)({},(0,Ge.Z)(Mr),pn?{}:br(ur,er),{"aria-selected":Nr,className:Tr,title:Ao,onMouseMove:function(){Vi===er||Lr||Rn(er)},onClick:function(){Lr||_n(lo)},style:qr}),Ue.createElement("div",{className:"".concat(pi,"-content")},Ho),Ue.isValidElement(Qn)||Nr,aa&&Ue.createElement(se,{className:"".concat(gn,"-option-state"),customizeIcon:Qn,customizeIconProps:{isSelected:Nr}},Nr?"\u2713":null))}))},Ri=Ue.forwardRef(Ei);Ri.displayName="OptionList";var an=Ri;function di(Nt){var at=Nt.mode,cn=Nt.options,Nn=Nt.children,kn=Nt.backfill,Jn=Nt.allowClear,St=Nt.placeholder,An=Nt.getInputElement,qn=Nt.showSearch,Si=Nt.onSearch,rn=Nt.defaultOpen,bn=Nt.autoFocus,Ft=Nt.labelInValue,Pn=Nt.value,yn=Nt.inputValue,Sn=Nt.optionLabelProp,Gn=isMultiple(at),Zn=qn!==void 0?qn:Gn||at==="combobox",Qn=cn||convertChildrenToData(Nn);if(warning(at!=="tags"||Qn.every(function(Ji){return!Ji.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),at==="tags"||at==="combobox"){var ii=Qn.some(function(Ji){return Ji.options?Ji.options.some(function(Ki){return typeof("value"in Ki?Ki.value:Ki.key)=="number"}):typeof("value"in Ji?Ji.value:Ji.key)=="number"});warning(!ii,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(at!=="combobox"||!Sn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(at==="combobox"||!kn,"`backfill` only works with `combobox` mode."),warning(at==="combobox"||!An,"`getInputElement` only work with `combobox` mode."),noteOnce(at!=="combobox"||!An||!Jn||!St,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Si&&!Zn&&at!=="combobox"&&at!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!rn||bn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Pn!=null){var ji=toArray(Pn);warning(!Ft||ji.every(function(Ji){return _typeof(Ji)==="object"&&("key"in Ji||"value"in Ji)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Gn||Array.isArray(Pn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Nn){var pn=null;toNodeArray(Nn).some(function(Ji){if(!React.isValidElement(Ji)||!Ji.type)return!1;var Ki=Ji,Gi=Ki.type;if(Gi.isSelectOption)return!1;if(Gi.isSelectOptGroup){var gn=toNodeArray(Ji.props.children).every(function(oi){return!React.isValidElement(oi)||!Ji.type||oi.type.isSelectOption?!0:(pn=oi.type,!1)});return!gn}return pn=Gi,!0}),pn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(pn.displayName||pn.name||pn,"`.")),warning(yn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function yi(Nt,at){if(Nt){var cn=function Nn(kn){for(var Jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=0;St<kn.length;St++){var An=kn[St];if(An[at==null?void 0:at.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Jn&&Array.isArray(An[at==null?void 0:at.options])&&Nn(An[at==null?void 0:at.options],!0))break}};cn(Nt)}}var Li=null,On=["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"],Un=["inputValue"];function It(Nt){return!Nt||(0,Me.Z)(Nt)!=="object"}var Kt=Ue.forwardRef(function(Nt,at){var cn=Nt.id,Nn=Nt.mode,kn=Nt.prefixCls,Jn=kn===void 0?"rc-select":kn,St=Nt.backfill,An=Nt.fieldNames,qn=Nt.inputValue,Si=Nt.searchValue,rn=Nt.onSearch,bn=Nt.autoClearSearchValue,Ft=bn===void 0?!0:bn,Pn=Nt.onSelect,yn=Nt.onDeselect,Sn=Nt.dropdownMatchSelectWidth,Gn=Sn===void 0?!0:Sn,Zn=Nt.filterOption,Qn=Nt.filterSort,ii=Nt.optionFilterProp,ji=Nt.optionLabelProp,pn=Nt.options,Ji=Nt.children,Ki=Nt.defaultActiveFirstOption,Gi=Nt.menuItemSelectedIcon,gn=Nt.virtual,oi=Nt.direction,Bi=Nt.listHeight,$i=Bi===void 0?200:Bi,Ti=Nt.listItemHeight,Qi=Ti===void 0?20:Ti,pr=Nt.value,hr=Nt.defaultValue,Vi=Nt.labelInValue,xr=Nt.onChange,Rn=(0,st.Z)(Nt,On),Br=(0,sn.ZP)(cn),_n=Pe(Nn),Or=!!(!pn&&Ji),no=Ue.useMemo(function(){return Zn===void 0&&Nn==="combobox"?!1:Zn},[Zn,Nn]),br=Ue.useMemo(function(){return Ze(An,Or)},[JSON.stringify(An),Or]),mo=(0,kt.Z)("",{value:Si!==void 0?Si:qn,postState:function(kr){return kr||""}}),Jr=(0,Ke.Z)(mo,2),ur=Jr[0],er=Jr[1],qi=fn(pn,Ji,br,ii,ji),Rr=qi.valueOptions,Ii=qi.labelOptions,Qe=qi.options,Qr=Ue.useCallback(function(yr){var kr=Et(yr);return kr.map(function(Zr){var Oi,sa,Ra,Ls,Ys;if(It(Zr))Oi=Zr;else{var tl;Ra=Zr.key,sa=Zr.label,Oi=(tl=Zr.value)!==null&&tl!==void 0?tl:Ra}var Ui=Rr.get(Oi);if(Ui){var La;if(sa===void 0&&(sa=Ui==null?void 0:Ui[ji||br.label]),Ra===void 0&&(Ra=(La=Ui==null?void 0:Ui.key)!==null&&La!==void 0?La:Oi),Ls=Ui==null?void 0:Ui.disabled,Ys=Ui==null?void 0:Ui.title,0)var Ba}return{label:sa,value:Oi,key:Ra,disabled:Ls,title:Ys}})},[br,ji,Rr]),lo=(0,kt.Z)(hr,{value:pr}),jr=(0,Ke.Z)(lo,2),vo=jr[0],po=jr[1],Lr=Ue.useMemo(function(){var yr,kr=Qr(vo);return Nn==="combobox"&&Ht((yr=kr[0])===null||yr===void 0?void 0:yr.value)?[]:kr},[vo,Qr,Nn]),Fr=We(Lr,Rr),uo=(0,Ke.Z)(Fr,2),qr=uo[0],zo=uo[1],Ro=Ue.useMemo(function(){if(!Nn&&qr.length===1){var yr=qr[0];if(yr.value===null&&(yr.label===null||yr.label===void 0))return[]}return qr.map(function(kr){var Zr;return(0,dt.Z)((0,dt.Z)({},kr),{},{label:(Zr=kr.label)!==null&&Zr!==void 0?Zr:kr.value})})},[Nn,qr]),Mr=Ue.useMemo(function(){return new Set(qr.map(function(yr){return yr.value}))},[qr]);Ue.useEffect(function(){if(Nn==="combobox"){var yr,kr=(yr=qr[0])===null||yr===void 0?void 0:yr.value;er(gt(kr)?String(kr):"")}},[qr]);var Nr=ui(function(yr,kr){var Zr,Oi=kr!=null?kr:yr;return Zr={},(0,Ve.Z)(Zr,br.value,yr),(0,Ve.Z)(Zr,br.label,Oi),Zr}),pi=Ue.useMemo(function(){if(Nn!=="tags")return Qe;var yr=(0,Re.Z)(Qe),kr=function(Oi){return Rr.has(Oi)};return(0,Re.Z)(qr).sort(function(Zr,Oi){return Zr.value<Oi.value?-1:1}).forEach(function(Zr){var Oi=Zr.value;kr(Oi)||yr.push(Nr(Oi,Zr.label))}),yr},[Nr,Qe,Rr,qr,Nn]),Tr=ft(pi,br,ur,no,ii),Bo=Ue.useMemo(function(){return Nn!=="tags"||!ur||Tr.some(function(yr){return yr[ii||"value"]===ur})||Tr.some(function(yr){return yr[br.value]===ur})?Tr:[Nr(ur)].concat((0,Re.Z)(Tr))},[Nr,ii,Nn,Tr,ur,br]),aa=Ue.useMemo(function(){return Qn?(0,Re.Z)(Bo).sort(function(yr,kr){return Qn(yr,kr)}):Bo},[Bo,Qn]),Ho=Ue.useMemo(function(){return At(aa,{fieldNames:br,childrenAsData:Or})},[aa,br,Or]),Ao=function(kr){var Zr=Qr(kr);if(po(Zr),xr&&(Zr.length!==qr.length||Zr.some(function(Ra,Ls){var Ys;return((Ys=qr[Ls])===null||Ys===void 0?void 0:Ys.value)!==(Ra==null?void 0:Ra.value)}))){var Oi=Vi?Zr:Zr.map(function(Ra){return Ra.value}),sa=Zr.map(function(Ra){return Dt(zo(Ra.value))});xr(_n?Oi:Oi[0],_n?sa:sa[0])}},_o=Ue.useState(null),ta=(0,Ke.Z)(_o,2),Ea=ta[0],Mt=ta[1],Pi=Ue.useState(0),_t=(0,Ke.Z)(Pi,2),Xi=_t[0],wi=_t[1],Sr=Ki!==void 0?Ki:Nn!=="combobox",Zi=Ue.useCallback(function(yr,kr){var Zr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Oi=Zr.source,sa=Oi===void 0?"keyboard":Oi;wi(kr),St&&Nn==="combobox"&&yr!==null&&sa==="keyboard"&&Mt(String(yr))},[St,Nn]),Ci=function(kr,Zr,Oi){var sa=function(){var lu,wo=zo(kr);return[Vi?{label:wo==null?void 0:wo[br.label],value:kr,key:(lu=wo==null?void 0:wo.key)!==null&&lu!==void 0?lu:kr}:kr,Dt(wo)]};if(Zr&&Pn){var Ra=sa(),Ls=(0,Ke.Z)(Ra,2),Ys=Ls[0],tl=Ls[1];Pn(Ys,tl)}else if(!Zr&&yn&&Oi!=="clear"){var Ui=sa(),La=(0,Ke.Z)(Ui,2),Ba=La[0],zs=La[1];yn(Ba,zs)}},nr=ui(function(yr,kr){var Zr,Oi=_n?kr.selected:!0;Oi?Zr=_n?[].concat((0,Re.Z)(qr),[yr]):[yr]:Zr=qr.filter(function(sa){return sa.value!==yr}),Ao(Zr),Ci(yr,Oi),Nn==="combobox"?Mt(""):(!Pe||Ft)&&(er(""),Mt(""))}),or=function(kr,Zr){Ao(kr);var Oi=Zr.type,sa=Zr.values;(Oi==="remove"||Oi==="clear")&&sa.forEach(function(Ra){Ci(Ra.value,!1,Oi)})},cr=function(kr,Zr){if(er(kr),Mt(null),Zr.source==="submit"){var Oi=(kr||"").trim();if(Oi){var sa=Array.from(new Set([].concat((0,Re.Z)(Mr),[Oi])));Ao(sa),Ci(Oi,!0),er("")}return}Zr.source!=="blur"&&(Nn==="combobox"&&Ao(kr),rn==null||rn(kr))},Pr=function(kr){var Zr=kr;Nn!=="tags"&&(Zr=kr.map(function(sa){var Ra=Ii.get(sa);return Ra==null?void 0:Ra.value}).filter(function(sa){return sa!==void 0}));var Oi=Array.from(new Set([].concat((0,Re.Z)(Mr),(0,Re.Z)(Zr))));Ao(Oi),Oi.forEach(function(sa){Ci(sa,!0)})},Gr=Ue.useMemo(function(){var yr=gn!==!1&&Gn!==!1;return(0,dt.Z)((0,dt.Z)({},qi),{},{flattenOptions:Ho,onActiveValue:Zi,defaultActiveFirstOption:Sr,onSelect:nr,menuItemSelectedIcon:Gi,rawValues:Mr,fieldNames:br,virtual:yr,direction:oi,listHeight:$i,listItemHeight:Qi,childrenAsData:Or})},[qi,Ho,Zi,Sr,nr,Gi,Mr,br,gn,Gn,$i,Qi,Or]);return Ue.createElement(zi.Provider,{value:Gr},Ue.createElement(Fe,(0,ge.Z)({},Rn,{id:Br,prefixCls:Jn,ref:at,omitDomProps:Un,mode:Nn,displayValues:Ro,onDisplayValuesChange:or,direction:oi,searchValue:ur,onSearch:cr,autoClearSearchValue:Ft,onSearchSplit:Pr,dropdownMatchSelectWidth:Gn,OptionList:an,emptyOptions:!Ho.length,activeValue:Ea,activeDescendantId:"".concat(Br,"_list_").concat(Xi)})))}),Ye=Kt;Ye.Option=_i,Ye.OptGroup=fi;var nn=Ye,xn=nn},9296:function(Vn,Cn,pe){"use strict";pe.r(Cn),pe.d(Cn,{ResizableTextArea:function(){return xt},default:function(){return Ht}});var ge=pe(96663),Re=pe(44127),Ve=pe(90493),dt=pe(20135),Ke=pe(72071),st=pe(6620),Me=pe(19127),kt=pe(92310),bt=pe.n(kt),Ue=pe(93681),lt=pe(5643),yt=pe(18929),jt=pe(59301),Ae=pe(29301),ne=pe(34280),ee=pe(16089),ce=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,se=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],fe={},ye;function be(Xt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,it=Xt.getAttribute("id")||Xt.getAttribute("data-reactid")||Xt.getAttribute("name");if(Ut&&fe[it])return fe[it];var _e=window.getComputedStyle(Xt),Wt=_e.getPropertyValue("box-sizing")||_e.getPropertyValue("-moz-box-sizing")||_e.getPropertyValue("-webkit-box-sizing"),Dn=parseFloat(_e.getPropertyValue("padding-bottom"))+parseFloat(_e.getPropertyValue("padding-top")),Bn=parseFloat(_e.getPropertyValue("border-bottom-width"))+parseFloat(_e.getPropertyValue("border-top-width")),$t=se.map(function(Tn){return"".concat(Tn,":").concat(_e.getPropertyValue(Tn))}).join(";"),ln={sizingStyle:$t,paddingSize:Dn,borderSize:Bn,boxSizing:Wt};return Ut&&it&&(fe[it]=ln),ln}function Te(Xt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,it=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,_e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ye||(ye=document.createElement("textarea"),ye.setAttribute("tab-index","-1"),ye.setAttribute("aria-hidden","true"),document.body.appendChild(ye)),Xt.getAttribute("wrap")?ye.setAttribute("wrap",Xt.getAttribute("wrap")):ye.removeAttribute("wrap");var Wt=be(Xt,Ut),Dn=Wt.paddingSize,Bn=Wt.borderSize,$t=Wt.boxSizing,ln=Wt.sizingStyle;ye.setAttribute("style","".concat(ln,";").concat(ce)),ye.value=Xt.value||Xt.placeholder||"";var Tn=void 0,ei=void 0,Ln,Yn=ye.scrollHeight;if($t==="border-box"?Yn+=Bn:$t==="content-box"&&(Yn-=Dn),it!==null||_e!==null){ye.value=" ";var zt=ye.scrollHeight-Dn;it!==null&&(Tn=zt*it,$t==="border-box"&&(Tn=Tn+Dn+Bn),Yn=Math.max(Tn,Yn)),_e!==null&&(ei=zt*_e,$t==="border-box"&&(ei=ei+Dn+Bn),Ln=Yn>ei?"":"hidden",Yn=Math.min(ei,Yn))}var wn={height:Yn,overflowY:Ln,resize:"none"};return Tn&&(wn.minHeight=Tn),ei&&(wn.maxHeight=ei),wn}var Be=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ze=0,Ge=1,nt=2,Je=jt.forwardRef(function(Xt,Ut){var it=Xt,_e=it.prefixCls,Wt=it.onPressEnter,Dn=it.defaultValue,Bn=it.value,$t=it.autoSize,ln=it.onResize,Tn=it.className,ei=it.style,Ln=it.disabled,Yn=it.onChange,zt=it.onInternalAutoSize,wn=(0,st.Z)(it,Be),$n=(0,yt.Z)(Dn,{value:Bn,postState:function(fi){return fi!=null?fi:""}}),Yt=(0,Ke.Z)($n,2),tn=Yt[0],Gt=Yt[1],Tt=function(fi){Gt(fi.target.value),Yn==null||Yn(fi)},ot=jt.useRef();jt.useImperativeHandle(Ut,function(){return{textArea:ot.current}});var Ze=jt.useMemo(function(){return $t&&(0,dt.Z)($t)==="object"?[$t.minRows,$t.maxRows]:[]},[$t]),At=(0,Ke.Z)(Ze,2),Dt=At[0],rt=At[1],et=!!$t,Oe=function(){try{if(document.activeElement===ot.current){var fi=ot.current,bi=fi.selectionStart,_i=fi.selectionEnd,rr=fi.scrollTop;ot.current.setSelectionRange(bi,_i),ot.current.scrollTop=rr}}catch(Wi){}},Pe=jt.useState(nt),ve=(0,Ke.Z)(Pe,2),Fe=ve[0],We=ve[1],Ne=jt.useState(),ft=(0,Ke.Z)(Ne,2),sn=ft[0],un=ft[1],Pt=function(){We(ze)};(0,ne.Z)(function(){et&&Pt()},[Bn,Dt,rt,et]),(0,ne.Z)(function(){if(Fe===ze)We(Ge);else if(Fe===Ge){var gi=Te(ot.current,!1,Dt,rt);We(nt),un(gi)}else Oe()},[Fe]);var qt=jt.useRef(),Mn=function(){ee.Z.cancel(qt.current)},hn=function(fi){Fe===nt&&(ln==null||ln(fi),$t&&(Mn(),qt.current=(0,ee.Z)(function(){Pt()})))};jt.useEffect(function(){return Mn},[]);var fn=et?sn:null,ui=(0,Re.Z)((0,Re.Z)({},ei),fn);return(Fe===ze||Fe===Ge)&&(ui.overflowY="hidden",ui.overflowX="hidden"),jt.createElement(Ae.Z,{onResize:hn,disabled:!($t||ln)},jt.createElement("textarea",(0,ge.Z)({},wn,{ref:ot,style:ui,className:bt()(_e,Tn,(0,Ve.Z)({},"".concat(_e,"-disabled"),Ln)),disabled:Ln,value:tn,onChange:Tt})))}),xt=Je,He=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Et(Xt,Ut){return(0,Me.Z)(Xt||"").slice(0,Ut).join("")}function tt(Xt,Ut,it,_e){var Wt=it;return Xt?Wt=Et(it,_e):(0,Me.Z)(Ut||"").length<it.length&&(0,Me.Z)(it||"").length>_e&&(Wt=Ut),Wt}var Ot=jt.forwardRef(function(Xt,Ut){var it,_e=Xt.defaultValue,Wt=Xt.value,Dn=Xt.onFocus,Bn=Xt.onBlur,$t=Xt.onChange,ln=Xt.allowClear,Tn=Xt.maxLength,ei=Xt.onCompositionStart,Ln=Xt.onCompositionEnd,Yn=Xt.suffix,zt=Xt.prefixCls,wn=zt===void 0?"rc-textarea":zt,$n=Xt.classes,Yt=Xt.showCount,tn=Xt.className,Gt=Xt.style,Tt=Xt.disabled,ot=Xt.hidden,Ze=Xt.classNames,At=Xt.styles,Dt=Xt.onResize,rt=(0,st.Z)(Xt,He),et=(0,yt.Z)(_e,{value:Wt,defaultValue:_e}),Oe=(0,Ke.Z)(et,2),Pe=Oe[0],ve=Oe[1],Fe=(0,jt.useRef)(null),We=jt.useState(!1),Ne=(0,Ke.Z)(We,2),ft=Ne[0],sn=Ne[1],un=jt.useState(!1),Pt=(0,Ke.Z)(un,2),qt=Pt[0],Mn=Pt[1],hn=jt.useRef(),fn=jt.useRef(0),ui=jt.useState(null),gi=(0,Ke.Z)(ui,2),fi=gi[0],bi=gi[1],_i=function(){var It;(It=Fe.current)===null||It===void 0||It.textArea.focus()};(0,jt.useImperativeHandle)(Ut,function(){return{resizableTextArea:Fe.current,focus:_i,blur:function(){var It;(It=Fe.current)===null||It===void 0||It.textArea.blur()}}}),(0,jt.useEffect)(function(){sn(function(Un){return!Tt&&Un})},[Tt]);var rr=Number(Tn)>0,Wi=function(It){Mn(!0),hn.current=Pe,fn.current=It.currentTarget.selectionStart,ei==null||ei(It)},vr=function(It){Mn(!1);var Kt=It.currentTarget.value;if(rr){var Ye,nn=fn.current>=Tn+1||fn.current===((Ye=hn.current)===null||Ye===void 0?void 0:Ye.length);Kt=tt(nn,hn.current,Kt,Tn)}Kt!==Pe&&(ve(Kt),(0,lt.rJ)(It.currentTarget,It,$t,Kt)),Ln==null||Ln(It)},fr=function(It){var Kt=It.target.value;if(!qt&&rr){var Ye=It.target.selectionStart>=Tn+1||It.target.selectionStart===Kt.length||!It.target.selectionStart;Kt=tt(Ye,Pe,Kt,Tn)}ve(Kt),(0,lt.rJ)(It.currentTarget,It,$t,Kt)},zi=function(It){var Kt=rt.onPressEnter,Ye=rt.onKeyDown;It.key==="Enter"&&Kt&&Kt(It),Ye==null||Ye(It)},Er=function(It){sn(!0),Dn==null||Dn(It)},Kn=function(It){sn(!1),Bn==null||Bn(It)},Le=function(It){var Kt;ve(""),_i(),(0,lt.rJ)((Kt=Fe.current)===null||Kt===void 0?void 0:Kt.textArea,It,$t)},Ei=(0,lt.D7)(Pe);!qt&&rr&&Wt==null&&(Ei=Et(Ei,Tn));var Ri=Yn,an;if(Yt){var di=(0,Me.Z)(Ei).length;(0,dt.Z)(Yt)==="object"?an=Yt.formatter({value:Ei,count:di,maxLength:Tn}):an="".concat(di).concat(rr?" / ".concat(Tn):""),Ri=jt.createElement(jt.Fragment,null,Ri,jt.createElement("span",{className:bt()("".concat(wn,"-data-count"),Ze==null?void 0:Ze.count),style:At==null?void 0:At.count},an))}var yi=function(It){var Kt;Dt==null||Dt(It),(Kt=Fe.current)!==null&&Kt!==void 0&&Kt.textArea.style.height&&bi(!0)},Li=!rt.autoSize&&!Yt&&!ln,On=jt.createElement(Ue.BaseInput,{value:Ei,allowClear:ln,handleReset:Le,suffix:Ri,prefixCls:wn,classes:{affixWrapper:bt()($n==null?void 0:$n.affixWrapper,(it={},(0,Ve.Z)(it,"".concat(wn,"-show-count"),Yt),(0,Ve.Z)(it,"".concat(wn,"-textarea-allow-clear"),ln),it))},disabled:Tt,focused:ft,className:tn,style:(0,Re.Z)((0,Re.Z)({},Gt),fi&&!Li?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof an=="string"?an:void 0}},hidden:ot,inputElement:jt.createElement(xt,(0,ge.Z)({},rt,{onKeyDown:zi,onChange:fr,onFocus:Er,onBlur:Kn,onCompositionStart:Wi,onCompositionEnd:vr,className:Ze==null?void 0:Ze.textarea,style:(0,Re.Z)((0,Re.Z)({},At==null?void 0:At.textarea),{},{resize:Gt==null?void 0:Gt.resize}),disabled:Tt,prefixCls:wn,onResize:yi,ref:Fe}))});return On}),gt=Ot,Ht=gt},39417:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Ge}});var ge=pe(96663),Re=pe(90493),Ve=pe(6620),dt=pe(44127),Ke=pe(52884),st=pe(95727),Me=pe(89866),kt=pe(65711),bt=pe(85745),Ue=pe(92310),lt=pe.n(Ue),yt=pe(26112),jt=pe(59301),Ae=pe(39378),ne=function(Je){for(var xt=Je.prefixCls,He=Je.level,Et=Je.isStart,tt=Je.isEnd,Ot="".concat(xt,"-indent-unit"),gt=[],Ht=0;Ht<He;Ht+=1){var Xt;gt.push(jt.createElement("span",{key:Ht,className:lt()(Ot,(Xt={},(0,Re.Z)(Xt,"".concat(Ot,"-start"),Et[Ht]),(0,Re.Z)(Xt,"".concat(Ot,"-end"),tt[Ht]),Xt))}))}return jt.createElement("span",{"aria-hidden":"true",className:"".concat(xt,"-indent")},gt)},ee=jt.memo(ne),ce=pe(67841),se=pe(71430),fe=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ye="open",be="close",Te="---",Be=function(nt){(0,kt.Z)(xt,nt);var Je=(0,bt.Z)(xt);function xt(){var He;(0,Ke.Z)(this,xt);for(var Et=arguments.length,tt=new Array(Et),Ot=0;Ot<Et;Ot++)tt[Ot]=arguments[Ot];return He=Je.call.apply(Je,[this].concat(tt)),He.state={dragNodeHighlight:!1},He.selectHandle=void 0,He.cacheIndent=void 0,He.onSelectorClick=function(gt){var Ht=He.props.context.onNodeClick;Ht(gt,(0,se.F)(He.props)),He.isSelectable()?He.onSelect(gt):He.onCheck(gt)},He.onSelectorDoubleClick=function(gt){var Ht=He.props.context.onNodeDoubleClick;Ht(gt,(0,se.F)(He.props))},He.onSelect=function(gt){if(!He.isDisabled()){var Ht=He.props.context.onNodeSelect;Ht(gt,(0,se.F)(He.props))}},He.onCheck=function(gt){if(!He.isDisabled()){var Ht=He.props,Xt=Ht.disableCheckbox,Ut=Ht.checked,it=He.props.context.onNodeCheck;if(!(!He.isCheckable()||Xt)){var _e=!Ut;it(gt,(0,se.F)(He.props),_e)}}},He.onMouseEnter=function(gt){var Ht=He.props.context.onNodeMouseEnter;Ht(gt,(0,se.F)(He.props))},He.onMouseLeave=function(gt){var Ht=He.props.context.onNodeMouseLeave;Ht(gt,(0,se.F)(He.props))},He.onContextMenu=function(gt){var Ht=He.props.context.onNodeContextMenu;Ht(gt,(0,se.F)(He.props))},He.onDragStart=function(gt){var Ht=He.props.context.onNodeDragStart;gt.stopPropagation(),He.setState({dragNodeHighlight:!0}),Ht(gt,(0,Me.Z)(He));try{gt.dataTransfer.setData("text/plain","")}catch(Xt){}},He.onDragEnter=function(gt){var Ht=He.props.context.onNodeDragEnter;gt.preventDefault(),gt.stopPropagation(),Ht(gt,(0,Me.Z)(He))},He.onDragOver=function(gt){var Ht=He.props.context.onNodeDragOver;gt.preventDefault(),gt.stopPropagation(),Ht(gt,(0,Me.Z)(He))},He.onDragLeave=function(gt){var Ht=He.props.context.onNodeDragLeave;gt.stopPropagation(),Ht(gt,(0,Me.Z)(He))},He.onDragEnd=function(gt){var Ht=He.props.context.onNodeDragEnd;gt.stopPropagation(),He.setState({dragNodeHighlight:!1}),Ht(gt,(0,Me.Z)(He))},He.onDrop=function(gt){var Ht=He.props.context.onNodeDrop;gt.preventDefault(),gt.stopPropagation(),He.setState({dragNodeHighlight:!1}),Ht(gt,(0,Me.Z)(He))},He.onExpand=function(gt){var Ht=He.props,Xt=Ht.loading,Ut=Ht.context.onNodeExpand;Xt||Ut(gt,(0,se.F)(He.props))},He.setSelectHandle=function(gt){He.selectHandle=gt},He.getNodeState=function(){var gt=He.props.expanded;return He.isLeaf()?null:gt?ye:be},He.hasChildren=function(){var gt=He.props.eventKey,Ht=He.props.context.keyEntities,Xt=(0,ce.Z)(Ht,gt)||{},Ut=Xt.children;return!!(Ut||[]).length},He.isLeaf=function(){var gt=He.props,Ht=gt.isLeaf,Xt=gt.loaded,Ut=He.props.context.loadData,it=He.hasChildren();return Ht===!1?!1:Ht||!Ut&&!it||Ut&&Xt&&!it},He.isDisabled=function(){var gt=He.props.disabled,Ht=He.props.context.disabled;return!!(Ht||gt)},He.isCheckable=function(){var gt=He.props.checkable,Ht=He.props.context.checkable;return!Ht||gt===!1?!1:Ht},He.syncLoadData=function(gt){var Ht=gt.expanded,Xt=gt.loading,Ut=gt.loaded,it=He.props.context,_e=it.loadData,Wt=it.onNodeLoad;Xt||_e&&Ht&&!He.isLeaf()&&!He.hasChildren()&&!Ut&&Wt((0,se.F)(He.props))},He.isDraggable=function(){var gt=He.props,Ht=gt.data,Xt=gt.context.draggable;return!!(Xt&&(!Xt.nodeDraggable||Xt.nodeDraggable(Ht)))},He.renderDragHandler=function(){var gt=He.props.context,Ht=gt.draggable,Xt=gt.prefixCls;return Ht!=null&&Ht.icon?jt.createElement("span",{className:"".concat(Xt,"-draggable-icon")},Ht.icon):null},He.renderSwitcherIconDom=function(gt){var Ht=He.props.switcherIcon,Xt=He.props.context.switcherIcon,Ut=Ht||Xt;return typeof Ut=="function"?Ut((0,dt.Z)((0,dt.Z)({},He.props),{},{isLeaf:gt})):Ut},He.renderSwitcher=function(){var gt=He.props.expanded,Ht=He.props.context.prefixCls;if(He.isLeaf()){var Xt=He.renderSwitcherIconDom(!0);return Xt!==!1?jt.createElement("span",{className:lt()("".concat(Ht,"-switcher"),"".concat(Ht,"-switcher-noop"))},Xt):null}var Ut=lt()("".concat(Ht,"-switcher"),"".concat(Ht,"-switcher_").concat(gt?ye:be)),it=He.renderSwitcherIconDom(!1);return it!==!1?jt.createElement("span",{onClick:He.onExpand,className:Ut},it):null},He.renderCheckbox=function(){var gt=He.props,Ht=gt.checked,Xt=gt.halfChecked,Ut=gt.disableCheckbox,it=He.props.context.prefixCls,_e=He.isDisabled(),Wt=He.isCheckable();if(!Wt)return null;var Dn=typeof Wt!="boolean"?Wt:null;return jt.createElement("span",{className:lt()("".concat(it,"-checkbox"),Ht&&"".concat(it,"-checkbox-checked"),!Ht&&Xt&&"".concat(it,"-checkbox-indeterminate"),(_e||Ut)&&"".concat(it,"-checkbox-disabled")),onClick:He.onCheck},Dn)},He.renderIcon=function(){var gt=He.props.loading,Ht=He.props.context.prefixCls;return jt.createElement("span",{className:lt()("".concat(Ht,"-iconEle"),"".concat(Ht,"-icon__").concat(He.getNodeState()||"docu"),gt&&"".concat(Ht,"-icon_loading"))})},He.renderSelector=function(){var gt=He.state.dragNodeHighlight,Ht=He.props,Xt=Ht.title,Ut=Xt===void 0?Te:Xt,it=Ht.selected,_e=Ht.icon,Wt=Ht.loading,Dn=Ht.data,Bn=He.props.context,$t=Bn.prefixCls,ln=Bn.showIcon,Tn=Bn.icon,ei=Bn.loadData,Ln=Bn.titleRender,Yn=He.isDisabled(),zt="".concat($t,"-node-content-wrapper"),wn;if(ln){var $n=_e||Tn;wn=$n?jt.createElement("span",{className:lt()("".concat($t,"-iconEle"),"".concat($t,"-icon__customize"))},typeof $n=="function"?$n(He.props):$n):He.renderIcon()}else ei&&Wt&&(wn=He.renderIcon());var Yt;typeof Ut=="function"?Yt=Ut(Dn):Ln?Yt=Ln(Dn):Yt=Ut;var tn=jt.createElement("span",{className:"".concat($t,"-title")},Yt);return jt.createElement("span",{ref:He.setSelectHandle,title:typeof Ut=="string"?Ut:"",className:lt()("".concat(zt),"".concat(zt,"-").concat(He.getNodeState()||"normal"),!Yn&&(it||gt)&&"".concat($t,"-node-selected")),onMouseEnter:He.onMouseEnter,onMouseLeave:He.onMouseLeave,onContextMenu:He.onContextMenu,onClick:He.onSelectorClick,onDoubleClick:He.onSelectorDoubleClick},wn,tn,He.renderDropIndicator())},He.renderDropIndicator=function(){var gt=He.props,Ht=gt.disabled,Xt=gt.eventKey,Ut=He.props.context,it=Ut.draggable,_e=Ut.dropLevelOffset,Wt=Ut.dropPosition,Dn=Ut.prefixCls,Bn=Ut.indent,$t=Ut.dropIndicatorRender,ln=Ut.dragOverNodeKey,Tn=Ut.direction,ei=!!it,Ln=!Ht&&ei&&ln===Xt,Yn=Bn!=null?Bn:He.cacheIndent;return He.cacheIndent=Bn,Ln?$t({dropPosition:Wt,dropLevelOffset:_e,indent:Yn,prefixCls:Dn,direction:Tn}):null},He}return(0,st.Z)(xt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Et=this.props.selectable,tt=this.props.context.selectable;return typeof Et=="boolean"?Et:tt}},{key:"render",value:function(){var Et,tt=this.props,Ot=tt.eventKey,gt=tt.className,Ht=tt.style,Xt=tt.dragOver,Ut=tt.dragOverGapTop,it=tt.dragOverGapBottom,_e=tt.isLeaf,Wt=tt.isStart,Dn=tt.isEnd,Bn=tt.expanded,$t=tt.selected,ln=tt.checked,Tn=tt.halfChecked,ei=tt.loading,Ln=tt.domRef,Yn=tt.active,zt=tt.data,wn=tt.onMouseMove,$n=tt.selectable,Yt=(0,Ve.Z)(tt,fe),tn=this.props.context,Gt=tn.prefixCls,Tt=tn.filterTreeNode,ot=tn.keyEntities,Ze=tn.dropContainerKey,At=tn.dropTargetKey,Dt=tn.draggingNodeKey,rt=this.isDisabled(),et=(0,yt.Z)(Yt,{aria:!0,data:!0}),Oe=(0,ce.Z)(ot,Ot)||{},Pe=Oe.level,ve=Dn[Dn.length-1],Fe=this.isDraggable(),We=!rt&&Fe,Ne=Dt===Ot,ft=$n!==void 0?{"aria-selected":!!$n}:void 0;return jt.createElement("div",(0,ge.Z)({ref:Ln,className:lt()(gt,"".concat(Gt,"-treenode"),(Et={},(0,Re.Z)(Et,"".concat(Gt,"-treenode-disabled"),rt),(0,Re.Z)(Et,"".concat(Gt,"-treenode-switcher-").concat(Bn?"open":"close"),!_e),(0,Re.Z)(Et,"".concat(Gt,"-treenode-checkbox-checked"),ln),(0,Re.Z)(Et,"".concat(Gt,"-treenode-checkbox-indeterminate"),Tn),(0,Re.Z)(Et,"".concat(Gt,"-treenode-selected"),$t),(0,Re.Z)(Et,"".concat(Gt,"-treenode-loading"),ei),(0,Re.Z)(Et,"".concat(Gt,"-treenode-active"),Yn),(0,Re.Z)(Et,"".concat(Gt,"-treenode-leaf-last"),ve),(0,Re.Z)(Et,"".concat(Gt,"-treenode-draggable"),Fe),(0,Re.Z)(Et,"dragging",Ne),(0,Re.Z)(Et,"drop-target",At===Ot),(0,Re.Z)(Et,"drop-container",Ze===Ot),(0,Re.Z)(Et,"drag-over",!rt&&Xt),(0,Re.Z)(Et,"drag-over-gap-top",!rt&&Ut),(0,Re.Z)(Et,"drag-over-gap-bottom",!rt&&it),(0,Re.Z)(Et,"filter-node",Tt&&Tt((0,se.F)(this.props))),Et)),style:Ht,draggable:We,"aria-grabbed":Ne,onDragStart:We?this.onDragStart:void 0,onDragEnter:Fe?this.onDragEnter:void 0,onDragOver:Fe?this.onDragOver:void 0,onDragLeave:Fe?this.onDragLeave:void 0,onDrop:Fe?this.onDrop:void 0,onDragEnd:Fe?this.onDragEnd:void 0,onMouseMove:wn},ft,et),jt.createElement(ee,{prefixCls:Gt,level:Pe,isStart:Wt,isEnd:Dn}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),xt}(jt.Component),ze=function(Je){return jt.createElement(Ae.k.Consumer,null,function(xt){return jt.createElement(Be,(0,ge.Z)({},Je,{context:xt}))})};ze.displayName="TreeNode",ze.isTreeNode=1;var Ge=ze},39378:function(Vn,Cn,pe){"use strict";pe.d(Cn,{k:function(){return Re}});var ge=pe(59301),Re=ge.createContext(null)},43858:function(Vn,Cn,pe){"use strict";pe.d(Cn,{O:function(){return Ge.Z},Z:function(){return tn}});var ge=pe(96663),Re=pe(90493),Ve=pe(20135),dt=pe(44127),Ke=pe(19127),st=pe(52884),Me=pe(95727),kt=pe(89866),bt=pe(65711),Ue=pe(85745),lt=pe(92310),yt=pe.n(lt),jt=pe(10228),Ae=pe(26112),ne=pe(48736),ee=pe(59301),ce=pe(39378);function se(Gt){var Tt=Gt.dropPosition,ot=Gt.dropLevelOffset,Ze=Gt.indent,At={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Tt){case-1:At.top=0,At.left=-ot*Ze;break;case 1:At.bottom=0,At.left=-ot*Ze;break;case 0:At.bottom=0,At.left=Ze;break}return ee.createElement("div",{style:At})}function fe(Gt){if(Gt==null)throw new TypeError("Cannot destructure "+Gt)}var ye=pe(72071),be=pe(6620),Te=pe(34280),Be=pe(45680),ze=pe(77900),Ge=pe(39417);function nt(Gt,Tt){var ot=ee.useState(!1),Ze=(0,ye.Z)(ot,2),At=Ze[0],Dt=Ze[1];ee.useLayoutEffect(function(){if(At)return Gt(),function(){Tt()}},[At]),ee.useLayoutEffect(function(){return Dt(!0),function(){Dt(!1)}},[])}var Je=pe(71430),xt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],He=function(Tt,ot){var Ze=Tt.className,At=Tt.style,Dt=Tt.motion,rt=Tt.motionNodes,et=Tt.motionType,Oe=Tt.onMotionStart,Pe=Tt.onMotionEnd,ve=Tt.active,Fe=Tt.treeNodeRequiredProps,We=(0,be.Z)(Tt,xt),Ne=ee.useState(!0),ft=(0,ye.Z)(Ne,2),sn=ft[0],un=ft[1],Pt=ee.useContext(ce.k),qt=Pt.prefixCls,Mn=rt&&et!=="hide";(0,Te.Z)(function(){rt&&Mn!==sn&&un(Mn)},[rt]);var hn=function(){rt&&Oe()},fn=ee.useRef(!1),ui=function(){rt&&!fn.current&&(fn.current=!0,Pe())};nt(hn,ui);var gi=function(bi){Mn===bi&&ui()};return rt?ee.createElement(ze.default,(0,ge.Z)({ref:ot,visible:sn},Dt,{motionAppear:et==="show",onVisibleChanged:gi}),function(fi,bi){var _i=fi.className,rr=fi.style;return ee.createElement("div",{ref:bi,className:yt()("".concat(qt,"-treenode-motion"),_i),style:rr},rt.map(function(Wi){var vr=(0,ge.Z)({},(fe(Wi.data),Wi.data)),fr=Wi.title,zi=Wi.key,Er=Wi.isStart,Kn=Wi.isEnd;delete vr.children;var Le=(0,Je.H8)(zi,Fe);return ee.createElement(Ge.Z,(0,ge.Z)({},vr,Le,{title:fr,active:ve,data:Wi.data,key:zi,isStart:Er,isEnd:Kn}))}))}):ee.createElement(Ge.Z,(0,ge.Z)({domRef:ot,className:Ze,style:At},We,{active:ve}))};He.displayName="MotionTreeNode";var Et=ee.forwardRef(He),tt=Et;function Ot(){var Gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ot=Gt.length,Ze=Tt.length;if(Math.abs(ot-Ze)!==1)return{add:!1,key:null};function At(Dt,rt){var et=new Map;Dt.forEach(function(Pe){et.set(Pe,!0)});var Oe=rt.filter(function(Pe){return!et.has(Pe)});return Oe.length===1?Oe[0]:null}return ot<Ze?{add:!0,key:At(Gt,Tt)}:{add:!1,key:At(Tt,Gt)}}function gt(Gt,Tt,ot){var Ze=Gt.findIndex(function(et){return et.key===ot}),At=Gt[Ze+1],Dt=Tt.findIndex(function(et){return et.key===ot});if(At){var rt=Tt.findIndex(function(et){return et.key===At.key});return Tt.slice(Dt+1,rt)}return Tt.slice(Dt+1)}var Ht=["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"],Xt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Ut=function(){},it="RC_TREE_MOTION_".concat(Math.random()),_e={key:it},Wt={key:it,level:0,index:0,pos:"0",node:_e,nodes:[_e]},Dn={parent:null,children:[],pos:Wt.pos,data:_e,title:null,key:it,isStart:[],isEnd:[]};function Bn(Gt,Tt,ot,Ze){return Tt===!1||!ot?Gt:Gt.slice(0,Math.ceil(ot/Ze)+1)}function $t(Gt){var Tt=Gt.key,ot=Gt.pos;return(0,Je.km)(Tt,ot)}function ln(Gt){for(var Tt=String(Gt.data.key),ot=Gt;ot.parent;)ot=ot.parent,Tt="".concat(ot.data.key," > ").concat(Tt);return Tt}var Tn=ee.forwardRef(function(Gt,Tt){var ot=Gt.prefixCls,Ze=Gt.data,At=Gt.selectable,Dt=Gt.checkable,rt=Gt.expandedKeys,et=Gt.selectedKeys,Oe=Gt.checkedKeys,Pe=Gt.loadedKeys,ve=Gt.loadingKeys,Fe=Gt.halfCheckedKeys,We=Gt.keyEntities,Ne=Gt.disabled,ft=Gt.dragging,sn=Gt.dragOverNodeKey,un=Gt.dropPosition,Pt=Gt.motion,qt=Gt.height,Mn=Gt.itemHeight,hn=Gt.virtual,fn=Gt.focusable,ui=Gt.activeItem,gi=Gt.focused,fi=Gt.tabIndex,bi=Gt.onKeyDown,_i=Gt.onFocus,rr=Gt.onBlur,Wi=Gt.onActiveChange,vr=Gt.onListChangeStart,fr=Gt.onListChangeEnd,zi=(0,be.Z)(Gt,Ht),Er=ee.useRef(null),Kn=ee.useRef(null);ee.useImperativeHandle(Tt,function(){return{scrollTo:function(bn){Er.current.scrollTo(bn)},getIndentWidth:function(){return Kn.current.offsetWidth}}});var Le=ee.useState(rt),Ei=(0,ye.Z)(Le,2),Ri=Ei[0],an=Ei[1],di=ee.useState(Ze),yi=(0,ye.Z)(di,2),Li=yi[0],On=yi[1],Un=ee.useState(Ze),It=(0,ye.Z)(Un,2),Kt=It[0],Ye=It[1],nn=ee.useState([]),xn=(0,ye.Z)(nn,2),Nt=xn[0],at=xn[1],cn=ee.useState(null),Nn=(0,ye.Z)(cn,2),kn=Nn[0],Jn=Nn[1],St=ee.useRef(Ze);St.current=Ze;function An(){var rn=St.current;On(rn),Ye(rn),at([]),Jn(null),fr()}(0,Te.Z)(function(){an(rt);var rn=Ot(Ri,rt);if(rn.key!==null)if(rn.add){var bn=Li.findIndex(function(Zn){var Qn=Zn.key;return Qn===rn.key}),Ft=Bn(gt(Li,Ze,rn.key),hn,qt,Mn),Pn=Li.slice();Pn.splice(bn+1,0,Dn),Ye(Pn),at(Ft),Jn("show")}else{var yn=Ze.findIndex(function(Zn){var Qn=Zn.key;return Qn===rn.key}),Sn=Bn(gt(Ze,Li,rn.key),hn,qt,Mn),Gn=Ze.slice();Gn.splice(yn+1,0,Dn),Ye(Gn),at(Sn),Jn("hide")}else Li!==Ze&&(On(Ze),Ye(Ze))},[rt,Ze]),ee.useEffect(function(){ft||An()},[ft]);var qn=Pt?Kt:Ze,Si={expandedKeys:rt,selectedKeys:et,loadedKeys:Pe,loadingKeys:ve,checkedKeys:Oe,halfCheckedKeys:Fe,dragOverNodeKey:sn,dropPosition:un,keyEntities:We};return ee.createElement(ee.Fragment,null,gi&&ui&&ee.createElement("span",{style:Xt,"aria-live":"assertive"},ln(ui)),ee.createElement("div",null,ee.createElement("input",{style:Xt,disabled:fn===!1||Ne,tabIndex:fn!==!1?fi:null,onKeyDown:bi,onFocus:_i,onBlur:rr,value:"",onChange:Ut,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(ot,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(ot,"-indent")},ee.createElement("div",{ref:Kn,className:"".concat(ot,"-indent-unit")}))),ee.createElement(Be.Z,(0,ge.Z)({},zi,{data:qn,itemKey:$t,height:qt,fullHeight:!1,virtual:hn,itemHeight:Mn,prefixCls:"".concat(ot,"-list"),ref:Er,onVisibleChange:function(bn,Ft){var Pn=new Set(bn),yn=Ft.filter(function(Sn){return!Pn.has(Sn)});yn.some(function(Sn){return $t(Sn)===it})&&An()}}),function(rn){var bn=rn.pos,Ft=(0,ge.Z)({},(fe(rn.data),rn.data)),Pn=rn.title,yn=rn.key,Sn=rn.isStart,Gn=rn.isEnd,Zn=(0,Je.km)(yn,bn);delete Ft.key,delete Ft.children;var Qn=(0,Je.H8)(Zn,Si);return ee.createElement(tt,(0,ge.Z)({},Ft,Qn,{title:Pn,active:!!ui&&yn===ui.key,pos:bn,data:rn.data,isStart:Sn,isEnd:Gn,motion:Pt,motionNodes:yn===it?Nt:null,motionType:kn,onMotionStart:vr,onMotionEnd:An,treeNodeRequiredProps:Si,onMouseMove:function(){Wi(null)}}))}))});Tn.displayName="NodeList";var ei=Tn,Ln=pe(35654),Yn=pe(90782),zt=pe(67841),wn=10,$n=function(Gt){(0,bt.Z)(ot,Gt);var Tt=(0,Ue.Z)(ot);function ot(){var Ze;(0,st.Z)(this,ot);for(var At=arguments.length,Dt=new Array(At),rt=0;rt<At;rt++)Dt[rt]=arguments[rt];return Ze=Tt.call.apply(Tt,[this].concat(Dt)),Ze.destroyed=!1,Ze.delayedDragEnterLogic=void 0,Ze.loadingRetryTimes={},Ze.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,Je.w$)()},Ze.dragStartMousePosition=null,Ze.dragNode=void 0,Ze.currentMouseOverDroppableNodeKey=null,Ze.listRef=ee.createRef(),Ze.onNodeDragStart=function(et,Oe){var Pe=Ze.state,ve=Pe.expandedKeys,Fe=Pe.keyEntities,We=Ze.props.onDragStart,Ne=Oe.props.eventKey;Ze.dragNode=Oe,Ze.dragStartMousePosition={x:et.clientX,y:et.clientY};var ft=(0,Ln._5)(ve,Ne);Ze.setState({draggingNodeKey:Ne,dragChildrenKeys:(0,Ln.wA)(Ne,Fe),indent:Ze.listRef.current.getIndentWidth()}),Ze.setExpandedKeys(ft),window.addEventListener("dragend",Ze.onWindowDragEnd),We==null||We({event:et,node:(0,Je.F)(Oe.props)})},Ze.onNodeDragEnter=function(et,Oe){var Pe=Ze.state,ve=Pe.expandedKeys,Fe=Pe.keyEntities,We=Pe.dragChildrenKeys,Ne=Pe.flattenNodes,ft=Pe.indent,sn=Ze.props,un=sn.onDragEnter,Pt=sn.onExpand,qt=sn.allowDrop,Mn=sn.direction,hn=Oe.props,fn=hn.pos,ui=hn.eventKey,gi=(0,kt.Z)(Ze),fi=gi.dragNode;if(Ze.currentMouseOverDroppableNodeKey!==ui&&(Ze.currentMouseOverDroppableNodeKey=ui),!fi){Ze.resetDragState();return}var bi=(0,Ln.OM)(et,fi,Oe,ft,Ze.dragStartMousePosition,qt,Ne,Fe,ve,Mn),_i=bi.dropPosition,rr=bi.dropLevelOffset,Wi=bi.dropTargetKey,vr=bi.dropContainerKey,fr=bi.dropTargetPos,zi=bi.dropAllowed,Er=bi.dragOverNodeKey;if(We.indexOf(Wi)!==-1||!zi){Ze.resetDragState();return}if(Ze.delayedDragEnterLogic||(Ze.delayedDragEnterLogic={}),Object.keys(Ze.delayedDragEnterLogic).forEach(function(Kn){clearTimeout(Ze.delayedDragEnterLogic[Kn])}),fi.props.eventKey!==Oe.props.eventKey&&(et.persist(),Ze.delayedDragEnterLogic[fn]=window.setTimeout(function(){if(Ze.state.draggingNodeKey!==null){var Kn=(0,Ke.Z)(ve),Le=(0,zt.Z)(Fe,Oe.props.eventKey);Le&&(Le.children||[]).length&&(Kn=(0,Ln.L0)(ve,Oe.props.eventKey)),"expandedKeys"in Ze.props||Ze.setExpandedKeys(Kn),Pt==null||Pt(Kn,{node:(0,Je.F)(Oe.props),expanded:!0,nativeEvent:et.nativeEvent})}},800)),fi.props.eventKey===Wi&&rr===0){Ze.resetDragState();return}Ze.setState({dragOverNodeKey:Er,dropPosition:_i,dropLevelOffset:rr,dropTargetKey:Wi,dropContainerKey:vr,dropTargetPos:fr,dropAllowed:zi}),un==null||un({event:et,node:(0,Je.F)(Oe.props),expandedKeys:ve})},Ze.onNodeDragOver=function(et,Oe){var Pe=Ze.state,ve=Pe.dragChildrenKeys,Fe=Pe.flattenNodes,We=Pe.keyEntities,Ne=Pe.expandedKeys,ft=Pe.indent,sn=Ze.props,un=sn.onDragOver,Pt=sn.allowDrop,qt=sn.direction,Mn=(0,kt.Z)(Ze),hn=Mn.dragNode;if(hn){var fn=(0,Ln.OM)(et,hn,Oe,ft,Ze.dragStartMousePosition,Pt,Fe,We,Ne,qt),ui=fn.dropPosition,gi=fn.dropLevelOffset,fi=fn.dropTargetKey,bi=fn.dropContainerKey,_i=fn.dropAllowed,rr=fn.dropTargetPos,Wi=fn.dragOverNodeKey;ve.indexOf(fi)!==-1||!_i||(hn.props.eventKey===fi&&gi===0?Ze.state.dropPosition===null&&Ze.state.dropLevelOffset===null&&Ze.state.dropTargetKey===null&&Ze.state.dropContainerKey===null&&Ze.state.dropTargetPos===null&&Ze.state.dropAllowed===!1&&Ze.state.dragOverNodeKey===null||Ze.resetDragState():ui===Ze.state.dropPosition&&gi===Ze.state.dropLevelOffset&&fi===Ze.state.dropTargetKey&&bi===Ze.state.dropContainerKey&&rr===Ze.state.dropTargetPos&&_i===Ze.state.dropAllowed&&Wi===Ze.state.dragOverNodeKey||Ze.setState({dropPosition:ui,dropLevelOffset:gi,dropTargetKey:fi,dropContainerKey:bi,dropTargetPos:rr,dropAllowed:_i,dragOverNodeKey:Wi}),un==null||un({event:et,node:(0,Je.F)(Oe.props)}))}},Ze.onNodeDragLeave=function(et,Oe){Ze.currentMouseOverDroppableNodeKey===Oe.props.eventKey&&!et.currentTarget.contains(et.relatedTarget)&&(Ze.resetDragState(),Ze.currentMouseOverDroppableNodeKey=null);var Pe=Ze.props.onDragLeave;Pe==null||Pe({event:et,node:(0,Je.F)(Oe.props)})},Ze.onWindowDragEnd=function(et){Ze.onNodeDragEnd(et,null,!0),window.removeEventListener("dragend",Ze.onWindowDragEnd)},Ze.onNodeDragEnd=function(et,Oe){var Pe=Ze.props.onDragEnd;Ze.setState({dragOverNodeKey:null}),Ze.cleanDragState(),Pe==null||Pe({event:et,node:(0,Je.F)(Oe.props)}),Ze.dragNode=null,window.removeEventListener("dragend",Ze.onWindowDragEnd)},Ze.onNodeDrop=function(et,Oe){var Pe,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Fe=Ze.state,We=Fe.dragChildrenKeys,Ne=Fe.dropPosition,ft=Fe.dropTargetKey,sn=Fe.dropTargetPos,un=Fe.dropAllowed;if(un){var Pt=Ze.props.onDrop;if(Ze.setState({dragOverNodeKey:null}),Ze.cleanDragState(),ft!==null){var qt=(0,dt.Z)((0,dt.Z)({},(0,Je.H8)(ft,Ze.getTreeNodeRequiredProps())),{},{active:((Pe=Ze.getActiveItem())===null||Pe===void 0?void 0:Pe.key)===ft,data:(0,zt.Z)(Ze.state.keyEntities,ft).node}),Mn=We.indexOf(ft)!==-1;(0,ne.ZP)(!Mn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var hn=(0,Ln.yx)(sn),fn={event:et,node:(0,Je.F)(qt),dragNode:Ze.dragNode?(0,Je.F)(Ze.dragNode.props):null,dragNodesKeys:[Ze.dragNode.props.eventKey].concat(We),dropToGap:Ne!==0,dropPosition:Ne+Number(hn[hn.length-1])};ve||Pt==null||Pt(fn),Ze.dragNode=null}}},Ze.cleanDragState=function(){var et=Ze.state.draggingNodeKey;et!==null&&Ze.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Ze.dragStartMousePosition=null,Ze.currentMouseOverDroppableNodeKey=null},Ze.triggerExpandActionExpand=function(et,Oe){var Pe=Ze.state,ve=Pe.expandedKeys,Fe=Pe.flattenNodes,We=Oe.expanded,Ne=Oe.key,ft=Oe.isLeaf;if(!(ft||et.shiftKey||et.metaKey||et.ctrlKey)){var sn=Fe.filter(function(Pt){return Pt.key===Ne})[0],un=(0,Je.F)((0,dt.Z)((0,dt.Z)({},(0,Je.H8)(Ne,Ze.getTreeNodeRequiredProps())),{},{data:sn.data}));Ze.setExpandedKeys(We?(0,Ln._5)(ve,Ne):(0,Ln.L0)(ve,Ne)),Ze.onNodeExpand(et,un)}},Ze.onNodeClick=function(et,Oe){var Pe=Ze.props,ve=Pe.onClick,Fe=Pe.expandAction;Fe==="click"&&Ze.triggerExpandActionExpand(et,Oe),ve==null||ve(et,Oe)},Ze.onNodeDoubleClick=function(et,Oe){var Pe=Ze.props,ve=Pe.onDoubleClick,Fe=Pe.expandAction;Fe==="doubleClick"&&Ze.triggerExpandActionExpand(et,Oe),ve==null||ve(et,Oe)},Ze.onNodeSelect=function(et,Oe){var Pe=Ze.state.selectedKeys,ve=Ze.state,Fe=ve.keyEntities,We=ve.fieldNames,Ne=Ze.props,ft=Ne.onSelect,sn=Ne.multiple,un=Oe.selected,Pt=Oe[We.key],qt=!un;qt?sn?Pe=(0,Ln.L0)(Pe,Pt):Pe=[Pt]:Pe=(0,Ln._5)(Pe,Pt);var Mn=Pe.map(function(hn){var fn=(0,zt.Z)(Fe,hn);return fn?fn.node:null}).filter(function(hn){return hn});Ze.setUncontrolledState({selectedKeys:Pe}),ft==null||ft(Pe,{event:"select",selected:qt,node:Oe,selectedNodes:Mn,nativeEvent:et.nativeEvent})},Ze.onNodeCheck=function(et,Oe,Pe){var ve=Ze.state,Fe=ve.keyEntities,We=ve.checkedKeys,Ne=ve.halfCheckedKeys,ft=Ze.props,sn=ft.checkStrictly,un=ft.onCheck,Pt=Oe.key,qt,Mn={event:"check",node:Oe,checked:Pe,nativeEvent:et.nativeEvent};if(sn){var hn=Pe?(0,Ln.L0)(We,Pt):(0,Ln._5)(We,Pt),fn=(0,Ln._5)(Ne,Pt);qt={checked:hn,halfChecked:fn},Mn.checkedNodes=hn.map(function(rr){return(0,zt.Z)(Fe,rr)}).filter(function(rr){return rr}).map(function(rr){return rr.node}),Ze.setUncontrolledState({checkedKeys:hn})}else{var ui=(0,Yn.S)([].concat((0,Ke.Z)(We),[Pt]),!0,Fe),gi=ui.checkedKeys,fi=ui.halfCheckedKeys;if(!Pe){var bi=new Set(gi);bi.delete(Pt);var _i=(0,Yn.S)(Array.from(bi),{checked:!1,halfCheckedKeys:fi},Fe);gi=_i.checkedKeys,fi=_i.halfCheckedKeys}qt=gi,Mn.checkedNodes=[],Mn.checkedNodesPositions=[],Mn.halfCheckedKeys=fi,gi.forEach(function(rr){var Wi=(0,zt.Z)(Fe,rr);if(Wi){var vr=Wi.node,fr=Wi.pos;Mn.checkedNodes.push(vr),Mn.checkedNodesPositions.push({node:vr,pos:fr})}}),Ze.setUncontrolledState({checkedKeys:gi},!1,{halfCheckedKeys:fi})}un==null||un(qt,Mn)},Ze.onNodeLoad=function(et){var Oe=et.key,Pe=new Promise(function(ve,Fe){Ze.setState(function(We){var Ne=We.loadedKeys,ft=Ne===void 0?[]:Ne,sn=We.loadingKeys,un=sn===void 0?[]:sn,Pt=Ze.props,qt=Pt.loadData,Mn=Pt.onLoad;if(!qt||ft.indexOf(Oe)!==-1||un.indexOf(Oe)!==-1)return null;var hn=qt(et);return hn.then(function(){var fn=Ze.state.loadedKeys,ui=(0,Ln.L0)(fn,Oe);Mn==null||Mn(ui,{event:"load",node:et}),Ze.setUncontrolledState({loadedKeys:ui}),Ze.setState(function(gi){return{loadingKeys:(0,Ln._5)(gi.loadingKeys,Oe)}}),ve()}).catch(function(fn){if(Ze.setState(function(gi){return{loadingKeys:(0,Ln._5)(gi.loadingKeys,Oe)}}),Ze.loadingRetryTimes[Oe]=(Ze.loadingRetryTimes[Oe]||0)+1,Ze.loadingRetryTimes[Oe]>=wn){var ui=Ze.state.loadedKeys;(0,ne.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Ze.setUncontrolledState({loadedKeys:(0,Ln.L0)(ui,Oe)}),ve()}Fe(fn)}),{loadingKeys:(0,Ln.L0)(un,Oe)}})});return Pe.catch(function(){}),Pe},Ze.onNodeMouseEnter=function(et,Oe){var Pe=Ze.props.onMouseEnter;Pe==null||Pe({event:et,node:Oe})},Ze.onNodeMouseLeave=function(et,Oe){var Pe=Ze.props.onMouseLeave;Pe==null||Pe({event:et,node:Oe})},Ze.onNodeContextMenu=function(et,Oe){var Pe=Ze.props.onRightClick;Pe&&(et.preventDefault(),Pe({event:et,node:Oe}))},Ze.onFocus=function(){var et=Ze.props.onFocus;Ze.setState({focused:!0});for(var Oe=arguments.length,Pe=new Array(Oe),ve=0;ve<Oe;ve++)Pe[ve]=arguments[ve];et==null||et.apply(void 0,Pe)},Ze.onBlur=function(){var et=Ze.props.onBlur;Ze.setState({focused:!1}),Ze.onActiveChange(null);for(var Oe=arguments.length,Pe=new Array(Oe),ve=0;ve<Oe;ve++)Pe[ve]=arguments[ve];et==null||et.apply(void 0,Pe)},Ze.getTreeNodeRequiredProps=function(){var et=Ze.state,Oe=et.expandedKeys,Pe=et.selectedKeys,ve=et.loadedKeys,Fe=et.loadingKeys,We=et.checkedKeys,Ne=et.halfCheckedKeys,ft=et.dragOverNodeKey,sn=et.dropPosition,un=et.keyEntities;return{expandedKeys:Oe||[],selectedKeys:Pe||[],loadedKeys:ve||[],loadingKeys:Fe||[],checkedKeys:We||[],halfCheckedKeys:Ne||[],dragOverNodeKey:ft,dropPosition:sn,keyEntities:un}},Ze.setExpandedKeys=function(et){var Oe=Ze.state,Pe=Oe.treeData,ve=Oe.fieldNames,Fe=(0,Je.oH)(Pe,et,ve);Ze.setUncontrolledState({expandedKeys:et,flattenNodes:Fe},!0)},Ze.onNodeExpand=function(et,Oe){var Pe=Ze.state.expandedKeys,ve=Ze.state,Fe=ve.listChanging,We=ve.fieldNames,Ne=Ze.props,ft=Ne.onExpand,sn=Ne.loadData,un=Oe.expanded,Pt=Oe[We.key];if(!Fe){var qt=Pe.indexOf(Pt),Mn=!un;if((0,ne.ZP)(un&&qt!==-1||!un&&qt===-1,"Expand state not sync with index check"),Mn?Pe=(0,Ln.L0)(Pe,Pt):Pe=(0,Ln._5)(Pe,Pt),Ze.setExpandedKeys(Pe),ft==null||ft(Pe,{node:Oe,expanded:Mn,nativeEvent:et.nativeEvent}),Mn&&sn){var hn=Ze.onNodeLoad(Oe);hn&&hn.then(function(){var fn=(0,Je.oH)(Ze.state.treeData,Pe,We);Ze.setUncontrolledState({flattenNodes:fn})}).catch(function(){var fn=Ze.state.expandedKeys,ui=(0,Ln._5)(fn,Pt);Ze.setExpandedKeys(ui)})}}},Ze.onListChangeStart=function(){Ze.setUncontrolledState({listChanging:!0})},Ze.onListChangeEnd=function(){setTimeout(function(){Ze.setUncontrolledState({listChanging:!1})})},Ze.onActiveChange=function(et){var Oe=Ze.state.activeKey,Pe=Ze.props.onActiveChange;Oe!==et&&(Ze.setState({activeKey:et}),et!==null&&Ze.scrollTo({key:et}),Pe==null||Pe(et))},Ze.getActiveItem=function(){var et=Ze.state,Oe=et.activeKey,Pe=et.flattenNodes;return Oe===null?null:Pe.find(function(ve){var Fe=ve.key;return Fe===Oe})||null},Ze.offsetActiveKey=function(et){var Oe=Ze.state,Pe=Oe.flattenNodes,ve=Oe.activeKey,Fe=Pe.findIndex(function(ft){var sn=ft.key;return sn===ve});Fe===-1&&et<0&&(Fe=Pe.length),Fe=(Fe+et+Pe.length)%Pe.length;var We=Pe[Fe];if(We){var Ne=We.key;Ze.onActiveChange(Ne)}else Ze.onActiveChange(null)},Ze.onKeyDown=function(et){var Oe=Ze.state,Pe=Oe.activeKey,ve=Oe.expandedKeys,Fe=Oe.checkedKeys,We=Oe.fieldNames,Ne=Ze.props,ft=Ne.onKeyDown,sn=Ne.checkable,un=Ne.selectable;switch(et.which){case jt.Z.UP:{Ze.offsetActiveKey(-1),et.preventDefault();break}case jt.Z.DOWN:{Ze.offsetActiveKey(1),et.preventDefault();break}}var Pt=Ze.getActiveItem();if(Pt&&Pt.data){var qt=Ze.getTreeNodeRequiredProps(),Mn=Pt.data.isLeaf===!1||!!(Pt.data[We.children]||[]).length,hn=(0,Je.F)((0,dt.Z)((0,dt.Z)({},(0,Je.H8)(Pe,qt)),{},{data:Pt.data,active:!0}));switch(et.which){case jt.Z.LEFT:{Mn&&ve.includes(Pe)?Ze.onNodeExpand({},hn):Pt.parent&&Ze.onActiveChange(Pt.parent.key),et.preventDefault();break}case jt.Z.RIGHT:{Mn&&!ve.includes(Pe)?Ze.onNodeExpand({},hn):Pt.children&&Pt.children.length&&Ze.onActiveChange(Pt.children[0].key),et.preventDefault();break}case jt.Z.ENTER:case jt.Z.SPACE:{sn&&!hn.disabled&&hn.checkable!==!1&&!hn.disableCheckbox?Ze.onNodeCheck({},hn,!Fe.includes(Pe)):!sn&&un&&!hn.disabled&&hn.selectable!==!1&&Ze.onNodeSelect({},hn);break}}}ft==null||ft(et)},Ze.setUncontrolledState=function(et){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Ze.destroyed){var ve=!1,Fe=!0,We={};Object.keys(et).forEach(function(Ne){if(Ne in Ze.props){Fe=!1;return}ve=!0,We[Ne]=et[Ne]}),ve&&(!Oe||Fe)&&Ze.setState((0,dt.Z)((0,dt.Z)({},We),Pe))}},Ze.scrollTo=function(et){Ze.listRef.current.scrollTo(et)},Ze}return(0,Me.Z)(ot,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var At=this.props.activeKey;At!==void 0&&At!==this.state.activeKey&&(this.setState({activeKey:At}),At!==null&&this.scrollTo({key:At}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var At,Dt=this.state,rt=Dt.focused,et=Dt.flattenNodes,Oe=Dt.keyEntities,Pe=Dt.draggingNodeKey,ve=Dt.activeKey,Fe=Dt.dropLevelOffset,We=Dt.dropContainerKey,Ne=Dt.dropTargetKey,ft=Dt.dropPosition,sn=Dt.dragOverNodeKey,un=Dt.indent,Pt=this.props,qt=Pt.prefixCls,Mn=Pt.className,hn=Pt.style,fn=Pt.showLine,ui=Pt.focusable,gi=Pt.tabIndex,fi=gi===void 0?0:gi,bi=Pt.selectable,_i=Pt.showIcon,rr=Pt.icon,Wi=Pt.switcherIcon,vr=Pt.draggable,fr=Pt.checkable,zi=Pt.checkStrictly,Er=Pt.disabled,Kn=Pt.motion,Le=Pt.loadData,Ei=Pt.filterTreeNode,Ri=Pt.height,an=Pt.itemHeight,di=Pt.virtual,yi=Pt.titleRender,Li=Pt.dropIndicatorRender,On=Pt.onContextMenu,Un=Pt.onScroll,It=Pt.direction,Kt=Pt.rootClassName,Ye=Pt.rootStyle,nn=(0,Ae.Z)(this.props,{aria:!0,data:!0}),xn;return vr&&((0,Ve.Z)(vr)==="object"?xn=vr:typeof vr=="function"?xn={nodeDraggable:vr}:xn={}),ee.createElement(ce.k.Provider,{value:{prefixCls:qt,selectable:bi,showIcon:_i,icon:rr,switcherIcon:Wi,draggable:xn,draggingNodeKey:Pe,checkable:fr,checkStrictly:zi,disabled:Er,keyEntities:Oe,dropLevelOffset:Fe,dropContainerKey:We,dropTargetKey:Ne,dropPosition:ft,dragOverNodeKey:sn,indent:un,direction:It,dropIndicatorRender:Li,loadData:Le,filterTreeNode:Ei,titleRender:yi,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},ee.createElement("div",{role:"tree",className:yt()(qt,Mn,Kt,(At={},(0,Re.Z)(At,"".concat(qt,"-show-line"),fn),(0,Re.Z)(At,"".concat(qt,"-focused"),rt),(0,Re.Z)(At,"".concat(qt,"-active-focused"),ve!==null),At)),style:Ye},ee.createElement(ei,(0,ge.Z)({ref:this.listRef,prefixCls:qt,style:hn,data:et,disabled:Er,selectable:bi,checkable:!!fr,motion:Kn,dragging:Pe!==null,height:Ri,itemHeight:an,virtual:di,focusable:ui,focused:rt,tabIndex:fi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:On,onScroll:Un},this.getTreeNodeRequiredProps(),nn))))}}],[{key:"getDerivedStateFromProps",value:function(At,Dt){var rt=Dt.prevProps,et={prevProps:At};function Oe(ui){return!rt&&ui in At||rt&&rt[ui]!==At[ui]}var Pe,ve=Dt.fieldNames;if(Oe("fieldNames")&&(ve=(0,Je.w$)(At.fieldNames),et.fieldNames=ve),Oe("treeData")?Pe=At.treeData:Oe("children")&&((0,ne.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Pe=(0,Je.zn)(At.children)),Pe){et.treeData=Pe;var Fe=(0,Je.I8)(Pe,{fieldNames:ve});et.keyEntities=(0,dt.Z)((0,Re.Z)({},it,Wt),Fe.keyEntities)}var We=et.keyEntities||Dt.keyEntities;if(Oe("expandedKeys")||rt&&Oe("autoExpandParent"))et.expandedKeys=At.autoExpandParent||!rt&&At.defaultExpandParent?(0,Ln.r7)(At.expandedKeys,We):At.expandedKeys;else if(!rt&&At.defaultExpandAll){var Ne=(0,dt.Z)({},We);delete Ne[it],et.expandedKeys=Object.keys(Ne).map(function(ui){return Ne[ui].key})}else!rt&&At.defaultExpandedKeys&&(et.expandedKeys=At.autoExpandParent||At.defaultExpandParent?(0,Ln.r7)(At.defaultExpandedKeys,We):At.defaultExpandedKeys);if(et.expandedKeys||delete et.expandedKeys,Pe||et.expandedKeys){var ft=(0,Je.oH)(Pe||Dt.treeData,et.expandedKeys||Dt.expandedKeys,ve);et.flattenNodes=ft}if(At.selectable&&(Oe("selectedKeys")?et.selectedKeys=(0,Ln.BT)(At.selectedKeys,At):!rt&&At.defaultSelectedKeys&&(et.selectedKeys=(0,Ln.BT)(At.defaultSelectedKeys,At))),At.checkable){var sn;if(Oe("checkedKeys")?sn=(0,Ln.E6)(At.checkedKeys)||{}:!rt&&At.defaultCheckedKeys?sn=(0,Ln.E6)(At.defaultCheckedKeys)||{}:Pe&&(sn=(0,Ln.E6)(At.checkedKeys)||{checkedKeys:Dt.checkedKeys,halfCheckedKeys:Dt.halfCheckedKeys}),sn){var un=sn,Pt=un.checkedKeys,qt=Pt===void 0?[]:Pt,Mn=un.halfCheckedKeys,hn=Mn===void 0?[]:Mn;if(!At.checkStrictly){var fn=(0,Yn.S)(qt,!0,We);qt=fn.checkedKeys,hn=fn.halfCheckedKeys}et.checkedKeys=qt,et.halfCheckedKeys=hn}}return Oe("loadedKeys")&&(et.loadedKeys=At.loadedKeys),et}}]),ot}(ee.Component);$n.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:se,allowDrop:function(){return!0},expandAction:!1},$n.TreeNode=Ge.Z;var Yt=$n,tn=Yt},35654:function(Vn,Cn,pe){"use strict";pe.d(Cn,{BT:function(){return ee},E6:function(){return fe},L0:function(){return Ue},OM:function(){return ne},_5:function(){return bt},r7:function(){return ye},wA:function(){return yt},yx:function(){return lt}});var ge=pe(19127),Re=pe(20135),Ve=pe(48736),dt=pe(59301),Ke=pe(39417),st=pe(67841),Me=pe(71430),kt=null;function bt(be,Te){if(!be)return[];var Be=be.slice(),ze=Be.indexOf(Te);return ze>=0&&Be.splice(ze,1),Be}function Ue(be,Te){var Be=(be||[]).slice();return Be.indexOf(Te)===-1&&Be.push(Te),Be}function lt(be){return be.split("-")}function yt(be,Te){var Be=[],ze=(0,st.Z)(Te,be);function Ge(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];nt.forEach(function(Je){var xt=Je.key,He=Je.children;Be.push(xt),Ge(He)})}return Ge(ze.children),Be}function jt(be){if(be.parent){var Te=lt(be.pos);return Number(Te[Te.length-1])===be.parent.children.length-1}return!1}function Ae(be){var Te=lt(be.pos);return Number(Te[Te.length-1])===0}function ne(be,Te,Be,ze,Ge,nt,Je,xt,He,Et){var tt,Ot=be.clientX,gt=be.clientY,Ht=be.target.getBoundingClientRect(),Xt=Ht.top,Ut=Ht.height,it=(Et==="rtl"?-1:1)*(((Ge==null?void 0:Ge.x)||0)-Ot),_e=(it-12)/ze,Wt=(0,st.Z)(xt,Be.props.eventKey);if(gt<Xt+Ut/2){var Dn=Je.findIndex(function(tn){return tn.key===Wt.key}),Bn=Dn<=0?0:Dn-1,$t=Je[Bn].key;Wt=(0,st.Z)(xt,$t)}var ln=Wt.key,Tn=Wt,ei=Wt.key,Ln=0,Yn=0;if(!He.includes(ln))for(var zt=0;zt<_e&&jt(Wt);zt+=1)Wt=Wt.parent,Yn+=1;var wn=Te.props.data,$n=Wt.node,Yt=!0;return Ae(Wt)&&Wt.level===0&><Xt+Ut/2&&nt({dragNode:wn,dropNode:$n,dropPosition:-1})&&Wt.key===Be.props.eventKey?Ln=-1:(Tn.children||[]).length&&He.includes(ei)?nt({dragNode:wn,dropNode:$n,dropPosition:0})?Ln=0:Yt=!1:Yn===0?_e>-1.5?nt({dragNode:wn,dropNode:$n,dropPosition:1})?Ln=1:Yt=!1:nt({dragNode:wn,dropNode:$n,dropPosition:0})?Ln=0:nt({dragNode:wn,dropNode:$n,dropPosition:1})?Ln=1:Yt=!1:nt({dragNode:wn,dropNode:$n,dropPosition:1})?Ln=1:Yt=!1,{dropPosition:Ln,dropLevelOffset:Yn,dropTargetKey:Wt.key,dropTargetPos:Wt.pos,dragOverNodeKey:ei,dropContainerKey:Ln===0?null:((tt=Wt.parent)===null||tt===void 0?void 0:tt.key)||null,dropAllowed:Yt}}function ee(be,Te){if(be){var Be=Te.multiple;return Be?be.slice():be.length?[be[0]]:be}}var ce=function(Te){return Te};function se(be,Te){if(!be)return[];var Be=Te||{},ze=Be.processProps,Ge=ze===void 0?ce:ze,nt=Array.isArray(be)?be:[be];return nt.map(function(Je){var xt=Je.children,He=_objectWithoutProperties(Je,kt),Et=se(xt,Te);return React.createElement(TreeNode,_extends({key:He.key},Ge(He)),Et)})}function fe(be){if(!be)return null;var Te;if(Array.isArray(be))Te={checkedKeys:be,halfCheckedKeys:void 0};else if((0,Re.Z)(be)==="object")Te={checkedKeys:be.checked||void 0,halfCheckedKeys:be.halfChecked||void 0};else return(0,Ve.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Te}function ye(be,Te){var Be=new Set;function ze(Ge){if(!Be.has(Ge)){var nt=(0,st.Z)(Te,Ge);if(nt){Be.add(Ge);var Je=nt.parent,xt=nt.node;xt.disabled||Je&&ze(Je.key)}}}return(be||[]).forEach(function(Ge){ze(Ge)}),(0,ge.Z)(Be)}},90782:function(Vn,Cn,pe){"use strict";pe.d(Cn,{S:function(){return Me}});var ge=pe(48736),Re=pe(67841);function Ve(kt,bt){var Ue=new Set;return kt.forEach(function(lt){bt.has(lt)||Ue.add(lt)}),Ue}function dt(kt){var bt=kt||{},Ue=bt.disabled,lt=bt.disableCheckbox,yt=bt.checkable;return!!(Ue||lt)||yt===!1}function Ke(kt,bt,Ue,lt){for(var yt=new Set(kt),jt=new Set,Ae=0;Ae<=Ue;Ae+=1){var ne=bt.get(Ae)||new Set;ne.forEach(function(fe){var ye=fe.key,be=fe.node,Te=fe.children,Be=Te===void 0?[]:Te;yt.has(ye)&&!lt(be)&&Be.filter(function(ze){return!lt(ze.node)}).forEach(function(ze){yt.add(ze.key)})})}for(var ee=new Set,ce=Ue;ce>=0;ce-=1){var se=bt.get(ce)||new Set;se.forEach(function(fe){var ye=fe.parent,be=fe.node;if(!(lt(be)||!fe.parent||ee.has(fe.parent.key))){if(lt(fe.parent.node)){ee.add(ye.key);return}var Te=!0,Be=!1;(ye.children||[]).filter(function(ze){return!lt(ze.node)}).forEach(function(ze){var Ge=ze.key,nt=yt.has(Ge);Te&&!nt&&(Te=!1),!Be&&(nt||jt.has(Ge))&&(Be=!0)}),Te&&yt.add(ye.key),Be&&jt.add(ye.key),ee.add(ye.key)}})}return{checkedKeys:Array.from(yt),halfCheckedKeys:Array.from(Ve(jt,yt))}}function st(kt,bt,Ue,lt,yt){for(var jt=new Set(kt),Ae=new Set(bt),ne=0;ne<=lt;ne+=1){var ee=Ue.get(ne)||new Set;ee.forEach(function(ye){var be=ye.key,Te=ye.node,Be=ye.children,ze=Be===void 0?[]:Be;!jt.has(be)&&!Ae.has(be)&&!yt(Te)&&ze.filter(function(Ge){return!yt(Ge.node)}).forEach(function(Ge){jt.delete(Ge.key)})})}Ae=new Set;for(var ce=new Set,se=lt;se>=0;se-=1){var fe=Ue.get(se)||new Set;fe.forEach(function(ye){var be=ye.parent,Te=ye.node;if(!(yt(Te)||!ye.parent||ce.has(ye.parent.key))){if(yt(ye.parent.node)){ce.add(be.key);return}var Be=!0,ze=!1;(be.children||[]).filter(function(Ge){return!yt(Ge.node)}).forEach(function(Ge){var nt=Ge.key,Je=jt.has(nt);Be&&!Je&&(Be=!1),!ze&&(Je||Ae.has(nt))&&(ze=!0)}),Be||jt.delete(be.key),ze&&Ae.add(be.key),ce.add(be.key)}})}return{checkedKeys:Array.from(jt),halfCheckedKeys:Array.from(Ve(Ae,jt))}}function Me(kt,bt,Ue,lt){var yt=[],jt;lt?jt=lt:jt=dt;var Ae=new Set(kt.filter(function(se){var fe=!!(0,Re.Z)(Ue,se);return fe||yt.push(se),fe})),ne=new Map,ee=0;Object.keys(Ue).forEach(function(se){var fe=Ue[se],ye=fe.level,be=ne.get(ye);be||(be=new Set,ne.set(ye,be)),be.add(fe),ee=Math.max(ee,ye)}),(0,ge.ZP)(!yt.length,"Tree missing follow keys: ".concat(yt.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var ce;return bt===!0?ce=Ke(Ae,ne,ee,jt):ce=st(Ae,bt.halfCheckedKeys,ne,ee,jt),ce}},67841:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return ge}});function ge(Re,Ve){return Re[Ve]}},71430:function(Vn,Cn,pe){"use strict";pe.d(Cn,{F:function(){return ye},H8:function(){return fe},I8:function(){return se},km:function(){return yt},oH:function(){return ee},w$:function(){return jt},zn:function(){return ne}});var ge=pe(20135),Re=pe(19127),Ve=pe(44127),dt=pe(6620),Ke=pe(11592),st=pe(2738),Me=pe(48736),kt=pe(67841),bt=["children"];function Ue(be,Te){return"".concat(be,"-").concat(Te)}function lt(be){return be&&be.type&&be.type.isTreeNode}function yt(be,Te){return be!=null?be:Te}function jt(be){var Te=be||{},Be=Te.title,ze=Te._title,Ge=Te.key,nt=Te.children,Je=Be||"title";return{title:Je,_title:ze||[Je],key:Ge||"key",children:nt||"children"}}function Ae(be,Te){var Be=new Map;function ze(Ge){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Ge||[]).forEach(function(Je){var xt=Je[Te.key],He=Je[Te.children];warning(xt!=null,"Tree node must have a certain key: [".concat(nt).concat(xt,"]"));var Et=String(xt);warning(!Be.has(Et)||xt===null||xt===void 0,"Same 'key' exist in the Tree: ".concat(Et)),Be.set(Et,!0),ze(He,"".concat(nt).concat(Et," > "))})}ze(be)}function ne(be){function Te(Be){var ze=(0,Ke.Z)(Be);return ze.map(function(Ge){if(!lt(Ge))return(0,Me.ZP)(!Ge,"Tree/TreeNode can only accept TreeNode as children."),null;var nt=Ge.key,Je=Ge.props,xt=Je.children,He=(0,dt.Z)(Je,bt),Et=(0,Ve.Z)({key:nt},He),tt=Te(xt);return tt.length&&(Et.children=tt),Et}).filter(function(Ge){return Ge})}return Te(be)}function ee(be,Te,Be){var ze=jt(Be),Ge=ze._title,nt=ze.key,Je=ze.children,xt=new Set(Te===!0?[]:Te),He=[];function Et(tt){var Ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return tt.map(function(gt,Ht){for(var Xt=Ue(Ot?Ot.pos:"0",Ht),Ut=yt(gt[nt],Xt),it,_e=0;_e<Ge.length;_e+=1){var Wt=Ge[_e];if(gt[Wt]!==void 0){it=gt[Wt];break}}var Dn=(0,Ve.Z)((0,Ve.Z)({},(0,st.Z)(gt,[].concat((0,Re.Z)(Ge),[nt,Je]))),{},{title:it,key:Ut,parent:Ot,pos:Xt,children:null,data:gt,isStart:[].concat((0,Re.Z)(Ot?Ot.isStart:[]),[Ht===0]),isEnd:[].concat((0,Re.Z)(Ot?Ot.isEnd:[]),[Ht===tt.length-1])});return He.push(Dn),Te===!0||xt.has(Ut)?Dn.children=Et(gt[Je]||[],Dn):Dn.children=[],Dn})}return Et(be),He}function ce(be,Te,Be){var ze={};(0,ge.Z)(Be)==="object"?ze=Be:ze={externalGetKey:Be},ze=ze||{};var Ge=ze,nt=Ge.childrenPropName,Je=Ge.externalGetKey,xt=Ge.fieldNames,He=jt(xt),Et=He.key,tt=He.children,Ot=nt||tt,gt;Je?typeof Je=="string"?gt=function(Ut){return Ut[Je]}:typeof Je=="function"&&(gt=function(Ut){return Je(Ut)}):gt=function(Ut,it){return yt(Ut[Et],it)};function Ht(Xt,Ut,it,_e){var Wt=Xt?Xt[Ot]:be,Dn=Xt?Ue(it.pos,Ut):"0",Bn=Xt?[].concat((0,Re.Z)(_e),[Xt]):[];if(Xt){var $t=gt(Xt,Dn),ln={node:Xt,index:Ut,pos:Dn,key:$t,parentPos:it.node?it.pos:null,level:it.level+1,nodes:Bn};Te(ln)}Wt&&Wt.forEach(function(Tn,ei){Ht(Tn,ei,{node:Xt,pos:Dn,level:it?it.level+1:-1},Bn)})}Ht(null)}function se(be){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=Te.initWrapper,ze=Te.processEntity,Ge=Te.onProcessFinished,nt=Te.externalGetKey,Je=Te.childrenPropName,xt=Te.fieldNames,He=arguments.length>2?arguments[2]:void 0,Et=nt||He,tt={},Ot={},gt={posEntities:tt,keyEntities:Ot};return Be&&(gt=Be(gt)||gt),ce(be,function(Ht){var Xt=Ht.node,Ut=Ht.index,it=Ht.pos,_e=Ht.key,Wt=Ht.parentPos,Dn=Ht.level,Bn=Ht.nodes,$t={node:Xt,nodes:Bn,index:Ut,key:_e,pos:it,level:Dn},ln=yt(_e,it);tt[it]=$t,Ot[ln]=$t,$t.parent=tt[Wt],$t.parent&&($t.parent.children=$t.parent.children||[],$t.parent.children.push($t)),ze&&ze($t,gt)},{externalGetKey:Et,childrenPropName:Je,fieldNames:xt}),Ge&&Ge(gt),gt}function fe(be,Te){var Be=Te.expandedKeys,ze=Te.selectedKeys,Ge=Te.loadedKeys,nt=Te.loadingKeys,Je=Te.checkedKeys,xt=Te.halfCheckedKeys,He=Te.dragOverNodeKey,Et=Te.dropPosition,tt=Te.keyEntities,Ot=(0,kt.Z)(tt,be),gt={eventKey:be,expanded:Be.indexOf(be)!==-1,selected:ze.indexOf(be)!==-1,loaded:Ge.indexOf(be)!==-1,loading:nt.indexOf(be)!==-1,checked:Je.indexOf(be)!==-1,halfChecked:xt.indexOf(be)!==-1,pos:String(Ot?Ot.pos:""),dragOver:He===be&&Et===0,dragOverGapTop:He===be&&Et===-1,dragOverGapBottom:He===be&&Et===1};return gt}function ye(be){var Te=be.data,Be=be.expanded,ze=be.selected,Ge=be.checked,nt=be.loaded,Je=be.loading,xt=be.halfChecked,He=be.dragOver,Et=be.dragOverGapTop,tt=be.dragOverGapBottom,Ot=be.pos,gt=be.active,Ht=be.eventKey,Xt=(0,Ve.Z)((0,Ve.Z)({},Te),{},{expanded:Be,selected:ze,checked:Ge,loaded:nt,loading:Je,halfChecked:xt,dragOver:He,dragOverGapTop:Et,dragOverGapBottom:tt,pos:Ot,active:gt,key:Ht});return"props"in Xt||Object.defineProperty(Xt,"props",{get:function(){return(0,Me.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),be}}),Xt}},8224:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return Re}});var ge=pe(4676);function Re(Ve,dt,Ke,st){var Me=ge.unstable_batchedUpdates?function(bt){ge.unstable_batchedUpdates(Ke,bt)}:Ke;return Ve!=null&&Ve.addEventListener&&Ve.addEventListener(dt,Me,st),{remove:function(){Ve!=null&&Ve.removeEventListener&&Ve.removeEventListener(dt,Me,st)}}}},55468:function(Vn,Cn,pe){"use strict";pe.d(Cn,{g1:function(){return lt},os:function(){return jt}});var ge=/margin|padding|width|height|max|min|offset/,Re={left:!0,top:!0},Ve={cssFloat:1,styleFloat:1,float:1};function dt(Ae){return Ae.nodeType===1?Ae.ownerDocument.defaultView.getComputedStyle(Ae,null):{}}function Ke(Ae,ne,ee){if(ne=ne.toLowerCase(),ee==="auto"){if(ne==="height")return Ae.offsetHeight;if(ne==="width")return Ae.offsetWidth}return ne in Re||(Re[ne]=ge.test(ne)),Re[ne]?parseFloat(ee)||0:ee}function st(Ae,ne){var ee=arguments.length,ce=dt(Ae);return ne=Ve[ne]?"cssFloat"in Ae.style?"cssFloat":"styleFloat":ne,ee===1?ce:Ke(Ae,ne,ce[ne]||Ae.style[ne])}function Me(Ae,ne,ee){var ce=arguments.length;if(ne=Ve[ne]?"cssFloat"in Ae.style?"cssFloat":"styleFloat":ne,ce===3)return typeof ee=="number"&&ge.test(ne)&&(ee="".concat(ee,"px")),Ae.style[ne]=ee,ee;for(var se in ne)ne.hasOwnProperty(se)&&Me(Ae,se,ne[se]);return dt(Ae)}function kt(Ae){return Ae===document.body?document.documentElement.clientWidth:Ae.offsetWidth}function bt(Ae){return Ae===document.body?window.innerHeight||document.documentElement.clientHeight:Ae.offsetHeight}function Ue(){var Ae=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),ne=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Ae,height:ne}}function lt(){var Ae=document.documentElement.clientWidth,ne=window.innerHeight||document.documentElement.clientHeight;return{width:Ae,height:ne}}function yt(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function jt(Ae){var ne=Ae.getBoundingClientRect(),ee=document.documentElement;return{left:ne.left+(window.pageXOffset||ee.scrollLeft)-(ee.clientLeft||document.body.clientLeft||0),top:ne.top+(window.pageYOffset||ee.scrollTop)-(ee.clientTop||document.body.clientTop||0)}}},24514:function(Vn,Cn,pe){"use strict";pe.d(Cn,{G:function(){return dt}});var ge=pe(47273),Re=function(st){if((0,ge.Z)()&&window.document.documentElement){var Me=Array.isArray(st)?st:[st],kt=window.document.documentElement;return Me.some(function(bt){return bt in kt.style})}return!1},Ve=function(st,Me){if(!Re(st))return!1;var kt=document.createElement("div"),bt=kt.style[st];return kt.style[st]=Me,kt.style[st]!==bt};function dt(Ke,st){return!Array.isArray(Ke)&&st!==void 0?Ve(Ke,st):Re(Ke)}},45680:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return $n}});var ge=pe(96663),Re=pe(20135),Ve=pe(44127),dt=pe(90493),Ke=pe(72071),st=pe(6620),Me=pe(92310),kt=pe.n(Me),bt=pe(29301),Ue=pe(70425),lt=pe(34280),yt=pe(59301),jt=pe(4676),Ae=yt.forwardRef(function(Yt,tn){var Gt=Yt.height,Tt=Yt.offsetY,ot=Yt.offsetX,Ze=Yt.children,At=Yt.prefixCls,Dt=Yt.onInnerResize,rt=Yt.innerProps,et=Yt.rtl,Oe=Yt.extra,Pe={},ve={display:"flex",flexDirection:"column"};return Tt!==void 0&&(Pe={height:Gt,position:"relative",overflow:"hidden"},ve=(0,Ve.Z)((0,Ve.Z)({},ve),{},(0,dt.Z)((0,dt.Z)((0,dt.Z)((0,dt.Z)((0,dt.Z)({transform:"translateY(".concat(Tt,"px)")},et?"marginRight":"marginLeft",-ot),"position","absolute"),"left",0),"right",0),"top",0))),yt.createElement("div",{style:Pe},yt.createElement(bt.Z,{onResize:function(We){var Ne=We.offsetHeight;Ne&&Dt&&Dt()}},yt.createElement("div",(0,ge.Z)({style:ve,className:kt()((0,dt.Z)({},"".concat(At,"-holder-inner"),At)),ref:tn},rt),Ze,Oe)))});Ae.displayName="Filler";var ne=Ae;function ee(Yt){var tn=Yt.children,Gt=Yt.setRef,Tt=yt.useCallback(function(ot){Gt(ot)},[]);return yt.cloneElement(tn,{ref:Tt})}function ce(Yt,tn,Gt,Tt,ot,Ze,At,Dt){var rt=Dt.getKey;return Yt.slice(tn,Gt+1).map(function(et,Oe){var Pe=tn+Oe,ve=At(et,Pe,{style:{width:Tt},offsetX:ot}),Fe=rt(et);return yt.createElement(ee,{key:Fe,setRef:function(Ne){return Ze(et,Ne)}},ve)})}function se(Yt,tn,Gt,Tt){var ot=Gt-Yt,Ze=tn-Gt,At=Math.min(ot,Ze)*2;if(Tt<=At){var Dt=Math.floor(Tt/2);return Tt%2?Gt+Dt+1:Gt-Dt}return ot>Ze?Gt-(Tt-Ze):Gt+(Tt-ot)}function fe(Yt,tn,Gt){var Tt=Yt.length,ot=tn.length,Ze,At;if(Tt===0&&ot===0)return null;Tt<ot?(Ze=Yt,At=tn):(Ze=tn,At=Yt);var Dt={__EMPTY_ITEM__:!0};function rt(We){return We!==void 0?Gt(We):Dt}for(var et=null,Oe=Math.abs(Tt-ot)!==1,Pe=0;Pe<At.length;Pe+=1){var ve=rt(Ze[Pe]),Fe=rt(At[Pe]);if(ve!==Fe){et=Pe,Oe=Oe||ve!==rt(At[Pe+1]);break}}return et===null?null:{index:et,multiple:Oe}}function ye(Yt,tn,Gt){var Tt=yt.useState(Yt),ot=(0,Ke.Z)(Tt,2),Ze=ot[0],At=ot[1],Dt=yt.useState(null),rt=(0,Ke.Z)(Dt,2),et=rt[0],Oe=rt[1];return yt.useEffect(function(){var Pe=fe(Ze||[],Yt||[],tn);(Pe==null?void 0:Pe.index)!==void 0&&(Gt==null||Gt(Pe.index),Oe(Yt[Pe.index])),At(Yt)},[Yt]),[et]}var be=pe(16089),Te=(typeof navigator=="undefined"?"undefined":(0,Re.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Be=Te,ze=function(Yt,tn,Gt,Tt){var ot=(0,yt.useRef)(!1),Ze=(0,yt.useRef)(null);function At(){clearTimeout(Ze.current),ot.current=!0,Ze.current=setTimeout(function(){ot.current=!1},50)}var Dt=(0,yt.useRef)({top:Yt,bottom:tn,left:Gt,right:Tt});return Dt.current.top=Yt,Dt.current.bottom=tn,Dt.current.left=Gt,Dt.current.right=Tt,function(rt,et){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Pe=rt?et<0&&Dt.current.left||et>0&&Dt.current.right:et<0&&Dt.current.top||et>0&&Dt.current.bottom;return Oe&&Pe?(clearTimeout(Ze.current),ot.current=!1):(!Pe||ot.current)&&At(),!ot.current&&Pe}};function Ge(Yt,tn,Gt,Tt,ot,Ze,At){var Dt=(0,yt.useRef)(0),rt=(0,yt.useRef)(null),et=(0,yt.useRef)(null),Oe=(0,yt.useRef)(!1),Pe=ze(tn,Gt,Tt,ot);function ve(un,Pt){if(be.Z.cancel(rt.current),!Pe(!1,Pt)){var qt=un;if(!qt._virtualHandled)qt._virtualHandled=!0;else return;Dt.current+=Pt,et.current=Pt,Be||qt.preventDefault(),rt.current=(0,be.Z)(function(){var Mn=Oe.current?10:1;At(Dt.current*Mn,!1),Dt.current=0})}}function Fe(un,Pt){At(Pt,!0),Be||un.preventDefault()}var We=(0,yt.useRef)(null),Ne=(0,yt.useRef)(null);function ft(un){if(Yt){be.Z.cancel(Ne.current),Ne.current=(0,be.Z)(function(){We.current=null},2);var Pt=un.deltaX,qt=un.deltaY,Mn=un.shiftKey,hn=Pt,fn=qt;(We.current==="sx"||!We.current&&Mn&&qt&&!Pt)&&(hn=qt,fn=0,We.current="sx");var ui=Math.abs(hn),gi=Math.abs(fn);We.current===null&&(We.current=Ze&&ui>gi?"x":"y"),We.current==="y"?ve(un,fn):Fe(un,hn)}}function sn(un){Yt&&(Oe.current=un.detail===et.current)}return[ft,sn]}function nt(Yt,tn,Gt,Tt){var ot=yt.useMemo(function(){return[new Map,[]]},[Yt,Gt.id,Tt]),Ze=(0,Ke.Z)(ot,2),At=Ze[0],Dt=Ze[1],rt=function(Oe){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Oe,ve=At.get(Oe),Fe=At.get(Pe);if(ve===void 0||Fe===void 0)for(var We=Yt.length,Ne=Dt.length;Ne<We;Ne+=1){var ft,sn=Yt[Ne],un=tn(sn);At.set(un,Ne);var Pt=(ft=Gt.get(un))!==null&&ft!==void 0?ft:Tt;if(Dt[Ne]=(Dt[Ne-1]||0)+Pt,un===Oe&&(ve=Ne),un===Pe&&(Fe=Ne),ve!==void 0&&Fe!==void 0)break}return{top:Dt[ve-1]||0,bottom:Dt[Fe]}};return rt}var Je=pe(52884),xt=pe(95727),He=function(){function Yt(){(0,Je.Z)(this,Yt),(0,dt.Z)(this,"maps",void 0),(0,dt.Z)(this,"id",0),(0,dt.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,xt.Z)(Yt,[{key:"set",value:function(Gt,Tt){this.maps[Gt]=Tt,this.id+=1,this.diffKeys.add(Gt)}},{key:"get",value:function(Gt){return this.maps[Gt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Yt}(),Et=He;function tt(Yt){var tn=parseFloat(Yt);return isNaN(tn)?0:tn}function Ot(Yt,tn,Gt){var Tt=yt.useState(0),ot=(0,Ke.Z)(Tt,2),Ze=ot[0],At=ot[1],Dt=(0,yt.useRef)(new Map),rt=(0,yt.useRef)(new Et),et=(0,yt.useRef)(0);function Oe(){et.current+=1}function Pe(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Oe();var We=function(){var sn=!1;Dt.current.forEach(function(un,Pt){if(un&&un.offsetParent){var qt=un.offsetHeight,Mn=getComputedStyle(un),hn=Mn.marginTop,fn=Mn.marginBottom,ui=tt(hn),gi=tt(fn),fi=qt+ui+gi;rt.current.get(Pt)!==fi&&(rt.current.set(Pt,fi),sn=!0)}}),sn&&At(function(un){return un+1})};if(Fe)We();else{et.current+=1;var Ne=et.current;Promise.resolve().then(function(){Ne===et.current&&We()})}}function ve(Fe,We){var Ne=Yt(Fe),ft=Dt.current.get(Ne);We?(Dt.current.set(Ne,We),Pe()):Dt.current.delete(Ne),!ft!=!We&&(We?tn==null||tn(Fe):Gt==null||Gt(Fe))}return(0,yt.useEffect)(function(){return Oe},[]),[ve,Pe,rt.current,Ze]}var gt=14/15;function Ht(Yt,tn,Gt){var Tt=(0,yt.useRef)(!1),ot=(0,yt.useRef)(0),Ze=(0,yt.useRef)(0),At=(0,yt.useRef)(null),Dt=(0,yt.useRef)(null),rt,et=function(Fe){if(Tt.current){var We=Math.ceil(Fe.touches[0].pageX),Ne=Math.ceil(Fe.touches[0].pageY),ft=ot.current-We,sn=Ze.current-Ne,un=Math.abs(ft)>Math.abs(sn);un?ot.current=We:Ze.current=Ne;var Pt=Gt(un,un?ft:sn,!1,Fe);Pt&&Fe.preventDefault(),clearInterval(Dt.current),Pt&&(Dt.current=setInterval(function(){un?ft*=gt:sn*=gt;var qt=Math.floor(un?ft:sn);(!Gt(un,qt,!0)||Math.abs(qt)<=.1)&&clearInterval(Dt.current)},16))}},Oe=function(){Tt.current=!1,rt()},Pe=function(Fe){rt(),Fe.touches.length===1&&!Tt.current&&(Tt.current=!0,ot.current=Math.ceil(Fe.touches[0].pageX),Ze.current=Math.ceil(Fe.touches[0].pageY),At.current=Fe.target,At.current.addEventListener("touchmove",et,{passive:!1}),At.current.addEventListener("touchend",Oe,{passive:!0}))};rt=function(){At.current&&(At.current.removeEventListener("touchmove",et),At.current.removeEventListener("touchend",Oe))},(0,lt.Z)(function(){return Yt&&tn.current.addEventListener("touchstart",Pe,{passive:!0}),function(){var ve;(ve=tn.current)===null||ve===void 0||ve.removeEventListener("touchstart",Pe),rt(),clearInterval(Dt.current)}},[Yt])}function Xt(Yt){return Math.floor(Math.pow(Yt,.5))}function Ut(Yt,tn){var Gt="touches"in Yt?Yt.touches[0]:Yt;return Gt[tn?"pageX":"pageY"]-window[tn?"scrollX":"scrollY"]}function it(Yt,tn,Gt){yt.useEffect(function(){var Tt=tn.current;if(Yt&&Tt){var ot=!1,Ze,At,Dt=function(){be.Z.cancel(Ze)},rt=function ve(){Dt(),Ze=(0,be.Z)(function(){Gt(At),ve()})},et=function(Fe){if(!(Fe.target.draggable||Fe.button!==0)){var We=Fe;We._virtualHandled||(We._virtualHandled=!0,ot=!0)}},Oe=function(){ot=!1,Dt()},Pe=function(Fe){if(ot){var We=Ut(Fe,!1),Ne=Tt.getBoundingClientRect(),ft=Ne.top,sn=Ne.bottom;if(We<=ft){var un=ft-We;At=-Xt(un),rt()}else if(We>=sn){var Pt=We-sn;At=Xt(Pt),rt()}else Dt()}};return Tt.addEventListener("mousedown",et),Tt.ownerDocument.addEventListener("mouseup",Oe),Tt.ownerDocument.addEventListener("mousemove",Pe),function(){Tt.removeEventListener("mousedown",et),Tt.ownerDocument.removeEventListener("mouseup",Oe),Tt.ownerDocument.removeEventListener("mousemove",Pe),Dt()}}},[Yt])}var _e=10;function Wt(Yt,tn,Gt,Tt,ot,Ze,At,Dt){var rt=yt.useRef(),et=yt.useState(null),Oe=(0,Ke.Z)(et,2),Pe=Oe[0],ve=Oe[1];return(0,lt.Z)(function(){if(Pe&&Pe.times<_e){if(!Yt.current){ve(function(Kn){return(0,Ve.Z)({},Kn)});return}Ze();var Fe=Pe.targetAlign,We=Pe.originAlign,Ne=Pe.index,ft=Pe.offset,sn=Yt.current.clientHeight,un=!1,Pt=Fe,qt=null;if(sn){for(var Mn=Fe||We,hn=0,fn=0,ui=0,gi=Math.min(tn.length-1,Ne),fi=0;fi<=gi;fi+=1){var bi=ot(tn[fi]);fn=hn;var _i=Gt.get(bi);ui=fn+(_i===void 0?Tt:_i),hn=ui}for(var rr=Mn==="top"?ft:sn-ft,Wi=gi;Wi>=0;Wi-=1){var vr=ot(tn[Wi]),fr=Gt.get(vr);if(fr===void 0){un=!0;break}if(rr-=fr,rr<=0)break}switch(Mn){case"top":qt=fn-ft;break;case"bottom":qt=ui-sn+ft;break;default:{var zi=Yt.current.scrollTop,Er=zi+sn;fn<zi?Pt="top":ui>Er&&(Pt="bottom")}}qt!==null&&At(qt),qt!==Pe.lastTop&&(un=!0)}un&&ve((0,Ve.Z)((0,Ve.Z)({},Pe),{},{times:Pe.times+1,targetAlign:Pt,lastTop:qt}))}},[Pe,Yt.current]),function(Fe){if(Fe==null){Dt();return}if(be.Z.cancel(rt.current),typeof Fe=="number")At(Fe);else if(Fe&&(0,Re.Z)(Fe)==="object"){var We,Ne=Fe.align;"index"in Fe?We=Fe.index:We=tn.findIndex(function(un){return ot(un)===Fe.key});var ft=Fe.offset,sn=ft===void 0?0:ft;ve({times:0,index:We,offset:sn,originAlign:Ne})}}}var Dn=yt.forwardRef(function(Yt,tn){var Gt=Yt.prefixCls,Tt=Yt.rtl,ot=Yt.scrollOffset,Ze=Yt.scrollRange,At=Yt.onStartMove,Dt=Yt.onStopMove,rt=Yt.onScroll,et=Yt.horizontal,Oe=Yt.spinSize,Pe=Yt.containerSize,ve=Yt.style,Fe=Yt.thumbStyle,We=Yt.showScrollBar,Ne=yt.useState(!1),ft=(0,Ke.Z)(Ne,2),sn=ft[0],un=ft[1],Pt=yt.useState(null),qt=(0,Ke.Z)(Pt,2),Mn=qt[0],hn=qt[1],fn=yt.useState(null),ui=(0,Ke.Z)(fn,2),gi=ui[0],fi=ui[1],bi=!Tt,_i=yt.useRef(),rr=yt.useRef(),Wi=yt.useState(We),vr=(0,Ke.Z)(Wi,2),fr=vr[0],zi=vr[1],Er=yt.useRef(),Kn=function(){We===!0||We===!1||(clearTimeout(Er.current),zi(!0),Er.current=setTimeout(function(){zi(!1)},3e3))},Le=Ze-Pe||0,Ei=Pe-Oe||0,Ri=yt.useMemo(function(){if(ot===0||Le===0)return 0;var Ye=ot/Le;return Ye*Ei},[ot,Le,Ei]),an=function(nn){nn.stopPropagation(),nn.preventDefault()},di=yt.useRef({top:Ri,dragging:sn,pageY:Mn,startTop:gi});di.current={top:Ri,dragging:sn,pageY:Mn,startTop:gi};var yi=function(nn){un(!0),hn(Ut(nn,et)),fi(di.current.top),At(),nn.stopPropagation(),nn.preventDefault()};yt.useEffect(function(){var Ye=function(at){at.preventDefault()},nn=_i.current,xn=rr.current;return nn.addEventListener("touchstart",Ye,{passive:!1}),xn.addEventListener("touchstart",yi,{passive:!1}),function(){nn.removeEventListener("touchstart",Ye),xn.removeEventListener("touchstart",yi)}},[]);var Li=yt.useRef();Li.current=Le;var On=yt.useRef();On.current=Ei,yt.useEffect(function(){if(sn){var Ye,nn=function(at){var cn=di.current,Nn=cn.dragging,kn=cn.pageY,Jn=cn.startTop;be.Z.cancel(Ye);var St=_i.current.getBoundingClientRect(),An=Pe/(et?St.width:St.height);if(Nn){var qn=(Ut(at,et)-kn)*An,Si=Jn;!bi&&et?Si-=qn:Si+=qn;var rn=Li.current,bn=On.current,Ft=bn?Si/bn:0,Pn=Math.ceil(Ft*rn);Pn=Math.max(Pn,0),Pn=Math.min(Pn,rn),Ye=(0,be.Z)(function(){rt(Pn,et)})}},xn=function(){un(!1),Dt()};return window.addEventListener("mousemove",nn,{passive:!0}),window.addEventListener("touchmove",nn,{passive:!0}),window.addEventListener("mouseup",xn,{passive:!0}),window.addEventListener("touchend",xn,{passive:!0}),function(){window.removeEventListener("mousemove",nn),window.removeEventListener("touchmove",nn),window.removeEventListener("mouseup",xn),window.removeEventListener("touchend",xn),be.Z.cancel(Ye)}}},[sn]),yt.useEffect(function(){return Kn(),function(){clearTimeout(Er.current)}},[ot]),yt.useImperativeHandle(tn,function(){return{delayHidden:Kn}});var Un="".concat(Gt,"-scrollbar"),It={position:"absolute",visibility:fr?null:"hidden"},Kt={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return et?(It.height=8,It.left=0,It.right=0,It.bottom=0,Kt.height="100%",Kt.width=Oe,bi?Kt.left=Ri:Kt.right=Ri):(It.width=8,It.top=0,It.bottom=0,bi?It.right=0:It.left=0,Kt.width="100%",Kt.height=Oe,Kt.top=Ri),yt.createElement("div",{ref:_i,className:kt()(Un,(0,dt.Z)((0,dt.Z)((0,dt.Z)({},"".concat(Un,"-horizontal"),et),"".concat(Un,"-vertical"),!et),"".concat(Un,"-visible"),fr)),style:(0,Ve.Z)((0,Ve.Z)({},It),ve),onMouseDown:an,onMouseMove:Kn},yt.createElement("div",{ref:rr,className:kt()("".concat(Un,"-thumb"),(0,dt.Z)({},"".concat(Un,"-thumb-moving"),sn)),style:(0,Ve.Z)((0,Ve.Z)({},Kt),Fe),onMouseDown:yi}))}),Bn=Dn,$t=20;function ln(){var Yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Gt=Yt/tn*Yt;return isNaN(Gt)&&(Gt=0),Gt=Math.max(Gt,$t),Math.floor(Gt)}var Tn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],ei=[],Ln={overflowY:"auto",overflowAnchor:"none"};function Yn(Yt,tn){var Gt=Yt.prefixCls,Tt=Gt===void 0?"rc-virtual-list":Gt,ot=Yt.className,Ze=Yt.height,At=Yt.itemHeight,Dt=Yt.fullHeight,rt=Dt===void 0?!0:Dt,et=Yt.style,Oe=Yt.data,Pe=Yt.children,ve=Yt.itemKey,Fe=Yt.virtual,We=Yt.direction,Ne=Yt.scrollWidth,ft=Yt.component,sn=ft===void 0?"div":ft,un=Yt.onScroll,Pt=Yt.onVirtualScroll,qt=Yt.onVisibleChange,Mn=Yt.innerProps,hn=Yt.extraRender,fn=Yt.styles,ui=Yt.showScrollBar,gi=ui===void 0?"optional":ui,fi=(0,st.Z)(Yt,Tn),bi=yt.useCallback(function(Lr){return typeof ve=="function"?ve(Lr):Lr==null?void 0:Lr[ve]},[ve]),_i=Ot(bi,null,null),rr=(0,Ke.Z)(_i,4),Wi=rr[0],vr=rr[1],fr=rr[2],zi=rr[3],Er=!!(Fe!==!1&&Ze&&At),Kn=yt.useMemo(function(){return Object.values(fr.maps).reduce(function(Lr,Fr){return Lr+Fr},0)},[fr.id,fr.maps]),Le=Er&&Oe&&(Math.max(At*Oe.length,Kn)>Ze||!!Ne),Ei=We==="rtl",Ri=kt()(Tt,(0,dt.Z)({},"".concat(Tt,"-rtl"),Ei),ot),an=Oe||ei,di=(0,yt.useRef)(),yi=(0,yt.useRef)(),Li=(0,yt.useRef)(),On=(0,yt.useState)(0),Un=(0,Ke.Z)(On,2),It=Un[0],Kt=Un[1],Ye=(0,yt.useState)(0),nn=(0,Ke.Z)(Ye,2),xn=nn[0],Nt=nn[1],at=(0,yt.useState)(!1),cn=(0,Ke.Z)(at,2),Nn=cn[0],kn=cn[1],Jn=function(){kn(!0)},St=function(){kn(!1)},An={getKey:bi};function qn(Lr){Kt(function(Fr){var uo;typeof Lr=="function"?uo=Lr(Fr):uo=Lr;var qr=Qi(uo);return di.current.scrollTop=qr,qr})}var Si=(0,yt.useRef)({start:0,end:an.length}),rn=(0,yt.useRef)(),bn=ye(an,bi),Ft=(0,Ke.Z)(bn,1),Pn=Ft[0];rn.current=Pn;var yn=yt.useMemo(function(){if(!Er)return{scrollHeight:void 0,start:0,end:an.length-1,offset:void 0};if(!Le){var Lr;return{scrollHeight:((Lr=yi.current)===null||Lr===void 0?void 0:Lr.offsetHeight)||0,start:0,end:an.length-1,offset:void 0}}for(var Fr=0,uo,qr,zo,Ro=an.length,Mr=0;Mr<Ro;Mr+=1){var Nr=an[Mr],pi=bi(Nr),Tr=fr.get(pi),Bo=Fr+(Tr===void 0?At:Tr);Bo>=It&&uo===void 0&&(uo=Mr,qr=Fr),Bo>It+Ze&&zo===void 0&&(zo=Mr),Fr=Bo}return uo===void 0&&(uo=0,qr=0,zo=Math.ceil(Ze/At)),zo===void 0&&(zo=an.length-1),zo=Math.min(zo+1,an.length-1),{scrollHeight:Fr,start:uo,end:zo,offset:qr}},[Le,Er,It,an,zi,Ze]),Sn=yn.scrollHeight,Gn=yn.start,Zn=yn.end,Qn=yn.offset;Si.current.start=Gn,Si.current.end=Zn,yt.useLayoutEffect(function(){var Lr=fr.getRecord();if(Lr.size===1){var Fr=Array.from(Lr)[0],uo=an[Gn];if(uo){var qr=bi(uo);if(qr===Fr){var zo=fr.get(Fr),Ro=zo-At;qn(function(Mr){return Mr+Ro})}}}fr.resetRecord()},[Sn]);var ii=yt.useState({width:0,height:Ze}),ji=(0,Ke.Z)(ii,2),pn=ji[0],Ji=ji[1],Ki=function(Fr){Ji({width:Fr.offsetWidth,height:Fr.offsetHeight})},Gi=(0,yt.useRef)(),gn=(0,yt.useRef)(),oi=yt.useMemo(function(){return ln(pn.width,Ne)},[pn.width,Ne]),Bi=yt.useMemo(function(){return ln(pn.height,Sn)},[pn.height,Sn]),$i=Sn-Ze,Ti=(0,yt.useRef)($i);Ti.current=$i;function Qi(Lr){var Fr=Lr;return Number.isNaN(Ti.current)||(Fr=Math.min(Fr,Ti.current)),Fr=Math.max(Fr,0),Fr}var pr=It<=0,hr=It>=$i,Vi=xn<=0,xr=xn>=Ne,Rn=ze(pr,hr,Vi,xr),Br=function(){return{x:Ei?-xn:xn,y:It}},_n=(0,yt.useRef)(Br()),Or=(0,Ue.useEvent)(function(Lr){if(Pt){var Fr=(0,Ve.Z)((0,Ve.Z)({},Br()),Lr);(_n.current.x!==Fr.x||_n.current.y!==Fr.y)&&(Pt(Fr),_n.current=Fr)}});function no(Lr,Fr){var uo=Lr;Fr?((0,jt.flushSync)(function(){Nt(uo)}),Or()):qn(uo)}function br(Lr){var Fr=Lr.currentTarget.scrollTop;Fr!==It&&qn(Fr),un==null||un(Lr),Or()}var mo=function(Fr){var uo=Fr,qr=Ne?Ne-pn.width:0;return uo=Math.max(uo,0),uo=Math.min(uo,qr),uo},Jr=(0,Ue.useEvent)(function(Lr,Fr){Fr?((0,jt.flushSync)(function(){Nt(function(uo){var qr=uo+(Ei?-Lr:Lr);return mo(qr)})}),Or()):qn(function(uo){var qr=uo+Lr;return qr})}),ur=Ge(Er,pr,hr,Vi,xr,!!Ne,Jr),er=(0,Ke.Z)(ur,2),qi=er[0],Rr=er[1];Ht(Er,di,function(Lr,Fr,uo,qr){var zo=qr;return Rn(Lr,Fr,uo)?!1:!zo||!zo._virtualHandled?(zo&&(zo._virtualHandled=!0),qi({preventDefault:function(){},deltaX:Lr?Fr:0,deltaY:Lr?0:Fr}),!0):!1}),it(Le,di,function(Lr){qn(function(Fr){return Fr+Lr})}),(0,lt.Z)(function(){function Lr(uo){var qr=pr&&uo.detail<0,zo=hr&&uo.detail>0;Er&&!qr&&!zo&&uo.preventDefault()}var Fr=di.current;return Fr.addEventListener("wheel",qi,{passive:!1}),Fr.addEventListener("DOMMouseScroll",Rr,{passive:!0}),Fr.addEventListener("MozMousePixelScroll",Lr,{passive:!1}),function(){Fr.removeEventListener("wheel",qi),Fr.removeEventListener("DOMMouseScroll",Rr),Fr.removeEventListener("MozMousePixelScroll",Lr)}},[Er,pr,hr]),(0,lt.Z)(function(){if(Ne){var Lr=mo(xn);Nt(Lr),Or({x:Lr})}},[pn.width,Ne]);var Ii=function(){var Fr,uo;(Fr=Gi.current)===null||Fr===void 0||Fr.delayHidden(),(uo=gn.current)===null||uo===void 0||uo.delayHidden()},Qe=Wt(di,an,fr,At,bi,function(){return vr(!0)},qn,Ii);yt.useImperativeHandle(tn,function(){return{nativeElement:Li.current,getScrollInfo:Br,scrollTo:function(Fr){function uo(qr){return qr&&(0,Re.Z)(qr)==="object"&&("left"in qr||"top"in qr)}uo(Fr)?(Fr.left!==void 0&&Nt(mo(Fr.left)),Qe(Fr.top)):Qe(Fr)}}}),(0,lt.Z)(function(){if(qt){var Lr=an.slice(Gn,Zn+1);qt(Lr,an)}},[Gn,Zn,an]);var Qr=nt(an,bi,fr,At),lo=hn==null?void 0:hn({start:Gn,end:Zn,virtual:Le,offsetX:xn,offsetY:Qn,rtl:Ei,getSize:Qr}),jr=ce(an,Gn,Zn,Ne,xn,Wi,Pe,An),vo=null;Ze&&(vo=(0,Ve.Z)((0,dt.Z)({},rt?"height":"maxHeight",Ze),Ln),Er&&(vo.overflowY="hidden",Ne&&(vo.overflowX="hidden"),Nn&&(vo.pointerEvents="none")));var po={};return Ei&&(po.dir="rtl"),yt.createElement("div",(0,ge.Z)({ref:Li,style:(0,Ve.Z)((0,Ve.Z)({},et),{},{position:"relative"}),className:Ri},po,fi),yt.createElement(bt.Z,{onResize:Ki},yt.createElement(sn,{className:"".concat(Tt,"-holder"),style:vo,ref:di,onScroll:br,onMouseEnter:Ii},yt.createElement(ne,{prefixCls:Tt,height:Sn,offsetX:xn,offsetY:Qn,scrollWidth:Ne,onInnerResize:vr,ref:yi,innerProps:Mn,rtl:Ei,extra:lo},jr))),Le&&Sn>Ze&&yt.createElement(Bn,{ref:Gi,prefixCls:Tt,scrollOffset:It,scrollRange:Sn,rtl:Ei,onScroll:no,onStartMove:Jn,onStopMove:St,spinSize:Bi,containerSize:pn.height,style:fn==null?void 0:fn.verticalScrollBar,thumbStyle:fn==null?void 0:fn.verticalScrollBarThumb,showScrollBar:gi}),Le&&Ne>pn.width&&yt.createElement(Bn,{ref:gn,prefixCls:Tt,scrollOffset:xn,scrollRange:Ne,rtl:Ei,onScroll:no,onStartMove:Jn,onStopMove:St,spinSize:oi,containerSize:pn.width,horizontal:!0,style:fn==null?void 0:fn.horizontalScrollBar,thumbStyle:fn==null?void 0:fn.horizontalScrollBarThumb,showScrollBar:gi}))}var zt=yt.forwardRef(Yn);zt.displayName="List";var wn=zt,$n=wn},54203:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z5:function(){return wg},_l:function(){return Nl},bK:function(){return Zu}});var ge=pe(59301),Re=pe(75229);function Ve(xe,Ce){xe.prototype=Object.create(Ce.prototype),xe.prototype.constructor=xe,(0,Re.Z)(xe,Ce)}var dt=pe(96663),Ke=pe(59781),st=ge.createContext(null),Me=null;function kt(xe){xe()}var bt=kt,Ue=function(Ce){return bt=Ce},lt=function(){return bt};function yt(){var xe=lt(),Ce=null,ke=null;return{clear:function(){Ce=null,ke=null},notify:function(){xe(function(){for(var vt=Ce;vt;)vt.callback(),vt=vt.next})},get:function(){for(var vt=[],pt=Ce;pt;)vt.push(pt),pt=pt.next;return vt},subscribe:function(vt){var pt=!0,Bt=ke={callback:vt,next:null,prev:ke};return Bt.prev?Bt.prev.next=Bt:Ce=Bt,function(){!pt||Ce===null||(pt=!1,Bt.next?Bt.next.prev=Bt.prev:ke=Bt.prev,Bt.prev?Bt.prev.next=Bt.next:Ce=Bt.next)}}}}var jt={notify:function(){},get:function(){return[]}};function Ae(xe,Ce){var ke,$e=jt;function vt(jn){return Fn(),$e.subscribe(jn)}function pt(){$e.notify()}function Bt(){Wn.onStateChange&&Wn.onStateChange()}function Vt(){return!!ke}function Fn(){ke||(ke=Ce?Ce.addNestedSub(Bt):xe.subscribe(Bt),$e=yt())}function Xn(){ke&&(ke(),ke=void 0,$e.clear(),$e=jt)}var Wn={addNestedSub:vt,notifyNestedSubs:pt,handleChangeWrapper:Bt,isSubscribed:Vt,trySubscribe:Fn,tryUnsubscribe:Xn,getListeners:function(){return $e}};return Wn}var ne=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?ge.useLayoutEffect:ge.useEffect;function ee(xe){var Ce=xe.store,ke=xe.context,$e=xe.children,vt=(0,ge.useMemo)(function(){var Vt=Ae(Ce);return{store:Ce,subscription:Vt}},[Ce]),pt=(0,ge.useMemo)(function(){return Ce.getState()},[Ce]);ne(function(){var Vt=vt.subscription;return Vt.onStateChange=Vt.notifyNestedSubs,Vt.trySubscribe(),pt!==Ce.getState()&&Vt.notifyNestedSubs(),function(){Vt.tryUnsubscribe(),Vt.onStateChange=null}},[vt,pt]);var Bt=ke||st;return ge.createElement(Bt.Provider,{value:vt},$e)}var ce=ee,se=pe(30176),fe=pe(94266),ye=pe.n(fe),be=pe(53410),Te=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Be=["reactReduxForwardedRef"],ze=[],Ge=[null,null],nt=function(Ce){try{return JSON.stringify(Ce)}catch(ke){return String(Ce)}};function Je(xe,Ce){var ke=xe[1];return[Ce.payload,ke+1]}function xt(xe,Ce,ke){ne(function(){return xe.apply(void 0,Ce)},ke)}function He(xe,Ce,ke,$e,vt,pt,Bt){xe.current=$e,Ce.current=vt,ke.current=!1,pt.current&&(pt.current=null,Bt())}function Et(xe,Ce,ke,$e,vt,pt,Bt,Vt,Fn,Xn){if(xe){var Wn=!1,jn=null,In=function(){if(!Wn){var Ar=Ce.getState(),Hr,to;try{Hr=$e(Ar,vt.current)}catch(ho){to=ho,jn=ho}to||(jn=null),Hr===pt.current?Bt.current||Fn():(pt.current=Hr,Vt.current=Hr,Bt.current=!0,Xn({type:"STORE_UPDATED",payload:{error:to}}))}};ke.onStateChange=In,ke.trySubscribe(),In();var ri=function(){if(Wn=!0,ke.tryUnsubscribe(),ke.onStateChange=null,jn)throw jn};return ri}}var tt=function(){return[null,0]};function Ot(xe,Ce){Ce===void 0&&(Ce={});var ke=Ce,$e=ke.getDisplayName,vt=$e===void 0?function(va){return"ConnectAdvanced("+va+")"}:$e,pt=ke.methodName,Bt=pt===void 0?"connectAdvanced":pt,Vt=ke.renderCountProp,Fn=Vt===void 0?void 0:Vt,Xn=ke.shouldHandleStateChanges,Wn=Xn===void 0?!0:Xn,jn=ke.storeKey,In=jn===void 0?"store":jn,ri=ke.withRef,ki=ri===void 0?!1:ri,Ar=ke.forwardRef,Hr=Ar===void 0?!1:Ar,to=ke.context,ho=to===void 0?st:to,Lo=(0,se.Z)(ke,Te);if(0)var bo;var Uo=ho;return function(Ka){var pl=Ka.displayName||Ka.name||"Component",Wa=vt(pl),ol=(0,dt.Z)({},Lo,{getDisplayName:vt,methodName:Bt,renderCountProp:Fn,shouldHandleStateChanges:Wn,storeKey:In,displayName:Wa,wrappedComponentName:pl,WrappedComponent:Ka}),nu=Lo.pure;function yu(Xs){return xe(Xs.dispatch,ol)}var Wc=nu?ge.useMemo:function(Xs){return Xs()};function Ju(Xs){var fd=(0,ge.useMemo)(function(){var Qs=Xs.reactReduxForwardedRef,dc=(0,se.Z)(Xs,Be);return[Xs.context,Qs,dc]},[Xs]),al=fd[0],Gc=fd[1],hf=fd[2],$c=(0,ge.useMemo)(function(){return al&&al.Consumer&&(0,be.isContextConsumer)(ge.createElement(al.Consumer,null))?al:Uo},[al,Uo]),Oo=(0,ge.useContext)($c),Rh=!!Xs.store&&!!Xs.store.getState&&!!Xs.store.dispatch,Fg=!!Oo&&!!Oo.store,Kc=Rh?Xs.store:Oo.store,Od=(0,ge.useMemo)(function(){return yu(Kc)},[Kc]),fh=(0,ge.useMemo)(function(){if(!Wn)return Ge;var Qs=Ae(Kc,Rh?null:Oo.subscription),dc=Qs.notifyNestedSubs.bind(Qs);return[Qs,dc]},[Kc,Rh,Oo]),Gu=fh[0],_f=fh[1],Xf=(0,ge.useMemo)(function(){return Rh?Oo:(0,dt.Z)({},Oo,{subscription:Gu})},[Rh,Oo,Gu]),op=(0,ge.useReducer)(Je,ze,tt),Gp=op[0],Ag=Gp[0],ff=op[1];if(Ag&&Ag.error)throw Ag.error;var ap=(0,ge.useRef)(),Dg=(0,ge.useRef)(hf),gf=(0,ge.useRef)(),pf=(0,ge.useRef)(!1),Bg=Wc(function(){return gf.current&&hf===Dg.current?gf.current:Od(Kc.getState(),hf)},[Kc,Ag,hf]);xt(He,[Dg,ap,pf,hf,Bg,gf,_f]),xt(Et,[Wn,Kc,Gu,Od,Dg,ap,pf,gf,_f,ff],[Kc,Gu,Od]);var oa=(0,ge.useMemo)(function(){return ge.createElement(Ka,(0,dt.Z)({},Bg,{ref:Gc}))},[Gc,Ka,Bg]),Su=(0,ge.useMemo)(function(){return Wn?ge.createElement($c.Provider,{value:Xf},oa):oa},[$c,oa,Xf]);return Su}var Wu=nu?ge.memo(Ju):Ju;if(Wu.WrappedComponent=Ka,Wu.displayName=Ju.displayName=Wa,Hr){var Al=ge.forwardRef(function(fd,al){return ge.createElement(Wu,(0,dt.Z)({},fd,{reactReduxForwardedRef:al}))});return Al.displayName=Wa,Al.WrappedComponent=Ka,ye()(Al,Ka)}return ye()(Wu,Ka)}}function gt(xe,Ce){return xe===Ce?xe!==0||Ce!==0||1/xe===1/Ce:xe!==xe&&Ce!==Ce}function Ht(xe,Ce){if(gt(xe,Ce))return!0;if(typeof xe!="object"||xe===null||typeof Ce!="object"||Ce===null)return!1;var ke=Object.keys(xe),$e=Object.keys(Ce);if(ke.length!==$e.length)return!1;for(var vt=0;vt<ke.length;vt++)if(!Object.prototype.hasOwnProperty.call(Ce,ke[vt])||!gt(xe[ke[vt]],Ce[ke[vt]]))return!1;return!0}function Xt(xe,Ce){var ke={},$e=function(Bt){var Vt=xe[Bt];typeof Vt=="function"&&(ke[Bt]=function(){return Ce(Vt.apply(void 0,arguments))})};for(var vt in xe)$e(vt);return ke}function Ut(xe){return function(ke,$e){var vt=xe(ke,$e);function pt(){return vt}return pt.dependsOnOwnProps=!1,pt}}function it(xe){return xe.dependsOnOwnProps!==null&&xe.dependsOnOwnProps!==void 0?!!xe.dependsOnOwnProps:xe.length!==1}function _e(xe,Ce){return function($e,vt){var pt=vt.displayName,Bt=function(Fn,Xn){return Bt.dependsOnOwnProps?Bt.mapToProps(Fn,Xn):Bt.mapToProps(Fn)};return Bt.dependsOnOwnProps=!0,Bt.mapToProps=function(Fn,Xn){Bt.mapToProps=xe,Bt.dependsOnOwnProps=it(xe);var Wn=Bt(Fn,Xn);return typeof Wn=="function"&&(Bt.mapToProps=Wn,Bt.dependsOnOwnProps=it(Wn),Wn=Bt(Fn,Xn)),Wn},Bt}}function Wt(xe){return typeof xe=="function"?_e(xe,"mapDispatchToProps"):void 0}function Dn(xe){return xe?void 0:Ut(function(Ce){return{dispatch:Ce}})}function Bn(xe){return xe&&typeof xe=="object"?Ut(function(Ce){return Xt(xe,Ce)}):void 0}var $t=[Wt,Dn,Bn];function ln(xe){return typeof xe=="function"?_e(xe,"mapStateToProps"):void 0}function Tn(xe){return xe?void 0:Ut(function(){return{}})}var ei=[ln,Tn];function Ln(xe,Ce,ke){return(0,dt.Z)({},ke,xe,Ce)}function Yn(xe){return function(ke,$e){var vt=$e.displayName,pt=$e.pure,Bt=$e.areMergedPropsEqual,Vt=!1,Fn;return function(Wn,jn,In){var ri=xe(Wn,jn,In);return Vt?(!pt||!Bt(ri,Fn))&&(Fn=ri):(Vt=!0,Fn=ri),Fn}}}function zt(xe){return typeof xe=="function"?Yn(xe):void 0}function wn(xe){return xe?void 0:function(){return Ln}}var $n=[zt,wn],Yt=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function tn(xe,Ce,ke,$e){return function(pt,Bt){return ke(xe(pt,Bt),Ce($e,Bt),Bt)}}function Gt(xe,Ce,ke,$e,vt){var pt=vt.areStatesEqual,Bt=vt.areOwnPropsEqual,Vt=vt.areStatePropsEqual,Fn=!1,Xn,Wn,jn,In,ri;function ki(Lo,bo){return Xn=Lo,Wn=bo,jn=xe(Xn,Wn),In=Ce($e,Wn),ri=ke(jn,In,Wn),Fn=!0,ri}function Ar(){return jn=xe(Xn,Wn),Ce.dependsOnOwnProps&&(In=Ce($e,Wn)),ri=ke(jn,In,Wn),ri}function Hr(){return xe.dependsOnOwnProps&&(jn=xe(Xn,Wn)),Ce.dependsOnOwnProps&&(In=Ce($e,Wn)),ri=ke(jn,In,Wn),ri}function to(){var Lo=xe(Xn,Wn),bo=!Vt(Lo,jn);return jn=Lo,bo&&(ri=ke(jn,In,Wn)),ri}function ho(Lo,bo){var Uo=!Bt(bo,Wn),va=!pt(Lo,Xn,bo,Wn);return Xn=Lo,Wn=bo,Uo&&va?Ar():Uo?Hr():va?to():ri}return function(bo,Uo){return Fn?ho(bo,Uo):ki(bo,Uo)}}function Tt(xe,Ce){var ke=Ce.initMapStateToProps,$e=Ce.initMapDispatchToProps,vt=Ce.initMergeProps,pt=(0,se.Z)(Ce,Yt),Bt=ke(xe,pt),Vt=$e(xe,pt),Fn=vt(xe,pt),Xn=pt.pure?Gt:tn;return Xn(Bt,Vt,Fn,xe,pt)}var ot=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function Ze(xe,Ce,ke){for(var $e=Ce.length-1;$e>=0;$e--){var vt=Ce[$e](xe);if(vt)return vt}return function(pt,Bt){throw new Error("Invalid value of type "+typeof xe+" for "+ke+" argument when connecting component "+Bt.wrappedComponentName+".")}}function At(xe,Ce){return xe===Ce}function Dt(xe){var Ce=xe===void 0?{}:xe,ke=Ce.connectHOC,$e=ke===void 0?Ot:ke,vt=Ce.mapStateToPropsFactories,pt=vt===void 0?ei:vt,Bt=Ce.mapDispatchToPropsFactories,Vt=Bt===void 0?$t:Bt,Fn=Ce.mergePropsFactories,Xn=Fn===void 0?$n:Fn,Wn=Ce.selectorFactory,jn=Wn===void 0?Tt:Wn;return function(ri,ki,Ar,Hr){Hr===void 0&&(Hr={});var to=Hr,ho=to.pure,Lo=ho===void 0?!0:ho,bo=to.areStatesEqual,Uo=bo===void 0?At:bo,va=to.areOwnPropsEqual,Ka=va===void 0?Ht:va,pl=to.areStatePropsEqual,Wa=pl===void 0?Ht:pl,ol=to.areMergedPropsEqual,nu=ol===void 0?Ht:ol,yu=(0,se.Z)(to,ot),Wc=Ze(ri,pt,"mapStateToProps"),Ju=Ze(ki,Vt,"mapDispatchToProps"),Wu=Ze(Ar,Xn,"mergeProps");return $e(jn,(0,dt.Z)({methodName:"connect",getDisplayName:function(Xs){return"Connect("+Xs+")"},shouldHandleStateChanges:!!ri,initMapStateToProps:Wc,initMapDispatchToProps:Ju,initMergeProps:Wu,pure:Lo,areStatesEqual:Uo,areOwnPropsEqual:Ka,areStatePropsEqual:Wa,areMergedPropsEqual:nu},yu))}}var rt=Dt();function et(){var xe=useContext(ReactReduxContext);return xe}function Oe(xe){xe===void 0&&(xe=ReactReduxContext);var Ce=xe===ReactReduxContext?useDefaultReduxContext:function(){return useContext(xe)};return function(){var $e=Ce(),vt=$e.store;return vt}}var Pe=null;function ve(xe){xe===void 0&&(xe=ReactReduxContext);var Ce=xe===ReactReduxContext?useDefaultStore:createStoreHook(xe);return function(){var $e=Ce();return $e.dispatch}}var Fe=null,We=function(Ce,ke){return Ce===ke};function Ne(xe,Ce,ke,$e){var vt=useReducer(function(ki){return ki+1},0),pt=vt[1],Bt=useMemo(function(){return createSubscription(ke,$e)},[ke,$e]),Vt=useRef(),Fn=useRef(),Xn=useRef(),Wn=useRef(),jn=ke.getState(),In;try{if(xe!==Fn.current||jn!==Xn.current||Vt.current){var ri=xe(jn);Wn.current===void 0||!Ce(ri,Wn.current)?In=ri:In=Wn.current}else In=Wn.current}catch(ki){throw Vt.current&&(ki.message+=`
|
|
|
The error may be correlated with this previous error:
|
|
|
`+Vt.current.stack+`
|
|
|
|
|
|
`),ki}return useIsomorphicLayoutEffect(function(){Fn.current=xe,Xn.current=jn,Wn.current=In,Vt.current=void 0}),useIsomorphicLayoutEffect(function(){function ki(){try{var Ar=ke.getState();if(Ar===Xn.current)return;var Hr=Fn.current(Ar);if(Ce(Hr,Wn.current))return;Wn.current=Hr,Xn.current=Ar}catch(to){Vt.current=to}pt()}return Bt.onStateChange=ki,Bt.trySubscribe(),ki(),function(){return Bt.tryUnsubscribe()}},[ke,Bt]),In}function ft(xe){xe===void 0&&(xe=ReactReduxContext);var Ce=xe===ReactReduxContext?useDefaultReduxContext:function(){return useContext(xe)};return function($e,vt){vt===void 0&&(vt=We);var pt=Ce(),Bt=pt.store,Vt=pt.subscription,Fn=Ne($e,vt,Bt,Vt);return useDebugValue(Fn),Fn}}var sn=null,un=pe(4676);Ue(un.unstable_batchedUpdates);function Pt(xe,Ce){if(xe.length!==Ce.length)return!1;for(var ke=0;ke<xe.length;ke++)if(xe[ke]!==Ce[ke])return!1;return!0}function qt(xe,Ce){var ke=(0,ge.useState)(function(){return{inputs:Ce,result:xe()}})[0],$e=(0,ge.useRef)(!0),vt=(0,ge.useRef)(ke),pt=$e.current||!!(Ce&&vt.current.inputs&&Pt(Ce,vt.current.inputs)),Bt=pt?vt.current:{inputs:Ce,result:xe()};return(0,ge.useEffect)(function(){$e.current=!1,vt.current=Bt},[Bt]),Bt.result}function Mn(xe,Ce){return qt(function(){return xe},Ce)}var hn=qt,fn=Mn,ui=!0,gi="Invariant failed";function fi(xe,Ce){if(!xe){if(ui)throw new Error(gi);var ke=typeof Ce=="function"?Ce():Ce,$e=ke?"".concat(gi,": ").concat(ke):gi;throw new Error($e)}}var bi=function(Ce){var ke=Ce.top,$e=Ce.right,vt=Ce.bottom,pt=Ce.left,Bt=$e-pt,Vt=vt-ke,Fn={top:ke,right:$e,bottom:vt,left:pt,width:Bt,height:Vt,x:pt,y:ke,center:{x:($e+pt)/2,y:(vt+ke)/2}};return Fn},_i=function(Ce,ke){return{top:Ce.top-ke.top,left:Ce.left-ke.left,bottom:Ce.bottom+ke.bottom,right:Ce.right+ke.right}},rr=function(Ce,ke){return{top:Ce.top+ke.top,left:Ce.left+ke.left,bottom:Ce.bottom-ke.bottom,right:Ce.right-ke.right}},Wi=function(Ce,ke){return{top:Ce.top+ke.y,left:Ce.left+ke.x,bottom:Ce.bottom+ke.y,right:Ce.right+ke.x}},vr={top:0,right:0,bottom:0,left:0},fr=function(Ce){var ke=Ce.borderBox,$e=Ce.margin,vt=$e===void 0?vr:$e,pt=Ce.border,Bt=pt===void 0?vr:pt,Vt=Ce.padding,Fn=Vt===void 0?vr:Vt,Xn=bi(_i(ke,vt)),Wn=bi(rr(ke,Bt)),jn=bi(rr(Wn,Fn));return{marginBox:Xn,borderBox:bi(ke),paddingBox:Wn,contentBox:jn,margin:vt,border:Bt,padding:Fn}},zi=function(Ce){var ke=Ce.slice(0,-2),$e=Ce.slice(-2);if($e!=="px")return 0;var vt=Number(ke);return isNaN(vt)&&fi(!1),vt},Er=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Kn=function(Ce,ke){var $e=Ce.borderBox,vt=Ce.border,pt=Ce.margin,Bt=Ce.padding,Vt=Wi($e,ke);return fr({borderBox:Vt,border:vt,margin:pt,padding:Bt})},Le=function(Ce,ke){return ke===void 0&&(ke=Er()),Kn(Ce,ke)},Ei=function(Ce,ke){var $e={top:zi(ke.marginTop),right:zi(ke.marginRight),bottom:zi(ke.marginBottom),left:zi(ke.marginLeft)},vt={top:zi(ke.paddingTop),right:zi(ke.paddingRight),bottom:zi(ke.paddingBottom),left:zi(ke.paddingLeft)},pt={top:zi(ke.borderTopWidth),right:zi(ke.borderRightWidth),bottom:zi(ke.borderBottomWidth),left:zi(ke.borderLeftWidth)};return fr({borderBox:Ce,margin:$e,padding:vt,border:pt})},Ri=function(Ce){var ke=Ce.getBoundingClientRect(),$e=window.getComputedStyle(Ce);return Ei(ke,$e)},an=Number.isNaN||function(Ce){return typeof Ce=="number"&&Ce!==Ce};function di(xe,Ce){return!!(xe===Ce||an(xe)&&an(Ce))}function yi(xe,Ce){if(xe.length!==Ce.length)return!1;for(var ke=0;ke<xe.length;ke++)if(!di(xe[ke],Ce[ke]))return!1;return!0}function Li(xe,Ce){Ce===void 0&&(Ce=yi);var ke,$e=[],vt,pt=!1;function Bt(){for(var Vt=[],Fn=0;Fn<arguments.length;Fn++)Vt[Fn]=arguments[Fn];return pt&&ke===this&&Ce(Vt,$e)||(vt=xe.apply(this,Vt),pt=!0,ke=this,$e=Vt),vt}return Bt}var On=Li,Un=function(Ce){var ke=[],$e=null,vt=function(){for(var Bt=arguments.length,Vt=new Array(Bt),Fn=0;Fn<Bt;Fn++)Vt[Fn]=arguments[Fn];ke=Vt,!$e&&($e=requestAnimationFrame(function(){$e=null,Ce.apply(void 0,ke)}))};return vt.cancel=function(){$e&&(cancelAnimationFrame($e),$e=null)},vt},It=Un,Kt=!0,Ye=/[ \t]{2,}/g,nn=/^[ \t]*/gm,xn=function(Ce){return Ce.replace(Ye," ").replace(nn,"").trim()},Nt=function(Ce){return xn(`
|
|
|
%creact-beautiful-dnd
|
|
|
|
|
|
%c`+xn(Ce)+`
|
|
|
|
|
|
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
|
|
|
`)},at=function(Ce){return[Nt(Ce),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},cn="__react-beautiful-dnd-disable-dev-warnings";function Nn(xe,Ce){var ke;Kt||typeof window!="undefined"&&window[cn]||(ke=console)[xe].apply(ke,at(Ce))}var kn=Nn.bind(null,"warn"),Jn=Nn.bind(null,"error");function St(){}function An(xe,Ce){return(0,dt.Z)({},xe,{},Ce)}function qn(xe,Ce,ke){var $e=Ce.map(function(vt){var pt=An(ke,vt.options);return xe.addEventListener(vt.eventName,vt.fn,pt),function(){xe.removeEventListener(vt.eventName,vt.fn,pt)}});return function(){$e.forEach(function(pt){pt()})}}var Si=!0,rn="Invariant failed";function bn(xe){this.message=xe}bn.prototype.toString=function(){return this.message};function Ft(xe,Ce){if(!xe)throw Si?new bn(rn):new bn(rn+": "+(Ce||""))}var Pn=function(xe){Ve(Ce,xe);function Ce(){for(var $e,vt=arguments.length,pt=new Array(vt),Bt=0;Bt<vt;Bt++)pt[Bt]=arguments[Bt];return $e=xe.call.apply(xe,[this].concat(pt))||this,$e.callbacks=null,$e.unbind=St,$e.onWindowError=function(Vt){var Fn=$e.getCallbacks();Fn.isDragging()&&Fn.tryAbort();var Xn=Vt.error;Xn instanceof bn&&Vt.preventDefault()},$e.getCallbacks=function(){if(!$e.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return $e.callbacks},$e.setCallbacks=function(Vt){$e.callbacks=Vt},$e}var ke=Ce.prototype;return ke.componentDidMount=function(){this.unbind=qn(window,[{eventName:"error",fn:this.onWindowError}])},ke.componentWillUnmount=function(){this.unbind()},ke.componentDidCatch=function(vt){if(vt instanceof bn){this.setState({});return}throw vt},ke.render=function(){return this.props.children(this.setCallbacks)},Ce}(ge.Component),yn=`
|
|
|
Press space bar to start a drag.
|
|
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
|
`,Sn=function(Ce){return Ce+1},Gn=function(Ce){return`
|
|
|
You have lifted an item in position `+Sn(Ce.source.index)+`
|
|
|
`},Zn=function(Ce,ke){var $e=Ce.droppableId===ke.droppableId,vt=Sn(Ce.index),pt=Sn(ke.index);return $e?`
|
|
|
You have moved the item from position `+vt+`
|
|
|
to position `+pt+`
|
|
|
`:`
|
|
|
You have moved the item from position `+vt+`
|
|
|
in list `+Ce.droppableId+`
|
|
|
to list `+ke.droppableId+`
|
|
|
in position `+pt+`
|
|
|
`},Qn=function(Ce,ke,$e){var vt=ke.droppableId===$e.droppableId;return vt?`
|
|
|
The item `+Ce+`
|
|
|
has been combined with `+$e.draggableId:`
|
|
|
The item `+Ce+`
|
|
|
in list `+ke.droppableId+`
|
|
|
has been combined with `+$e.draggableId+`
|
|
|
in list `+$e.droppableId+`
|
|
|
`},ii=function(Ce){var ke=Ce.destination;if(ke)return Zn(Ce.source,ke);var $e=Ce.combine;return $e?Qn(Ce.draggableId,Ce.source,$e):"You are over an area that cannot be dropped on"},ji=function(Ce){return`
|
|
|
The item has returned to its starting position
|
|
|
of `+Sn(Ce.index)+`
|
|
|
`},pn=function(Ce){if(Ce.reason==="CANCEL")return`
|
|
|
Movement cancelled.
|
|
|
`+ji(Ce.source)+`
|
|
|
`;var ke=Ce.destination,$e=Ce.combine;return ke?`
|
|
|
You have dropped the item.
|
|
|
`+Zn(Ce.source,ke)+`
|
|
|
`:$e?`
|
|
|
You have dropped the item.
|
|
|
`+Qn(Ce.draggableId,Ce.source,$e)+`
|
|
|
`:`
|
|
|
The item has been dropped while not over a drop area.
|
|
|
`+ji(Ce.source)+`
|
|
|
`},Ji={dragHandleUsageInstructions:yn,onDragStart:Gn,onDragUpdate:ii,onDragEnd:pn},Ki={x:0,y:0},Gi=function(Ce,ke){return{x:Ce.x+ke.x,y:Ce.y+ke.y}},gn=function(Ce,ke){return{x:Ce.x-ke.x,y:Ce.y-ke.y}},oi=function(Ce,ke){return Ce.x===ke.x&&Ce.y===ke.y},Bi=function(Ce){return{x:Ce.x!==0?-Ce.x:0,y:Ce.y!==0?-Ce.y:0}},$i=function(Ce,ke,$e){var vt;return $e===void 0&&($e=0),vt={},vt[Ce]=ke,vt[Ce==="x"?"y":"x"]=$e,vt},Ti=function(Ce,ke){return Math.sqrt(Math.pow(ke.x-Ce.x,2)+Math.pow(ke.y-Ce.y,2))},Qi=function(Ce,ke){return Math.min.apply(Math,ke.map(function($e){return Ti(Ce,$e)}))},pr=function(Ce){return function(ke){return{x:Ce(ke.x),y:Ce(ke.y)}}},hr=function(xe,Ce){var ke=bi({top:Math.max(Ce.top,xe.top),right:Math.min(Ce.right,xe.right),bottom:Math.min(Ce.bottom,xe.bottom),left:Math.max(Ce.left,xe.left)});return ke.width<=0||ke.height<=0?null:ke},Vi=function(Ce,ke){return{top:Ce.top+ke.y,left:Ce.left+ke.x,bottom:Ce.bottom+ke.y,right:Ce.right+ke.x}},xr=function(Ce){return[{x:Ce.left,y:Ce.top},{x:Ce.right,y:Ce.top},{x:Ce.left,y:Ce.bottom},{x:Ce.right,y:Ce.bottom}]},Rn={top:0,right:0,bottom:0,left:0},Br=function(Ce,ke){return ke?Vi(Ce,ke.scroll.diff.displacement):Ce},_n=function(Ce,ke,$e){if($e&&$e.increasedBy){var vt;return(0,dt.Z)({},Ce,(vt={},vt[ke.end]=Ce[ke.end]+$e.increasedBy[ke.line],vt))}return Ce},Or=function(Ce,ke){return ke&&ke.shouldClipSubject?hr(ke.pageMarginBox,Ce):bi(Ce)},no=function(xe){var Ce=xe.page,ke=xe.withPlaceholder,$e=xe.axis,vt=xe.frame,pt=Br(Ce.marginBox,vt),Bt=_n(pt,$e,ke),Vt=Or(Bt,vt);return{page:Ce,withPlaceholder:ke,active:Vt}},br=function(xe,Ce){xe.frame||Ft(!1);var ke=xe.frame,$e=gn(Ce,ke.scroll.initial),vt=Bi($e),pt=(0,dt.Z)({},ke,{scroll:{initial:ke.scroll.initial,current:Ce,diff:{value:$e,displacement:vt},max:ke.scroll.max}}),Bt=no({page:xe.subject.page,withPlaceholder:xe.subject.withPlaceholder,axis:xe.axis,frame:pt}),Vt=(0,dt.Z)({},xe,{frame:pt,subject:Bt});return Vt};function mo(xe){return Number.isInteger?Number.isInteger(xe):typeof xe=="number"&&isFinite(xe)&&Math.floor(xe)===xe}function Jr(xe){return Object.values?Object.values(xe):Object.keys(xe).map(function(Ce){return xe[Ce]})}function ur(xe,Ce){if(xe.findIndex)return xe.findIndex(Ce);for(var ke=0;ke<xe.length;ke++)if(Ce(xe[ke]))return ke;return-1}function er(xe,Ce){if(xe.find)return xe.find(Ce);var ke=ur(xe,Ce);if(ke!==-1)return xe[ke]}function qi(xe){return Array.prototype.slice.call(xe)}var Rr=On(function(xe){return xe.reduce(function(Ce,ke){return Ce[ke.descriptor.id]=ke,Ce},{})}),Ii=On(function(xe){return xe.reduce(function(Ce,ke){return Ce[ke.descriptor.id]=ke,Ce},{})}),Qe=On(function(xe){return Jr(xe)}),Qr=On(function(xe){return Jr(xe)}),lo=On(function(xe,Ce){var ke=Qr(Ce).filter(function($e){return xe===$e.descriptor.droppableId}).sort(function($e,vt){return $e.descriptor.index-vt.descriptor.index});return ke});function jr(xe){return xe.at&&xe.at.type==="REORDER"?xe.at.destination:null}function vo(xe){return xe.at&&xe.at.type==="COMBINE"?xe.at.combine:null}var po=On(function(xe,Ce){return Ce.filter(function(ke){return ke.descriptor.id!==xe.descriptor.id})}),Lr=function(xe){var Ce=xe.isMovingForward,ke=xe.draggable,$e=xe.destination,vt=xe.insideDestination,pt=xe.previousImpact;if(!$e.isCombineEnabled)return null;var Bt=jr(pt);if(!Bt)return null;function Vt(Ar){var Hr={type:"COMBINE",combine:{draggableId:Ar,droppableId:$e.descriptor.id}};return(0,dt.Z)({},pt,{at:Hr})}var Fn=pt.displaced.all,Xn=Fn.length?Fn[0]:null;if(Ce)return Xn?Vt(Xn):null;var Wn=po(ke,vt);if(!Xn){if(!Wn.length)return null;var jn=Wn[Wn.length-1];return Vt(jn.descriptor.id)}var In=ur(Wn,function(Ar){return Ar.descriptor.id===Xn});In===-1&&Ft(!1);var ri=In-1;if(ri<0)return null;var ki=Wn[ri];return Vt(ki.descriptor.id)},Fr=function(xe,Ce){return xe.descriptor.droppableId===Ce.descriptor.id},uo={point:Ki,value:0},qr={invisible:{},visible:{},all:[]},zo={displaced:qr,displacedBy:uo,at:null},Ro=function(xe,Ce){return function(ke){return xe<=ke&&ke<=Ce}},Mr=function(xe){var Ce=Ro(xe.top,xe.bottom),ke=Ro(xe.left,xe.right);return function($e){var vt=Ce($e.top)&&Ce($e.bottom)&&ke($e.left)&&ke($e.right);if(vt)return!0;var pt=Ce($e.top)||Ce($e.bottom),Bt=ke($e.left)||ke($e.right),Vt=pt&&Bt;if(Vt)return!0;var Fn=$e.top<xe.top&&$e.bottom>xe.bottom,Xn=$e.left<xe.left&&$e.right>xe.right,Wn=Fn&&Xn;if(Wn)return!0;var jn=Fn&&Bt||Xn&&pt;return jn}},Nr=function(xe){var Ce=Ro(xe.top,xe.bottom),ke=Ro(xe.left,xe.right);return function($e){var vt=Ce($e.top)&&Ce($e.bottom)&&ke($e.left)&&ke($e.right);return vt}},pi={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Tr={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Bo=function(xe){return function(Ce){var ke=Ro(Ce.top,Ce.bottom),$e=Ro(Ce.left,Ce.right);return function(vt){return xe===pi?ke(vt.top)&&ke(vt.bottom):$e(vt.left)&&$e(vt.right)}}},aa=function(Ce,ke){var $e=ke.frame?ke.frame.scroll.diff.displacement:Ki;return Vi(Ce,$e)},Ho=function(Ce,ke,$e){return ke.subject.active?$e(ke.subject.active)(Ce):!1},Ao=function(Ce,ke,$e){return $e(ke)(Ce)},_o=function(Ce){var ke=Ce.target,$e=Ce.destination,vt=Ce.viewport,pt=Ce.withDroppableDisplacement,Bt=Ce.isVisibleThroughFrameFn,Vt=pt?aa(ke,$e):ke;return Ho(Vt,$e,Bt)&&Ao(Vt,vt,Bt)},ta=function(Ce){return _o((0,dt.Z)({},Ce,{isVisibleThroughFrameFn:Mr}))},Ea=function(Ce){return _o((0,dt.Z)({},Ce,{isVisibleThroughFrameFn:Nr}))},Mt=function(Ce){return _o((0,dt.Z)({},Ce,{isVisibleThroughFrameFn:Bo(Ce.destination.axis)}))},Pi=function(Ce,ke,$e){if(typeof $e=="boolean")return $e;if(!ke)return!0;var vt=ke.invisible,pt=ke.visible;if(vt[Ce])return!1;var Bt=pt[Ce];return Bt?Bt.shouldAnimate:!0};function _t(xe,Ce){var ke=xe.page.marginBox,$e={top:Ce.point.y,right:0,bottom:0,left:Ce.point.x};return bi(_i(ke,$e))}function Xi(xe){var Ce=xe.afterDragging,ke=xe.destination,$e=xe.displacedBy,vt=xe.viewport,pt=xe.forceShouldAnimate,Bt=xe.last;return Ce.reduce(function(Fn,Xn){var Wn=_t(Xn,$e),jn=Xn.descriptor.id;Fn.all.push(jn);var In=ta({target:Wn,destination:ke,viewport:vt,withDroppableDisplacement:!0});if(!In)return Fn.invisible[Xn.descriptor.id]=!0,Fn;var ri=Pi(jn,Bt,pt),ki={draggableId:jn,shouldAnimate:ri};return Fn.visible[jn]=ki,Fn},{all:[],visible:{},invisible:{}})}function wi(xe,Ce){if(!xe.length)return 0;var ke=xe[xe.length-1].descriptor.index;return Ce.inHomeList?ke:ke+1}function Sr(xe){var Ce=xe.insideDestination,ke=xe.inHomeList,$e=xe.displacedBy,vt=xe.destination,pt=wi(Ce,{inHomeList:ke});return{displaced:qr,displacedBy:$e,at:{type:"REORDER",destination:{droppableId:vt.descriptor.id,index:pt}}}}function Zi(xe){var Ce=xe.draggable,ke=xe.insideDestination,$e=xe.destination,vt=xe.viewport,pt=xe.displacedBy,Bt=xe.last,Vt=xe.index,Fn=xe.forceShouldAnimate,Xn=Fr(Ce,$e);if(Vt==null)return Sr({insideDestination:ke,inHomeList:Xn,displacedBy:pt,destination:$e});var Wn=er(ke,function(Ar){return Ar.descriptor.index===Vt});if(!Wn)return Sr({insideDestination:ke,inHomeList:Xn,displacedBy:pt,destination:$e});var jn=po(Ce,ke),In=ke.indexOf(Wn),ri=jn.slice(In),ki=Xi({afterDragging:ri,destination:$e,displacedBy:pt,last:Bt,viewport:vt.frame,forceShouldAnimate:Fn});return{displaced:ki,displacedBy:pt,at:{type:"REORDER",destination:{droppableId:$e.descriptor.id,index:Vt}}}}function Ci(xe,Ce){return!!Ce.effected[xe]}var nr=function(xe){var Ce=xe.isMovingForward,ke=xe.destination,$e=xe.draggables,vt=xe.combine,pt=xe.afterCritical;if(!ke.isCombineEnabled)return null;var Bt=vt.draggableId,Vt=$e[Bt],Fn=Vt.descriptor.index,Xn=Ci(Bt,pt);return Xn?Ce?Fn:Fn-1:Ce?Fn+1:Fn},or=function(xe){var Ce=xe.isMovingForward,ke=xe.isInHomeList,$e=xe.insideDestination,vt=xe.location;if(!$e.length)return null;var pt=vt.index,Bt=Ce?pt+1:pt-1,Vt=$e[0].descriptor.index,Fn=$e[$e.length-1].descriptor.index,Xn=ke?Fn:Fn+1;return Bt<Vt||Bt>Xn?null:Bt},cr=function(xe){var Ce=xe.isMovingForward,ke=xe.isInHomeList,$e=xe.draggable,vt=xe.draggables,pt=xe.destination,Bt=xe.insideDestination,Vt=xe.previousImpact,Fn=xe.viewport,Xn=xe.afterCritical,Wn=Vt.at;if(Wn||Ft(!1),Wn.type==="REORDER"){var jn=or({isMovingForward:Ce,isInHomeList:ke,location:Wn.destination,insideDestination:Bt});return jn==null?null:Zi({draggable:$e,insideDestination:Bt,destination:pt,viewport:Fn,last:Vt.displaced,displacedBy:Vt.displacedBy,index:jn})}var In=nr({isMovingForward:Ce,destination:pt,displaced:Vt.displaced,draggables:vt,combine:Wn.combine,afterCritical:Xn});return In==null?null:Zi({draggable:$e,insideDestination:Bt,destination:pt,viewport:Fn,last:Vt.displaced,displacedBy:Vt.displacedBy,index:In})},Pr=function(xe){var Ce=xe.displaced,ke=xe.afterCritical,$e=xe.combineWith,vt=xe.displacedBy,pt=!!(Ce.visible[$e]||Ce.invisible[$e]);return Ci($e,ke)?pt?Ki:Bi(vt.point):pt?vt.point:Ki},Gr=function(xe){var Ce=xe.afterCritical,ke=xe.impact,$e=xe.draggables,vt=vo(ke);vt||Ft(!1);var pt=vt.draggableId,Bt=$e[pt].page.borderBox.center,Vt=Pr({displaced:ke.displaced,afterCritical:Ce,combineWith:pt,displacedBy:ke.displacedBy});return Gi(Bt,Vt)},yr=function(Ce,ke){return ke.margin[Ce.start]+ke.borderBox[Ce.size]/2},kr=function(Ce,ke){return ke.margin[Ce.end]+ke.borderBox[Ce.size]/2},Zr=function(Ce,ke,$e){return ke[Ce.crossAxisStart]+$e.margin[Ce.crossAxisStart]+$e.borderBox[Ce.crossAxisSize]/2},Oi=function(Ce){var ke=Ce.axis,$e=Ce.moveRelativeTo,vt=Ce.isMoving;return $i(ke.line,$e.marginBox[ke.end]+yr(ke,vt),Zr(ke,$e.marginBox,vt))},sa=function(Ce){var ke=Ce.axis,$e=Ce.moveRelativeTo,vt=Ce.isMoving;return $i(ke.line,$e.marginBox[ke.start]-kr(ke,vt),Zr(ke,$e.marginBox,vt))},Ra=function(Ce){var ke=Ce.axis,$e=Ce.moveInto,vt=Ce.isMoving;return $i(ke.line,$e.contentBox[ke.start]+yr(ke,vt),Zr(ke,$e.contentBox,vt))},Ls=function(xe){var Ce=xe.impact,ke=xe.draggable,$e=xe.draggables,vt=xe.droppable,pt=xe.afterCritical,Bt=lo(vt.descriptor.id,$e),Vt=ke.page,Fn=vt.axis;if(!Bt.length)return Ra({axis:Fn,moveInto:vt.page,isMoving:Vt});var Xn=Ce.displaced,Wn=Ce.displacedBy,jn=Xn.all[0];if(jn){var In=$e[jn];if(Ci(jn,pt))return sa({axis:Fn,moveRelativeTo:In.page,isMoving:Vt});var ri=Kn(In.page,Wn.point);return sa({axis:Fn,moveRelativeTo:ri,isMoving:Vt})}var ki=Bt[Bt.length-1];if(ki.descriptor.id===ke.descriptor.id)return Vt.borderBox.center;if(Ci(ki.descriptor.id,pt)){var Ar=Kn(ki.page,Bi(pt.displacedBy.point));return Oi({axis:Fn,moveRelativeTo:Ar,isMoving:Vt})}return Oi({axis:Fn,moveRelativeTo:ki.page,isMoving:Vt})},Ys=function(xe,Ce){var ke=xe.frame;return ke?Gi(Ce,ke.scroll.diff.displacement):Ce},tl=function(Ce){var ke=Ce.impact,$e=Ce.draggable,vt=Ce.droppable,pt=Ce.draggables,Bt=Ce.afterCritical,Vt=$e.page.borderBox.center,Fn=ke.at;return!vt||!Fn?Vt:Fn.type==="REORDER"?Ls({impact:ke,draggable:$e,draggables:pt,droppable:vt,afterCritical:Bt}):Gr({impact:ke,draggables:pt,afterCritical:Bt})},Ui=function(xe){var Ce=tl(xe),ke=xe.droppable,$e=ke?Ys(ke,Ce):Ce;return $e},La=function(xe,Ce){var ke=gn(Ce,xe.scroll.initial),$e=Bi(ke),vt=bi({top:Ce.y,bottom:Ce.y+xe.frame.height,left:Ce.x,right:Ce.x+xe.frame.width}),pt={frame:vt,scroll:{initial:xe.scroll.initial,max:xe.scroll.max,current:Ce,diff:{value:ke,displacement:$e}}};return pt};function Ba(xe,Ce){return xe.map(function(ke){return Ce[ke]})}function zs(xe,Ce){for(var ke=0;ke<Ce.length;ke++){var $e=Ce[ke].visible[xe];if($e)return $e}return null}var su=function(xe){var Ce=xe.impact,ke=xe.viewport,$e=xe.destination,vt=xe.draggables,pt=xe.maxScrollChange,Bt=La(ke,Gi(ke.scroll.current,pt)),Vt=$e.frame?br($e,Gi($e.frame.scroll.current,pt)):$e,Fn=Ce.displaced,Xn=Xi({afterDragging:Ba(Fn.all,vt),destination:$e,displacedBy:Ce.displacedBy,viewport:Bt.frame,last:Fn,forceShouldAnimate:!1}),Wn=Xi({afterDragging:Ba(Fn.all,vt),destination:Vt,displacedBy:Ce.displacedBy,viewport:ke.frame,last:Fn,forceShouldAnimate:!1}),jn={},In={},ri=[Fn,Xn,Wn];Fn.all.forEach(function(Ar){var Hr=zs(Ar,ri);if(Hr){In[Ar]=Hr;return}jn[Ar]=!0});var ki=(0,dt.Z)({},Ce,{displaced:{all:Fn.all,invisible:jn,visible:In}});return ki},lu=function(xe,Ce){return Gi(xe.scroll.diff.displacement,Ce)},wo=function(xe){var Ce=xe.pageBorderBoxCenter,ke=xe.draggable,$e=xe.viewport,vt=lu($e,Ce),pt=gn(vt,ke.page.borderBox.center);return Gi(ke.client.borderBox.center,pt)},yc=function(xe){var Ce=xe.draggable,ke=xe.destination,$e=xe.newPageBorderBoxCenter,vt=xe.viewport,pt=xe.withDroppableDisplacement,Bt=xe.onlyOnMainAxis,Vt=Bt===void 0?!1:Bt,Fn=gn($e,Ce.page.borderBox.center),Xn=Vi(Ce.page.borderBox,Fn),Wn={target:Xn,destination:ke,withDroppableDisplacement:pt,viewport:vt};return Vt?Mt(Wn):Ea(Wn)},Ml=function(xe){var Ce=xe.isMovingForward,ke=xe.draggable,$e=xe.destination,vt=xe.draggables,pt=xe.previousImpact,Bt=xe.viewport,Vt=xe.previousPageBorderBoxCenter,Fn=xe.previousClientSelection,Xn=xe.afterCritical;if(!$e.isEnabled)return null;var Wn=lo($e.descriptor.id,vt),jn=Fr(ke,$e),In=Lr({isMovingForward:Ce,draggable:ke,destination:$e,insideDestination:Wn,previousImpact:pt})||cr({isMovingForward:Ce,isInHomeList:jn,draggable:ke,draggables:vt,destination:$e,insideDestination:Wn,previousImpact:pt,viewport:Bt,afterCritical:Xn});if(!In)return null;var ri=Ui({impact:In,draggable:ke,droppable:$e,draggables:vt,afterCritical:Xn}),ki=yc({draggable:ke,destination:$e,newPageBorderBoxCenter:ri,viewport:Bt.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(ki){var Ar=wo({pageBorderBoxCenter:ri,draggable:ke,viewport:Bt});return{clientSelection:Ar,impact:In,scrollJumpRequest:null}}var Hr=gn(ri,Vt),to=su({impact:In,viewport:Bt,destination:$e,draggables:vt,maxScrollChange:Hr});return{clientSelection:Fn,impact:to,scrollJumpRequest:Hr}},as=function(Ce){var ke=Ce.subject.active;return ke||Ft(!1),ke},vl=function(xe){var Ce=xe.isMovingForward,ke=xe.pageBorderBoxCenter,$e=xe.source,vt=xe.droppables,pt=xe.viewport,Bt=$e.subject.active;if(!Bt)return null;var Vt=$e.axis,Fn=Ro(Bt[Vt.start],Bt[Vt.end]),Xn=Qe(vt).filter(function(jn){return jn!==$e}).filter(function(jn){return jn.isEnabled}).filter(function(jn){return!!jn.subject.active}).filter(function(jn){return Mr(pt.frame)(as(jn))}).filter(function(jn){var In=as(jn);return Ce?Bt[Vt.crossAxisEnd]<In[Vt.crossAxisEnd]:In[Vt.crossAxisStart]<Bt[Vt.crossAxisStart]}).filter(function(jn){var In=as(jn),ri=Ro(In[Vt.start],In[Vt.end]);return Fn(In[Vt.start])||Fn(In[Vt.end])||ri(Bt[Vt.start])||ri(Bt[Vt.end])}).sort(function(jn,In){var ri=as(jn)[Vt.crossAxisStart],ki=as(In)[Vt.crossAxisStart];return Ce?ri-ki:ki-ri}).filter(function(jn,In,ri){return as(jn)[Vt.crossAxisStart]===as(ri[0])[Vt.crossAxisStart]});if(!Xn.length)return null;if(Xn.length===1)return Xn[0];var Wn=Xn.filter(function(jn){var In=Ro(as(jn)[Vt.start],as(jn)[Vt.end]);return In(ke[Vt.line])});return Wn.length===1?Wn[0]:Wn.length>1?Wn.sort(function(jn,In){return as(jn)[Vt.start]-as(In)[Vt.start]})[0]:Xn.sort(function(jn,In){var ri=Qi(ke,xr(as(jn))),ki=Qi(ke,xr(as(In)));return ri!==ki?ri-ki:as(jn)[Vt.start]-as(In)[Vt.start]})[0]},ju=function(Ce,ke){var $e=Ce.page.borderBox.center;return Ci(Ce.descriptor.id,ke)?gn($e,ke.displacedBy.point):$e},rc=function(Ce,ke){var $e=Ce.page.borderBox;return Ci(Ce.descriptor.id,ke)?Vi($e,Bi(ke.displacedBy.point)):$e},wl=function(xe){var Ce=xe.pageBorderBoxCenter,ke=xe.viewport,$e=xe.destination,vt=xe.insideDestination,pt=xe.afterCritical,Bt=vt.filter(function(Vt){return Ea({target:rc(Vt,pt),destination:$e,viewport:ke.frame,withDroppableDisplacement:!0})}).sort(function(Vt,Fn){var Xn=Ti(Ce,Ys($e,ju(Vt,pt))),Wn=Ti(Ce,Ys($e,ju(Fn,pt)));return Xn<Wn?-1:Wn<Xn?1:Vt.descriptor.index-Fn.descriptor.index});return Bt[0]||null},sl=On(function(Ce,ke){var $e=ke[Ce.line];return{value:$e,point:$i(Ce.line,$e)}}),td=function(Ce,ke,$e){var vt=Ce.axis;if(Ce.descriptor.mode==="virtual")return $i(vt.line,ke[vt.line]);var pt=Ce.subject.page.contentBox[vt.size],Bt=lo(Ce.descriptor.id,$e),Vt=Bt.reduce(function(Wn,jn){return Wn+jn.client.marginBox[vt.size]},0),Fn=Vt+ke[vt.line],Xn=Fn-pt;return Xn<=0?null:$i(vt.line,Xn)},nd=function(Ce,ke){return(0,dt.Z)({},Ce,{scroll:(0,dt.Z)({},Ce.scroll,{max:ke})})},kc=function(Ce,ke,$e){var vt=Ce.frame;Fr(ke,Ce)&&Ft(!1),Ce.subject.withPlaceholder&&Ft(!1);var pt=sl(Ce.axis,ke.displaceBy).point,Bt=td(Ce,pt,$e),Vt={placeholderSize:pt,increasedBy:Bt,oldFrameMaxScroll:Ce.frame?Ce.frame.scroll.max:null};if(!vt){var Fn=no({page:Ce.subject.page,withPlaceholder:Vt,axis:Ce.axis,frame:Ce.frame});return(0,dt.Z)({},Ce,{subject:Fn})}var Xn=Bt?Gi(vt.scroll.max,Bt):vt.scroll.max,Wn=nd(vt,Xn),jn=no({page:Ce.subject.page,withPlaceholder:Vt,axis:Ce.axis,frame:Wn});return(0,dt.Z)({},Ce,{subject:jn,frame:Wn})},_d=function(Ce){var ke=Ce.subject.withPlaceholder;ke||Ft(!1);var $e=Ce.frame;if(!$e){var vt=no({page:Ce.subject.page,axis:Ce.axis,frame:null,withPlaceholder:null});return(0,dt.Z)({},Ce,{subject:vt})}var pt=ke.oldFrameMaxScroll;pt||Ft(!1);var Bt=nd($e,pt),Vt=no({page:Ce.subject.page,axis:Ce.axis,frame:Bt,withPlaceholder:null});return(0,dt.Z)({},Ce,{subject:Vt,frame:Bt})},id=function(xe){var Ce=xe.previousPageBorderBoxCenter,ke=xe.moveRelativeTo,$e=xe.insideDestination,vt=xe.draggable,pt=xe.draggables,Bt=xe.destination,Vt=xe.viewport,Fn=xe.afterCritical;if(!ke){if($e.length)return null;var Xn={displaced:qr,displacedBy:uo,at:{type:"REORDER",destination:{droppableId:Bt.descriptor.id,index:0}}},Wn=Ui({impact:Xn,draggable:vt,droppable:Bt,draggables:pt,afterCritical:Fn}),jn=Fr(vt,Bt)?Bt:kc(Bt,vt,pt),In=yc({draggable:vt,destination:jn,newPageBorderBoxCenter:Wn,viewport:Vt.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return In?Xn:null}var ri=Ce[Bt.axis.line]<=ke.page.borderBox.center[Bt.axis.line],ki=function(){var Hr=ke.descriptor.index;return ke.descriptor.id===vt.descriptor.id||ri?Hr:Hr+1}(),Ar=sl(Bt.axis,vt.displaceBy);return Zi({draggable:vt,insideDestination:$e,destination:Bt,viewport:Vt,displacedBy:Ar,last:qr,index:ki})},Ic=function(xe){var Ce=xe.isMovingForward,ke=xe.previousPageBorderBoxCenter,$e=xe.draggable,vt=xe.isOver,pt=xe.draggables,Bt=xe.droppables,Vt=xe.viewport,Fn=xe.afterCritical,Xn=vl({isMovingForward:Ce,pageBorderBoxCenter:ke,source:vt,droppables:Bt,viewport:Vt});if(!Xn)return null;var Wn=lo(Xn.descriptor.id,pt),jn=wl({pageBorderBoxCenter:ke,viewport:Vt,destination:Xn,insideDestination:Wn,afterCritical:Fn}),In=id({previousPageBorderBoxCenter:ke,destination:Xn,draggable:$e,draggables:pt,moveRelativeTo:jn,insideDestination:Wn,viewport:Vt,afterCritical:Fn});if(!In)return null;var ri=Ui({impact:In,draggable:$e,droppable:Xn,draggables:pt,afterCritical:Fn}),ki=wo({pageBorderBoxCenter:ri,draggable:$e,viewport:Vt});return{clientSelection:ki,impact:In,scrollJumpRequest:null}},Js=function(xe){var Ce=xe.at;return Ce?Ce.type==="REORDER"?Ce.destination.droppableId:Ce.combine.droppableId:null},uu=function(Ce,ke){var $e=Js(Ce);return $e?ke[$e]:null},xd=function(xe){var Ce=xe.state,ke=xe.type,$e=uu(Ce.impact,Ce.dimensions.droppables),vt=!!$e,pt=Ce.dimensions.droppables[Ce.critical.droppable.id],Bt=$e||pt,Vt=Bt.axis.direction,Fn=Vt==="vertical"&&(ke==="MOVE_UP"||ke==="MOVE_DOWN")||Vt==="horizontal"&&(ke==="MOVE_LEFT"||ke==="MOVE_RIGHT");if(Fn&&!vt)return null;var Xn=ke==="MOVE_DOWN"||ke==="MOVE_RIGHT",Wn=Ce.dimensions.draggables[Ce.critical.draggable.id],jn=Ce.current.page.borderBoxCenter,In=Ce.dimensions,ri=In.draggables,ki=In.droppables;return Fn?Ml({isMovingForward:Xn,previousPageBorderBoxCenter:jn,draggable:Wn,destination:Bt,draggables:ri,viewport:Ce.viewport,previousClientSelection:Ce.current.client.selection,previousImpact:Ce.impact,afterCritical:Ce.afterCritical}):Ic({isMovingForward:Xn,previousPageBorderBoxCenter:jn,draggable:Wn,isOver:Bt,draggables:ri,droppables:ki,viewport:Ce.viewport,afterCritical:Ce.afterCritical})};function Eu(xe){return xe.phase==="DRAGGING"||xe.phase==="COLLECTING"}function Sc(xe){var Ce=Ro(xe.top,xe.bottom),ke=Ro(xe.left,xe.right);return function(vt){return Ce(vt.y)&&ke(vt.x)}}function Vo(xe,Ce){return xe.left<Ce.right&&xe.right>Ce.left&&xe.top<Ce.bottom&&xe.bottom>Ce.top}function ya(xe){var Ce=xe.pageBorderBox,ke=xe.draggable,$e=xe.candidates,vt=ke.page.borderBox.center,pt=$e.map(function(Bt){var Vt=Bt.axis,Fn=$i(Bt.axis.line,Ce.center[Vt.line],Bt.page.borderBox.center[Vt.crossAxisLine]);return{id:Bt.descriptor.id,distance:Ti(vt,Fn)}}).sort(function(Bt,Vt){return Vt.distance-Bt.distance});return pt[0]?pt[0].id:null}function ll(xe){var Ce=xe.pageBorderBox,ke=xe.draggable,$e=xe.droppables,vt=Qe($e).filter(function(pt){if(!pt.isEnabled)return!1;var Bt=pt.subject.active;if(!Bt||!Vo(Ce,Bt))return!1;if(Sc(Bt)(Ce.center))return!0;var Vt=pt.axis,Fn=Bt.center[Vt.crossAxisLine],Xn=Ce[Vt.crossAxisStart],Wn=Ce[Vt.crossAxisEnd],jn=Ro(Bt[Vt.crossAxisStart],Bt[Vt.crossAxisEnd]),In=jn(Xn),ri=jn(Wn);return!In&&!ri?!0:In?Xn<Fn:Wn>Fn});return vt.length?vt.length===1?vt[0].descriptor.id:ya({pageBorderBox:Ce,draggable:ke,candidates:vt}):null}var Ss=function(Ce,ke){return bi(Vi(Ce,ke))},ms=function(xe,Ce){var ke=xe.frame;return ke?Ss(Ce,ke.scroll.diff.value):Ce};function Ua(xe){var Ce=xe.displaced,ke=xe.id;return!!(Ce.visible[ke]||Ce.invisible[ke])}function ss(xe){var Ce=xe.draggable,ke=xe.closest,$e=xe.inHomeList;return ke?$e&&ke.descriptor.index>Ce.descriptor.index?ke.descriptor.index-1:ke.descriptor.index:null}var xs=function(xe){var Ce=xe.pageBorderBoxWithDroppableScroll,ke=xe.draggable,$e=xe.destination,vt=xe.insideDestination,pt=xe.last,Bt=xe.viewport,Vt=xe.afterCritical,Fn=$e.axis,Xn=sl($e.axis,ke.displaceBy),Wn=Xn.value,jn=Ce[Fn.start],In=Ce[Fn.end],ri=po(ke,vt),ki=er(ri,function(Hr){var to=Hr.descriptor.id,ho=Hr.page.borderBox.center[Fn.line],Lo=Ci(to,Vt),bo=Ua({displaced:pt,id:to});return Lo?bo?In<=ho:jn<ho-Wn:bo?In<=ho+Wn:jn<ho}),Ar=ss({draggable:ke,closest:ki,inHomeList:Fr(ke,$e)});return Zi({draggable:ke,insideDestination:vt,destination:$e,viewport:Bt,last:pt,displacedBy:Xn,index:Ar})},vs=4,oc=function(xe){var Ce=xe.draggable,ke=xe.pageBorderBoxWithDroppableScroll,$e=xe.previousImpact,vt=xe.destination,pt=xe.insideDestination,Bt=xe.afterCritical;if(!vt.isCombineEnabled)return null;var Vt=vt.axis,Fn=sl(vt.axis,Ce.displaceBy),Xn=Fn.value,Wn=ke[Vt.start],jn=ke[Vt.end],In=po(Ce,pt),ri=er(In,function(Ar){var Hr=Ar.descriptor.id,to=Ar.page.borderBox,ho=to[Vt.size],Lo=ho/vs,bo=Ci(Hr,Bt),Uo=Ua({displaced:$e.displaced,id:Hr});return bo?Uo?jn>to[Vt.start]+Lo&&jn<to[Vt.end]-Lo:Wn>to[Vt.start]-Xn+Lo&&Wn<to[Vt.end]-Xn-Lo:Uo?jn>to[Vt.start]+Xn+Lo&&jn<to[Vt.end]+Xn-Lo:Wn>to[Vt.start]+Lo&&Wn<to[Vt.end]-Lo});if(!ri)return null;var ki={displacedBy:Fn,displaced:$e.displaced,at:{type:"COMBINE",combine:{draggableId:ri.descriptor.id,droppableId:vt.descriptor.id}}};return ki},_l=function(xe){var Ce=xe.pageOffset,ke=xe.draggable,$e=xe.draggables,vt=xe.droppables,pt=xe.previousImpact,Bt=xe.viewport,Vt=xe.afterCritical,Fn=Ss(ke.page.borderBox,Ce),Xn=ll({pageBorderBox:Fn,draggable:ke,droppables:vt});if(!Xn)return zo;var Wn=vt[Xn],jn=lo(Wn.descriptor.id,$e),In=ms(Wn,Fn);return oc({pageBorderBoxWithDroppableScroll:In,draggable:ke,previousImpact:pt,destination:Wn,insideDestination:jn,afterCritical:Vt})||xs({pageBorderBoxWithDroppableScroll:In,draggable:ke,destination:Wn,insideDestination:jn,last:pt.displaced,viewport:Bt,afterCritical:Vt})},is=function(xe,Ce){var ke;return(0,dt.Z)({},xe,(ke={},ke[Ce.descriptor.id]=Ce,ke))},bh=function(Ce){var ke=Ce.previousImpact,$e=Ce.impact,vt=Ce.droppables,pt=Js(ke),Bt=Js($e);if(!pt||pt===Bt)return vt;var Vt=vt[pt];if(!Vt.subject.withPlaceholder)return vt;var Fn=_d(Vt);return is(vt,Fn)},Eh=function(xe){var Ce=xe.draggable,ke=xe.draggables,$e=xe.droppables,vt=xe.previousImpact,pt=xe.impact,Bt=bh({previousImpact:vt,impact:pt,droppables:$e}),Vt=Js(pt);if(!Vt)return Bt;var Fn=$e[Vt];if(Fr(Ce,Fn)||Fn.subject.withPlaceholder)return Bt;var Xn=kc(Fn,Ce,ke);return is(Bt,Xn)},Uu=function(xe){var Ce=xe.state,ke=xe.clientSelection,$e=xe.dimensions,vt=xe.viewport,pt=xe.impact,Bt=xe.scrollJumpRequest,Vt=vt||Ce.viewport,Fn=$e||Ce.dimensions,Xn=ke||Ce.current.client.selection,Wn=gn(Xn,Ce.initial.client.selection),jn={offset:Wn,selection:Xn,borderBoxCenter:Gi(Ce.initial.client.borderBoxCenter,Wn)},In={selection:Gi(jn.selection,Vt.scroll.current),borderBoxCenter:Gi(jn.borderBoxCenter,Vt.scroll.current),offset:Gi(jn.offset,Vt.scroll.diff.value)},ri={client:jn,page:In};if(Ce.phase==="COLLECTING")return(0,dt.Z)({phase:"COLLECTING"},Ce,{dimensions:Fn,viewport:Vt,current:ri});var ki=Fn.draggables[Ce.critical.draggable.id],Ar=pt||_l({pageOffset:In.offset,draggable:ki,draggables:Fn.draggables,droppables:Fn.droppables,previousImpact:Ce.impact,viewport:Vt,afterCritical:Ce.afterCritical}),Hr=Eh({draggable:ki,impact:Ar,previousImpact:Ce.impact,draggables:Fn.draggables,droppables:Fn.droppables}),to=(0,dt.Z)({},Ce,{current:ri,dimensions:{draggables:Fn.draggables,droppables:Hr},impact:Ar,viewport:Vt,scrollJumpRequest:Bt||null,forceShouldAnimate:Bt?!1:null});return to};function ro(xe,Ce){return xe.map(function(ke){return Ce[ke]})}var rd=function(xe){var Ce=xe.impact,ke=xe.viewport,$e=xe.draggables,vt=xe.destination,pt=xe.forceShouldAnimate,Bt=Ce.displaced,Vt=ro(Bt.all,$e),Fn=Xi({afterDragging:Vt,destination:vt,displacedBy:Ce.displacedBy,viewport:ke.frame,forceShouldAnimate:pt,last:Bt});return(0,dt.Z)({},Ce,{displaced:Fn})},en=function(xe){var Ce=xe.impact,ke=xe.draggable,$e=xe.droppable,vt=xe.draggables,pt=xe.viewport,Bt=xe.afterCritical,Vt=Ui({impact:Ce,draggable:ke,draggables:vt,droppable:$e,afterCritical:Bt});return wo({pageBorderBoxCenter:Vt,draggable:ke,viewport:pt})},xi=function(xe){var Ce=xe.state,ke=xe.dimensions,$e=xe.viewport;Ce.movementMode!=="SNAP"&&Ft(!1);var vt=Ce.impact,pt=$e||Ce.viewport,Bt=ke||Ce.dimensions,Vt=Bt.draggables,Fn=Bt.droppables,Xn=Vt[Ce.critical.draggable.id],Wn=Js(vt);Wn||Ft(!1);var jn=Fn[Wn],In=rd({impact:vt,viewport:pt,destination:jn,draggables:Vt}),ri=en({impact:In,draggable:Xn,droppable:jn,draggables:Vt,viewport:pt,afterCritical:Ce.afterCritical});return Uu({impact:In,clientSelection:ri,state:Ce,dimensions:Bt,viewport:pt})},Mh=function(xe){return{index:xe.index,droppableId:xe.droppableId}},Lh=function(xe){var Ce=xe.draggable,ke=xe.home,$e=xe.draggables,vt=xe.viewport,pt=sl(ke.axis,Ce.displaceBy),Bt=lo(ke.descriptor.id,$e),Vt=Bt.indexOf(Ce);Vt===-1&&Ft(!1);var Fn=Bt.slice(Vt+1),Xn=Fn.reduce(function(ri,ki){return ri[ki.descriptor.id]=!0,ri},{}),Wn={inVirtualList:ke.descriptor.mode==="virtual",displacedBy:pt,effected:Xn},jn=Xi({afterDragging:Fn,destination:ke,displacedBy:pt,last:null,viewport:vt.frame,forceShouldAnimate:!1}),In={displaced:jn,displacedBy:pt,at:{type:"REORDER",destination:Mh(Ce.descriptor)}};return{impact:In,afterCritical:Wn}},ac=function(xe,Ce){return{draggables:xe.draggables,droppables:is(xe.droppables,Ce)}},cu=function(Ce){},Mu=function(Ce){},Nh=function(xe){var Ce=xe.draggable,ke=xe.offset,$e=xe.initialWindowScroll,vt=Kn(Ce.client,ke),pt=Le(vt,$e),Bt=(0,dt.Z)({},Ce,{placeholder:(0,dt.Z)({},Ce.placeholder,{client:vt}),client:vt,page:pt});return Bt},Pd=function(xe){var Ce=xe.frame;return Ce||Ft(!1),Ce},ys=function(xe){var Ce=xe.additions,ke=xe.updatedDroppables,$e=xe.viewport,vt=$e.scroll.diff.value;return Ce.map(function(pt){var Bt=pt.descriptor.droppableId,Vt=ke[Bt],Fn=Pd(Vt),Xn=Fn.scroll.diff.value,Wn=Gi(vt,Xn),jn=Nh({draggable:pt,offset:Wn,initialWindowScroll:$e.scroll.initial});return jn})},To=function(xe){var Ce=xe.state,ke=xe.published;cu();var $e=ke.modified.map(function(Lo){var bo=Ce.dimensions.droppables[Lo.droppableId],Uo=br(bo,Lo.scroll);return Uo}),vt=(0,dt.Z)({},Ce.dimensions.droppables,{},Rr($e)),pt=Ii(ys({additions:ke.additions,updatedDroppables:vt,viewport:Ce.viewport})),Bt=(0,dt.Z)({},Ce.dimensions.draggables,{},pt);ke.removals.forEach(function(Lo){delete Bt[Lo]});var Vt={droppables:vt,draggables:Bt},Fn=Js(Ce.impact),Xn=Fn?Vt.droppables[Fn]:null,Wn=Vt.draggables[Ce.critical.draggable.id],jn=Vt.droppables[Ce.critical.droppable.id],In=Lh({draggable:Wn,home:jn,draggables:Bt,viewport:Ce.viewport}),ri=In.impact,ki=In.afterCritical,Ar=Xn&&Xn.isCombineEnabled?Ce.impact:ri,Hr=_l({pageOffset:Ce.current.page.offset,draggable:Vt.draggables[Ce.critical.draggable.id],draggables:Vt.draggables,droppables:Vt.droppables,previousImpact:Ar,viewport:Ce.viewport,afterCritical:ki});Mu();var to=(0,dt.Z)({phase:"DRAGGING"},Ce,{phase:"DRAGGING",impact:Hr,onLiftImpact:ri,dimensions:Vt,afterCritical:ki,forceShouldAnimate:!1});if(Ce.phase==="COLLECTING")return to;var ho=(0,dt.Z)({phase:"DROP_PENDING"},to,{phase:"DROP_PENDING",reason:Ce.reason,isWaiting:!1});return ho},yl=function(Ce){return Ce.movementMode==="SNAP"},ul=function(Ce,ke,$e){var vt=ac(Ce.dimensions,ke);return!yl(Ce)||$e?Uu({state:Ce,dimensions:vt}):xi({state:Ce,dimensions:vt})};function _a(xe){return xe.isDragging&&xe.movementMode==="SNAP"?(0,dt.Z)({phase:"DRAGGING"},xe,{scrollJumpRequest:null}):xe}var ra={phase:"IDLE",completed:null,shouldFlush:!1},Hs=function(xe,Ce){if(xe===void 0&&(xe=ra),Ce.type==="FLUSH")return(0,dt.Z)({},ra,{shouldFlush:!0});if(Ce.type==="INITIAL_PUBLISH"){xe.phase!=="IDLE"&&Ft(!1);var ke=Ce.payload,$e=ke.critical,vt=ke.clientSelection,pt=ke.viewport,Bt=ke.dimensions,Vt=ke.movementMode,Fn=Bt.draggables[$e.draggable.id],Xn=Bt.droppables[$e.droppable.id],Wn={selection:vt,borderBoxCenter:Fn.client.borderBox.center,offset:Ki},jn={client:Wn,page:{selection:Gi(Wn.selection,pt.scroll.initial),borderBoxCenter:Gi(Wn.selection,pt.scroll.initial),offset:Gi(Wn.selection,pt.scroll.diff.value)}},In=Qe(Bt.droppables).every(function(Xf){return!Xf.isFixedOnPage}),ri=Lh({draggable:Fn,home:Xn,draggables:Bt.draggables,viewport:pt}),ki=ri.impact,Ar=ri.afterCritical,Hr={phase:"DRAGGING",isDragging:!0,critical:$e,movementMode:Vt,dimensions:Bt,initial:jn,current:jn,isWindowScrollAllowed:In,impact:ki,afterCritical:Ar,onLiftImpact:ki,viewport:pt,scrollJumpRequest:null,forceShouldAnimate:null};return Hr}if(Ce.type==="COLLECTION_STARTING"){if(xe.phase==="COLLECTING"||xe.phase==="DROP_PENDING")return xe;xe.phase!=="DRAGGING"&&Ft(!1);var to=(0,dt.Z)({phase:"COLLECTING"},xe,{phase:"COLLECTING"});return to}if(Ce.type==="PUBLISH_WHILE_DRAGGING")return xe.phase==="COLLECTING"||xe.phase==="DROP_PENDING"||Ft(!1),To({state:xe,published:Ce.payload});if(Ce.type==="MOVE"){if(xe.phase==="DROP_PENDING")return xe;Eu(xe)||Ft(!1);var ho=Ce.payload.client;return oi(ho,xe.current.client.selection)?xe:Uu({state:xe,clientSelection:ho,impact:yl(xe)?xe.impact:null})}if(Ce.type==="UPDATE_DROPPABLE_SCROLL"){if(xe.phase==="DROP_PENDING"||xe.phase==="COLLECTING")return _a(xe);Eu(xe)||Ft(!1);var Lo=Ce.payload,bo=Lo.id,Uo=Lo.newScroll,va=xe.dimensions.droppables[bo];if(!va)return xe;var Ka=br(va,Uo);return ul(xe,Ka,!1)}if(Ce.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(xe.phase==="DROP_PENDING")return xe;Eu(xe)||Ft(!1);var pl=Ce.payload,Wa=pl.id,ol=pl.isEnabled,nu=xe.dimensions.droppables[Wa];nu||Ft(!1),nu.isEnabled===ol&&Ft(!1);var yu=(0,dt.Z)({},nu,{isEnabled:ol});return ul(xe,yu,!0)}if(Ce.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(xe.phase==="DROP_PENDING")return xe;Eu(xe)||Ft(!1);var Wc=Ce.payload,Ju=Wc.id,Wu=Wc.isCombineEnabled,Al=xe.dimensions.droppables[Ju];Al||Ft(!1),Al.isCombineEnabled===Wu&&Ft(!1);var Xs=(0,dt.Z)({},Al,{isCombineEnabled:Wu});return ul(xe,Xs,!0)}if(Ce.type==="MOVE_BY_WINDOW_SCROLL"){if(xe.phase==="DROP_PENDING"||xe.phase==="DROP_ANIMATING")return xe;Eu(xe)||Ft(!1),xe.isWindowScrollAllowed||Ft(!1);var fd=Ce.payload.newScroll;if(oi(xe.viewport.scroll.current,fd))return _a(xe);var al=La(xe.viewport,fd);return yl(xe)?xi({state:xe,viewport:al}):Uu({state:xe,viewport:al})}if(Ce.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Eu(xe))return xe;var Gc=Ce.payload.maxScroll;if(oi(Gc,xe.viewport.scroll.max))return xe;var hf=(0,dt.Z)({},xe.viewport,{scroll:(0,dt.Z)({},xe.viewport.scroll,{max:Gc})});return(0,dt.Z)({phase:"DRAGGING"},xe,{viewport:hf})}if(Ce.type==="MOVE_UP"||Ce.type==="MOVE_DOWN"||Ce.type==="MOVE_LEFT"||Ce.type==="MOVE_RIGHT"){if(xe.phase==="COLLECTING"||xe.phase==="DROP_PENDING")return xe;xe.phase!=="DRAGGING"&&Ft(!1);var $c=xd({state:xe,type:Ce.type});return $c?Uu({state:xe,impact:$c.impact,clientSelection:$c.clientSelection,scrollJumpRequest:$c.scrollJumpRequest}):xe}if(Ce.type==="DROP_PENDING"){var Oo=Ce.payload.reason;xe.phase!=="COLLECTING"&&Ft(!1);var Rh=(0,dt.Z)({phase:"DROP_PENDING"},xe,{phase:"DROP_PENDING",isWaiting:!0,reason:Oo});return Rh}if(Ce.type==="DROP_ANIMATE"){var Fg=Ce.payload,Kc=Fg.completed,Od=Fg.dropDuration,fh=Fg.newHomeClientOffset;xe.phase==="DRAGGING"||xe.phase==="DROP_PENDING"||Ft(!1);var Gu={phase:"DROP_ANIMATING",completed:Kc,dropDuration:Od,newHomeClientOffset:fh,dimensions:xe.dimensions};return Gu}if(Ce.type==="DROP_COMPLETE"){var _f=Ce.payload.completed;return{phase:"IDLE",completed:_f,shouldFlush:!1}}return xe},Xl=function(Ce){return{type:"BEFORE_INITIAL_CAPTURE",payload:Ce}},Ja=function(Ce){return{type:"LIFT",payload:Ce}},du=function(Ce){return{type:"INITIAL_PUBLISH",payload:Ce}},nl=function(Ce){return{type:"PUBLISH_WHILE_DRAGGING",payload:Ce}},od=function(){return{type:"COLLECTION_STARTING",payload:null}},Pa=function(Ce){return{type:"UPDATE_DROPPABLE_SCROLL",payload:Ce}},Ll=function(Ce){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:Ce}},wa=function(Ce){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:Ce}},Va=function(Ce){return{type:"MOVE",payload:Ce}},cs=function(Ce){return{type:"MOVE_BY_WINDOW_SCROLL",payload:Ce}},Ps=function(Ce){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:Ce}},Na=function(){return{type:"MOVE_UP",payload:null}},ad=function(){return{type:"MOVE_DOWN",payload:null}},Do=function(){return{type:"MOVE_RIGHT",payload:null}},Rf=function(){return{type:"MOVE_LEFT",payload:null}},fa=function(){return{type:"FLUSH",payload:null}},jf=function(Ce){return{type:"DROP_ANIMATE",payload:Ce}},sd=function(Ce){return{type:"DROP_COMPLETE",payload:Ce}},wd=function(Ce){return{type:"DROP",payload:Ce}},zf=function(Ce){return{type:"DROP_PENDING",payload:Ce}},Xd=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function ld(xe){if(!(xe.length<=1)){for(var Ce=xe.map(function(Vt){return Vt.descriptor.index}),ke={},$e=1;$e<Ce.length;$e++){var vt=Ce[$e],pt=Ce[$e-1];vt!==pt+1&&(ke[vt]=!0)}if(Object.keys(ke).length)var Bt=Ce.map(function(Vt){var Fn=!!ke[Vt];return Fn?"[\u{1F525}"+Vt+"]":""+Vt}).join(", ")}}function ud(xe,Ce){if(0)var ke}var Fa=function(xe){return function(Ce){var ke=Ce.getState,$e=Ce.dispatch;return function(vt){return function(pt){if(pt.type!=="LIFT"){vt(pt);return}var Bt=pt.payload,Vt=Bt.id,Fn=Bt.clientSelection,Xn=Bt.movementMode,Wn=ke();Wn.phase==="DROP_ANIMATING"&&$e(sd({completed:Wn.completed})),ke().phase!=="IDLE"&&Ft(!1),$e(fa()),$e(Xl({draggableId:Vt,movementMode:Xn}));var jn={shouldPublishImmediately:Xn==="SNAP"},In={draggableId:Vt,scrollOptions:jn},ri=xe.startPublishing(In),ki=ri.critical,Ar=ri.dimensions,Hr=ri.viewport;ud(ki,Ar),$e(du({critical:ki,dimensions:Ar,clientSelection:Fn,movementMode:Xn,viewport:Hr}))}}}},sc=function(xe){return function(){return function(Ce){return function(ke){ke.type==="INITIAL_PUBLISH"&&xe.dragging(),ke.type==="DROP_ANIMATE"&&xe.dropping(ke.payload.completed.result.reason),(ke.type==="FLUSH"||ke.type==="DROP_COMPLETE")&&xe.resting(),Ce(ke)}}}},Yd={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},_u={opacity:{drop:0,combining:.7},scale:{drop:.75}},Fh={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},kl=Fh.outOfTheWay+"s "+Yd.outOfTheWay,Il={fluid:"opacity "+kl,snap:"transform "+kl+", opacity "+kl,drop:function(Ce){var ke=Ce+"s "+Yd.drop;return"transform "+ke+", opacity "+ke},outOfTheWay:"transform "+kl,placeholder:"height "+kl+", width "+kl+", margin "+kl},xc=function(Ce){return oi(Ce,Ki)?null:"translate("+Ce.x+"px, "+Ce.y+"px)"},Lu={moveTo:xc,drop:function(Ce,ke){var $e=xc(Ce);return $e?ke?$e+" scale("+_u.scale.drop+")":$e:null}},lc=Fh.minDropTime,Jd=Fh.maxDropTime,of=Jd-lc,Ah=1500,Hf=.6,Ol=function(xe){var Ce=xe.current,ke=xe.destination,$e=xe.reason,vt=Ti(Ce,ke);if(vt<=0)return lc;if(vt>=Ah)return Jd;var pt=vt/Ah,Bt=lc+of*pt,Vt=$e==="CANCEL"?Bt*Hf:Bt;return Number(Vt.toFixed(2))},Oc=function(xe){var Ce=xe.impact,ke=xe.draggable,$e=xe.dimensions,vt=xe.viewport,pt=xe.afterCritical,Bt=$e.draggables,Vt=$e.droppables,Fn=Js(Ce),Xn=Fn?Vt[Fn]:null,Wn=Vt[ke.descriptor.droppableId],jn=en({impact:Ce,draggable:ke,draggables:Bt,afterCritical:pt,droppable:Xn||Wn,viewport:vt}),In=gn(jn,ke.client.borderBox.center);return In},dg=function(xe){var Ce=xe.draggables,ke=xe.reason,$e=xe.lastImpact,vt=xe.home,pt=xe.viewport,Bt=xe.onLiftImpact;if(!$e.at||ke!=="DROP"){var Vt=rd({draggables:Ce,impact:Bt,destination:vt,viewport:pt,forceShouldAnimate:!0});return{impact:Vt,didDropInsideDroppable:!1}}if($e.at.type==="REORDER")return{impact:$e,didDropInsideDroppable:!0};var Fn=(0,dt.Z)({},$e,{displaced:qr});return{impact:Fn,didDropInsideDroppable:!0}},mt=function(xe){var Ce=xe.getState,ke=xe.dispatch;return function($e){return function(vt){if(vt.type!=="DROP"){$e(vt);return}var pt=Ce(),Bt=vt.payload.reason;if(pt.phase==="COLLECTING"){ke(zf({reason:Bt}));return}if(pt.phase!=="IDLE"){var Vt=pt.phase==="DROP_PENDING"&&pt.isWaiting;Vt&&Ft(!1),pt.phase==="DRAGGING"||pt.phase==="DROP_PENDING"||Ft(!1);var Fn=pt.critical,Xn=pt.dimensions,Wn=Xn.draggables[pt.critical.draggable.id],jn=dg({reason:Bt,lastImpact:pt.impact,afterCritical:pt.afterCritical,onLiftImpact:pt.onLiftImpact,home:pt.dimensions.droppables[pt.critical.droppable.id],viewport:pt.viewport,draggables:pt.dimensions.draggables}),In=jn.impact,ri=jn.didDropInsideDroppable,ki=ri?jr(In):null,Ar=ri?vo(In):null,Hr={index:Fn.draggable.index,droppableId:Fn.droppable.id},to={draggableId:Wn.descriptor.id,type:Wn.descriptor.type,source:Hr,reason:Bt,mode:pt.movementMode,destination:ki,combine:Ar},ho=Oc({impact:In,draggable:Wn,dimensions:Xn,viewport:pt.viewport,afterCritical:pt.afterCritical}),Lo={critical:pt.critical,afterCritical:pt.afterCritical,result:to,impact:In},bo=!oi(pt.current.client.offset,ho)||!!to.combine;if(!bo){ke(sd({completed:Lo}));return}var Uo=Ol({current:pt.current.client.offset,destination:ho,reason:Bt}),va={newHomeClientOffset:ho,dropDuration:Uo,completed:Lo};ke(jf(va))}}}},wt=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function on(xe){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(ke){ke.target!==window&&ke.target!==window.document||xe()}}}function dn(xe){var Ce=xe.onWindowScroll;function ke(){Ce(wt())}var $e=It(ke),vt=on($e),pt=St;function Bt(){return pt!==St}function Vt(){Bt()&&Ft(!1),pt=qn(window,[vt])}function Fn(){Bt()||Ft(!1),$e.cancel(),pt(),pt=St}return{start:Vt,stop:Fn,isActive:Bt}}var Hn=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},En=function(xe){var Ce=dn({onWindowScroll:function($e){xe.dispatch(cs({newScroll:$e}))}});return function(ke){return function($e){!Ce.isActive()&&$e.type==="INITIAL_PUBLISH"&&Ce.start(),Ce.isActive()&&Hn($e)&&Ce.stop(),ke($e)}}},si=function(xe){var Ce=!1,ke=!1,$e=setTimeout(function(){ke=!0}),vt=function(Bt){Ce||ke||(Ce=!0,xe(Bt),clearTimeout($e))};return vt.wasCalled=function(){return Ce},vt},li=function(){var xe=[],Ce=function(pt){var Bt=ur(xe,function(Xn){return Xn.timerId===pt});Bt===-1&&Ft(!1);var Vt=xe.splice(Bt,1),Fn=Vt[0];Fn.callback()},ke=function(pt){var Bt=setTimeout(function(){return Ce(Bt)}),Vt={timerId:Bt,callback:pt};xe.push(Vt)},$e=function(){if(xe.length){var pt=[].concat(xe);xe.length=0,pt.forEach(function(Bt){clearTimeout(Bt.timerId),Bt.callback()})}};return{add:ke,flush:$e}},ti=function(Ce,ke){return Ce==null&&ke==null?!0:Ce==null||ke==null?!1:Ce.droppableId===ke.droppableId&&Ce.index===ke.index},Mi=function(Ce,ke){return Ce==null&&ke==null?!0:Ce==null||ke==null?!1:Ce.draggableId===ke.draggableId&&Ce.droppableId===ke.droppableId},Ai=function(Ce,ke){if(Ce===ke)return!0;var $e=Ce.draggable.id===ke.draggable.id&&Ce.draggable.droppableId===ke.draggable.droppableId&&Ce.draggable.type===ke.draggable.type&&Ce.draggable.index===ke.draggable.index,vt=Ce.droppable.id===ke.droppable.id&&Ce.droppable.type===ke.droppable.type;return $e&&vt},Ni=function(Ce,ke){cu(),ke(),Mu()},gr=function(Ce,ke){return{draggableId:Ce.draggable.id,type:Ce.droppable.type,source:{droppableId:Ce.droppable.id,index:Ce.draggable.index},mode:ke}},dr=function(Ce,ke,$e,vt){if(!Ce){$e(vt(ke));return}var pt=si($e),Bt={announce:pt};Ce(ke,Bt),pt.wasCalled()||$e(vt(ke))},ir=function(xe,Ce){var ke=li(),$e=null,vt=function(In,ri){$e&&Ft(!1),Ni("onBeforeCapture",function(){var ki=xe().onBeforeCapture;if(ki){var Ar={draggableId:In,mode:ri};ki(Ar)}})},pt=function(In,ri){$e&&Ft(!1),Ni("onBeforeDragStart",function(){var ki=xe().onBeforeDragStart;ki&&ki(gr(In,ri))})},Bt=function(In,ri){$e&&Ft(!1);var ki=gr(In,ri);$e={mode:ri,lastCritical:In,lastLocation:ki.source,lastCombine:null},ke.add(function(){Ni("onDragStart",function(){return dr(xe().onDragStart,ki,Ce,Ji.onDragStart)})})},Vt=function(In,ri){var ki=jr(ri),Ar=vo(ri);$e||Ft(!1);var Hr=!Ai(In,$e.lastCritical);Hr&&($e.lastCritical=In);var to=!ti($e.lastLocation,ki);to&&($e.lastLocation=ki);var ho=!Mi($e.lastCombine,Ar);if(ho&&($e.lastCombine=Ar),!(!Hr&&!to&&!ho)){var Lo=(0,dt.Z)({},gr(In,$e.mode),{combine:Ar,destination:ki});ke.add(function(){Ni("onDragUpdate",function(){return dr(xe().onDragUpdate,Lo,Ce,Ji.onDragUpdate)})})}},Fn=function(){$e||Ft(!1),ke.flush()},Xn=function(In){$e||Ft(!1),$e=null,Ni("onDragEnd",function(){return dr(xe().onDragEnd,In,Ce,Ji.onDragEnd)})},Wn=function(){if($e){var In=(0,dt.Z)({},gr($e.lastCritical,$e.mode),{combine:null,destination:null,reason:"CANCEL"});Xn(In)}};return{beforeCapture:vt,beforeStart:pt,start:Bt,update:Vt,flush:Fn,drop:Xn,abort:Wn}},Wr=function(xe,Ce){var ke=ir(xe,Ce);return function($e){return function(vt){return function(pt){if(pt.type==="BEFORE_INITIAL_CAPTURE"){ke.beforeCapture(pt.payload.draggableId,pt.payload.movementMode);return}if(pt.type==="INITIAL_PUBLISH"){var Bt=pt.payload.critical;ke.beforeStart(Bt,pt.payload.movementMode),vt(pt),ke.start(Bt,pt.payload.movementMode);return}if(pt.type==="DROP_COMPLETE"){var Vt=pt.payload.completed.result;ke.flush(),vt(pt),ke.drop(Vt);return}if(vt(pt),pt.type==="FLUSH"){ke.abort();return}var Fn=$e.getState();Fn.phase==="DRAGGING"&&ke.update(Fn.critical,Fn.impact)}}}},sr=function(xe){return function(Ce){return function(ke){if(ke.type!=="DROP_ANIMATION_FINISHED"){Ce(ke);return}var $e=xe.getState();$e.phase!=="DROP_ANIMATING"&&Ft(!1),xe.dispatch(sd({completed:$e.completed}))}}},zr=function(xe){var Ce=null,ke=null;function $e(){ke&&(cancelAnimationFrame(ke),ke=null),Ce&&(Ce(),Ce=null)}return function(vt){return function(pt){if((pt.type==="FLUSH"||pt.type==="DROP_COMPLETE"||pt.type==="DROP_ANIMATION_FINISHED")&&$e(),vt(pt),pt.type==="DROP_ANIMATE"){var Bt={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var Fn=xe.getState();Fn.phase==="DROP_ANIMATING"&&xe.dispatch(Xd())}};ke=requestAnimationFrame(function(){ke=null,Ce=qn(window,[Bt])})}}}},Ir=function(xe){return function(){return function(Ce){return function(ke){(ke.type==="DROP_COMPLETE"||ke.type==="FLUSH"||ke.type==="DROP_ANIMATE")&&xe.stopPublishing(),Ce(ke)}}}},eo=function(xe){var Ce=!1;return function(){return function(ke){return function($e){if($e.type==="INITIAL_PUBLISH"){Ce=!0,xe.tryRecordFocus($e.payload.critical.draggable.id),ke($e),xe.tryRestoreFocusRecorded();return}if(ke($e),!!Ce){if($e.type==="FLUSH"){Ce=!1,xe.tryRestoreFocusRecorded();return}if($e.type==="DROP_COMPLETE"){Ce=!1;var vt=$e.payload.completed.result;vt.combine&&xe.tryShiftRecord(vt.draggableId,vt.combine.draggableId),xe.tryRestoreFocusRecorded()}}}}}},xo=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},ko=function(xe){return function(Ce){return function(ke){return function($e){if(xo($e)){xe.stop(),ke($e);return}if($e.type==="INITIAL_PUBLISH"){ke($e);var vt=Ce.getState();vt.phase!=="DRAGGING"&&Ft(!1),xe.start(vt);return}ke($e),xe.scroll(Ce.getState())}}}},$r=function(xe){return function(Ce){return function(ke){if(Ce(ke),ke.type==="PUBLISH_WHILE_DRAGGING"){var $e=xe.getState();$e.phase==="DROP_PENDING"&&($e.isWaiting||xe.dispatch(wd({reason:$e.reason})))}}}},So=Ke.qC,Xo=function(xe){var Ce=xe.dimensionMarshal,ke=xe.focusMarshal,$e=xe.styleMarshal,vt=xe.getResponders,pt=xe.announce,Bt=xe.autoScroller;return(0,Ke.MT)(Hs,So((0,Ke.md)(sc($e),Ir(Ce),Fa(Ce),mt,sr,zr,$r,ko(Bt),En,eo(ke),Wr(vt,pt))))},_r=function(){return{additions:{},removals:{},modified:{}}};function co(xe){var Ce=xe.registry,ke=xe.callbacks,$e=_r(),vt=null,pt=function(){vt||(ke.collectionStarting(),vt=requestAnimationFrame(function(){vt=null,cu();var Wn=$e,jn=Wn.additions,In=Wn.removals,ri=Wn.modified,ki=Object.keys(jn).map(function(to){return Ce.draggable.getById(to).getDimension(Ki)}).sort(function(to,ho){return to.descriptor.index-ho.descriptor.index}),Ar=Object.keys(ri).map(function(to){var ho=Ce.droppable.getById(to),Lo=ho.callbacks.getScrollWhileDragging();return{droppableId:to,scroll:Lo}}),Hr={additions:ki,removals:Object.keys(In),modified:Ar};$e=_r(),Mu(),ke.publish(Hr)}))},Bt=function(Wn){var jn=Wn.descriptor.id;$e.additions[jn]=Wn,$e.modified[Wn.descriptor.droppableId]=!0,$e.removals[jn]&&delete $e.removals[jn],pt()},Vt=function(Wn){var jn=Wn.descriptor;$e.removals[jn.id]=!0,$e.modified[jn.droppableId]=!0,$e.additions[jn.id]&&delete $e.additions[jn.id],pt()},Fn=function(){vt&&(cancelAnimationFrame(vt),vt=null,$e=_r())};return{add:Bt,remove:Vt,stop:Fn}}var Xr=function(xe){var Ce=xe.scrollHeight,ke=xe.scrollWidth,$e=xe.height,vt=xe.width,pt=gn({x:ke,y:Ce},{x:vt,y:$e}),Bt={x:Math.max(0,pt.x),y:Math.max(0,pt.y)};return Bt},Cr=function(){var xe=document.documentElement;return xe||Ft(!1),xe},oo=function(){var xe=Cr(),Ce=Xr({scrollHeight:xe.scrollHeight,scrollWidth:xe.scrollWidth,width:xe.clientWidth,height:xe.clientHeight});return Ce},Mo=function(){var xe=wt(),Ce=oo(),ke=xe.y,$e=xe.x,vt=Cr(),pt=vt.clientWidth,Bt=vt.clientHeight,Vt=$e+pt,Fn=ke+Bt,Xn=bi({top:ke,left:$e,right:Vt,bottom:Fn}),Wn={frame:Xn,scroll:{initial:xe,current:xe,max:Ce,diff:{value:Ki,displacement:Ki}}};return Wn},Zo=function(xe){var Ce=xe.critical,ke=xe.scrollOptions,$e=xe.registry;cu();var vt=Mo(),pt=vt.scroll.current,Bt=Ce.droppable,Vt=$e.droppable.getAllByType(Bt.type).map(function(jn){return jn.callbacks.getDimensionAndWatchScroll(pt,ke)}),Fn=$e.draggable.getAllByType(Ce.draggable.type).map(function(jn){return jn.getDimension(pt)}),Xn={draggables:Ii(Fn),droppables:Rr(Vt)};Mu();var Wn={dimensions:Xn,critical:Ce,viewport:vt};return Wn};function Wo(xe,Ce,ke){if(ke.descriptor.id===Ce.id||ke.descriptor.type!==Ce.type)return!1;var $e=xe.droppable.getById(ke.descriptor.droppableId);return $e.descriptor.mode==="virtual"}var Kr=function(xe,Ce){var ke=null,$e=co({callbacks:{publish:Ce.publishWhileDragging,collectionStarting:Ce.collectionStarting},registry:xe}),vt=function(ri,ki){xe.droppable.exists(ri)||Ft(!1),ke&&Ce.updateDroppableIsEnabled({id:ri,isEnabled:ki})},pt=function(ri,ki){ke&&(xe.droppable.exists(ri)||Ft(!1),Ce.updateDroppableIsCombineEnabled({id:ri,isCombineEnabled:ki}))},Bt=function(ri,ki){ke&&(xe.droppable.exists(ri)||Ft(!1),Ce.updateDroppableScroll({id:ri,newScroll:ki}))},Vt=function(ri,ki){ke&&xe.droppable.getById(ri).callbacks.scroll(ki)},Fn=function(){if(ke){$e.stop();var ri=ke.critical.droppable;xe.droppable.getAllByType(ri.type).forEach(function(ki){return ki.callbacks.dragStopped()}),ke.unsubscribe(),ke=null}},Xn=function(ri){ke||Ft(!1);var ki=ke.critical.draggable;ri.type==="ADDITION"&&Wo(xe,ki,ri.value)&&$e.add(ri.value),ri.type==="REMOVAL"&&Wo(xe,ki,ri.value)&&$e.remove(ri.value)},Wn=function(ri){ke&&Ft(!1);var ki=xe.draggable.getById(ri.draggableId),Ar=xe.droppable.getById(ki.descriptor.droppableId),Hr={draggable:ki.descriptor,droppable:Ar.descriptor},to=xe.subscribe(Xn);return ke={critical:Hr,unsubscribe:to},Zo({critical:Hr,registry:xe,scrollOptions:ri.scrollOptions})},jn={updateDroppableIsEnabled:vt,updateDroppableIsCombineEnabled:pt,scrollDroppable:Vt,updateDroppableScroll:Bt,startPublishing:Wn,stopPublishing:Fn};return jn},Yo=function(xe,Ce){return xe.phase==="IDLE"?!0:xe.phase!=="DROP_ANIMATING"||xe.completed.result.draggableId===Ce?!1:xe.completed.result.reason==="DROP"},ia=function(xe){window.scrollBy(xe.x,xe.y)},Ta=On(function(xe){return Qe(xe).filter(function(Ce){return!(!Ce.isEnabled||!Ce.frame)})}),pa=function(Ce,ke){var $e=er(Ta(ke),function(vt){return vt.frame||Ft(!1),Sc(vt.frame.pageMarginBox)(Ce)});return $e},ds=function(xe){var Ce=xe.center,ke=xe.destination,$e=xe.droppables;if(ke){var vt=$e[ke];return vt.frame?vt:null}var pt=pa(Ce,$e);return pt},ja={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(Ce){return Math.pow(Ce,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},na=function(xe,Ce){var ke=xe[Ce.size]*ja.startFromPercentage,$e=xe[Ce.size]*ja.maxScrollAtPercentage,vt={startScrollingFrom:ke,maxScrollValueAt:$e};return vt},Fo=function(xe){var Ce=xe.startOfRange,ke=xe.endOfRange,$e=xe.current,vt=ke-Ce;if(vt===0)return 0;var pt=$e-Ce,Bt=pt/vt;return Bt},Sa=1,hs=function(xe,Ce){if(xe>Ce.startScrollingFrom)return 0;if(xe<=Ce.maxScrollValueAt)return ja.maxPixelScroll;if(xe===Ce.startScrollingFrom)return Sa;var ke=Fo({startOfRange:Ce.maxScrollValueAt,endOfRange:Ce.startScrollingFrom,current:xe}),$e=1-ke,vt=ja.maxPixelScroll*ja.ease($e);return Math.ceil(vt)},Qa=ja.durationDampening.accelerateAt,Ns=ja.durationDampening.stopDampeningAt,$o=function(xe,Ce){var ke=Ce,$e=Ns,vt=Date.now(),pt=vt-ke;if(pt>=Ns)return xe;if(pt<Qa)return Sa;var Bt=Fo({startOfRange:Qa,endOfRange:$e,current:pt}),Vt=xe*ja.ease(Bt);return Math.ceil(Vt)},Io=function(xe){var Ce=xe.distanceToEdge,ke=xe.thresholds,$e=xe.dragStartTime,vt=xe.shouldUseTimeDampening,pt=hs(Ce,ke);return pt===0?0:vt?Math.max($o(pt,$e),Sa):pt},Go=function(xe){var Ce=xe.container,ke=xe.distanceToEdges,$e=xe.dragStartTime,vt=xe.axis,pt=xe.shouldUseTimeDampening,Bt=na(Ce,vt),Vt=ke[vt.end]<ke[vt.start];return Vt?Io({distanceToEdge:ke[vt.end],thresholds:Bt,dragStartTime:$e,shouldUseTimeDampening:pt}):-1*Io({distanceToEdge:ke[vt.start],thresholds:Bt,dragStartTime:$e,shouldUseTimeDampening:pt})},Co=function(xe){var Ce=xe.container,ke=xe.subject,$e=xe.proposedScroll,vt=ke.height>Ce.height,pt=ke.width>Ce.width;return!pt&&!vt?$e:pt&&vt?null:{x:pt?0:$e.x,y:vt?0:$e.y}},Aa=pr(function(xe){return xe===0?0:xe}),Po=function(xe){var Ce=xe.dragStartTime,ke=xe.container,$e=xe.subject,vt=xe.center,pt=xe.shouldUseTimeDampening,Bt={top:vt.y-ke.top,right:ke.right-vt.x,bottom:ke.bottom-vt.y,left:vt.x-ke.left},Vt=Go({container:ke,distanceToEdges:Bt,dragStartTime:Ce,axis:pi,shouldUseTimeDampening:pt}),Fn=Go({container:ke,distanceToEdges:Bt,dragStartTime:Ce,axis:Tr,shouldUseTimeDampening:pt}),Xn=Aa({x:Fn,y:Vt});if(oi(Xn,Ki))return null;var Wn=Co({container:ke,subject:$e,proposedScroll:Xn});return Wn?oi(Wn,Ki)?null:Wn:null},Jo=pr(function(xe){return xe===0?0:xe>0?1:-1}),ga=function(){var xe=function(ke,$e){return ke<0?ke:ke>$e?ke-$e:0};return function(Ce){var ke=Ce.current,$e=Ce.max,vt=Ce.change,pt=Gi(ke,vt),Bt={x:xe(pt.x,$e.x),y:xe(pt.y,$e.y)};return oi(Bt,Ki)?null:Bt}}(),ma=function(Ce){var ke=Ce.max,$e=Ce.current,vt=Ce.change,pt={x:Math.max($e.x,ke.x),y:Math.max($e.y,ke.y)},Bt=Jo(vt),Vt=ga({max:pt,current:$e,change:Bt});return!Vt||Bt.x!==0&&Vt.x===0||Bt.y!==0&&Vt.y===0},Us=function(Ce,ke){return ma({current:Ce.scroll.current,max:Ce.scroll.max,change:ke})},Zs=function(Ce,ke){if(!Us(Ce,ke))return null;var $e=Ce.scroll.max,vt=Ce.scroll.current;return ga({current:vt,max:$e,change:ke})},cl=function(Ce,ke){var $e=Ce.frame;return $e?ma({current:$e.scroll.current,max:$e.scroll.max,change:ke}):!1},ka=function(Ce,ke){var $e=Ce.frame;return!$e||!cl(Ce,ke)?null:ga({current:$e.scroll.current,max:$e.scroll.max,change:ke})},il=function(xe){var Ce=xe.viewport,ke=xe.subject,$e=xe.center,vt=xe.dragStartTime,pt=xe.shouldUseTimeDampening,Bt=Po({dragStartTime:vt,container:Ce.frame,subject:ke,center:$e,shouldUseTimeDampening:pt});return Bt&&Us(Ce,Bt)?Bt:null},Fs=function(xe){var Ce=xe.droppable,ke=xe.subject,$e=xe.center,vt=xe.dragStartTime,pt=xe.shouldUseTimeDampening,Bt=Ce.frame;if(!Bt)return null;var Vt=Po({dragStartTime:vt,container:Bt.pageMarginBox,subject:ke,center:$e,shouldUseTimeDampening:pt});return Vt&&cl(Ce,Vt)?Vt:null},Ws=function(xe){var Ce=xe.state,ke=xe.dragStartTime,$e=xe.shouldUseTimeDampening,vt=xe.scrollWindow,pt=xe.scrollDroppable,Bt=Ce.current.page.borderBoxCenter,Vt=Ce.dimensions.draggables[Ce.critical.draggable.id],Fn=Vt.page.marginBox;if(Ce.isWindowScrollAllowed){var Xn=Ce.viewport,Wn=il({dragStartTime:ke,viewport:Xn,subject:Fn,center:Bt,shouldUseTimeDampening:$e});if(Wn){vt(Wn);return}}var jn=ds({center:Bt,destination:Js(Ce.impact),droppables:Ce.dimensions.droppables});if(jn){var In=Fs({dragStartTime:ke,droppable:jn,subject:Fn,center:Bt,shouldUseTimeDampening:$e});In&&pt(jn.descriptor.id,In)}},uc=function(xe){var Ce=xe.scrollWindow,ke=xe.scrollDroppable,$e=It(Ce),vt=It(ke),pt=null,Bt=function(Wn){pt||Ft(!1);var jn=pt,In=jn.shouldUseTimeDampening,ri=jn.dragStartTime;Ws({state:Wn,scrollWindow:$e,scrollDroppable:vt,dragStartTime:ri,shouldUseTimeDampening:In})},Vt=function(Wn){cu(),pt&&Ft(!1);var jn=Date.now(),In=!1,ri=function(){In=!0};Ws({state:Wn,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:ri,scrollDroppable:ri}),pt={dragStartTime:jn,shouldUseTimeDampening:In},Mu(),In&&Bt(Wn)},Fn=function(){pt&&($e.cancel(),vt.cancel(),pt=null)};return{start:Vt,stop:Fn,scroll:Bt}},Ia=function(xe){var Ce=xe.move,ke=xe.scrollDroppable,$e=xe.scrollWindow,vt=function(Xn,Wn){var jn=Gi(Xn.current.client.selection,Wn);Ce({client:jn})},pt=function(Xn,Wn){if(!cl(Xn,Wn))return Wn;var jn=ka(Xn,Wn);if(!jn)return ke(Xn.descriptor.id,Wn),null;var In=gn(Wn,jn);ke(Xn.descriptor.id,In);var ri=gn(Wn,In);return ri},Bt=function(Xn,Wn,jn){if(!Xn||!Us(Wn,jn))return jn;var In=Zs(Wn,jn);if(!In)return $e(jn),null;var ri=gn(jn,In);$e(ri);var ki=gn(jn,ri);return ki},Vt=function(Xn){var Wn=Xn.scrollJumpRequest;if(Wn){var jn=Js(Xn.impact);jn||Ft(!1);var In=pt(Xn.dimensions.droppables[jn],Wn);if(In){var ri=Xn.viewport,ki=Bt(Xn.isWindowScrollAllowed,ri,In);ki&&vt(Xn,ki)}}};return Vt},$a=function(xe){var Ce=xe.scrollDroppable,ke=xe.scrollWindow,$e=xe.move,vt=uc({scrollWindow:ke,scrollDroppable:Ce}),pt=Ia({move:$e,scrollWindow:ke,scrollDroppable:Ce}),Bt=function(Xn){if(Xn.phase==="DRAGGING"){if(Xn.movementMode==="FLUID"){vt.scroll(Xn);return}Xn.scrollJumpRequest&&pt(Xn)}},Vt={scroll:Bt,start:vt.start,stop:vt.stop};return Vt},Oa="data-rbd",qa=function(){var xe=Oa+"-drag-handle";return{base:xe,draggableId:xe+"-draggable-id",contextId:xe+"-context-id"}}(),As=function(){var xe=Oa+"-draggable";return{base:xe,contextId:xe+"-context-id",id:xe+"-id"}}(),da=function(){var xe=Oa+"-droppable";return{base:xe,contextId:xe+"-context-id",id:xe+"-id"}}(),Xa={contextId:Oa+"-scroll-container-context-id"},_s=function(Ce){return function(ke){return"["+ke+'="'+Ce+'"]'}},dl=function(Ce,ke){return Ce.map(function($e){var vt=$e.styles[ke];return vt?$e.selector+" { "+vt+" }":""}).join(" ")},hu="pointer-events: none;",Yl=function(xe){var Ce=_s(xe),ke=function(){var Vt=`
|
|
|
cursor: -webkit-grab;
|
|
|
cursor: grab;
|
|
|
`;return{selector:Ce(qa.contextId),styles:{always:`
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
|
touch-action: manipulation;
|
|
|
`,resting:Vt,dragging:hu,dropAnimating:Vt}}}(),$e=function(){var Vt=`
|
|
|
transition: `+Il.outOfTheWay+`;
|
|
|
`;return{selector:Ce(As.contextId),styles:{dragging:Vt,dropAnimating:Vt,userCancel:Vt}}}(),vt={selector:Ce(da.contextId),styles:{always:"overflow-anchor: none;"}},pt={selector:"body",styles:{dragging:`
|
|
|
cursor: grabbing;
|
|
|
cursor: -webkit-grabbing;
|
|
|
user-select: none;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
overflow-anchor: none;
|
|
|
`}},Bt=[$e,ke,vt,pt];return{always:dl(Bt,"always"),resting:dl(Bt,"resting"),dragging:dl(Bt,"dragging"),dropAnimating:dl(Bt,"dropAnimating"),userCancel:dl(Bt,"userCancel")}},Ds=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?ge.useLayoutEffect:ge.useEffect,Jl=function(){var Ce=document.querySelector("head");return Ce||Ft(!1),Ce},Ql=function(Ce){var ke=document.createElement("style");return Ce&&ke.setAttribute("nonce",Ce),ke.type="text/css",ke};function za(xe,Ce){var ke=hn(function(){return Yl(xe)},[xe]),$e=(0,ge.useRef)(null),vt=(0,ge.useRef)(null),pt=fn(On(function(jn){var In=vt.current;In||Ft(!1),In.textContent=jn}),[]),Bt=fn(function(jn){var In=$e.current;In||Ft(!1),In.textContent=jn},[]);Ds(function(){!$e.current&&!vt.current||Ft(!1);var jn=Ql(Ce),In=Ql(Ce);return $e.current=jn,vt.current=In,jn.setAttribute(Oa+"-always",xe),In.setAttribute(Oa+"-dynamic",xe),Jl().appendChild(jn),Jl().appendChild(In),Bt(ke.always),pt(ke.resting),function(){var ri=function(Ar){var Hr=Ar.current;Hr||Ft(!1),Jl().removeChild(Hr),Ar.current=null};ri($e),ri(vt)}},[Ce,Bt,pt,ke.always,ke.resting,xe]);var Vt=fn(function(){return pt(ke.dragging)},[pt,ke.dragging]),Fn=fn(function(jn){if(jn==="DROP"){pt(ke.dropAnimating);return}pt(ke.userCancel)},[pt,ke.dropAnimating,ke.userCancel]),Xn=fn(function(){vt.current&&pt(ke.resting)},[pt,ke.resting]),Wn=hn(function(){return{dragging:Vt,dropping:Fn,resting:Xn}},[Vt,Fn,Xn]);return Wn}var rl=function(xe){return xe&&xe.ownerDocument?xe.ownerDocument.defaultView:window};function es(xe){return xe instanceof rl(xe).HTMLElement}function Ya(xe,Ce){var ke="["+qa.contextId+'="'+xe+'"]',$e=qi(document.querySelectorAll(ke));if(!$e.length)return null;var vt=er($e,function(pt){return pt.getAttribute(qa.draggableId)===Ce});return!vt||!es(vt)?null:vt}function fu(xe){var Ce=(0,ge.useRef)({}),ke=(0,ge.useRef)(null),$e=(0,ge.useRef)(null),vt=(0,ge.useRef)(!1),pt=fn(function(In,ri){var ki={id:In,focus:ri};return Ce.current[In]=ki,function(){var Hr=Ce.current,to=Hr[In];to!==ki&&delete Hr[In]}},[]),Bt=fn(function(In){var ri=Ya(xe,In);ri&&ri!==document.activeElement&&ri.focus()},[xe]),Vt=fn(function(In,ri){ke.current===In&&(ke.current=ri)},[]),Fn=fn(function(){$e.current||vt.current&&($e.current=requestAnimationFrame(function(){$e.current=null;var In=ke.current;In&&Bt(In)}))},[Bt]),Xn=fn(function(In){ke.current=null;var ri=document.activeElement;ri&&ri.getAttribute(qa.draggableId)===In&&(ke.current=In)},[]);Ds(function(){return vt.current=!0,function(){vt.current=!1;var In=$e.current;In&&cancelAnimationFrame(In)}},[]);var Wn=hn(function(){return{register:pt,tryRecordFocus:Xn,tryRestoreFocusRecorded:Fn,tryShiftRecord:Vt}},[pt,Xn,Fn,Vt]);return Wn}function Pc(){var xe={draggables:{},droppables:{}},Ce=[];function ke(jn){return Ce.push(jn),function(){var ri=Ce.indexOf(jn);ri!==-1&&Ce.splice(ri,1)}}function $e(jn){Ce.length&&Ce.forEach(function(In){return In(jn)})}function vt(jn){return xe.draggables[jn]||null}function pt(jn){var In=vt(jn);return In||Ft(!1),In}var Bt={register:function(In){xe.draggables[In.descriptor.id]=In,$e({type:"ADDITION",value:In})},update:function(In,ri){var ki=xe.draggables[ri.descriptor.id];ki&&ki.uniqueId===In.uniqueId&&(delete xe.draggables[ri.descriptor.id],xe.draggables[In.descriptor.id]=In)},unregister:function(In){var ri=In.descriptor.id,ki=vt(ri);ki&&In.uniqueId===ki.uniqueId&&(delete xe.draggables[ri],$e({type:"REMOVAL",value:In}))},getById:pt,findById:vt,exists:function(In){return!!vt(In)},getAllByType:function(In){return Jr(xe.draggables).filter(function(ri){return ri.descriptor.type===In})}};function Vt(jn){return xe.droppables[jn]||null}function Fn(jn){var In=Vt(jn);return In||Ft(!1),In}var Xn={register:function(In){xe.droppables[In.descriptor.id]=In},unregister:function(In){var ri=Vt(In.descriptor.id);ri&&In.uniqueId===ri.uniqueId&&delete xe.droppables[In.descriptor.id]},getById:Fn,findById:Vt,exists:function(In){return!!Vt(In)},getAllByType:function(In){return Jr(xe.droppables).filter(function(ri){return ri.descriptor.type===In})}};function Wn(){xe.draggables={},xe.droppables={},Ce.length=0}return{draggable:Bt,droppable:Xn,subscribe:ke,clean:Wn}}function Nu(){var xe=hn(Pc,[]);return(0,ge.useEffect)(function(){return function(){requestAnimationFrame(xe.clean)}},[xe]),xe}var Fu=ge.createContext(null),gu=function(){var xe=document.body;return xe||Ft(!1),xe},ql={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Da=function(Ce){return"rbd-announcement-"+Ce};function rs(xe){var Ce=hn(function(){return Da(xe)},[xe]),ke=(0,ge.useRef)(null);(0,ge.useEffect)(function(){var pt=document.createElement("div");return ke.current=pt,pt.id=Ce,pt.setAttribute("aria-live","assertive"),pt.setAttribute("aria-atomic","true"),(0,dt.Z)(pt.style,ql),gu().appendChild(pt),function(){setTimeout(function(){var Fn=gu();Fn.contains(pt)&&Fn.removeChild(pt),pt===ke.current&&(ke.current=null)})}},[Ce]);var $e=fn(function(vt){var pt=ke.current;if(pt){pt.textContent=vt;return}},[]);return $e}var Bs=0,os={separator:"::"};function Ca(){Bs=0}function Ts(xe,Ce){return Ce===void 0&&(Ce=os),hn(function(){return""+xe+Ce.separator+Bs++},[Ce.separator,xe])}function Rl(xe){var Ce=xe.contextId,ke=xe.uniqueId;return"rbd-hidden-text-"+Ce+"-"+ke}function zu(xe){var Ce=xe.contextId,ke=xe.text,$e=Ts("hidden-text",{separator:"-"}),vt=hn(function(){return Rl({contextId:Ce,uniqueId:$e})},[$e,Ce]);return(0,ge.useEffect)(function(){var Bt=document.createElement("div");return Bt.id=vt,Bt.textContent=ke,Bt.style.display="none",gu().appendChild(Bt),function(){var Fn=gu();Fn.contains(Bt)&&Fn.removeChild(Bt)}},[vt,ke]),vt}var Cd=ge.createContext(null),mn={react:"^16.8.5","react-dom":"^16.8.5"},Rc=/(\d+)\.(\d+)\.(\d+)/,Xu=function(Ce){var ke=Rc.exec(Ce);ke==null&&Ft(!1);var $e=Number(ke[1]),vt=Number(ke[2]),pt=Number(ke[3]);return{major:$e,minor:vt,patch:pt,raw:Ce}},af=function(Ce,ke){return ke.major>Ce.major?!0:ke.major<Ce.major?!1:ke.minor>Ce.minor?!0:ke.minor<Ce.minor?!1:ke.patch>=Ce.patch},bd=function(xe,Ce){var ke=Xu(xe),$e=Xu(Ce);af(ke,$e)},Ed=`
|
|
|
We expect a html5 doctype: <!doctype html>
|
|
|
This is to ensure consistent browser layout and measurement
|
|
|
|
|
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
|
|
|
`,Dh=function(xe){var Ce=xe.doctype;Ce&&(Ce.name.toLowerCase(),Ce.publicId)};function Qg(xe){}function Gs(xe,Ce){}function Qd(){Gs(function(){bd(mn.react,ge.version),Dh(document)},[])}function Md(xe){var Ce=(0,ge.useRef)(xe);return(0,ge.useEffect)(function(){Ce.current=xe}),Ce}function qd(){var xe=null;function Ce(){return!!xe}function ke(Bt){return Bt===xe}function $e(Bt){xe&&Ft(!1);var Vt={abandon:Bt};return xe=Vt,Vt}function vt(){xe||Ft(!1),xe=null}function pt(){xe&&(xe.abandon(),vt())}return{isClaimed:Ce,isActive:ke,claim:$e,release:vt,tryAbandon:pt}}var sf=9,Zf=13,eh=27,th=32,pu=33,Ld=34,lf=35,Yu=36,jc=37,Nd=38,cd=39,jl=40,dd,Bh=(dd={},dd[Zf]=!0,dd[sf]=!0,dd),eu=function(xe){Bh[xe.keyCode]&&xe.preventDefault()},wc=function(){var xe="visibilitychange";if(typeof document=="undefined")return xe;var Ce=[xe,"ms"+xe,"webkit"+xe,"moz"+xe,"o"+xe],ke=er(Ce,function($e){return"on"+$e in document});return ke||xe}(),nh=0,ih=5;function zc(xe,Ce){return Math.abs(Ce.x-xe.x)>=ih||Math.abs(Ce.y-xe.y)>=ih}var Cl={type:"IDLE"};function Th(xe){var Ce=xe.cancel,ke=xe.completed,$e=xe.getPhase,vt=xe.setPhase;return[{eventName:"mousemove",fn:function(Bt){var Vt=Bt.button,Fn=Bt.clientX,Xn=Bt.clientY;if(Vt===nh){var Wn={x:Fn,y:Xn},jn=$e();if(jn.type==="DRAGGING"){Bt.preventDefault(),jn.actions.move(Wn);return}jn.type!=="PENDING"&&Ft(!1);var In=jn.point;if(zc(In,Wn)){Bt.preventDefault();var ri=jn.actions.fluidLift(Wn);vt({type:"DRAGGING",actions:ri})}}}},{eventName:"mouseup",fn:function(Bt){var Vt=$e();if(Vt.type!=="DRAGGING"){Ce();return}Bt.preventDefault(),Vt.actions.drop({shouldBlockNextClick:!0}),ke()}},{eventName:"mousedown",fn:function(Bt){$e().type==="DRAGGING"&&Bt.preventDefault(),Ce()}},{eventName:"keydown",fn:function(Bt){var Vt=$e();if(Vt.type==="PENDING"){Ce();return}if(Bt.keyCode===eh){Bt.preventDefault(),Ce();return}eu(Bt)}},{eventName:"resize",fn:Ce},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){$e().type==="PENDING"&&Ce()}},{eventName:"webkitmouseforcedown",fn:function(Bt){var Vt=$e();if(Vt.type==="IDLE"&&Ft(!1),Vt.actions.shouldRespectForcePress()){Ce();return}Bt.preventDefault()}},{eventName:wc,fn:Ce}]}function $s(xe){var Ce=(0,ge.useRef)(Cl),ke=(0,ge.useRef)(St),$e=hn(function(){return{eventName:"mousedown",fn:function(jn){if(!jn.defaultPrevented&&jn.button===nh&&!(jn.ctrlKey||jn.metaKey||jn.shiftKey||jn.altKey)){var In=xe.findClosestDraggableId(jn);if(In){var ri=xe.tryGetLock(In,Bt,{sourceEvent:jn});if(ri){jn.preventDefault();var ki={x:jn.clientX,y:jn.clientY};ke.current(),Xn(ri,ki)}}}}}},[xe]),vt=hn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(jn){if(!jn.defaultPrevented){var In=xe.findClosestDraggableId(jn);if(In){var ri=xe.findOptionsForDraggable(In);ri&&(ri.shouldRespectForcePress||xe.canGetLock(In)&&jn.preventDefault())}}}}},[xe]),pt=fn(function(){var jn={passive:!1,capture:!0};ke.current=qn(window,[vt,$e],jn)},[vt,$e]),Bt=fn(function(){var Wn=Ce.current;Wn.type!=="IDLE"&&(Ce.current=Cl,ke.current(),pt())},[pt]),Vt=fn(function(){var Wn=Ce.current;Bt(),Wn.type==="DRAGGING"&&Wn.actions.cancel({shouldBlockNextClick:!0}),Wn.type==="PENDING"&&Wn.actions.abort()},[Bt]),Fn=fn(function(){var jn={capture:!0,passive:!1},In=Th({cancel:Vt,completed:Bt,getPhase:function(){return Ce.current},setPhase:function(ki){Ce.current=ki}});ke.current=qn(window,In,jn)},[Vt,Bt]),Xn=fn(function(jn,In){Ce.current.type!=="IDLE"&&Ft(!1),Ce.current={type:"PENDING",point:In,actions:jn},Fn()},[Fn]);Ds(function(){return pt(),function(){ke.current()}},[pt])}var xa;function ls(){}var Sl=(xa={},xa[Ld]=!0,xa[pu]=!0,xa[Yu]=!0,xa[lf]=!0,xa);function Au(xe,Ce){function ke(){Ce(),xe.cancel()}function $e(){Ce(),xe.drop()}return[{eventName:"keydown",fn:function(pt){if(pt.keyCode===eh){pt.preventDefault(),ke();return}if(pt.keyCode===th){pt.preventDefault(),$e();return}if(pt.keyCode===jl){pt.preventDefault(),xe.moveDown();return}if(pt.keyCode===Nd){pt.preventDefault(),xe.moveUp();return}if(pt.keyCode===cd){pt.preventDefault(),xe.moveRight();return}if(pt.keyCode===jc){pt.preventDefault(),xe.moveLeft();return}if(Sl[pt.keyCode]){pt.preventDefault();return}eu(pt)}},{eventName:"mousedown",fn:ke},{eventName:"mouseup",fn:ke},{eventName:"click",fn:ke},{eventName:"touchstart",fn:ke},{eventName:"resize",fn:ke},{eventName:"wheel",fn:ke,options:{passive:!0}},{eventName:wc,fn:ke}]}function Du(xe){var Ce=(0,ge.useRef)(ls),ke=hn(function(){return{eventName:"keydown",fn:function(pt){if(pt.defaultPrevented||pt.keyCode!==th)return;var Bt=xe.findClosestDraggableId(pt);if(!Bt)return;var Vt=xe.tryGetLock(Bt,Wn,{sourceEvent:pt});if(!Vt)return;pt.preventDefault();var Fn=!0,Xn=Vt.snapLift();Ce.current();function Wn(){Fn||Ft(!1),Fn=!1,Ce.current(),$e()}Ce.current=qn(window,Au(Xn,Wn),{capture:!0,passive:!1})}}},[xe]),$e=fn(function(){var pt={passive:!1,capture:!0};Ce.current=qn(window,[ke],pt)},[ke]);Ds(function(){return $e(),function(){Ce.current()}},[$e])}var Fd={type:"IDLE"},Hc=120,rh=.15;function Hu(xe){var Ce=xe.cancel,ke=xe.getPhase;return[{eventName:"orientationchange",fn:Ce},{eventName:"resize",fn:Ce},{eventName:"contextmenu",fn:function(vt){vt.preventDefault()}},{eventName:"keydown",fn:function(vt){if(ke().type!=="DRAGGING"){Ce();return}vt.keyCode===eh&&vt.preventDefault(),Ce()}},{eventName:wc,fn:Ce}]}function Cc(xe){var Ce=xe.cancel,ke=xe.completed,$e=xe.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(pt){var Bt=$e();if(Bt.type!=="DRAGGING"){Ce();return}Bt.hasMoved=!0;var Vt=pt.touches[0],Fn=Vt.clientX,Xn=Vt.clientY,Wn={x:Fn,y:Xn};pt.preventDefault(),Bt.actions.move(Wn)}},{eventName:"touchend",fn:function(pt){var Bt=$e();if(Bt.type!=="DRAGGING"){Ce();return}pt.preventDefault(),Bt.actions.drop({shouldBlockNextClick:!0}),ke()}},{eventName:"touchcancel",fn:function(pt){if($e().type!=="DRAGGING"){Ce();return}pt.preventDefault(),Ce()}},{eventName:"touchforcechange",fn:function(pt){var Bt=$e();Bt.type==="IDLE"&&Ft(!1);var Vt=pt.touches[0];if(Vt){var Fn=Vt.force>=rh;if(Fn){var Xn=Bt.actions.shouldRespectForcePress();if(Bt.type==="PENDING"){Xn&&Ce();return}if(Xn){if(Bt.hasMoved){pt.preventDefault();return}Ce();return}pt.preventDefault()}}}},{eventName:wc,fn:Ce}]}function Wf(xe){var Ce=(0,ge.useRef)(Fd),ke=(0,ge.useRef)(St),$e=fn(function(){return Ce.current},[]),vt=fn(function(ri){Ce.current=ri},[]),pt=hn(function(){return{eventName:"touchstart",fn:function(ri){if(!ri.defaultPrevented){var ki=xe.findClosestDraggableId(ri);if(ki){var Ar=xe.tryGetLock(ki,Vt,{sourceEvent:ri});if(Ar){var Hr=ri.touches[0],to=Hr.clientX,ho=Hr.clientY,Lo={x:to,y:ho};ke.current(),jn(Ar,Lo)}}}}}},[xe]),Bt=fn(function(){var ri={capture:!0,passive:!1};ke.current=qn(window,[pt],ri)},[pt]),Vt=fn(function(){var In=Ce.current;In.type!=="IDLE"&&(In.type==="PENDING"&&clearTimeout(In.longPressTimerId),vt(Fd),ke.current(),Bt())},[Bt,vt]),Fn=fn(function(){var In=Ce.current;Vt(),In.type==="DRAGGING"&&In.actions.cancel({shouldBlockNextClick:!0}),In.type==="PENDING"&&In.actions.abort()},[Vt]),Xn=fn(function(){var ri={capture:!0,passive:!1},ki={cancel:Fn,completed:Vt,getPhase:$e},Ar=qn(window,Cc(ki),ri),Hr=qn(window,Hu(ki),ri);ke.current=function(){Ar(),Hr()}},[Fn,$e,Vt]),Wn=fn(function(){var ri=$e();ri.type!=="PENDING"&&Ft(!1);var ki=ri.actions.fluidLift(ri.point);vt({type:"DRAGGING",actions:ki,hasMoved:!1})},[$e,vt]),jn=fn(function(ri,ki){$e().type!=="IDLE"&&Ft(!1);var Ar=setTimeout(Wn,Hc);vt({type:"PENDING",point:ki,actions:ri,longPressTimerId:Ar}),Xn()},[Xn,$e,vt,Wn]);Ds(function(){return Bt(),function(){ke.current();var ki=$e();ki.type==="PENDING"&&(clearTimeout(ki.longPressTimerId),vt(Fd))}},[$e,Bt,vt]),Ds(function(){var ri=qn(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return ri},[])}function Gf(xe){}var $f={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Ad(xe,Ce){if(Ce==null)return!1;var ke=!!$f[Ce.tagName.toLowerCase()];if(ke)return!0;var $e=Ce.getAttribute("contenteditable");return $e==="true"||$e===""?!0:Ce===xe?!1:Ad(xe,Ce.parentElement)}function hg(xe,Ce){var ke=Ce.target;return es(ke)?Ad(xe,ke):!1}var fg=function(xe){return bi(xe.getBoundingClientRect()).center};function gg(xe){return xe instanceof rl(xe).Element}var bc=function(){var xe="matches";if(typeof document=="undefined")return xe;var Ce=[xe,"msMatchesSelector","webkitMatchesSelector"],ke=er(Ce,function($e){return $e in Element.prototype});return ke||xe}();function pg(xe,Ce){return xe==null?null:xe[bc](Ce)?xe:pg(xe.parentElement,Ce)}function mg(xe,Ce){return xe.closest?xe.closest(Ce):pg(xe,Ce)}function kh(xe){return"["+qa.contextId+'="'+xe+'"]'}function oh(xe,Ce){var ke=Ce.target;if(!gg(ke))return null;var $e=kh(xe),vt=mg(ke,$e);return!vt||!es(vt)?null:vt}function vg(xe,Ce){var ke=oh(xe,Ce);return ke?ke.getAttribute(qa.draggableId):null}function Ec(xe,Ce){var ke="["+As.contextId+'="'+xe+'"]',$e=qi(document.querySelectorAll(ke)),vt=er($e,function(pt){return pt.getAttribute(As.id)===Ce});return!vt||!es(vt)?null:vt}function yg(xe){xe.preventDefault()}function ah(xe){var Ce=xe.expected,ke=xe.phase,$e=xe.isLockActive,vt=xe.shouldWarn;return!(!$e()||Ce!==ke)}function Sg(xe){var Ce=xe.lockAPI,ke=xe.store,$e=xe.registry,vt=xe.draggableId;if(Ce.isClaimed())return!1;var pt=$e.draggable.findById(vt);return!(!pt||!pt.options.isEnabled||!Yo(ke.getState(),vt))}function xg(xe){var Ce=xe.lockAPI,ke=xe.contextId,$e=xe.store,vt=xe.registry,pt=xe.draggableId,Bt=xe.forceSensorStop,Vt=xe.sourceEvent,Fn=Sg({lockAPI:Ce,store:$e,registry:vt,draggableId:pt});if(!Fn)return null;var Xn=vt.draggable.getById(pt),Wn=Ec(ke,Xn.descriptor.id);if(!Wn||Vt&&!Xn.options.canDragInteractiveElements&&hg(Wn,Vt))return null;var jn=Ce.claim(Bt||St),In="PRE_DRAG";function ri(){return Xn.options.shouldRespectForcePress}function ki(){return Ce.isActive(jn)}function Ar(va,Ka){ah({expected:va,phase:In,isLockActive:ki,shouldWarn:!0})&&$e.dispatch(Ka())}var Hr=Ar.bind(null,"DRAGGING");function to(va){function Ka(){Ce.release(),In="COMPLETED"}In!=="PRE_DRAG"&&(Ka(),In!=="PRE_DRAG"&&Ft(!1)),$e.dispatch(Ja(va.liftActionArgs)),In="DRAGGING";function pl(Wa,ol){if(ol===void 0&&(ol={shouldBlockNextClick:!1}),va.cleanup(),ol.shouldBlockNextClick){var nu=qn(window,[{eventName:"click",fn:yg,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(nu)}Ka(),$e.dispatch(wd({reason:Wa}))}return(0,dt.Z)({isActive:function(){return ah({expected:"DRAGGING",phase:In,isLockActive:ki,shouldWarn:!1})},shouldRespectForcePress:ri,drop:function(ol){return pl("DROP",ol)},cancel:function(ol){return pl("CANCEL",ol)}},va.actions)}function ho(va){var Ka=It(function(Wa){Hr(function(){return Va({client:Wa})})}),pl=to({liftActionArgs:{id:pt,clientSelection:va,movementMode:"FLUID"},cleanup:function(){return Ka.cancel()},actions:{move:Ka}});return(0,dt.Z)({},pl,{move:Ka})}function Lo(){var va={moveUp:function(){return Hr(Na)},moveRight:function(){return Hr(Do)},moveDown:function(){return Hr(ad)},moveLeft:function(){return Hr(Rf)}};return to({liftActionArgs:{id:pt,clientSelection:fg(Wn),movementMode:"SNAP"},cleanup:St,actions:va})}function bo(){var va=ah({expected:"PRE_DRAG",phase:In,isLockActive:ki,shouldWarn:!0});va&&Ce.release()}var Uo={isActive:function(){return ah({expected:"PRE_DRAG",phase:In,isLockActive:ki,shouldWarn:!1})},shouldRespectForcePress:ri,fluidLift:ho,snapLift:Lo,abort:bo};return Uo}var Pg=[$s,Du,Wf];function Wp(xe){var Ce=xe.contextId,ke=xe.store,$e=xe.registry,vt=xe.customSensors,pt=xe.enableDefaultSensors,Bt=[].concat(pt?Pg:[],vt||[]),Vt=(0,ge.useState)(function(){return qd()})[0],Fn=fn(function(ho,Lo){ho.isDragging&&!Lo.isDragging&&Vt.tryAbandon()},[Vt]);Ds(function(){var ho=ke.getState(),Lo=ke.subscribe(function(){var bo=ke.getState();Fn(ho,bo),ho=bo});return Lo},[Vt,ke,Fn]),Ds(function(){return Vt.tryAbandon},[Vt.tryAbandon]);var Xn=fn(function(to){return Sg({lockAPI:Vt,registry:$e,store:ke,draggableId:to})},[Vt,$e,ke]),Wn=fn(function(to,ho,Lo){return xg({lockAPI:Vt,registry:$e,contextId:Ce,store:ke,draggableId:to,forceSensorStop:ho,sourceEvent:Lo&&Lo.sourceEvent?Lo.sourceEvent:null})},[Ce,Vt,$e,ke]),jn=fn(function(to){return vg(Ce,to)},[Ce]),In=fn(function(to){var ho=$e.draggable.findById(to);return ho?ho.options:null},[$e.draggable]),ri=fn(function(){Vt.isClaimed()&&(Vt.tryAbandon(),ke.getState().phase!=="IDLE"&&ke.dispatch(fa()))},[Vt,ke]),ki=fn(Vt.isClaimed,[Vt]),Ar=hn(function(){return{canGetLock:Xn,tryGetLock:Wn,findClosestDraggableId:jn,findOptionsForDraggable:In,tryReleaseLock:ri,isLockClaimed:ki}},[Xn,Wn,jn,In,ri,ki]);Gf(Bt);for(var Hr=0;Hr<Bt.length;Hr++)Bt[Hr](Ar)}var qg=function(Ce){return{onBeforeCapture:Ce.onBeforeCapture,onBeforeDragStart:Ce.onBeforeDragStart,onDragStart:Ce.onDragStart,onDragEnd:Ce.onDragEnd,onDragUpdate:Ce.onDragUpdate}};function Dd(xe){return xe.current||Ft(!1),xe.current}function Kf(xe){var Ce=xe.contextId,ke=xe.setCallbacks,$e=xe.sensors,vt=xe.nonce,pt=xe.dragHandleUsageInstructions,Bt=(0,ge.useRef)(null);Qd();var Vt=Md(xe),Fn=fn(function(){return qg(Vt.current)},[Vt]),Xn=rs(Ce),Wn=zu({contextId:Ce,text:pt}),jn=za(Ce,vt),In=fn(function(Wa){Dd(Bt).dispatch(Wa)},[]),ri=hn(function(){return(0,Ke.DE)({publishWhileDragging:nl,updateDroppableScroll:Pa,updateDroppableIsEnabled:Ll,updateDroppableIsCombineEnabled:wa,collectionStarting:od},In)},[In]),ki=Nu(),Ar=hn(function(){return Kr(ki,ri)},[ki,ri]),Hr=hn(function(){return $a((0,dt.Z)({scrollWindow:ia,scrollDroppable:Ar.scrollDroppable},(0,Ke.DE)({move:Va},In)))},[Ar.scrollDroppable,In]),to=fu(Ce),ho=hn(function(){return Xo({announce:Xn,autoScroller:Hr,dimensionMarshal:Ar,focusMarshal:to,getResponders:Fn,styleMarshal:jn})},[Xn,Hr,Ar,to,Fn,jn]);Bt.current=ho;var Lo=fn(function(){var Wa=Dd(Bt),ol=Wa.getState();ol.phase!=="IDLE"&&Wa.dispatch(fa())},[]),bo=fn(function(){var Wa=Dd(Bt).getState();return Wa.isDragging||Wa.phase==="DROP_ANIMATING"},[]),Uo=hn(function(){return{isDragging:bo,tryAbort:Lo}},[bo,Lo]);ke(Uo);var va=fn(function(Wa){return Yo(Dd(Bt).getState(),Wa)},[]),Ka=fn(function(){return Eu(Dd(Bt).getState())},[]),pl=hn(function(){return{marshal:Ar,focus:to,contextId:Ce,canLift:va,isMovementAllowed:Ka,dragHandleUsageInstructionsId:Wn,registry:ki}},[Ce,Ar,Wn,to,va,Ka,ki]);return Wp({contextId:Ce,store:ho,registry:ki,customSensors:$e,enableDefaultSensors:xe.enableDefaultSensors!==!1}),(0,ge.useEffect)(function(){return Lo},[Lo]),ge.createElement(Cd.Provider,{value:pl},ge.createElement(ce,{context:Fu,store:ho},xe.children))}var uf=0;function ep(){uf=0}function Vf(){return hn(function(){return""+uf++},[])}function sh(){ep(),Ca()}function wg(xe){var Ce=Vf(),ke=xe.dragHandleUsageInstructions||Ji.dragHandleUsageInstructions;return ge.createElement(Pn,null,function($e){return ge.createElement(Kf,{nonce:xe.nonce,contextId:Ce,setCallbacks:$e,dragHandleUsageInstructions:ke,enableDefaultSensors:xe.enableDefaultSensors,sensors:xe.sensors,onBeforeCapture:xe.onBeforeCapture,onBeforeDragStart:xe.onBeforeDragStart,onDragStart:xe.onDragStart,onDragUpdate:xe.onDragUpdate,onDragEnd:xe.onDragEnd},xe.children)})}var lh=function(Ce){return function(ke){return Ce===ke}},tp=lh("scroll"),Uf=lh("auto"),np=lh("visible"),Ha=function(Ce,ke){return ke(Ce.overflowX)||ke(Ce.overflowY)},Ih=function(Ce,ke){return ke(Ce.overflowX)&&ke(Ce.overflowY)},Bd=function(Ce){var ke=window.getComputedStyle(Ce),$e={overflowX:ke.overflowX,overflowY:ke.overflowY};return Ha($e,tp)||Ha($e,Uf)},xl=function(){return!1;var Ce,ke,$e,vt},tu=function xe(Ce){return Ce==null?null:Ce===document.body?xl()?Ce:null:Ce===document.documentElement?null:Bd(Ce)?Ce:xe(Ce.parentElement)},Oh=function(xe){if(xe)var Ce=tu(xe.parentElement)},uh=function(xe){return{x:xe.scrollLeft,y:xe.scrollTop}},Cg=function xe(Ce){if(!Ce)return!1;var ke=window.getComputedStyle(Ce);return ke.position==="fixed"?!0:xe(Ce.parentElement)},bg=function(xe){var Ce=tu(xe),ke=Cg(xe);return{closestScrollable:Ce,isFixedOnPage:ke}},Eg=function(xe){var Ce=xe.descriptor,ke=xe.isEnabled,$e=xe.isCombineEnabled,vt=xe.isFixedOnPage,pt=xe.direction,Bt=xe.client,Vt=xe.page,Fn=xe.closest,Xn=function(){if(!Fn)return null;var ri=Fn.scrollSize,ki=Fn.client,Ar=Xr({scrollHeight:ri.scrollHeight,scrollWidth:ri.scrollWidth,height:ki.paddingBox.height,width:ki.paddingBox.width});return{pageMarginBox:Fn.page.marginBox,frameClient:ki,scrollSize:ri,shouldClipSubject:Fn.shouldClipSubject,scroll:{initial:Fn.scroll,current:Fn.scroll,max:Ar,diff:{value:Ki,displacement:Ki}}}}(),Wn=pt==="vertical"?pi:Tr,jn=no({page:Vt,withPlaceholder:null,axis:Wn,frame:Xn}),In={descriptor:Ce,isCombineEnabled:$e,isFixedOnPage:vt,axis:Wn,isEnabled:ke,client:Bt,page:Vt,frame:Xn,subject:jn};return In},Mg=function(Ce,ke){var $e=Ri(Ce);if(!ke||Ce!==ke)return $e;var vt=$e.paddingBox.top-ke.scrollTop,pt=$e.paddingBox.left-ke.scrollLeft,Bt=vt+ke.scrollHeight,Vt=pt+ke.scrollWidth,Fn={top:vt,right:Vt,bottom:Bt,left:pt},Xn=_i(Fn,$e.border),Wn=fr({borderBox:Xn,margin:$e.margin,border:$e.border,padding:$e.padding});return Wn},Lg=function(xe){var Ce=xe.ref,ke=xe.descriptor,$e=xe.env,vt=xe.windowScroll,pt=xe.direction,Bt=xe.isDropDisabled,Vt=xe.isCombineEnabled,Fn=xe.shouldClipSubject,Xn=$e.closestScrollable,Wn=Mg(Ce,Xn),jn=Le(Wn,vt),In=function(){if(!Xn)return null;var ki=Ri(Xn),Ar={scrollHeight:Xn.scrollHeight,scrollWidth:Xn.scrollWidth};return{client:ki,page:Le(ki,vt),scroll:uh(Xn),scrollSize:Ar,shouldClipSubject:Fn}}(),ri=Eg({descriptor:ke,isEnabled:!Bt,isCombineEnabled:Vt,isFixedOnPage:$e.isFixedOnPage,direction:pt,client:Wn,page:jn,closest:In});return ri},Td={passive:!1},cf={passive:!0},hd=function(xe){return xe.shouldPublishImmediately?Td:cf};function ts(xe){var Ce=(0,ge.useContext)(xe);return Ce||Ft(!1),Ce}var ch=function(Ce){return Ce&&Ce.env.closestScrollable||null};function Ng(xe){var Ce=(0,ge.useRef)(null),ke=ts(Cd),$e=Ts("droppable"),vt=ke.registry,pt=ke.marshal,Bt=Md(xe),Vt=hn(function(){return{id:xe.droppableId,type:xe.type,mode:xe.mode}},[xe.droppableId,xe.mode,xe.type]),Fn=(0,ge.useRef)(Vt),Xn=hn(function(){return On(function(bo,Uo){Ce.current||Ft(!1);var va={x:bo,y:Uo};pt.updateDroppableScroll(Vt.id,va)})},[Vt.id,pt]),Wn=fn(function(){var bo=Ce.current;return!bo||!bo.env.closestScrollable?Ki:uh(bo.env.closestScrollable)},[]),jn=fn(function(){var bo=Wn();Xn(bo.x,bo.y)},[Wn,Xn]),In=hn(function(){return It(jn)},[jn]),ri=fn(function(){var bo=Ce.current,Uo=ch(bo);bo&&Uo||Ft(!1);var va=bo.scrollOptions;if(va.shouldPublishImmediately){jn();return}In()},[In,jn]),ki=fn(function(bo,Uo){Ce.current&&Ft(!1);var va=Bt.current,Ka=va.getDroppableRef();Ka||Ft(!1);var pl=bg(Ka),Wa={ref:Ka,descriptor:Vt,env:pl,scrollOptions:Uo};Ce.current=Wa;var ol=Lg({ref:Ka,descriptor:Vt,env:pl,windowScroll:bo,direction:va.direction,isDropDisabled:va.isDropDisabled,isCombineEnabled:va.isCombineEnabled,shouldClipSubject:!va.ignoreContainerClipping}),nu=pl.closestScrollable;return nu&&(nu.setAttribute(Xa.contextId,ke.contextId),nu.addEventListener("scroll",ri,hd(Wa.scrollOptions))),ol},[ke.contextId,Vt,ri,Bt]),Ar=fn(function(){var bo=Ce.current,Uo=ch(bo);return bo&&Uo||Ft(!1),uh(Uo)},[]),Hr=fn(function(){var bo=Ce.current;bo||Ft(!1);var Uo=ch(bo);Ce.current=null,Uo&&(In.cancel(),Uo.removeAttribute(Xa.contextId),Uo.removeEventListener("scroll",ri,hd(bo.scrollOptions)))},[ri,In]),to=fn(function(bo){var Uo=Ce.current;Uo||Ft(!1);var va=ch(Uo);va||Ft(!1),va.scrollTop+=bo.y,va.scrollLeft+=bo.x},[]),ho=hn(function(){return{getDimensionAndWatchScroll:ki,getScrollWhileDragging:Ar,dragStopped:Hr,scroll:to}},[Hr,ki,Ar,to]),Lo=hn(function(){return{uniqueId:$e,descriptor:Vt,callbacks:ho}},[ho,Vt,$e]);Ds(function(){return Fn.current=Lo.descriptor,vt.droppable.register(Lo),function(){Ce.current&&Hr(),vt.droppable.unregister(Lo)}},[ho,Vt,Hr,Lo,pt,vt.droppable]),Ds(function(){Ce.current&&pt.updateDroppableIsEnabled(Fn.current.id,!xe.isDropDisabled)},[xe.isDropDisabled,pt]),Ds(function(){Ce.current&&pt.updateDroppableIsCombineEnabled(Fn.current.id,xe.isCombineEnabled)},[xe.isCombineEnabled,pt])}function kd(){}var dh={width:0,height:0,margin:Rn},df=function(Ce){var ke=Ce.isAnimatingOpenOnMount,$e=Ce.placeholder,vt=Ce.animate;return ke||vt==="close"?dh:{height:$e.client.borderBox.height,width:$e.client.borderBox.width,margin:$e.client.margin}},ip=function(Ce){var ke=Ce.isAnimatingOpenOnMount,$e=Ce.placeholder,vt=Ce.animate,pt=df({isAnimatingOpenOnMount:ke,placeholder:$e,animate:vt});return{display:$e.display,boxSizing:"border-box",width:pt.width,height:pt.height,marginTop:pt.margin.top,marginRight:pt.margin.right,marginBottom:pt.margin.bottom,marginLeft:pt.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:vt!=="none"?Il.placeholder:null}};function hl(xe){var Ce=(0,ge.useRef)(null),ke=fn(function(){Ce.current&&(clearTimeout(Ce.current),Ce.current=null)},[]),$e=xe.animate,vt=xe.onTransitionEnd,pt=xe.onClose,Bt=xe.contextId,Vt=(0,ge.useState)(xe.animate==="open"),Fn=Vt[0],Xn=Vt[1];(0,ge.useEffect)(function(){return Fn?$e!=="open"?(ke(),Xn(!1),kd):Ce.current?kd:(Ce.current=setTimeout(function(){Ce.current=null,Xn(!1)}),ke):kd},[$e,Fn,ke]);var Wn=fn(function(In){In.propertyName==="height"&&(vt(),$e==="close"&&pt())},[$e,pt,vt]),jn=ip({isAnimatingOpenOnMount:Fn,animate:xe.animate,placeholder:xe.placeholder});return ge.createElement(xe.placeholder.tagName,{style:jn,"data-rbd-placeholder-context-id":Bt,onTransitionEnd:Wn,ref:xe.innerRef})}var rp=ge.memo(hl),Id=ge.createContext(null);function Zc(xe){xe&&es(xe)||Ft(!1)}function hh(xe){return typeof xe=="boolean"}function ie(xe,Ce){Ce.forEach(function(ke){return ke(xe)})}var ae=[function(Ce){var ke=Ce.props;ke.droppableId||Ft(!1),typeof ke.droppableId!="string"&&Ft(!1)},function(Ce){var ke=Ce.props;hh(ke.isDropDisabled)||Ft(!1),hh(ke.isCombineEnabled)||Ft(!1),hh(ke.ignoreContainerClipping)||Ft(!1)},function(Ce){var ke=Ce.getDroppableRef;Zc(ke())}],he=[function(Ce){var ke=Ce.props,$e=Ce.getPlaceholderRef;if(ke.placeholder)var vt=$e()}],de=[function(Ce){var ke=Ce.props;ke.renderClone||Ft(!1)},function(Ce){var ke=Ce.getPlaceholderRef;ke()&&Ft(!1)}];function Se(xe){Gs(function(){ie(xe,ae),xe.props.mode==="standard"&&ie(xe,he),xe.props.mode==="virtual"&&ie(xe,de)})}var Ie=function(xe){Ve(Ce,xe);function Ce(){for(var $e,vt=arguments.length,pt=new Array(vt),Bt=0;Bt<vt;Bt++)pt[Bt]=arguments[Bt];return $e=xe.call.apply(xe,[this].concat(pt))||this,$e.state={isVisible:!!$e.props.on,data:$e.props.on,animate:$e.props.shouldAnimate&&$e.props.on?"open":"none"},$e.onClose=function(){$e.state.animate==="close"&&$e.setState({isVisible:!1})},$e}Ce.getDerivedStateFromProps=function(vt,pt){return vt.shouldAnimate?vt.on?{isVisible:!0,data:vt.on,animate:"open"}:pt.isVisible?{isVisible:!0,data:pt.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!vt.on,data:vt.on,animate:"none"}};var ke=Ce.prototype;return ke.render=function(){if(!this.state.isVisible)return null;var vt={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(vt)},Ce}(ge.PureComponent),Xe={dragging:5e3,dropAnimating:4500},ht=function(Ce,ke){return ke?Il.drop(ke.duration):Ce?Il.snap:Il.fluid},ut=function(Ce,ke){return Ce?ke?_u.opacity.drop:_u.opacity.combining:null},Zt=function(Ce){return Ce.forceShouldAnimate!=null?Ce.forceShouldAnimate:Ce.mode==="SNAP"};function zn(xe){var Ce=xe.dimension,ke=Ce.client,$e=xe.offset,vt=xe.combineWith,pt=xe.dropping,Bt=!!vt,Vt=Zt(xe),Fn=!!pt,Xn=Fn?Lu.drop($e,Bt):Lu.moveTo($e),Wn={position:"fixed",top:ke.marginBox.top,left:ke.marginBox.left,boxSizing:"border-box",width:ke.borderBox.width,height:ke.borderBox.height,transition:ht(Vt,pt),transform:Xn,opacity:ut(Bt,Fn),zIndex:Fn?Xe.dropAnimating:Xe.dragging,pointerEvents:"none"};return Wn}function Qt(xe){return{transform:Lu.moveTo(xe.offset),transition:xe.shouldAnimateDisplacement?null:"none"}}function ci(xe){return xe.type==="DRAGGING"?zn(xe):Qt(xe)}function ai(xe,Ce,ke){ke===void 0&&(ke=Ki);var $e=window.getComputedStyle(Ce),vt=Ce.getBoundingClientRect(),pt=Ei(vt,$e),Bt=Le(pt,ke),Vt={client:pt,tagName:Ce.tagName.toLowerCase(),display:$e.display},Fn={x:pt.marginBox.width,y:pt.marginBox.height},Xn={descriptor:xe,placeholder:Vt,displaceBy:Fn,client:pt,page:Bt};return Xn}function tr(xe){var Ce=Ts("draggable"),ke=xe.descriptor,$e=xe.registry,vt=xe.getDraggableRef,pt=xe.canDragInteractiveElements,Bt=xe.shouldRespectForcePress,Vt=xe.isEnabled,Fn=hn(function(){return{canDragInteractiveElements:pt,shouldRespectForcePress:Bt,isEnabled:Vt}},[pt,Vt,Bt]),Xn=fn(function(ri){var ki=vt();return ki||Ft(!1),ai(ke,ki,ri)},[ke,vt]),Wn=hn(function(){return{uniqueId:Ce,descriptor:ke,options:Fn,getDimension:Xn}},[ke,Xn,Fn,Ce]),jn=(0,ge.useRef)(Wn),In=(0,ge.useRef)(!0);Ds(function(){return $e.draggable.register(jn.current),function(){return $e.draggable.unregister(jn.current)}},[$e.draggable]),Ds(function(){if(In.current){In.current=!1;return}var ri=jn.current;jn.current=Wn,$e.draggable.update(Wn,ri)},[Wn,$e.draggable])}function lr(xe,Ce,ke){Gs(function(){function $e(pt){return"Draggable[id: "+pt+"]: "}var vt=xe.draggableId;vt||Ft(!1),typeof vt!="string"&&Ft(!1),mo(xe.index)||Ft(!1),xe.mapped.type!=="DRAGGING"&&(Zc(ke()),xe.isEnabled&&(Ya(Ce,vt)||Ft(!1)))})}function wr(xe){}function Vr(xe){xe.preventDefault()}function yo(xe){var Ce=(0,ge.useRef)(null),ke=fn(function(Wa){Ce.current=Wa},[]),$e=fn(function(){return Ce.current},[]),vt=ts(Cd),pt=vt.contextId,Bt=vt.dragHandleUsageInstructionsId,Vt=vt.registry,Fn=ts(Id),Xn=Fn.type,Wn=Fn.droppableId,jn=hn(function(){return{id:xe.draggableId,index:xe.index,type:Xn,droppableId:Wn}},[xe.draggableId,xe.index,Xn,Wn]),In=xe.children,ri=xe.draggableId,ki=xe.isEnabled,Ar=xe.shouldRespectForcePress,Hr=xe.canDragInteractiveElements,to=xe.isClone,ho=xe.mapped,Lo=xe.dropAnimationFinished;if(lr(xe,pt,$e),wr(to),!to){var bo=hn(function(){return{descriptor:jn,registry:Vt,getDraggableRef:$e,canDragInteractiveElements:Hr,shouldRespectForcePress:Ar,isEnabled:ki}},[jn,Vt,$e,Hr,Ar,ki]);tr(bo)}var Uo=hn(function(){return ki?{tabIndex:0,role:"button","aria-describedby":Bt,"data-rbd-drag-handle-draggable-id":ri,"data-rbd-drag-handle-context-id":pt,draggable:!1,onDragStart:Vr}:null},[pt,Bt,ri,ki]),va=fn(function(Wa){ho.type==="DRAGGING"&&ho.dropping&&Wa.propertyName==="transform"&&Lo()},[Lo,ho]),Ka=hn(function(){var Wa=ci(ho),ol=ho.type==="DRAGGING"&&ho.dropping?va:null,nu={innerRef:ke,draggableProps:{"data-rbd-draggable-context-id":pt,"data-rbd-draggable-id":ri,style:Wa,onTransitionEnd:ol},dragHandleProps:Uo};return nu},[pt,Uo,ri,ho,va,ke]),pl=hn(function(){return{draggableId:jn.id,type:jn.type,source:{index:jn.index,droppableId:jn.droppableId}}},[jn.droppableId,jn.id,jn.index,jn.type]);return In(Ka,ho.snapshot,pl)}var ao=function(xe,Ce){return xe===Ce},Eo=function(xe){var Ce=xe.combine,ke=xe.destination;return ke?ke.droppableId:Ce?Ce.droppableId:null},Qo=function(Ce){return Ce.combine?Ce.combine.draggableId:null},so=function(Ce){return Ce.at&&Ce.at.type==="COMBINE"?Ce.at.combine.draggableId:null};function ha(){var xe=On(function(vt,pt){return{x:vt,y:pt}}),Ce=On(function(vt,pt,Bt,Vt,Fn){return{isDragging:!0,isClone:pt,isDropAnimating:!!Fn,dropAnimation:Fn,mode:vt,draggingOver:Bt,combineWith:Vt,combineTargetFor:null}}),ke=On(function(vt,pt,Bt,Vt,Fn,Xn,Wn){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:Fn,combineWith:Xn,mode:pt,offset:vt,dimension:Bt,forceShouldAnimate:Wn,snapshot:Ce(pt,Vt,Fn,Xn,null)}}}),$e=function(pt,Bt){if(pt.isDragging){if(pt.critical.draggable.id!==Bt.draggableId)return null;var Vt=pt.current.client.offset,Fn=pt.dimensions.draggables[Bt.draggableId],Xn=Js(pt.impact),Wn=so(pt.impact),jn=pt.forceShouldAnimate;return ke(xe(Vt.x,Vt.y),pt.movementMode,Fn,Bt.isClone,Xn,Wn,jn)}if(pt.phase==="DROP_ANIMATING"){var In=pt.completed;if(In.result.draggableId!==Bt.draggableId)return null;var ri=Bt.isClone,ki=pt.dimensions.draggables[Bt.draggableId],Ar=In.result,Hr=Ar.mode,to=Eo(Ar),ho=Qo(Ar),Lo=pt.dropDuration,bo={duration:Lo,curve:Yd.drop,moveTo:pt.newHomeClientOffset,opacity:ho?_u.opacity.drop:null,scale:ho?_u.scale.drop:null};return{mapped:{type:"DRAGGING",offset:pt.newHomeClientOffset,dimension:ki,dropping:bo,draggingOver:to,combineWith:ho,mode:Hr,forceShouldAnimate:null,snapshot:Ce(Hr,ri,to,ho,bo)}}}return null};return $e}function ws(xe){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:xe,combineWith:null}}var Pl={mapped:{type:"SECONDARY",offset:Ki,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:ws(null)}};function ks(){var xe=On(function(Bt,Vt){return{x:Bt,y:Vt}}),Ce=On(ws),ke=On(function(Bt,Vt,Fn){return Vt===void 0&&(Vt=null),{mapped:{type:"SECONDARY",offset:Bt,combineTargetFor:Vt,shouldAnimateDisplacement:Fn,snapshot:Ce(Vt)}}}),$e=function(Vt){return Vt?ke(Ki,Vt,!0):null},vt=function(Vt,Fn,Xn,Wn){var jn=Xn.displaced.visible[Vt],In=!!(Wn.inVirtualList&&Wn.effected[Vt]),ri=vo(Xn),ki=ri&&ri.draggableId===Vt?Fn:null;if(!jn){if(!In)return $e(ki);if(Xn.displaced.invisible[Vt])return null;var Ar=Bi(Wn.displacedBy.point),Hr=xe(Ar.x,Ar.y);return ke(Hr,ki,!0)}if(In)return $e(ki);var to=Xn.displacedBy.point,ho=xe(to.x,to.y);return ke(ho,ki,jn.shouldAnimate)},pt=function(Vt,Fn){if(Vt.isDragging)return Vt.critical.draggable.id===Fn.draggableId?null:vt(Fn.draggableId,Vt.critical.draggable.id,Vt.impact,Vt.afterCritical);if(Vt.phase==="DROP_ANIMATING"){var Xn=Vt.completed;return Xn.result.draggableId===Fn.draggableId?null:vt(Fn.draggableId,Xn.result.draggableId,Xn.impact,Xn.afterCritical)}return null};return pt}var mu=function(){var Ce=ha(),ke=ks(),$e=function(pt,Bt){return Ce(pt,Bt)||ke(pt,Bt)||Pl};return $e},zl={dropAnimationFinished:Xd},fl=rt(mu,zl,null,{context:Fu,pure:!0,areStatePropsEqual:ao})(yo);function vu(xe){var Ce=ts(Id),ke=Ce.isUsingCloneFor;return ke===xe.draggableId&&!xe.isClone?null:ge.createElement(fl,xe)}function Nl(xe){var Ce=typeof xe.isDragDisabled=="boolean"?!xe.isDragDisabled:!0,ke=!!xe.disableInteractiveElementBlocking,$e=!!xe.shouldRespectForcePress;return ge.createElement(vu,(0,dt.Z)({},xe,{isClone:!1,isEnabled:Ce,canDragInteractiveElements:ke,shouldRespectForcePress:$e}))}function gl(xe){var Ce=(0,ge.useContext)(Cd);Ce||Ft(!1);var ke=Ce.contextId,$e=Ce.isMovementAllowed,vt=(0,ge.useRef)(null),pt=(0,ge.useRef)(null),Bt=xe.children,Vt=xe.droppableId,Fn=xe.type,Xn=xe.mode,Wn=xe.direction,jn=xe.ignoreContainerClipping,In=xe.isDropDisabled,ri=xe.isCombineEnabled,ki=xe.snapshot,Ar=xe.useClone,Hr=xe.updateViewportMaxScroll,to=xe.getContainerForClone,ho=fn(function(){return vt.current},[]),Lo=fn(function(yu){vt.current=yu},[]),bo=fn(function(){return pt.current},[]),Uo=fn(function(yu){pt.current=yu},[]);Se({props:xe,getDroppableRef:ho,getPlaceholderRef:bo});var va=fn(function(){$e()&&Hr({maxScroll:oo()})},[$e,Hr]);Ng({droppableId:Vt,type:Fn,mode:Xn,direction:Wn,isDropDisabled:In,isCombineEnabled:ri,ignoreContainerClipping:jn,getDroppableRef:ho});var Ka=ge.createElement(Ie,{on:xe.placeholder,shouldAnimate:xe.shouldAnimatePlaceholder},function(yu){var Wc=yu.onClose,Ju=yu.data,Wu=yu.animate;return ge.createElement(rp,{placeholder:Ju,onClose:Wc,innerRef:Uo,animate:Wu,contextId:ke,onTransitionEnd:va})}),pl=hn(function(){return{innerRef:Lo,placeholder:Ka,droppableProps:{"data-rbd-droppable-id":Vt,"data-rbd-droppable-context-id":ke}}},[ke,Vt,Ka,Lo]),Wa=Ar?Ar.dragging.draggableId:null,ol=hn(function(){return{droppableId:Vt,type:Fn,isUsingCloneFor:Wa}},[Vt,Wa,Fn]);function nu(){if(!Ar)return null;var yu=Ar.dragging,Wc=Ar.render,Ju=ge.createElement(vu,{draggableId:yu.draggableId,index:yu.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(Wu,Al){return Wc(Wu,Al,yu)});return un.createPortal(Ju,to())}return ge.createElement(Id.Provider,{value:ol},Bt(pl,ki),nu())}var Za=function(Ce,ke){return Ce===ke.droppable.type},Is=function(Ce,ke){return ke.draggables[Ce.draggable.id]},bl=function(){var Ce={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},ke=(0,dt.Z)({},Ce,{shouldAnimatePlaceholder:!1}),$e=On(function(Bt){return{draggableId:Bt.id,type:Bt.type,source:{index:Bt.index,droppableId:Bt.droppableId}}}),vt=On(function(Bt,Vt,Fn,Xn,Wn,jn){var In=Wn.descriptor.id,ri=Wn.descriptor.droppableId===Bt;if(ri){var ki=jn?{render:jn,dragging:$e(Wn.descriptor)}:null,Ar={isDraggingOver:Fn,draggingOverWith:Fn?In:null,draggingFromThisWith:In,isUsingPlaceholder:!0};return{placeholder:Wn.placeholder,shouldAnimatePlaceholder:!1,snapshot:Ar,useClone:ki}}if(!Vt)return ke;if(!Xn)return Ce;var Hr={isDraggingOver:Fn,draggingOverWith:In,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:Wn.placeholder,shouldAnimatePlaceholder:!0,snapshot:Hr,useClone:null}}),pt=function(Vt,Fn){var Xn=Fn.droppableId,Wn=Fn.type,jn=!Fn.isDropDisabled,In=Fn.renderClone;if(Vt.isDragging){var ri=Vt.critical;if(!Za(Wn,ri))return ke;var ki=Is(ri,Vt.dimensions),Ar=Js(Vt.impact)===Xn;return vt(Xn,jn,Ar,Ar,ki,In)}if(Vt.phase==="DROP_ANIMATING"){var Hr=Vt.completed;if(!Za(Wn,Hr.critical))return ke;var to=Is(Hr.critical,Vt.dimensions);return vt(Xn,jn,Eo(Hr.result)===Xn,Js(Hr.impact)===Xn,to,In)}if(Vt.phase==="IDLE"&&Vt.completed&&!Vt.shouldFlush){var ho=Vt.completed;if(!Za(Wn,ho.critical))return ke;var Lo=Js(ho.impact)===Xn,bo=!!(ho.impact.at&&ho.impact.at.type==="COMBINE"),Uo=ho.critical.droppable.id===Xn;return Lo?bo?Ce:ke:Uo?Ce:ke}return ke};return pt},Fl={updateViewportMaxScroll:Ps};function cc(){return document.body||Ft(!1),document.body}var Os={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:cc},Zu=rt(bl,Fl,null,{context:Fu,pure:!0,areStatePropsEqual:ao})(gl);Zu.defaultProps=Os},38486:function(Vn,Cn){"use strict";var pe;var ge=60103,Re=60106,Ve=60107,dt=60108,Ke=60114,st=60109,Me=60110,kt=60112,bt=60113,Ue=60120,lt=60115,yt=60116,jt=60121,Ae=60122,ne=60117,ee=60129,ce=60131;if(typeof Symbol=="function"&&Symbol.for){var se=Symbol.for;ge=se("react.element"),Re=se("react.portal"),Ve=se("react.fragment"),dt=se("react.strict_mode"),Ke=se("react.profiler"),st=se("react.provider"),Me=se("react.context"),kt=se("react.forward_ref"),bt=se("react.suspense"),Ue=se("react.suspense_list"),lt=se("react.memo"),yt=se("react.lazy"),jt=se("react.block"),Ae=se("react.server.block"),ne=se("react.fundamental"),ee=se("react.debug_trace_mode"),ce=se("react.legacy_hidden")}function fe(Et){if(typeof Et=="object"&&Et!==null){var tt=Et.$$typeof;switch(tt){case ge:switch(Et=Et.type,Et){case Ve:case Ke:case dt:case bt:case Ue:return Et;default:switch(Et=Et&&Et.$$typeof,Et){case Me:case kt:case yt:case lt:case st:return Et;default:return tt}}case Re:return tt}}}var ye=st,be=ge,Te=kt,Be=Ve,ze=yt,Ge=lt,nt=Re,Je=Ke,xt=dt,He=bt;pe=Me,pe=ye,pe=be,pe=Te,pe=Be,pe=ze,pe=Ge,pe=nt,pe=Je,pe=xt,pe=He,pe=function(){return!1},pe=function(){return!1},Cn.isContextConsumer=function(Et){return fe(Et)===Me},pe=function(Et){return fe(Et)===st},pe=function(Et){return typeof Et=="object"&&Et!==null&&Et.$$typeof===ge},pe=function(Et){return fe(Et)===kt},pe=function(Et){return fe(Et)===Ve},pe=function(Et){return fe(Et)===yt},pe=function(Et){return fe(Et)===lt},pe=function(Et){return fe(Et)===Re},pe=function(Et){return fe(Et)===Ke},pe=function(Et){return fe(Et)===dt},pe=function(Et){return fe(Et)===bt},pe=function(Et){return typeof Et=="string"||typeof Et=="function"||Et===Ve||Et===Ke||Et===ee||Et===dt||Et===bt||Et===Ue||Et===ce||typeof Et=="object"&&Et!==null&&(Et.$$typeof===yt||Et.$$typeof===lt||Et.$$typeof===st||Et.$$typeof===Me||Et.$$typeof===kt||Et.$$typeof===ne||Et.$$typeof===jt||Et[0]===Ae)},pe=fe},53410:function(Vn,Cn,pe){"use strict";Vn.exports=pe(38486)},32637:function(Vn,Cn,pe){"use strict";Vn.exports=pe.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(Vn){"use strict";Vn.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=="},73631:function(Vn){"use strict";Vn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAZxJREFUOBGtlL1Ow0AMgH2XUIkOLFXVASgTsDHxBIAEzAwMPBQjT8AATGVBgEBCYmHmFcICYmBogCbNYSe52HUTVZWwFJ3PP599Z+WMcy6Af5SwYkWnLYifTyBzq5XNK8YNwbbvYP381ZuaVlN1+HJwAc4d1QYaA+gDsHYANrhGHTdCMtSDMILtwSMDn7ZiANPKwyjeQ0Reo4r1gEoEwRkDb7spdPcBeocMk1Cv00oii5L+fgPwcR/zHfb3AJY2sEpUVLOUhB/l+w7I1iS9TYDFrM3AzhqGDstPZ3li2Z12U2WLvk4fGJh+F0elYN8ZrbWiA7igAP4WR6sFzDAKPgPHP0VnlMsFS5IyyIGoeAamCKybYI5UQLWVE2fgGI/s72wqQXRd9jyxiHgGJtihFxGQm8Qd5XvtF3fEQOrQH9mDm1Z9hyJuEphXIq9uSWSQqv8a4RbAUTFdcs7gifwplYGjT3wzbPFz6Q70EZv8WZoxMP66ApMc86inirNBA8njcFIuvOTXhowPyzuQJiukzi3hQgS7b+I9nJtQn/AHsLGsvlcPPWsAAAAASUVORK5CYII="},5623:function(Vn){"use strict";Vn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAedJREFUOBGtVDtLA0EQ/jY5z7dgEBVJLHyAitpYWQqKjVZa5BfEKpWlWPgrLG0UEdTexkILRUQiSBBBCAhGUINFHia53Dm7ufXcvfgIOHA3O69vvtnbPeY4ThD/KIF/xBJQhg/wbmkZtj0KMKbEGNIweg4xuPmq+DWDKSOfz2/AqaxpOVWzip8HC2xTsydfjoMHhMd2VMDjkSswTPqSucOhh3PmupaIediBOnL52UTLENC7QCV1bC9vkjkF3i4WVUDeORIF2sf5ymOk7mY1pr87hoHEhekHDLYQOfck8c6c6OeYfPHN3LyOxEB2KwQru0LrBvTPdaGRipj7ISUzqUWJ/moiRyc1tUXAQP42Tsa6sEIRCtwDRXqESDYS8RuG5iyRMEWFAat4CbvsAmgFmukmeYofJYeSAimab0L4DfQNHiF1laFAyMv840o2zN3Q1FMuIOIWStF9OtAxH4xkIC8NZyN9SnIOsNISkLRd3EWlFBP0lQJtDzVTyc8mBKB3U65nUnBYmDaFAr98BFGqvYKtwOMZHRsp1vsedVxV8bQRJXu5BbKWa6sAmK1lj2FiOoLcS5LYNX/N+3ktp+GapFJMeoDccdI9gEJ2nW5HhJjKuXmktih7yjJoC8VVwNpldXnr+KX8DfcD09mnwzz7SXEAAAAASUVORK5CYII="},96908:function(Vn){"use strict";Vn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQLMbTosyFzGc5pGoD/RyQ13ANnJBk9YdSm9YVg6+tB0NC2ZtqZ6dn/1P+rKirwqaRqrknVuSM9mZ8J0FD2CetmJ1MipO74WkPXn0VOg72CvY1ZRuJU9uRvQPW4ZLes0jdszlvG3+CoRWroDyERZPtH1Dk1HH56B5vHQWFvJzrUf42lrUaMlPJ4BMxOxtnQAmWhgJLL+3gPQR5+E1qsPDdXl5G9YjUdipIreGpzGFUOfpb4zVXQA2ZnW7op1paSiH30qWlIqdVWlFGz6Al1ipmqkXH0wnD0ym8bOUt0BZGdZuivXk9IH/ajJaK4Uasr3UJizUQX/Fb2WOZ7LtfniosefHEDG38bdo4bUvuijJqG5XFQU5VOSv22/3hr8NTObWzqjIQ4gO8PK3aWO3v3RR57gHR13blpHQ121FZTTM7N5Od5NcQAZbwt3N/mDjvDu8jQ11rHj6/XoskevqKxXMuOPfZHyeDbJAWQ8rdsdZct2zYjj0VJS2bu7gLLiXdZRMiszmx/Hs1kOIONp3e4qO60/+rBx6O5WdmzeRHOTz8lO0pg2fhkr4tU0B5Dxsmx3lytTd99B1FZVUZC31dqanMzxTNDmsz9gGcumOoCMpTV7kixXEvrwCV4HZ1vuZlqamqytu2VCNn+NR3MdQMbDqj1Epj5wBFqfgVSU7qWkWB3CENKgEhibme39jCklBpCysf/H3aohrY1w64CYNqrLCJOziRJg1hN+qqtjJklJQx88xrudmJuzBY+cVveBcmlmNr/qmODQpRIHyPuKlVYtjXBL/1i3K7HyDh4Gp94IU2+Ee0+A+pgPJJ3WPn3QEWgpvSkpKaaiosJabxsuJk7IYksslXEAGUtrmrIW5sHAkerb7UO6NSBJ6wcDhnvXkFu354HlDK8GKzOzOS+WJnQAGUtrmrIW5atXCHoCIDXwDDwSlyuJvIICGhran7OIdRjIAaQDyIgW0PsNRkvtR2l5OaXlAcuPmIaBuh4gp1wP/QYrI338ODRUBRpM0+Cc36p0OVT6nwd9PIcdAydcqr7nroL8NXDi5TBmKoyepPgL16n0dS+3dzgGjoaTjY0If7n+Wow+GdK/p1Jr9sC+Ihg1SX0X3Xob6+K3F0FLg0r/egUUbWovSRy8SdNh5PEw4jho2Ae71sOuDbDhVaWvP1nbWLIZvvo3TLwQvjtDvdQlaf+eB2Uxeuu1V2/oP4yGhnryCn3etqmWS+PmjGUsiYhsGwxdD5C/WwsjJirV7xkX3KjyPvZSY+poqoXbBvqaetzF8HPjDMAbc2HIWDjlp8FNsfldePIaH+iTU2FxIRxkyHvgu5D3afCyM5dDprF8emuBN4jM6TPDm/zZG+HTf/l4xpwG1z/nXaMFpYIv4fHpUGVEJEwmaxu/eBFyP4Br/t5exMPnwZb3bUDADouGPmiU9+3FnLxC3BZvW0rHMgzUswEpI5O8Q9LaDAVroHgzDE2H0SdB6kGqJyryYdFJ0GicbLnsfjjLOGn1yT/ghRmBPSajmgBXLg+Qwwd3j4WzboXTDV4J95jkPZxghH2e+xl89ozKEVDdlKVu8RAq/lqNikm91Eg++GiVXlsGD52tRr1ggCz+BgaPAXk/20oxBSTo/YagJfdiV8lequuMEd9SnwYxCQP1bECKwerK4ZELQUYbk2RbbNZbMOQYlbJyMSy/Wz3LdDjvG/XcWAN3Hg6t7XYp4IxZ8CNjmSCj7NJp7cEQyamRH8m8zT7H54WZ8MkTPhlyO4ZM+xcvUGkb3oDHLw8OSDP1m3fgw0ehtlSBWUb2ysL2eh3It7T+iMddVV1LUVnQMFZMwkA9H5CPXQqb3gzsChlVBBSyHm2uh7ljFHiFbn4Pjj1DPT/1U5Bp0Uq/XQ1HnKxSnrgC1r8aHSAvnAfn3aXKfPYsPHN9cKiYywIJrC+a5Ft/WqfsSDIOBITWsnJjRr/DaG1pIbewJKjUWISBejYgZTqeOzZ0l9zyPhxzusp/7BLY9JZ6FifjhhfUc85/YckPfDKsI6iMRnNGq3t+rBRphJyzBuQgrNBD34etHwTXcfLVcN3TKu/d++H136lnKyDlx3TXkcGdv1iB0ZTT7zDv0/aiMppaWoNKP9AwUM8G5Fdvwt8MjzuY+ab/Bc40dr+yfw2rDEdRRgMBlXSArAFl9KwyzgVaR7f3HoDX5gRKjgTIh6rV2lZow+uBSwJTojhX489R32QUltHYH5A7P4P7T4s19ILLk2k7JY3SqhpK99WFqvOAwkA9G5Af/R1emhW6s865HS5ZpPJXLYXsW328Fy+EH9yhvi+/B1YafH/YCoceqdLnZUBpu6NZKj0cICVgLvnRkoSCFk8OBOSXy+DJq6OV1jH+5F6Q1p/G5mZ2lAQJxxlSDyQMFHtATpgGR56iVNvyHmz7KLDxstcrXqpQUx3cdoiPJ5ZhnzUvwNPXhjb+tLth2lyV/86f4I3f+3jF8Zmfq+6SLNsB96TDUVPgNx8qHmnXg2cFlx0OkDIyPrhPrV2FJNbqe8MvtK4S3go2Zcv6Vta5nUGicp9B3vuBcooraXMHfxHxQMJAsQfkRQvg3DuVeazeq9Vgo06EOz9XKXu3wvwMX651fbXgeCgxPF5reQlgLzSCvuHikOJpSiwxFF3zBEy5TuU+exN8aqzXTP5fvgkZxvrxz2fC5CvhtJ+p3KevgzXPRw9IKWHd6w41yoYDmH8csrMAKTql9vWGqoqr6qisaw6pZUfDQLEH5Hd+Atc+qRRdmw3/vCpQaStPzn9gybk+nl+8BhMvUN+XXgCb3wksf+1T8J1rVHo4QMoux7xxwcMfElwXUJt7zg+cDnmr29clux+/MDxoGW0zzlVBc9lNmTMy9Nov0hpy1goY/31Vl3/Ix6rB8ZfACT9UKRJe+vw59ZxIQMq0nZJGbUMzBRVhL7XoUBgo9oCUoPMdxu6GBKQXTIByy4VaKWnwm4/VVpnQf5fAy7/2dcP0B+FMY90XbMo9fCLM+UJNpZEAKflfZqndGH8SZ0acGiEJSC82wjhWPokH3pvnA62ZJ/G+rJsDZZop1nWmePni7VvpuIvg56+oFNlynJ8JzX5OgswCd63zbUH+5Xuw/ePEA1KWGvIOt9vNlr21eDyhz3p2JAwUe0CKyWavhHRjfVVXoUAni38x8ik/geHGFC33yMgIZu2wcWfDr972dZ/slnz+PNTuhaNPhUvuVd6vSeFGSPGQBbjrXoH3/gxl22BIOpz0I593LXIevQi+ttRpBc/5c+ECI2hupt8rMcGvQgPSGk6SsFHO+2rPXLxyk2a8DrLeFirdrtaHEryXy0ZlmTD5Kt9uzTcrVXDfpESOkKKD7G3rOruqmqhuCv9qjcvF+RlZhDBuoAnjA0iJ1ckoaR4wCNV1794HrxsBYivPze/CsWcGLyUgWz5XAVMoHCAFiEInXhZcloBkxQKQvehQJFP6wh2+Lb78L+C+KaH5JUeWE7Ks8KdZaeqqZaFDRsCMN3z79qEk7t4IMjo21XQdQLpSvP8QoKaxlcJ9odeRorCmsSVjHBPtvhQWH0CKJtKRVz3mO4BgNXhFgQrHyC8/GMmhUNlTPvWG9rnVJarcphX2DleIByrOxxVL1Mhsxv5EqkyVWbNh4/Lw4JLc2e/4TvbI3raM2pFo6k1wxkwYPNa3z2wFpJSXeOf5v1d751bdJE/WqfJDkeWBf+A90SOkTNtJvdA9bWwpa8ET4RWNaMJA8QOk2WF9DlEHGmS6FhDszVX7rXao76EwdJy6yF2OjJXLieUIFKqzpPMlHCWjdsFadWTMDglQFhVAnwFqi/HOEYHrPTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},57177:function(Vn){"use strict";Vn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(Vn){"use strict";Vn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(Vn,Cn,pe){"use strict";pe.d(Cn,{Z:function(){return kt}});const ge=bt=>typeof bt=="object"&&bt!=null&&bt.nodeType===1,Re=(bt,Ue)=>(!Ue||bt!=="hidden")&&bt!=="visible"&&bt!=="clip",Ve=(bt,Ue)=>{if(bt.clientHeight<bt.scrollHeight||bt.clientWidth<bt.scrollWidth){const lt=getComputedStyle(bt,null);return Re(lt.overflowY,Ue)||Re(lt.overflowX,Ue)||(yt=>{const jt=(Ae=>{if(!Ae.ownerDocument||!Ae.ownerDocument.defaultView)return null;try{return Ae.ownerDocument.defaultView.frameElement}catch(ne){return null}})(yt);return!!jt&&(jt.clientHeight<yt.scrollHeight||jt.clientWidth<yt.scrollWidth)})(bt)}return!1},dt=(bt,Ue,lt,yt,jt,Ae,ne,ee)=>Ae<bt&&ne>Ue||Ae>bt&&ne<Ue?0:Ae<=bt&&ee<=lt||ne>=Ue&&ee>=lt?Ae-bt-yt:ne>Ue&&ee<lt||Ae<bt&&ee>lt?ne-Ue+jt:0,Ke=bt=>{const Ue=bt.parentElement;return Ue==null?bt.getRootNode().host||null:Ue},st=(bt,Ue)=>{var lt,yt,jt,Ae;if(typeof document=="undefined")return[];const{scrollMode:ne,block:ee,inline:ce,boundary:se,skipOverflowHiddenElements:fe}=Ue,ye=typeof se=="function"?se:Bn=>Bn!==se;if(!ge(bt))throw new TypeError("Invalid target");const be=document.scrollingElement||document.documentElement,Te=[];let Be=bt;for(;ge(Be)&&ye(Be);){if(Be=Ke(Be),Be===be){Te.push(Be);break}Be!=null&&Be===document.body&&Ve(Be)&&!Ve(document.documentElement)||Be!=null&&Ve(Be,fe)&&Te.push(Be)}const ze=(yt=(lt=window.visualViewport)==null?void 0:lt.width)!=null?yt:innerWidth,Ge=(Ae=(jt=window.visualViewport)==null?void 0:jt.height)!=null?Ae:innerHeight,{scrollX:nt,scrollY:Je}=window,{height:xt,width:He,top:Et,right:tt,bottom:Ot,left:gt}=bt.getBoundingClientRect(),{top:Ht,right:Xt,bottom:Ut,left:it}=(Bn=>{const $t=window.getComputedStyle(Bn);return{top:parseFloat($t.scrollMarginTop)||0,right:parseFloat($t.scrollMarginRight)||0,bottom:parseFloat($t.scrollMarginBottom)||0,left:parseFloat($t.scrollMarginLeft)||0}})(bt);let _e=ee==="start"||ee==="nearest"?Et-Ht:ee==="end"?Ot+Ut:Et+xt/2-Ht+Ut,Wt=ce==="center"?gt+He/2-it+Xt:ce==="end"?tt+Xt:gt-it;const Dn=[];for(let Bn=0;Bn<Te.length;Bn++){const $t=Te[Bn],{height:ln,width:Tn,top:ei,right:Ln,bottom:Yn,left:zt}=$t.getBoundingClientRect();if(ne==="if-needed"&&Et>=0&>>=0&&Ot<=Ge&&tt<=ze&&($t===be&&!Ve($t)||Et>=ei&&Ot<=Yn&>>=zt&&tt<=Ln))return Dn;const wn=getComputedStyle($t),$n=parseInt(wn.borderLeftWidth,10),Yt=parseInt(wn.borderTopWidth,10),tn=parseInt(wn.borderRightWidth,10),Gt=parseInt(wn.borderBottomWidth,10);let Tt=0,ot=0;const Ze="offsetWidth"in $t?$t.offsetWidth-$t.clientWidth-$n-tn:0,At="offsetHeight"in $t?$t.offsetHeight-$t.clientHeight-Yt-Gt:0,Dt="offsetWidth"in $t?$t.offsetWidth===0?0:Tn/$t.offsetWidth:0,rt="offsetHeight"in $t?$t.offsetHeight===0?0:ln/$t.offsetHeight:0;if(be===$t)Tt=ee==="start"?_e:ee==="end"?_e-Ge:ee==="nearest"?dt(Je,Je+Ge,Ge,Yt,Gt,Je+_e,Je+_e+xt,xt):_e-Ge/2,ot=ce==="start"?Wt:ce==="center"?Wt-ze/2:ce==="end"?Wt-ze:dt(nt,nt+ze,ze,$n,tn,nt+Wt,nt+Wt+He,He),Tt=Math.max(0,Tt+Je),ot=Math.max(0,ot+nt);else{Tt=ee==="start"?_e-ei-Yt:ee==="end"?_e-Yn+Gt+At:ee==="nearest"?dt(ei,Yn,ln,Yt,Gt+At,_e,_e+xt,xt):_e-(ei+ln/2)+At/2,ot=ce==="start"?Wt-zt-$n:ce==="center"?Wt-(zt+Tn/2)+Ze/2:ce==="end"?Wt-Ln+tn+Ze:dt(zt,Ln,Tn,$n,tn+Ze,Wt,Wt+He,He);const{scrollLeft:et,scrollTop:Oe}=$t;Tt=rt===0?0:Math.max(0,Math.min(Oe+Tt/rt,$t.scrollHeight-ln/rt+At)),ot=Dt===0?0:Math.max(0,Math.min(et+ot/Dt,$t.scrollWidth-Tn/Dt+Ze)),_e+=Oe-Tt,Wt+=et-ot}Dn.push({el:$t,top:Tt,left:ot})}return Dn},Me=bt=>bt===!1?{block:"end",inline:"nearest"}:(Ue=>Ue===Object(Ue)&&Object.keys(Ue).length!==0)(bt)?bt:{block:"start",inline:"nearest"};function kt(bt,Ue){if(!bt.isConnected||!(jt=>{let Ae=jt;for(;Ae&&Ae.parentNode;){if(Ae.parentNode===document)return!0;Ae=Ae.parentNode instanceof ShadowRoot?Ae.parentNode.host:Ae.parentNode}return!1})(bt))return;const lt=(jt=>{const Ae=window.getComputedStyle(jt);return{top:parseFloat(Ae.scrollMarginTop)||0,right:parseFloat(Ae.scrollMarginRight)||0,bottom:parseFloat(Ae.scrollMarginBottom)||0,left:parseFloat(Ae.scrollMarginLeft)||0}})(bt);if((jt=>typeof jt=="object"&&typeof jt.behavior=="function")(Ue))return Ue.behavior(st(bt,Ue));const yt=typeof Ue=="boolean"||Ue==null?void 0:Ue.behavior;for(const{el:jt,top:Ae,left:ne}of st(bt,Me(Ue))){const ee=Ae-lt.top+lt.bottom,ce=ne-lt.left+lt.right;jt.scroll({top:ee,left:ce,behavior:yt})}}}}]);
|